Skip to main content

Handled

Enum Handled 

Source
pub enum Handled<T> {
    Yes,
    No {
        message: T,
        retry: bool,
    },
}
Expand description

Return type from JrHandler; indicates whether the request was handled or not.

Variants§

§

Yes

The message was handled

§

No

The message was not handled; returns the original value.

If retry is true,

Fields

§message: T

The message to be passed to subsequent handlers (typically the original message, but it may have been mutated.)

§retry: bool

If true, request the message to be queued and retried with dynamic handlers as they are added.

This is used for managing session updates since the dynamic handler for a session cannot be added until the response to the new session request has been processed and there may be updates that get processed at the same time.

Trait Implementations§

Source§

impl<T: Debug> Debug for Handled<T>

Source§

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

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

impl<T> IntoHandled<T> for Handled<T>

Source§

fn into_handled(self) -> Handled<T>

Convert this value into a Handled<T>.

Auto Trait Implementations§

§

impl<T> Freeze for Handled<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for Handled<T>
where T: RefUnwindSafe,

§

impl<T> Send for Handled<T>
where T: Send,

§

impl<T> Sync for Handled<T>
where T: Sync,

§

impl<T> Unpin for Handled<T>
where T: Unpin,

§

impl<T> UnsafeUnpin for Handled<T>
where T: UnsafeUnpin,

§

impl<T> UnwindSafe for Handled<T>
where T: 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<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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<T> IntoMaybeUndefined<T> for T

Source§

impl<T> IntoOption<T> for T

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more