[−][src]Struct exonum_api::Deprecated
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) -> Self
[src]
Creates a new Deprecated
object.
pub fn with_date(self, discontinued_on: DateTime<Utc>) -> Self
[src]
Adds an expiration date for endpoint.
pub fn with_description<S: Into<String>>(self, description: S) -> Self
[src]
Adds a description note to the warning, e.g. link to the new API documentation.
pub fn with_different_handler<F1, R1>(
self,
handler: F1
) -> Deprecated<Q, I, R1, F1> where
F1: Fn(Q) -> R1,
R1: Future<Output = Result<I>>,
[src]
self,
handler: F1
) -> Deprecated<Q, I, R1, F1> where
F1: Fn(Q) -> R1,
R1: Future<Output = Result<I>>,
Replaces the used handler with a new one.
Trait Implementations
impl<Q: Clone, I: Clone, R: Clone, F: Clone> Clone for Deprecated<Q, I, R, F>
[src]
fn clone(&self) -> Deprecated<Q, I, R, F>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<Q: Debug, I: Debug, R: Debug, F: Debug> Debug for Deprecated<Q, I, R, F>
[src]
impl<'a, Q, I, R, F> From<Deprecated<Q, I, R, F>> for With<Q, I, R, F>
[src]
fn from(deprecated: Deprecated<Q, I, R, F>) -> Self
[src]
impl<Q, I, R, F> From<F> for Deprecated<Q, I, R, F> where
F: Fn(Q) -> R,
R: Future<Output = Result<I>>,
[src]
F: Fn(Q) -> R,
R: Future<Output = Result<I>>,
Auto Trait Implementations
impl<Q, I, R, F> RefUnwindSafe for Deprecated<Q, I, R, F> where
F: RefUnwindSafe,
I: RefUnwindSafe,
Q: RefUnwindSafe,
R: RefUnwindSafe,
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,
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,
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,
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,
F: UnwindSafe,
I: UnwindSafe,
Q: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,