pub struct Cache<T>where
T: SimObject + AccessMemory,{ /* private fields */ }Implementations§
Source§impl<T> Cache<T>where
T: SimObject + AccessMemory,
impl<T> Cache<T>where
T: SimObject + AccessMemory,
Sourcepub fn new_and_register_with_renames(
engine: &Engine,
clock: &Clock,
parent: &Rc<Entity>,
name: &str,
aka: Option<&Aka>,
config: CacheConfig,
) -> Result<Rc<Self>, SimError>
pub fn new_and_register_with_renames( engine: &Engine, clock: &Clock, parent: &Rc<Entity>, name: &str, aka: Option<&Aka>, config: CacheConfig, ) -> Result<Rc<Self>, SimError>
Create an instance of the cache and register it with the Engine.
Sourcepub fn new_and_register(
engine: &Engine,
clock: &Clock,
parent: &Rc<Entity>,
name: &str,
config: CacheConfig,
) -> Result<Rc<Self>, SimError>
pub fn new_and_register( engine: &Engine, clock: &Clock, parent: &Rc<Entity>, name: &str, config: CacheConfig, ) -> Result<Rc<Self>, SimError>
Create an instance of the cache and register it with the Engine.
pub fn connect_port_dev_tx(&self, port_state: PortStateResult<T>) -> SimResult
pub fn connect_port_mem_tx(&self, port_state: PortStateResult<T>) -> SimResult
pub fn port_dev_rx(&self) -> PortStateResult<T>
pub fn port_mem_rx(&self) -> PortStateResult<T>
pub fn payload_bytes_read(&self) -> usize
pub fn payload_bytes_written(&self) -> usize
pub fn num_hits(&self) -> usize
pub fn num_misses(&self) -> usize
pub fn dump_stats(&self, time_now_ns: f64)
Trait Implementations§
Source§impl<T> Display for Cache<T>where
T: SimObject + AccessMemory,
impl<T> Display for Cache<T>where
T: SimObject + AccessMemory,
Source§impl<T> GetEntity for Cache<T>where
T: SimObject + AccessMemory,
impl<T> GetEntity for Cache<T>where
T: SimObject + AccessMemory,
Source§impl<T> Runnable for Cache<T>where
T: SimObject + AccessMemory,
impl<T> Runnable for Cache<T>where
T: SimObject + AccessMemory,
Auto Trait Implementations§
impl<T> !Freeze for Cache<T>
impl<T> !RefUnwindSafe for Cache<T>
impl<T> !Send for Cache<T>
impl<T> !Sync for Cache<T>
impl<T> !UnwindSafe for Cache<T>
impl<T> Unpin for Cache<T>
impl<T> UnsafeUnpin for Cache<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more