pub struct Store<T>where
T: SimObject,{ /* private fields */ }Expand description
A component that can support a configurable number of objects.
Objects must support the [SimObject] trait.
Implementations§
Source§impl<T> Store<T>where
T: SimObject,
impl<T> Store<T>where
T: SimObject,
Sourcepub fn new_and_register_with_renames(
engine: &Engine,
clock: &Clock,
parent: &Rc<Entity>,
name: &str,
aka: Option<&Aka>,
capacity: usize,
) -> Result<Rc<Self>, SimError>
pub fn new_and_register_with_renames( engine: &Engine, clock: &Clock, parent: &Rc<Entity>, name: &str, aka: Option<&Aka>, capacity: usize, ) -> Result<Rc<Self>, SimError>
Basic store constructor
Returns a SimError if capacity is 0.
Sourcepub fn new_and_register(
engine: &Engine,
clock: &Clock,
parent: &Rc<Entity>,
name: &str,
capacity: usize,
) -> Result<Rc<Self>, SimError>
pub fn new_and_register( engine: &Engine, clock: &Clock, parent: &Rc<Entity>, name: &str, capacity: usize, ) -> Result<Rc<Self>, SimError>
Basic store constructor
Returns a SimError if capacity is 0.
pub fn connect_port_tx(&self, port_state: PortStateResult<T>) -> SimResult
pub fn port_rx(&self) -> PortStateResult<T>
pub fn fill_level(&self) -> usize
pub fn set_error_on_overflow(&self)
pub fn get_level_change_event(&self) -> Repeated<usize>
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for Store<T>
impl<T> !RefUnwindSafe for Store<T>
impl<T> !Send for Store<T>
impl<T> !Sync for Store<T>
impl<T> Unpin for Store<T>
impl<T> !UnwindSafe for Store<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