set

Function set 

Source
pub fn set<C>(
    client: &Client<C>,
    key: &str,
    value: &str,
    ttl: Option<u64>,
) -> impl Future<Item = Response<KeyValueInfo>, Error = Vec<Error>> + Send
where C: Clone + Connect,
Expand description

Sets the value of a key-value pair.

Any previous value and TTL will be replaced.

§Parameters

  • client: A Client to use to make the API call.
  • key: The name of the key-value pair to set.
  • value: The new value for the key-value pair.
  • ttl: If given, the node will expire after this many seconds.

§Errors

Fails if the node is a directory.