Trait TryComputer

Source
pub trait TryComputer<Context, Code, Input>: IsProviderFor<TryComputerComponent, Context, (Code, Input)>
where Context: HasErrorType,
{ type Output; // Required method fn try_compute( context: &Context, _code: PhantomData<Code>, input: Input, ) -> Result<Self::Output, <Context as HasErrorType>::Error>; }

Required Associated Types§

Required Methods§

Source

fn try_compute( context: &Context, _code: PhantomData<Code>, input: Input, ) -> Result<Self::Output, <Context as HasErrorType>::Error>

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.

Implementations on Foreign Types§

Source§

impl<Context, Code, Builder, Provider, Output, Res> TryComputer<Context, Code, Builder> for BuildAndMerge<Provider>
where Context: HasErrorType, Provider: for<'a> TryComputer<Context, Code, &'a Builder, Output = Res>, Builder: CanBuildFrom<Res, Output = Output>,

Source§

type Output = Output

Source§

fn try_compute( context: &Context, code: PhantomData<Code>, builder: Builder, ) -> Result<<BuildAndMerge<Provider> as TryComputer<Context, Code, Builder>>::Output, <Context as HasErrorType>::Error>

Source§

impl<Context, Code, Input> TryComputer<Context, Code, Input> for UseContext
where Context: HasErrorType + CanTryCompute<Code, Input>,

Source§

type Output = <Context as CanTryCompute<Code, Input>>::Output

Source§

fn try_compute( context: &Context, _code: PhantomData<Code>, input: Input, ) -> Result<<UseContext as TryComputer<Context, Code, Input>>::Output, <Context as HasErrorType>::Error>

Source§

impl<Context, Code, Input, Handlers, Output, Remainder> TryComputer<Context, Code, Input> for DispatchMatchers<Handlers>
where Context: HasErrorType, Handlers: TryDispatchComputer<Context, Code, Input, Output = Output, Remainder = Remainder>,

Source§

type Output = Result<Output, Remainder>

Source§

fn try_compute( _context: &Context, code: PhantomData<Code>, input: Input, ) -> Result<<DispatchMatchers<Handlers> as TryComputer<Context, Code, Input>>::Output, <Context as HasErrorType>::Error>

Source§

impl<Context, Code, Input, Output, Builder, Handlers, Res> TryComputer<Context, Code, Input> for BuildWithHandlers<Output, Handlers>
where Context: HasErrorType, Output: HasBuilder<Builder = Builder>, PipeHandlers<Handlers>: TryComputer<Context, Code, Builder, Output = Res>, Res: FinalizeBuild<Output = Output>,

Source§

type Output = Output

Source§

fn try_compute( context: &Context, code: PhantomData<Code>, _input: Input, ) -> Result<<BuildWithHandlers<Output, Handlers> as TryComputer<Context, Code, Input>>::Output, <Context as HasErrorType>::Error>

Source§

impl<Context, Code, Input, Output, Handlers> TryComputer<Context, Code, &Input> for MatchWithHandlersRef<Handlers>
where Context: HasErrorType, Input: HasExtractorRef, DispatchMatchers<Handlers>: for<'b> TryComputer<Context, Code, <Input as HasExtractorRef>::ExtractorRef<'b>>, <DispatchMatchers<Handlers> as TryComputer<Context, Code, <Input as HasExtractorRef>::ExtractorRef<'b>>>::Output: for<'b> FinalizeExtractResult<Output = Output>,

Source§

type Output = Output

Source§

fn try_compute( context: &Context, code: PhantomData<Code>, input: &Input, ) -> Result<Output, <Context as HasErrorType>::Error>

Source§

impl<Context, Code, Input, Output, Remainder, Handlers> TryComputer<Context, Code, Input> for MatchWithHandlers<Handlers>
where Context: HasErrorType, Input: HasExtractor, DispatchMatchers<Handlers>: TryComputer<Context, Code, <Input as HasExtractor>::Extractor, Output = Result<Output, Remainder>>, Remainder: FinalizeExtract,

Source§

type Output = Output

Source§

fn try_compute( _context: &Context, code: PhantomData<Code>, input: Input, ) -> Result<Output, <Context as HasErrorType>::Error>

Source§

impl<Context, Code, Input, Provider, Inner, Output, Remainder> TryComputer<Context, Code, Input> for DowncastAndHandle<Inner, Provider>
where Context: HasErrorType, Input: CanDowncastFields<Inner, Remainder = Remainder>, Provider: TryComputer<Context, Code, Inner, Output = Output>,

Source§

type Output = Result<Output, Remainder>

Source§

fn try_compute( context: &Context, tag: PhantomData<Code>, input: Input, ) -> Result<Result<Output, Remainder>, <Context as HasErrorType>::Error>

Source§

impl<Context, Code, Input, Tag, Value, Provider, Output, Remainder> TryComputer<Context, Code, Input> for ExtractFieldAndHandle<Tag, Provider>
where Context: HasErrorType, Input: ExtractField<Tag, Value = Value, Remainder = Remainder>, Provider: TryComputer<Context, Code, ω<Tag, Value>, Output = Output>,

Source§

type Output = Result<Output, Remainder>

Source§

fn try_compute( context: &Context, tag: PhantomData<Code>, input: Input, ) -> Result<Result<Output, Remainder>, <Context as HasErrorType>::Error>

Source§

impl<Context, Code, Input, __Components__, __Delegate__> TryComputer<Context, Code, Input> for UseDelegate<__Components__>
where Context: HasErrorType, __Components__: DelegateComponent<Code, Delegate = __Delegate__>, __Delegate__: TryComputer<Context, Code, Input>,

Source§

type Output = <__Delegate__ as TryComputer<Context, Code, Input>>::Output

Source§

fn try_compute( context: &Context, _code: PhantomData<Code>, input: Input, ) -> Result<<UseDelegate<__Components__> as TryComputer<Context, Code, Input>>::Output, <Context as HasErrorType>::Error>

Source§

impl<Context, Code, Tag, Value, Provider, Output, Builder> TryComputer<Context, Code, Builder> for BuildAndSetField<Tag, Provider>
where Context: HasErrorType, Provider: for<'a> TryComputer<Context, Code, &'a Builder, Output = Value>, Builder: BuildField<Tag, Value = Value, Output = Output>,

Source§

type Output = Output

Source§

fn try_compute( context: &Context, code: PhantomData<Code>, builder: Builder, ) -> Result<<BuildAndSetField<Tag, Provider> as TryComputer<Context, Code, Builder>>::Output, <Context as HasErrorType>::Error>

Implementors§

Source§

impl<Component, Context, Code, Input> TryComputer<Context, Code, Input> for Component

Source§

type Output = <<Component as DelegateComponent<TryComputerComponent>>::Delegate as TryComputer<Context, Code, Input>>::Output

Source§

impl<Context, Code, Input> TryComputer<Context, Code, Input> for ReturnInput
where Context: HasErrorType,

Source§

type Output = Input

Source§

impl<Context, Code, Input, Output, Error, Provider> TryComputer<Context, Code, Input> for TryPromote<Provider>
where Context: CanRaiseError<Error>, Provider: Computer<Context, Code, Input, Output = Result<Output, Error>>,

Source§

type Output = Output

Source§

impl<Context, Code, Input, Output, Provider> TryComputer<Context, Code, Input> for Promote<Provider>
where Context: HasErrorType, Provider: Computer<Context, Code, Input, Output = Output>,

Source§

type Output = Output

Source§

impl<Context, Code, Input, Target, Provider> TryComputer<Context, Code, Input> for PromoteRef<Provider>
where Context: HasErrorType, Provider: TryComputerRef<Context, Code, Target>, Input: Deref<Target = Target>,

Source§

type Output = <Provider as TryComputerRef<Context, Code, Target>>::Output

Source§

impl<Context, Code, Input, __Components__, __Delegate__> TryComputer<Context, Code, Input> for UseInputDelegate<__Components__>
where Context: HasErrorType, __Components__: DelegateComponent<Input, Delegate = __Delegate__>, __Delegate__: TryComputer<Context, Code, Input>,

Source§

type Output = <__Delegate__ as TryComputer<Context, Code, Input>>::Output

Source§

impl<Context, Code, Tag, Input, Output, Provider> TryComputer<Context, Code, ω<Tag, Input>> for HandleFieldValue<Provider>
where Context: HasErrorType, Provider: TryComputer<Context, Code, Input, Output = Output>,

Source§

type Output = Output

Source§

impl<Context, Tag, Input, Output, Providers> TryComputer<Context, Tag, Input> for PipeHandlers<Providers>
where Context: HasErrorType, Providers: PipeTryComputer<Context, Tag, Input, Output = Output>,

Source§

type Output = Output