Skip to main content

NewStep

Struct NewStep 

Source
pub struct NewStep<'engine, 'a, S: EngineSpec, T> { /* private fields */ }
Expand description

A new step that hasn’t been registered by an execution engine yet.

Created by UpdateEngine::new_step or ComponentRegistrar::new_step.

Implementations§

Source§

impl<'a, S: EngineSpec, T> NewStep<'_, 'a, S, T>

Source

pub fn with_metadata_fn<F, Fut>(self, f: F) -> Self
where F: FnOnce(MetadataContext<S>) -> Fut + Send + 'a, Fut: Future<Output = S::StepMetadata> + Send + 'a,

Adds a metadata-generating function to the step.

This function is expected to produce S::StepMetadata. The metadata function must be infallible, and will often be synchronous code.

Source

pub fn register(self) -> StepHandle<T, S>

Registers the step with the engine.

Trait Implementations§

Source§

impl<'engine, 'a, S: Debug + EngineSpec, T: Debug> Debug for NewStep<'engine, 'a, S, T>
where S::Component: Debug, S::StepId: Debug,

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'engine, 'a, S, T> Freeze for NewStep<'engine, 'a, S, T>

§

impl<'engine, 'a, S, T> !RefUnwindSafe for NewStep<'engine, 'a, S, T>

§

impl<'engine, 'a, S, T> Send for NewStep<'engine, 'a, S, T>
where T: Send,

§

impl<'engine, 'a, S, T> !Sync for NewStep<'engine, 'a, S, T>

§

impl<'engine, 'a, S, T> Unpin for NewStep<'engine, 'a, S, T>
where <S as EngineSpec>::Component: Unpin, <S as EngineSpec>::StepId: Unpin,

§

impl<'engine, 'a, S, T> UnsafeUnpin for NewStep<'engine, 'a, S, T>

§

impl<'engine, 'a, S, T> !UnwindSafe for NewStep<'engine, 'a, S, T>

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.