pub struct Progress<T, P> { /* private fields */ }Expand description
A wrapper that allows containers to be sent by validating capabilities.
Implementations§
Source§impl<T: Timestamp, P> Progress<T, P>
impl<T: Timestamp, P> Progress<T, P>
Sourcepub fn give<C: Container, CT: CapabilityTrait<T>>(
&mut self,
capability: &CT,
container: &mut C,
)
pub fn give<C: Container, CT: CapabilityTrait<T>>( &mut self, capability: &CT, container: &mut C, )
Ships a container using a provided capability.
On return, the container may hold undefined contents and should be cleared before it is reused.
Sourcepub fn activate<'a, C>(&'a mut self) -> ProgressSession<'a, T, C, P>
pub fn activate<'a, C>(&'a mut self) -> ProgressSession<'a, T, C, P>
Activates a Progress into a ProgressSession which will flush when dropped.
Sourcepub fn valid<CT: CapabilityTrait<T>>(&self, capability: &CT) -> bool
pub fn valid<CT: CapabilityTrait<T>>(&self, capability: &CT) -> bool
Determines if the capability is valid for this output.
Trait Implementations§
Auto Trait Implementations§
impl<T, P> Freeze for Progress<T, P>where
P: Freeze,
impl<T, P> !RefUnwindSafe for Progress<T, P>
impl<T, P> !Send for Progress<T, P>
impl<T, P> !Sync for Progress<T, P>
impl<T, P> Unpin for Progress<T, P>where
P: Unpin,
impl<T, P> !UnwindSafe for Progress<T, P>
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> 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