HandlerOptions

Struct HandlerOptions 

Source
pub struct HandlerOptions<H, D, E> { /* private fields */ }
Expand description

Options for a request handler.

Implementations§

Source§

impl<H> HandlerOptions<H, (), ()>

Source

pub fn new() -> Self

Makes a new HandlerOptions instance.

Source§

impl<H, D, E> HandlerOptions<H, D, E>
where H: HandleRequest,

Source

pub fn decoder<F>(self, decoder_factory: F) -> HandlerOptions<H, F, E>
where F: Factory<Item = H::Decoder>,

Specifies the decoder factory that the handler will use.

Source

pub fn default_decoder(self) -> HandlerOptions<H, DefaultFactory<H::Decoder>, E>
where H::Decoder: Default,

Specifies that the handler will use the default decoder factory.

Source

pub fn encoder<F>(self, encoder_factory: F) -> HandlerOptions<H, D, F>
where F: Factory<Item = H::Encoder>,

Specifies the encoder factory that the handler will use.

Source

pub fn default_encoder(self) -> HandlerOptions<H, D, DefaultFactory<H::Encoder>>
where H::Encoder: Default,

Specifies that the handler will use the default encoder factory.

Trait Implementations§

Source§

impl<H: Debug, D: Debug, E: Debug> Debug for HandlerOptions<H, D, E>

Source§

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

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

impl<H> Default for HandlerOptions<H, DefaultFactory<H::Decoder>, DefaultFactory<H::Encoder>>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<H, D, E> Freeze for HandlerOptions<H, D, E>
where D: Freeze, E: Freeze,

§

impl<H, D, E> RefUnwindSafe for HandlerOptions<H, D, E>

§

impl<H, D, E> Send for HandlerOptions<H, D, E>
where D: Send, E: Send, H: Send,

§

impl<H, D, E> Sync for HandlerOptions<H, D, E>
where D: Sync, E: Sync, H: Sync,

§

impl<H, D, E> Unpin for HandlerOptions<H, D, E>
where D: Unpin, E: Unpin, H: Unpin,

§

impl<H, D, E> UnwindSafe for HandlerOptions<H, D, E>
where D: UnwindSafe, E: UnwindSafe, H: 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, 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, 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> SendSyncUnwindSafe for T
where T: Send + Sync + UnwindSafe + ?Sized,