pub struct ProcessSlot { /* private fields */ }
Expand description
Represents a slot for a process in a ProcessArray
.
A slot can be empty (None
), or hold a reference to a
Process
.
The ProcessSlot
type is useful for allowing slices of processes without
knowing the fixed number of processes, or being templated on NUM_PROCS
.
That is, interfaces can use [ProcessSlot]
to just use an array of process
slots.
Implementations§
Source§impl ProcessSlot
impl ProcessSlot
Sourcepub fn get(&self) -> Option<&'static dyn Process>
pub fn get(&self) -> Option<&'static dyn Process>
Return the underlying process::Process
if the slot contains a
process.
Sourcepub fn contains_process_with_id(&self, identifier: usize) -> bool
pub fn contains_process_with_id(&self, identifier: usize) -> bool
Check if the slot contains a process with a matching process ID.
Trait Implementations§
Source§impl Clone for ProcessSlot
impl Clone for ProcessSlot
Source§fn clone(&self) -> ProcessSlot
fn clone(&self) -> ProcessSlot
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl !Freeze for ProcessSlot
impl !RefUnwindSafe for ProcessSlot
impl !Send for ProcessSlot
impl !Sync for ProcessSlot
impl Unpin for ProcessSlot
impl !UnwindSafe for ProcessSlot
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