<commit_before>//! etcd's key-value API.
//!
//! The term "node" in the documentation for this module refers to a key-value pair or a directory
//! of key-value pairs. For example, "/foo" is a key if it has a value, but it is a directory if
//! there other other key-value pairs "underneath" it, such as "/foo/bar".

use std::collections::HashMap;
use std::str::FromStr;
use std::time::Duration;

use futures::future::{Future, IntoFuture, err, ok};
use futures::stream::Stream;
use hyper::{StatusCode, Uri};
use hyper::client::Connect;
use serde_json;
use tokio_timer::Timer;
use url::Url;

pub use error::WatchError;

use async::first_ok;
use client::{Client, ClusterInfo};
use error::{ApiError, Error};
use member::Member;
use options::{ComparisonConditions, DeleteOptions, GetOptions as InternalGetOptions, SetOptions};
use url::form_urlencoded::Serializer;

/// The future returned by most key space API calls.
///
/// On success, information about the result of the operation. On failure, an error for each cluster
/// member that failed.
pub type FutureKeyValueInfo = Box<Future<Item = (KeyValueInfo, ClusterInfo), Error = Vec<Error>>>;

/// A `FutureKeyValueInfo` for a single etcd cluster member.
pub(crate) type FutureSingleMemberKeyValueInfo = Box<
    Future<Item = (KeyValueInfo, ClusterInfo), Error = Error>,<commit_msg>Mention the cluster info in FutureKeyValueInfo docs.<commit_after>//! etcd's key-value API.
//!
//! The term "node" in the documentation for this module refers to a key-value pair or a directory
//! of key-value pairs. For example, "/foo" is a key if it has a value, but it is a directory if
//! there other other key-value pairs "underneath" it, such as "/foo/bar".

use std::collections::HashMap;
use std::str::FromStr;
use std::time::Duration;

use futures::future::{Future, IntoFuture, err, ok};
use futures::stream::Stream;
use hyper::{StatusCode, Uri};
use hyper::client::Connect;
use serde_json;
use tokio_timer::Timer;
use url::Url;

pub use error::WatchError;

use async::first_ok;
use client::{Client, ClusterInfo};
use error::{ApiError, Error};
use member::Member;
use options::{ComparisonConditions, DeleteOptions, GetOptions as InternalGetOptions, SetOptions};
use url::form_urlencoded::Serializer;

/// The future returned by most key space API calls.
///
/// On success, information about the result of the operation and information about the etcd
/// cluster. On failure, an error for each cluster member that failed.
pub type FutureKeyValueInfo = Box<Future<Item = (KeyValueInfo, ClusterInfo), Error = Vec<Error>>>;

/// A `FutureKeyValueInfo` for a single etcd cluster member.
pub(crate) type FutureSingleMemberKeyValueInfo = Box<
    Future<Item = (KeyValueInfo, ClusterInfo), Error = Error>,
{'fraction_non_alphanumeric': 0.12572886297376093, 'fraction_numerical': 0.0, 'mean_word_length': 5.238636363636363, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5639814', 'n_tokens_mistral': 799, 'n_tokens_neox': 789, 'n_words': 311}