pub struct ExpiryUpdate {
pub target: ExpiryTarget,
pub max: Option<Duration>,
}Expand description
An expiry target and optional limit on the remaining lifetime it requests.
The limit is measured from the operation’s access_time, regardless of the target’s
anchor. It does not change the policy kind or shorten existing deadlines.
Repeated updates can therefore keep an object alive indefinitely.
Fields§
§target: ExpiryTargetThe requested minimum deadline.
max: Option<Duration>Maximum remaining lifetime. None means no limit.
Implementations§
Source§impl ExpiryUpdate
impl ExpiryUpdate
Sourcepub fn resolve(
self,
time_created: Option<Timestamp>,
access_time: Timestamp,
) -> Result<Option<Timestamp>>
pub fn resolve( self, time_created: Option<Timestamp>, access_time: Timestamp, ) -> Result<Option<Timestamp>>
Resolves and validates the requested deadline using the stored object metadata.
Returns None if the creation-time anchor is required but unavailable.
Returns ErrorKind::InvalidMetadata if the requested deadline exceeds
access_time + max, even if the existing deadline already satisfies it.
Timestamp addition rounds up to seconds and saturates at the supported maximum.
Trait Implementations§
Source§impl Clone for ExpiryUpdate
impl Clone for ExpiryUpdate
Source§fn clone(&self) -> ExpiryUpdate
fn clone(&self) -> ExpiryUpdate
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 ExpiryUpdate
Source§impl Debug for ExpiryUpdate
impl Debug for ExpiryUpdate
impl Eq for ExpiryUpdate
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 ExpiryUpdate
impl PartialEq for ExpiryUpdate
impl StructuralPartialEq for ExpiryUpdate
Auto Trait Implementations§
impl Freeze for ExpiryUpdate
impl RefUnwindSafe for ExpiryUpdate
impl Send for ExpiryUpdate
impl Sync for ExpiryUpdate
impl Unpin for ExpiryUpdate
impl UnsafeUnpin for ExpiryUpdate
impl UnwindSafe for ExpiryUpdate
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].