pub struct VecSink<T> { /* private fields */ }Available on crate feature
std only.Expand description
Sink that pushes every item into an internal Vec. Useful in tests.
The collected items live behind a SharedHandle returned by
VecSink::handle. The handle is Send + Sync (via internal
Arc<Mutex<_>>) and outlives the sink, so callers can drop the
sink and still read the result.
Implementations§
Trait Implementations§
Source§impl<T: Send + 'static> Sink for VecSink<T>
impl<T: Send + 'static> Sink for VecSink<T>
Auto Trait Implementations§
impl<T> Freeze for VecSink<T>
impl<T> RefUnwindSafe for VecSink<T>
impl<T> Send for VecSink<T>where
T: Send,
impl<T> Sync for VecSink<T>where
T: Send,
impl<T> Unpin for VecSink<T>
impl<T> UnsafeUnpin for VecSink<T>
impl<T> UnwindSafe for VecSink<T>
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