pub fn create<C>(
client: &Client<C>,
key: &str,
value: &str,
ttl: Option<u64>
) -> impl Future<Item = Response<KeyValueInfo>, Error = Vec<Error>> + Sendwhere
C: Clone + Connect,
Expand description
Creates a new key-value pair.
Parameters
- client: A
Client
to use to make the API call. - key: The name of the key-value pair to create.
- value: The new value for the node.
- ttl: If given, the node will expire after this many seconds.
Errors
Fails if the key already exists.