pub struct Queue<T>where
T: SimObject,{ /* private fields */ }Expand description
A generic queue for simulation objects.
Implementations§
Source§impl<T> Queue<T>where
T: SimObject,
impl<T> Queue<T>where
T: SimObject,
Sourcepub fn new(
parent: &Rc<Entity>,
name: &str,
capacity: Option<usize>,
) -> Result<Self, SimError>
pub fn new( parent: &Rc<Entity>, name: &str, capacity: Option<usize>, ) -> Result<Self, SimError>
Create a new queue.
Returns a [SimError] if capacity is Some(0).
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>where
T: Unpin,
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