pub fn set_dir<C>(
client: &Client<C>,
key: &str,
ttl: Option<u64>
) -> impl Future<Item = Response<KeyValueInfo>, Error = Vec<Error>> + Sendwhere
C: Clone + Connect,
Expand description
Sets the key to an empty directory.
An existing key-value pair will be replaced, but an existing directory will not.
Parameters
- client: A
Client
to use to make the API call. - key: The name of the directory to set.
- ttl: If given, the node will expire after this many seconds.
Errors
Fails if the node is an existing directory.