Trait TryComplete
pub trait TryComplete<C>: Work {
type Output;
// Required method
fn try_complete(self, context: C) -> Result<Self::Output, Self>;
}Expand description
A synchronous state change that returns the work if it is rejected.
Required Associated Types§
type Output
Required Methods§
fn try_complete(self, context: C) -> Result<Self::Output, Self>
fn try_complete(self, context: C) -> Result<Self::Output, Self>
Applies the state change and returns its output.
§Errors
Returns Err(Self) if the state change is rejected before accepting the work.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.