pub struct Queue<T>where
T: SimObject,{ /* private fields */ }Expand description
A generic queue component with rx and tx ports.
Implementations§
Source§impl<T> Queue<T>where
T: SimObject,
impl<T> Queue<T>where
T: SimObject,
Sourcepub fn new_and_register_with_renames(
engine: &Engine,
clock: &Clock,
parent: &Rc<Entity>,
name: &str,
aka: Option<&Aka>,
capacity: Option<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: Option<usize>, ) -> Result<Rc<Self>, SimError>
Create and register a new queue component.
Returns a [SimError] if capacity is Some(0).
Sourcepub fn new_and_register(
engine: &Engine,
clock: &Clock,
parent: &Rc<Entity>,
name: &str,
capacity: Option<usize>,
) -> Result<Rc<Self>, SimError>
pub fn new_and_register( engine: &Engine, clock: &Clock, parent: &Rc<Entity>, name: &str, capacity: Option<usize>, ) -> Result<Rc<Self>, SimError>
Create and register a new queue component.
Returns a [SimError] if capacity is Some(0).
pub fn connect_port_tx(&self, port_state: PortStateResult<T>) -> SimResult
pub fn port_rx(&self) -> PortStateResult<T>
Sourcepub fn changed_event(&self) -> Repeated<()>
pub fn changed_event(&self) -> Repeated<()>
Return an event that fires whenever the queue contents change.
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for Queue<T>
impl<T> !RefUnwindSafe for Queue<T>
impl<T> !Send for Queue<T>
impl<T> !Sync for Queue<T>
impl<T> Unpin for Queue<T>
impl<T> !UnwindSafe for Queue<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