pub enum ExpiryTarget {
At(Timestamp),
FromCreation(Duration),
}Expand description
The requested minimum deadline for an expiry update.
ExpiryTarget::At is already resolved. ExpiryTarget::FromCreation
is resolved by the backend from the creation time read by the update
operation itself. Zero durations and resolved deadlines in the past remain
valid minimum-deadline requests.
Variants§
At(Timestamp)
An absolute deadline.
FromCreation(Duration)
A deadline relative to the object’s creation time.
Implementations§
Source§impl ExpiryTarget
impl ExpiryTarget
Sourcepub fn resolve(self, time_created: Option<Timestamp>) -> Option<Timestamp>
pub fn resolve(self, time_created: Option<Timestamp>) -> Option<Timestamp>
Resolves this target against an optional creation time.
Returns None when a creation-relative target has no creation time.
Creation-relative deadlines use the timestamp’s existing rounding and
clamp to its maximum value on overflow.
Trait Implementations§
Source§impl Clone for ExpiryTarget
impl Clone for ExpiryTarget
Source§fn clone(&self) -> ExpiryTarget
fn clone(&self) -> ExpiryTarget
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ExpiryTarget
Source§impl Debug for ExpiryTarget
impl Debug for ExpiryTarget
impl Eq for ExpiryTarget
Source§impl From<ExpiryTarget> for ExpiryUpdate
impl From<ExpiryTarget> for ExpiryUpdate
Source§fn from(target: ExpiryTarget) -> Self
fn from(target: ExpiryTarget) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ExpiryTarget
impl PartialEq for ExpiryTarget
impl StructuralPartialEq for ExpiryTarget
Auto Trait Implementations§
impl Freeze for ExpiryTarget
impl RefUnwindSafe for ExpiryTarget
impl Send for ExpiryTarget
impl Sync for ExpiryTarget
impl Unpin for ExpiryTarget
impl UnsafeUnpin for ExpiryTarget
impl UnwindSafe for ExpiryTarget
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].