Trait carapax::TryFromInput

source ·
pub trait TryFromInput: Send + Sized {
    type Error: Error + Send;

    // Required method
    fn try_from_input(
        input: HandlerInput
    ) -> impl Future<Output = Result<Option<Self>, Self::Error>> + Send;
}
Expand description

Allows to create a specific handler input.

Required Associated Types§

source

type Error: Error + Send

An error when conversion failed.

Required Methods§

source

fn try_from_input( input: HandlerInput ) -> impl Future<Output = Result<Option<Self>, Self::Error>> + Send

Performs conversion.

§Arguments
  • input - An input to convert from.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl TryFromInput for ()

§

type Error = Infallible

source§

async fn try_from_input( _input: HandlerInput ) -> Result<Option<Self>, Self::Error>

source§

impl<A> TryFromInput for (A,)
where A: TryFromInput, A::Error: 'static,

source§

impl<A, B> TryFromInput for (A, B)
where A: TryFromInput, A::Error: 'static, B: TryFromInput, B::Error: 'static,

source§

impl<A, B, C> TryFromInput for (A, B, C)
where A: TryFromInput, A::Error: 'static, B: TryFromInput, B::Error: 'static, C: TryFromInput, C::Error: 'static,

source§

impl<A, B, C, D> TryFromInput for (A, B, C, D)
where A: TryFromInput, A::Error: 'static, B: TryFromInput, B::Error: 'static, C: TryFromInput, C::Error: 'static, D: TryFromInput, D::Error: 'static,

source§

impl<A, B, C, D, E> TryFromInput for (A, B, C, D, E)
where A: TryFromInput, A::Error: 'static, B: TryFromInput, B::Error: 'static, C: TryFromInput, C::Error: 'static, D: TryFromInput, D::Error: 'static, E: TryFromInput, E::Error: 'static,

source§

impl<A, B, C, D, E, F> TryFromInput for (A, B, C, D, E, F)
where A: TryFromInput, A::Error: 'static, B: TryFromInput, B::Error: 'static, C: TryFromInput, C::Error: 'static, D: TryFromInput, D::Error: 'static, E: TryFromInput, E::Error: 'static, F: TryFromInput, F::Error: 'static,

source§

impl<A, B, C, D, E, F, G> TryFromInput for (A, B, C, D, E, F, G)
where A: TryFromInput, A::Error: 'static, B: TryFromInput, B::Error: 'static, C: TryFromInput, C::Error: 'static, D: TryFromInput, D::Error: 'static, E: TryFromInput, E::Error: 'static, F: TryFromInput, F::Error: 'static, G: TryFromInput, G::Error: 'static,

source§

impl<A, B, C, D, E, F, G, H> TryFromInput for (A, B, C, D, E, F, G, H)
where A: TryFromInput, A::Error: 'static, B: TryFromInput, B::Error: 'static, C: TryFromInput, C::Error: 'static, D: TryFromInput, D::Error: 'static, E: TryFromInput, E::Error: 'static, F: TryFromInput, F::Error: 'static, G: TryFromInput, G::Error: 'static, H: TryFromInput, H::Error: 'static,

source§

impl<A, B, C, D, E, F, G, H, I> TryFromInput for (A, B, C, D, E, F, G, H, I)
where A: TryFromInput, A::Error: 'static, B: TryFromInput, B::Error: 'static, C: TryFromInput, C::Error: 'static, D: TryFromInput, D::Error: 'static, E: TryFromInput, E::Error: 'static, F: TryFromInput, F::Error: 'static, G: TryFromInput, G::Error: 'static, H: TryFromInput, H::Error: 'static, I: TryFromInput, I::Error: 'static,

source§

impl<A, B, C, D, E, F, G, H, I, J> TryFromInput for (A, B, C, D, E, F, G, H, I, J)
where A: TryFromInput, A::Error: 'static, B: TryFromInput, B::Error: 'static, C: TryFromInput, C::Error: 'static, D: TryFromInput, D::Error: 'static, E: TryFromInput, E::Error: 'static, F: TryFromInput, F::Error: 'static, G: TryFromInput, G::Error: 'static, H: TryFromInput, H::Error: 'static, I: TryFromInput, I::Error: 'static, J: TryFromInput, J::Error: 'static,

Implementors§

source§

impl TryFromInput for Chat

source§

impl TryFromInput for Poll

source§

impl TryFromInput for KeyChat

Available on crate feature ratelimit only.
source§

impl TryFromInput for KeyChatUser

Available on crate feature ratelimit only.
source§

impl TryFromInput for KeyUser

Available on crate feature ratelimit only.
source§

impl TryFromInput for SessionId

Available on crate feature session only.
source§

impl TryFromInput for HandlerInput

source§

impl TryFromInput for CallbackQuery

source§

impl TryFromInput for ChatJoinRequest

source§

impl TryFromInput for ChatMemberUpdated

source§

impl TryFromInput for ChatPeerId

source§

impl TryFromInput for ChatUsername

source§

impl TryFromInput for ChosenInlineResult

source§

impl TryFromInput for Command

source§

impl TryFromInput for InlineQuery

source§

impl TryFromInput for Message

source§

impl TryFromInput for PollAnswer

source§

impl TryFromInput for PreCheckoutQuery

source§

impl TryFromInput for ShippingQuery

source§

impl TryFromInput for Text

source§

impl TryFromInput for Update

source§

impl TryFromInput for User

source§

impl TryFromInput for UserPeerId

source§

impl TryFromInput for UserUsername

source§

impl<B> TryFromInput for Session<B>
where B: SessionBackend + Send + 'static,

Available on crate feature session only.
source§

impl<S, B> TryFromInput for DialogueInput<S, B>
where S: DialogueState + Send, B: SessionBackend + Send + 'static,

Available on crate feature dialogue only.
source§

impl<T> TryFromInput for Ref<T>
where T: Clone + Send + 'static,