Struct etcd_client::LeaseClient[][src]

#[repr(transparent)]
pub struct LeaseClient { /* fields omitted */ }

Client for lease operations.

Implementations

impl LeaseClient[src]

pub async fn grant(
    &mut self,
    ttl: i64,
    options: Option<LeaseGrantOptions>
) -> Result<LeaseGrantResponse, Error>
[src]

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]

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]

Retrieves lease information.

pub async fn leases(&mut self) -> Result<LeaseLeasesResponse, Error>[src]

Lists all existing leases.

Trait Implementations

impl Clone for LeaseClient[src]

Auto Trait Implementations

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> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<T> IntoRequest<T> for 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>, 

impl<T> WithSubscriber for T[src]