Struct zookeeper_client::MultiReader
source · pub struct MultiReader<'a> { /* private fields */ }
Expand description
MultiReader commits multiple read operations in one request to achieve snapshot like semantics.
Implementations§
source§impl<'a> MultiReader<'a>
impl<'a> MultiReader<'a>
sourcepub fn add_get_data(&mut self, path: &str) -> Result<(), Error>
pub fn add_get_data(&mut self, path: &str) -> Result<(), Error>
Adds operation to get stat and data for node with given path.
See Client::get_data for more details.
sourcepub fn add_get_children(&mut self, path: &str) -> Result<(), Error>
pub fn add_get_children(&mut self, path: &str) -> Result<(), Error>
Adds operation to get stat and children for node with given path.
See Client::get_children for more details.
sourcepub async fn commit(&mut self) -> Result<Vec<MultiReadResult>, Error>
pub async fn commit(&mut self) -> Result<Vec<MultiReadResult>, Error>
Commits multiple operations in one request to reach consistent read.
Notable behaviors
Individual errors(eg. Error::NoNode) are reported individually through MultiReadResult::Error.