[][src]Struct exonum_rust_runtime::api::Deprecated

pub struct Deprecated<Q, I, R, F> {
    pub handler: F,
    pub discontinued_on: Option<DateTime<Utc>>,
    pub description: Option<String>,
    // some fields omitted
}

Wrapper over an endpoint handler, which marks it as deprecated.

Fields

handler: F

Underlying API handler.

discontinued_on: Option<DateTime<Utc>>

Optional endpoint expiration date.

description: Option<String>

Optional additional note.

Methods

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

pub fn new(handler: F) -> Deprecated<Q, I, R, F>[src]

Creates a new Deprecated object.

pub fn with_date(self, discontinued_on: DateTime<Utc>) -> Deprecated<Q, I, R, F>[src]

Adds an expiration date for endpoint.

pub fn with_description<S>(self, description: S) -> Deprecated<Q, I, R, F> where
    S: Into<String>, 
[src]

Adds a description note to the warning, e.g. link to the new API documentation.

pub fn with_different_handler<F1>(self, handler: F1) -> Deprecated<Q, I, R, F1>[src]

Replaces the used handler with a new one.

Trait Implementations

impl<Q, I, R, F> Clone for Deprecated<Q, I, R, F> where
    F: Clone,
    I: Clone,
    Q: Clone,
    R: Clone
[src]

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

impl<Q, I, F> From<F> for Deprecated<Q, I, Result<I, Error>, F> where
    F: Fn(Q) -> Result<I, Error>, 
[src]

impl<Q, I, F> From<F> for Deprecated<Q, I, Box<dyn Future<Item = I, Error = Error> + 'static>, F> where
    F: Fn(Q) -> Box<dyn Future<Item = I, Error = Error> + 'static>, 
[src]

Auto Trait Implementations

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

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

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

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

impl<Q, I, R, F> UnwindSafe for Deprecated<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> Erased for T

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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>,