Struct nullable_utils::OutputTracker
source · pub struct OutputTracker<T> { /* private fields */ }Expand description
Tracker implements the receiver side of the [Output Tracking pattern].
Implementations§
source§impl<T> Tracker<T>
impl<T> Tracker<T>
sourcepub fn consume(&self) -> Vec<T>
pub fn consume(&self) -> Vec<T>
Consume all current events.
The consumed events will not be returned by future invocations of data or consume.
sourcepub fn data(&self) -> TrackerData<'_, T>
pub fn data(&self) -> TrackerData<'_, T>
Get a read-only view of tracked data so far.
This will block the sender side while the returned handle exists, so it should not be held for a long time.
Alternatively, you can copy out of the returned view or use Tracker::consume if you do not need to retain the
data.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Tracker<T>
impl<T> !RefUnwindSafe for Tracker<T>
impl<T> Send for Tracker<T>
impl<T> Sync for Tracker<T>
impl<T> Unpin for Tracker<T>
impl<T> !UnwindSafe for Tracker<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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)