Struct aopt::ctx::HandlerEntryThen

source ·
pub struct HandlerEntryThen<'a, 'b, I, Set, Ser, H, A, O>where
    O: ErasedTy,
    Set: Set,
    SetOpt<Set>: Opt,
    I: HandlerCollection<'a, Set, Ser>,
    H: Handler<Set, Ser, A, Output = Option<O>, Error = Error> + 'a,
    A: Extract<Set, Ser, Error = Error> + 'a,{ /* private fields */ }

Implementations§

source§

impl<'a, 'b, I, Set, Ser, H, A, O> HandlerEntryThen<'a, 'b, I, Set, Ser, H, A, O>where O: ErasedTy, Set: Set, SetOpt<Set>: Opt, I: HandlerCollection<'a, Set, Ser>, H: Handler<Set, Ser, A, Output = Option<O>, Error = Error> + 'a, A: Extract<Set, Ser, Error = Error> + 'a,

source

pub fn new(ser: &'b mut I, uid: Uid, handler: H, fallback: bool) -> Self

source

pub fn then( self, store: impl Store<Set, Ser, O, Ret = bool, Error = Error> + 'a ) -> Self

Register the handler with given store. The store will be used save the return value of option handler.

source

pub fn submit(self) -> Uid

Trait Implementations§

source§

impl<'a, 'b, I, Set, Ser, H, A, O> Drop for HandlerEntryThen<'a, 'b, I, Set, Ser, H, A, O>where O: ErasedTy, Set: Set, SetOpt<Set>: Opt, I: HandlerCollection<'a, Set, Ser>, H: Handler<Set, Ser, A, Output = Option<O>, Error = Error> + 'a, A: Extract<Set, Ser, Error = Error> + 'a,

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<'a, 'b, I, Set, Ser, H, A, O> RefUnwindSafe for HandlerEntryThen<'a, 'b, I, Set, Ser, H, A, O>where A: RefUnwindSafe, H: RefUnwindSafe, I: RefUnwindSafe, O: RefUnwindSafe, Ser: RefUnwindSafe, Set: RefUnwindSafe,

§

impl<'a, 'b, I, Set, Ser, H, A, O> Send for HandlerEntryThen<'a, 'b, I, Set, Ser, H, A, O>where A: Send, H: Send, I: Send, O: Send, Ser: Send, Set: Send,

§

impl<'a, 'b, I, Set, Ser, H, A, O> Sync for HandlerEntryThen<'a, 'b, I, Set, Ser, H, A, O>where A: Sync, H: Sync, I: Sync, O: Sync, Ser: Sync, Set: Sync,

§

impl<'a, 'b, I, Set, Ser, H, A, O> Unpin for HandlerEntryThen<'a, 'b, I, Set, Ser, H, A, O>where A: Unpin, H: Unpin, O: Unpin, Ser: Unpin, Set: Unpin,

§

impl<'a, 'b, I, Set, Ser, H, A, O> !UnwindSafe for HandlerEntryThen<'a, 'b, I, Set, Ser, H, A, O>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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> ErasedTy for Twhere T: Any + 'static,