pub trait AccessMemorywhere
Self: Routable + TotalBytes,{
// Required methods
fn dst_addr(&self) -> u64;
fn src_addr(&self) -> u64;
fn dst_device(&self) -> DeviceId;
fn src_device(&self) -> DeviceId;
fn access_size_bytes(&self) -> usize;
fn to_response(&self, mem: &impl ReadMemory) -> Result<Self, SimError>
where Self: Sized;
fn cache_hint(&self) -> CacheHintType;
}Expand description
Trait implemented by all types that memory components support
Required Methods§
Sourcefn dst_device(&self) -> DeviceId
fn dst_device(&self) -> DeviceId
Return the destination device of this access
Sourcefn src_device(&self) -> DeviceId
fn src_device(&self) -> DeviceId
Return the source device of this access
Sourcefn access_size_bytes(&self) -> usize
fn access_size_bytes(&self) -> usize
Return the size of the access in bytes
Sourcefn to_response(&self, mem: &impl ReadMemory) -> Result<Self, SimError>where
Self: Sized,
fn to_response(&self, mem: &impl ReadMemory) -> Result<Self, SimError>where
Self: Sized,
Returns the appropriate response for a request
Sourcefn cache_hint(&self) -> CacheHintType
fn cache_hint(&self) -> CacheHintType
Returns the requested caching behaviour of a request
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".