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§
Required Methods§
sourcefn try_from_input(
input: HandlerInput
) -> impl Future<Output = Result<Option<Self>, Self::Error>> + Send
fn try_from_input( input: HandlerInput ) -> impl Future<Output = Result<Option<Self>, Self::Error>> + Send
Object Safety§
This trait is not object safe.
Implementations on Foreign Types§
source§impl TryFromInput for ()
impl TryFromInput for ()
type Error = Infallible
async fn try_from_input( _input: HandlerInput ) -> Result<Option<Self>, Self::Error>
source§impl<A> TryFromInput for (A,)where
A: TryFromInput,
A::Error: 'static,
impl<A> TryFromInput for (A,)where
A: TryFromInput,
A::Error: 'static,
type Error = ConvertInputError
async fn try_from_input( input: HandlerInput ) -> Result<Option<Self>, Self::Error>
source§impl<A, B> TryFromInput for (A, B)
impl<A, B> TryFromInput for (A, B)
type Error = ConvertInputError
async fn try_from_input( input: HandlerInput ) -> Result<Option<Self>, Self::Error>
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,
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,
type Error = ConvertInputError
async fn try_from_input( input: HandlerInput ) -> Result<Option<Self>, Self::Error>
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,
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,
type Error = ConvertInputError
async fn try_from_input( input: HandlerInput ) -> Result<Option<Self>, Self::Error>
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,
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,
type Error = ConvertInputError
async fn try_from_input( input: HandlerInput ) -> Result<Option<Self>, Self::Error>
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,
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,
type Error = ConvertInputError
async fn try_from_input( input: HandlerInput ) -> Result<Option<Self>, Self::Error>
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,
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,
type Error = ConvertInputError
async fn try_from_input( input: HandlerInput ) -> Result<Option<Self>, Self::Error>
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,
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,
type Error = ConvertInputError
async fn try_from_input( input: HandlerInput ) -> Result<Option<Self>, Self::Error>
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,
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,
type Error = ConvertInputError
async fn try_from_input( input: HandlerInput ) -> Result<Option<Self>, Self::Error>
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,
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,
type Error = ConvertInputError
async fn try_from_input( input: HandlerInput ) -> Result<Option<Self>, Self::Error>
Implementors§
source§impl TryFromInput for Chat
impl TryFromInput for Chat
type Error = Infallible
source§impl TryFromInput for Poll
impl TryFromInput for Poll
type Error = Infallible
source§impl TryFromInput for KeyChat
Available on crate feature ratelimit
only.
impl TryFromInput for KeyChat
Available on crate feature
ratelimit
only.type Error = Infallible
source§impl TryFromInput for KeyChatUser
Available on crate feature ratelimit
only.
impl TryFromInput for KeyChatUser
Available on crate feature
ratelimit
only.type Error = Infallible
source§impl TryFromInput for KeyUser
Available on crate feature ratelimit
only.
impl TryFromInput for KeyUser
Available on crate feature
ratelimit
only.type Error = Infallible
source§impl TryFromInput for SessionId
Available on crate feature session
only.
impl TryFromInput for SessionId
Available on crate feature
session
only.type Error = Infallible
source§impl TryFromInput for HandlerInput
impl TryFromInput for HandlerInput
type Error = Infallible
source§impl TryFromInput for CallbackQuery
impl TryFromInput for CallbackQuery
type Error = Infallible
source§impl TryFromInput for ChatJoinRequest
impl TryFromInput for ChatJoinRequest
type Error = Infallible
source§impl TryFromInput for ChatMemberUpdated
impl TryFromInput for ChatMemberUpdated
type Error = Infallible
source§impl TryFromInput for ChatPeerId
impl TryFromInput for ChatPeerId
type Error = Infallible
source§impl TryFromInput for ChatUsername
impl TryFromInput for ChatUsername
type Error = Infallible
source§impl TryFromInput for ChosenInlineResult
impl TryFromInput for ChosenInlineResult
type Error = Infallible
source§impl TryFromInput for Command
impl TryFromInput for Command
type Error = CommandError
source§impl TryFromInput for InlineQuery
impl TryFromInput for InlineQuery
type Error = Infallible
source§impl TryFromInput for Message
impl TryFromInput for Message
type Error = Infallible
source§impl TryFromInput for PollAnswer
impl TryFromInput for PollAnswer
type Error = Infallible
source§impl TryFromInput for PreCheckoutQuery
impl TryFromInput for PreCheckoutQuery
type Error = Infallible
source§impl TryFromInput for ShippingQuery
impl TryFromInput for ShippingQuery
type Error = Infallible
source§impl TryFromInput for Text
impl TryFromInput for Text
type Error = Infallible
source§impl TryFromInput for Update
impl TryFromInput for Update
type Error = Infallible
source§impl TryFromInput for User
impl TryFromInput for User
type Error = Infallible
source§impl TryFromInput for UserPeerId
impl TryFromInput for UserPeerId
type Error = Infallible
source§impl TryFromInput for UserUsername
impl TryFromInput for UserUsername
type Error = Infallible
source§impl<B> TryFromInput for Session<B>where
B: SessionBackend + Send + 'static,
Available on crate feature session
only.
impl<B> TryFromInput for Session<B>where
B: SessionBackend + Send + 'static,
Available on crate feature
session
only.type Error = CreateSessionError
source§impl<S, B> TryFromInput for DialogueInput<S, B>
Available on crate feature dialogue
only.
impl<S, B> TryFromInput for DialogueInput<S, B>
Available on crate feature
dialogue
only.