Struct etcd_rs::KeyValue[][src]

pub struct KeyValue { /* fields omitted */ }

Key-Value pair.

Implementations

impl KeyValue[src]

pub fn key(&self) -> &[u8][src]

Gets the key in bytes. An empty key is not allowed.

pub fn take_key(&mut self) -> Vec<u8>[src]

Takes the key out of response, leaving an empty vector in its place.

pub fn key_str(&self) -> &str[src]

Converts the key from bytes &[u8] to &str. Leaves the original &[u8] in place, and creates a new string slice containing the entire content.

pub fn value(&self) -> &[u8][src]

Gets the value held by the key, in bytes.

pub fn take_value(&mut self) -> Vec<u8>[src]

Takes the value out of response, leaving an empty vector in its place.

pub fn value_str(&self) -> &str[src]

Converts the value from bytes &[u8] to &str. Leaves the original &[u8] in place, and creates a new string slice containing the entire content.

pub fn create_revision(&self) -> usize[src]

Gets the revision of last creation on this key.

pub fn mod_revision(&self) -> usize[src]

Gets the revision of last modification on this key.

pub fn version(&self) -> usize[src]

Gets the version of the key.

pub fn lease(&self) -> usize[src]

Gets the ID of the lease that attached to key.

pub fn has_lease(&self) -> bool[src]

Returns true if this KeyValue has a lease attached, and false otherwise.

Trait Implementations

impl Clone for KeyValue[src]

impl PartialEq<KeyValue> for KeyValue[src]

impl StructuralPartialEq for KeyValue[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]