Struct Chain

Source
pub struct Chain<F1, F2>(pub F1, pub F2);

Tuple Fields§

§0: F1§1: F2

Trait Implementations§

Source§

impl<Args: Tuple, F1, F2> Callable<Args> for Chain<F1, F2>
where F1: Callable<Args>, F2: Callable<(F1::Output,)>,

Source§

type Output = <F2 as Callable<(<F1 as Callable<Args>>::Output,)>>::Output

Source§

fn call_fn(&self, args: Args) -> Self::Output

Source§

impl<F1: CallableWithFixedArguments, F2: for<'a> Callable<(<F1 as Callable<ArgumentsOfTypes<'a, F1::FixedArgumentTypes>>>::Output,)>> CallableWithFixedArguments for Chain<F1, F2>

Source§

type FixedArgumentTypes = <F1 as CallableWithFixedArguments>::FixedArgumentTypes

Source§

fn call_with_prepended_args<'first: 'out, 'args: 'out, 'out>( &self, first: ArgumentOfType<'first, <Self::FixedArgumentTypes as ArgumentTypes>::First>, args: ArgumentsOfTypes<'args, <Self::FixedArgumentTypes as ArgumentTypes>::FirstTrimmed>, ) -> <Self as Callable<ArgumentsOfTypes<'out, Self::FixedArgumentTypes>>>::Output

Source§

fn call_with_appended_args<'last: 'out, 'args: 'out, 'out>( &self, args: ArgumentsOfTypes<'args, <Self::FixedArgumentTypes as ArgumentTypes>::LastTrimmed>, last: ArgumentOfType<'last, <Self::FixedArgumentTypes as ArgumentTypes>::Last>, ) -> <Self as Callable<ArgumentsOfTypes<'out, Self::FixedArgumentTypes>>>::Output

Source§

impl<F1: Clone, F2: Clone> Clone for Chain<F1, F2>

Source§

fn clone(&self) -> Chain<F1, F2>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<F1: Debug, F2: Debug> Debug for Chain<F1, F2>

Source§

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

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

impl<F1, F2> IsCallable for Chain<F1, F2>

Source§

fn accept_anything(self) -> AcceptAnything<Self>
where Self: Sized + Callable<()>,

Source§

fn provide_last_argument<A: ProvideArgument<ProvideArgumentType = <Self::FixedArgumentTypes as ArgumentTypes>::Last>>( self, last_argument: A, ) -> LastArgumentProvided<Self, A>

Source§

fn provide_first_argument<A: ProvideArgument<ProvideArgumentType = <Self::FixedArgumentTypes as ArgumentTypes>::First>>( self, first_argument: A, ) -> FirstArgumentProvided<Self, A>

Source§

fn provide_last_argument_refed<T>( self, last_argument: T, ) -> LastArgumentProvided<Self, Refed<T>>

Source§

fn provide_first_argument_refed<T>( self, first_argument: T, ) -> FirstArgumentProvided<Self, Refed<T>>

Source§

fn provide_first_argument_copied<T: Copy>( self, first_argument: T, ) -> FirstArgumentProvided<Self, Copied<T>>

Source§

fn provide_last_argument_copied<T: Copy>( self, last_argument: T, ) -> LastArgumentProvided<Self, Copied<T>>

Source§

fn provide_last_argument_cloned<T: Clone>( self, last_argument: T, ) -> LastArgumentProvided<Self, Cloned<T>>

Source§

fn provide_first_argument_cloned<T: Clone>( self, first_argument: T, ) -> FirstArgumentProvided<Self, Cloned<T>>

Source§

fn provide_first_argument_with<F: Callable<()>>( self, get_first_argument: F, ) -> FirstArgumentProvided<Self, With<F>>

Source§

fn provide_last_argument_with<F: Callable<()>>( self, get_first_argument: F, ) -> LastArgumentProvided<Self, With<F>>

Source§

impl<F1: PartialEq, F2: PartialEq> PartialEq for Chain<F1, F2>

Source§

fn eq(&self, other: &Chain<F1, F2>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<F1: Copy, F2: Copy> Copy for Chain<F1, F2>

Source§

impl<F1: Eq, F2: Eq> Eq for Chain<F1, F2>

Source§

impl<F1, F2> StructuralPartialEq for Chain<F1, F2>

Auto Trait Implementations§

§

impl<F1, F2> Freeze for Chain<F1, F2>
where F1: Freeze, F2: Freeze,

§

impl<F1, F2> RefUnwindSafe for Chain<F1, F2>

§

impl<F1, F2> Send for Chain<F1, F2>
where F1: Send, F2: Send,

§

impl<F1, F2> Sync for Chain<F1, F2>
where F1: Sync, F2: Sync,

§

impl<F1, F2> Unpin for Chain<F1, F2>
where F1: Unpin, F2: Unpin,

§

impl<F1, F2> UnwindSafe for Chain<F1, F2>
where F1: UnwindSafe, F2: UnwindSafe,

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<A1, F> CallableOne<A1> for F
where F: Callable<(A1,)>,

Source§

fn emit(&self, input: IN) -> Self::Output

A shortcut for Callable::call_fn with exactly one argument.
Source§

fn chain<F: CallableOne<Self::Output>>(self, f: F) -> Chain<Self, F>
where Self: Sized,

Source§

fn reform<NewInput, F: CallableOne<NewInput, Output = IN>>( self, f: F, ) -> Chain<F, Self>
where Self: Sized,

Provide input with another callable. Read more
Source§

fn reform_ref<NewInput: ?Sized, F: for<'i> CallableOne<&'i NewInput, Output = IN>>( self, f: F, ) -> Chain<F, Self>
where Self: Sized,

Source§

fn reform_mut<NewInput: ?Sized, F: for<'input> CallableOne<&'input mut NewInput, Output = IN>>( self, f: F, ) -> Chain<F, Self>
where Self: Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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<E, C> MaybeHandleEvent<E> for C
where E: StatedEvent + ?Sized, C: PartialEq + for<'e> Callable<(&'e E,)>,

Source§

type State = (<E as StatedEvent>::State, C)

Source§

type Callable = C

Source§

fn initialize_handle_event_state( this: C, new_event_state: impl FnOnce(&<C as MaybeHandleEvent<E>>::Callable) -> <E as StatedEvent>::State, ) -> <C as MaybeHandleEvent<E>>::State

Source§

fn update_handle_event_state( this: C, state: &mut <C as MaybeHandleEvent<E>>::State, new_event_state: impl FnOnce(&<C as MaybeHandleEvent<E>>::Callable) -> <E as StatedEvent>::State, )

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.