Struct etcd_client::LeaseClient [−][src]
#[repr(transparent)]pub struct LeaseClient { /* fields omitted */ }
Client for lease operations.
Implementations
impl LeaseClient[src]
impl LeaseClient[src]pub async fn grant(
&mut self,
ttl: i64,
options: Option<LeaseGrantOptions>
) -> Result<LeaseGrantResponse, Error>[src]
&mut self,
ttl: i64,
options: Option<LeaseGrantOptions>
) -> Result<LeaseGrantResponse, Error>
Creates a lease which expires if the server does not receive a keepAlive within a given time to live period. All keys attached to the lease will be expired and deleted if the lease expires. Each expired key generates a delete event in the event history.
pub async fn revoke(&mut self, id: i64) -> Result<LeaseRevokeResponse, Error>[src]
Revokes a lease. All keys attached to the lease will expire and be deleted.
pub async fn keep_alive(
&mut self,
id: i64
) -> Result<(LeaseKeeper, LeaseKeepAliveStream), Error>[src]
&mut self,
id: i64
) -> Result<(LeaseKeeper, LeaseKeepAliveStream), Error>
Keeps the lease alive by streaming keep alive requests from the client to the server and streaming keep alive responses from the server to the client.
pub async fn time_to_live(
&mut self,
id: i64,
options: Option<LeaseTimeToLiveOptions>
) -> Result<LeaseTimeToLiveResponse, Error>[src]
&mut self,
id: i64,
options: Option<LeaseTimeToLiveOptions>
) -> Result<LeaseTimeToLiveResponse, Error>
Retrieves lease information.
pub async fn leases(&mut self) -> Result<LeaseLeasesResponse, Error>[src]
Lists all existing leases.
Trait Implementations
impl Clone for LeaseClient[src]
impl Clone for LeaseClient[src]fn clone(&self) -> LeaseClient[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
Auto Trait Implementations
impl !RefUnwindSafe for LeaseClient
impl !RefUnwindSafe for LeaseClientimpl Send for LeaseClient
impl Send for LeaseClientimpl Sync for LeaseClient
impl Sync for LeaseClientimpl Unpin for LeaseClient
impl Unpin for LeaseClientimpl !UnwindSafe for LeaseClient
impl !UnwindSafe for LeaseClientBlanket Implementations
impl<T> Instrument for T[src]
impl<T> Instrument for T[src]pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T> Instrument for T[src]
impl<T> Instrument for T[src]pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T> IntoRequest<T> for T[src]
impl<T> IntoRequest<T> for T[src]pub fn into_request(self) -> Request<T>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>, pub fn vzip(self) -> V
impl<T> WithSubscriber for T[src]
impl<T> WithSubscriber for T[src]pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>, [src]
S: Into<Dispatch>,