pub struct CountSink<T> { /* private fields */ }Expand description
Sink that counts items received.
§Example
use grafos_stream::sink::CountSink;
use grafos_stream::stage::Sink;
let mut sink: CountSink<u32> = CountSink::new();
sink.accept(10).unwrap();
sink.accept(20).unwrap();
assert_eq!(sink.count(), 2);Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for CountSink<T>
impl<T> RefUnwindSafe for CountSink<T>where
T: RefUnwindSafe,
impl<T> Send for CountSink<T>where
T: Send,
impl<T> Sync for CountSink<T>where
T: Sync,
impl<T> Unpin for CountSink<T>where
T: Unpin,
impl<T> UnwindSafe for CountSink<T>where
T: UnwindSafe,
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