Struct meio::handlers::Interact[][src]

pub struct Interact<T: Interaction> {
    pub request: T,
    pub responder: InteractionResponder<T::Output>,
}
Expand description

The wrapper for an interaction request that keeps a request and the channel for sending a response.

Fields

request: T

Interaction request.

responder: InteractionResponder<T::Output>

The responder to send a result of an interaction.

Trait Implementations

impl<T, I> ActionHandler<Interact<I>> for T where
    T: InteractionHandler<I>,
    I: Interaction
[src]

fn handle<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    input: Interact<I>,
    ctx: &'life1 mut Context<Self>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Asyncronous method that receives incoming message.

impl<T: Interaction> Action for Interact<T>[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for Interact<T>

impl<T> Send for Interact<T>

impl<T> Sync for Interact<T> where
    T: Sync

impl<T> Unpin for Interact<T> where
    T: Unpin

impl<T> !UnwindSafe for Interact<T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.