pub struct ThreadSet(/* private fields */);Expand description
A bit-set of threads an account is scheduled or can be scheduled for.
Implementations§
Source§impl ThreadSet
impl ThreadSet
pub const fn none() -> Self
pub const fn any(num_threads: usize) -> Self
pub const fn only(thread_id: ThreadId) -> Self
pub fn num_threads(&self) -> u32
pub fn only_one_contained(&self) -> Option<ThreadId>
pub fn is_empty(&self) -> bool
pub fn contains(&self, thread_id: ThreadId) -> bool
pub fn insert(&mut self, thread_id: ThreadId)
pub fn remove(&mut self, thread_id: ThreadId)
pub fn contained_threads_iter(self) -> impl Iterator<Item = ThreadId>
Trait Implementations§
Source§impl BitAndAssign for ThreadSet
impl BitAndAssign for ThreadSet
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
Performs the
&= operation. Read moreimpl Copy for ThreadSet
impl Eq for ThreadSet
impl StructuralPartialEq for ThreadSet
Auto Trait Implementations§
impl Freeze for ThreadSet
impl RefUnwindSafe for ThreadSet
impl Send for ThreadSet
impl Sync for ThreadSet
impl Unpin for ThreadSet
impl UnsafeUnpin for ThreadSet
impl UnwindSafe for ThreadSet
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more