Skip to main content

StepSuccess

Struct StepSuccess 

Source
pub struct StepSuccess<T, S: EngineSpec> {
    pub output: T,
    pub message: Option<Cow<'static, str>>,
    pub metadata: Option<S::CompletionMetadata>,
}
Expand description

A success result produced by a step.

Fields§

§output: T

The output of the step.

§message: Option<Cow<'static, str>>

An optional message associated with this result.

§metadata: Option<S::CompletionMetadata>

Optional metadata associated with this step.

Implementations§

Source§

impl<T, S: EngineSpec> StepSuccess<T, S>

Source

pub fn new(output: T) -> Self

Creates a new StepSuccess.

Source

pub fn with_message(self, message: impl Into<Cow<'static, str>>) -> Self

Adds a message to this step.

Source

pub fn with_metadata(self, metadata: S::CompletionMetadata) -> Self

Adds metadata to this step.

Source

pub fn build(self) -> StepResult<T, S>

Creates a StepResult from this StepSuccess.

Trait Implementations§

Source§

impl<T, S: EngineSpec> Debug for StepSuccess<T, S>
where T: Debug,

Source§

fn fmt(&self, __f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T, S: EngineSpec> From<StepSuccess<T, S>> for Result<StepResult<T, S>, S::Error>

Source§

fn from(value: StepSuccess<T, S>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<T, S> Freeze for StepSuccess<T, S>

§

impl<T, S> RefUnwindSafe for StepSuccess<T, S>

§

impl<T, S> Send for StepSuccess<T, S>
where T: Send,

§

impl<T, S> Sync for StepSuccess<T, S>
where T: Sync,

§

impl<T, S> Unpin for StepSuccess<T, S>

§

impl<T, S> UnsafeUnpin for StepSuccess<T, S>

§

impl<T, S> UnwindSafe for StepSuccess<T, S>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> SendSyncUnwindSafe for T
where T: Send + Sync + UnwindSafe + ?Sized,