pub struct Permit { /* private fields */ }Expand description
Permit promises to Select that read or write will not block current execution.
Implementations§
Source§impl Permit
impl Permit
Sourcepub const fn with_primitive(primitive: usize) -> Self
pub const fn with_primitive(primitive: usize) -> Self
Constructs a permit with primitive value.
Sourcepub fn into_primitive(self) -> usize
pub fn into_primitive(self) -> usize
Turns this permit to primitive value.
Sourcepub fn with_compound(primitive: usize, attendant: usize) -> Self
pub fn with_compound(primitive: usize, attendant: usize) -> Self
Constructs a permit with compound values.
Sourcepub fn into_compound(self) -> (usize, usize)
pub fn into_compound(self) -> (usize, usize)
Turns this permit to compound values.
Trait Implementations§
impl Eq for Permit
impl StructuralPartialEq for Permit
Auto Trait Implementations§
impl Freeze for Permit
impl RefUnwindSafe for Permit
impl Send for Permit
impl Sync for Permit
impl Unpin for Permit
impl UnwindSafe for Permit
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