pub struct Family<S> { /* private fields */ }
Expand description
Instances of this type contains array of Queue
s.
All contained queues has identical capabilities.
Implementations§
Source§impl<S> Family<S>
impl<S> Family<S>
Sourcepub fn new(id: QueueFamilyId) -> Self
pub fn new(id: QueueFamilyId) -> Self
Create new empty Family
Sourcepub fn id(&self) -> QueueFamilyId
pub fn id(&self) -> QueueFamilyId
Get id of the family.
Sourcepub fn queue(&self, qid: QueueId) -> Option<&Queue<S>>
pub fn queue(&self, qid: QueueId) -> Option<&Queue<S>>
Get reference to Queue
instance by the id.
§Panic
This function will panic if requested queue isn’t part of this family.
Sourcepub fn queue_mut(&mut self, qid: QueueId) -> Option<&mut Queue<S>>
pub fn queue_mut(&mut self, qid: QueueId) -> Option<&mut Queue<S>>
Get mutable reference to Queue
instance by the id.
§Panic
This function will panic if requested queue isn’t part of this family.
Sourcepub fn ensure_queue(&mut self, qid: QueueId) -> &mut Queue<S>
pub fn ensure_queue(&mut self, qid: QueueId) -> &mut Queue<S>
Get mutable reference to Queue
instance by the id.
This function will grow queues array if index is out of bounds.
§Panic
This function will panic if requested queue isn’t part of this family.
Sourcepub fn submission(&self, sid: SubmissionId) -> Option<&Submission<S>>
pub fn submission(&self, sid: SubmissionId) -> Option<&Submission<S>>
Get reference to Submission<S>
instance by id.
§Panic
This function will panic if requested submission isn’t part of this family.
Sourcepub fn submission_mut(
&mut self,
sid: SubmissionId,
) -> Option<&mut Submission<S>>
pub fn submission_mut( &mut self, sid: SubmissionId, ) -> Option<&mut Submission<S>>
Get mutable reference to Submission<S>
instance by id.
§Panic
This function will panic if requested submission isn’t part of this family.
Sourcepub fn queue_count(&self) -> usize
pub fn queue_count(&self) -> usize
The number of queues in this schedule.
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for Family<S>
impl<S> RefUnwindSafe for Family<S>where
S: RefUnwindSafe,
impl<S> Send for Family<S>where
S: Send,
impl<S> Sync for Family<S>where
S: Sync,
impl<S> Unpin for Family<S>where
S: Unpin,
impl<S> UnwindSafe for Family<S>where
S: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)