[][src]Struct exonum_api::NamedWith

pub struct NamedWith<Q, I, R, F> {
    pub name: String,
    pub inner: With<Q, I, R, F>,
    pub mutability: EndpointMutability,
}

API Endpoint extractor that also contains the endpoint name and its kind.

Fields

name: String

Endpoint name.

inner: With<Q, I, R, F>

Extracted endpoint handler.

mutability: EndpointMutability

Endpoint mutability.

Methods

impl<Q, I, R, F> NamedWith<Q, I, R, F>[src]

pub fn new<S, W>(name: S, inner: W, mutability: EndpointMutability) -> Self where
    S: Into<String>,
    W: Into<With<Q, I, R, F>>, 
[src]

Creates a new instance from the given handler.

pub fn mutable<S, W>(name: S, inner: W) -> Self where
    S: Into<String>,
    W: Into<With<Q, I, R, F>>, 
[src]

Creates a new mutable NamedWith from the given handler.

pub fn immutable<S, W>(name: S, inner: W) -> Self where
    S: Into<String>,
    W: Into<With<Q, I, R, F>>, 
[src]

Creates a new mutable NamedWith from the given handler.

Trait Implementations

impl<Q: Debug, I: Debug, R: Debug, F: Debug> Debug for NamedWith<Q, I, R, F>[src]

impl<Q, I, F, R> From<NamedWith<Q, I, R, F>> for RequestHandler where
    F: Fn(Q) -> R + 'static + Clone + Send + Sync,
    Q: DeserializeOwned + 'static,
    I: Serialize + 'static,
    R: Future<Output = Result<I, Error>>, 
[src]

Auto Trait Implementations

impl<Q, I, R, F> RefUnwindSafe for NamedWith<Q, I, R, F> where
    F: RefUnwindSafe,
    I: RefUnwindSafe,
    Q: RefUnwindSafe,
    R: RefUnwindSafe

impl<Q, I, R, F> Send for NamedWith<Q, I, R, F> where
    F: Send,
    I: Send,
    Q: Send,
    R: Send

impl<Q, I, R, F> Sync for NamedWith<Q, I, R, F> where
    F: Sync,
    I: Sync,
    Q: Sync,
    R: Sync

impl<Q, I, R, F> Unpin for NamedWith<Q, I, R, F> where
    F: Unpin,
    I: Unpin,
    Q: Unpin,
    R: Unpin

impl<Q, I, R, F> UnwindSafe for NamedWith<Q, I, R, F> where
    F: UnwindSafe,
    I: UnwindSafe,
    Q: UnwindSafe,
    R: UnwindSafe

Blanket Implementations

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

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

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

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

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

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.

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,