pub struct AckOptions { /* private fields */ }Expand description
Set of options that are required by RedisStream::ack_entry()
Implementations§
Source§impl AckOptions
impl AckOptions
Sourcepub fn new(stream: String, group: String, entry_id: EntryId) -> Self
pub fn new(stream: String, group: String, entry_id: EntryId) -> Self
Examples found in repository?
examples/stream_consumer.rs (line 158)
156fn ack_stream_entry(manager: RedisStream, stream: String, group: String, id_to_ack: EntryId)
157 -> impl Future<Item=RedisStream, Error=RedisError> {
158 let options = AckOptions::new(stream.clone(), group.clone(), id_to_ack.clone());
159
160 manager.ack_entry(options)
161 .map(move |(manager, response)| {
162 match response {
163 AckResponse::Ok => println!("{:?} is acknowledged", id_to_ack.to_string()),
164 AckResponse::NotExists =>
165 eprintln!("Couldn't acknowledge {:?}", id_to_ack.to_string())
166 };
167 manager
168 })
169}Trait Implementations§
Source§impl Clone for AckOptions
impl Clone for AckOptions
Source§fn clone(&self) -> AckOptions
fn clone(&self) -> AckOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AckOptions
impl RefUnwindSafe for AckOptions
impl Send for AckOptions
impl Sync for AckOptions
impl Unpin for AckOptions
impl UnwindSafe for AckOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more