Struct etcd_client::KvClient[][src]

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

Client for KV operations.

Implementations

impl KvClient[src]

pub async fn put(
    &mut self,
    key: impl Into<Vec<u8>>,
    value: impl Into<Vec<u8>>,
    options: Option<PutOptions>
) -> Result<PutResponse, Error>
[src]

Puts the given key into the key-value store. A put request increments the revision of the key-value store and generates one event in the event history.

pub async fn get(
    &mut self,
    key: impl Into<Vec<u8>>,
    options: Option<GetOptions>
) -> Result<GetResponse, Error>
[src]

Gets the key or a range of keys from the store.

pub async fn delete(
    &mut self,
    key: impl Into<Vec<u8>>,
    options: Option<DeleteOptions>
) -> Result<DeleteResponse, Error>
[src]

Deletes the given key or a range of keys from the key-value store.

pub async fn compact(
    &mut self,
    revision: i64,
    options: Option<CompactionOptions>
) -> Result<CompactionResponse, Error>
[src]

Compacts the event history in the etcd key-value store. The key-value store should be periodically compacted or the event history will continue to grow indefinitely.

pub async fn txn(&mut self, txn: Txn) -> Result<TxnResponse, Error>[src]

Processes multiple operations in a single transaction. A txn request increments the revision of the key-value store and generates events with the same revision for every completed operation. It is not allowed to modify the same key several times within one txn.

Trait Implementations

impl Clone for KvClient[src]

Auto Trait Implementations

impl !RefUnwindSafe for KvClient

impl Send for KvClient

impl Sync for KvClient

impl Unpin for KvClient

impl !UnwindSafe for KvClient

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]