Struct Maybe

Source
pub struct Maybe<'r, 'mw: 'r, 'server: 'mw, D: 'mw>(pub &'r mut NickelRequest<'mw, 'server, D>);
Expand description

A wrapper for &mut nickel::Request which implements multipart::server::HttpRequest.

Necessary because this crate cannot directly provide an impl of HttpRequest for &mut NickelRequest.

Tuple Fields§

§0: &'r mut NickelRequest<'mw, 'server, D>

Trait Implementations§

Source§

impl<'r, 'mw: 'r, 'server: 'mw, D: 'mw> AsMut<&'r mut Request<'mw, 'server, D>> for Maybe<'r, 'mw, 'server, D>

Source§

fn as_mut(&mut self) -> &mut &'r mut NickelRequest<'mw, 'server, D>

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl<'r, 'mw: 'r, 'server: 'mw, D: 'mw> AsRef<&'r mut Request<'mw, 'server, D>> for Maybe<'r, 'mw, 'server, D>

Source§

fn as_ref(&self) -> &&'r mut NickelRequest<'mw, 'server, D>

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<'r, 'mw: 'r, 'server: 'mw, D: 'mw> From<&'r mut Request<'mw, 'server, D>> for Maybe<'r, 'mw, 'server, D>

Source§

fn from(req: &'r mut NickelRequest<'mw, 'server, D>) -> Self

Converts to this type from the input type.
Source§

impl<'r, 'mw: 'r, 'server: 'mw, D: 'mw> HttpRequest for Maybe<'r, 'mw, 'server, D>

Source§

type Body = &'r mut Request<'mw, 'server>

The body of this request.
Source§

fn multipart_boundary(&self) -> Option<&str>

Get the boundary string of this request if it is a POST request with the Content-Type header set to multipart/form-data. Read more
Source§

fn body(self) -> Self::Body

Return the request body for reading.
Source§

impl<'r, 'mw: 'r, 'server: 'mw, D: 'mw> Into<&'r mut Request<'mw, 'server, D>> for Maybe<'r, 'mw, 'server, D>

Source§

fn into(self) -> &'r mut NickelRequest<'mw, 'server, D>

Converts this type into the (usually inferred) input type.

Auto Trait Implementations§

§

impl<'r, 'mw, 'server, D> Freeze for Maybe<'r, 'mw, 'server, D>

§

impl<'r, 'mw, 'server, D> !RefUnwindSafe for Maybe<'r, 'mw, 'server, D>

§

impl<'r, 'mw, 'server, D> !Send for Maybe<'r, 'mw, 'server, D>

§

impl<'r, 'mw, 'server, D> !Sync for Maybe<'r, 'mw, 'server, D>

§

impl<'r, 'mw, 'server, D> Unpin for Maybe<'r, 'mw, 'server, D>

§

impl<'r, 'mw, 'server, D> !UnwindSafe for Maybe<'r, 'mw, 'server, D>

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> Typeable for T
where T: Any,

Source§

fn get_type(&self) -> TypeId

Get the TypeId of this object.
Source§

impl<T> UnsafeAny for T
where T: Any,