pub struct VectorSubscriber<T> { /* private fields */ }
Expand description
A subscriber for updates of a Vector
.
Implementations§
Source§impl<T: Clone + 'static> VectorSubscriber<T>
impl<T: Clone + 'static> VectorSubscriber<T>
Sourcepub fn values(&self) -> Vector<T>
pub fn values(&self) -> Vector<T>
Get the items the ObservableVector
contained when this subscriber was created.
Sourcepub fn into_stream(self) -> VectorSubscriberStream<T>
pub fn into_stream(self) -> VectorSubscriberStream<T>
Turn this VectorSubcriber
into a stream of VectorDiff
s.
Sourcepub fn into_batched_stream(self) -> VectorSubscriberBatchedStream<T>
pub fn into_batched_stream(self) -> VectorSubscriberBatchedStream<T>
Turn this VectorSubcriber
into a stream of Vec<VectorDiff>
s.
Sourcepub fn into_values_and_stream(self) -> (Vector<T>, VectorSubscriberStream<T>)
pub fn into_values_and_stream(self) -> (Vector<T>, VectorSubscriberStream<T>)
Destructure this VectorSubscriber
into the initial values and a stream
of VectorDiff
s.
Semantically equivalent to calling .values()
and .into_stream()
separately, but guarantees that the values are not unnecessarily cloned.
Sourcepub fn into_values_and_batched_stream(
self,
) -> (Vector<T>, VectorSubscriberBatchedStream<T>)
pub fn into_values_and_batched_stream( self, ) -> (Vector<T>, VectorSubscriberBatchedStream<T>)
Destructure this VectorSubscriber
into the initial values and a stream
of Vec<VectorDiff>
s.
Semantically equivalent to calling .values()
and
.into_batched_stream()
separately, but guarantees that the values
are not unnecessarily cloned.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for VectorSubscriber<T>
impl<T> !RefUnwindSafe for VectorSubscriber<T>
impl<T> Send for VectorSubscriber<T>
impl<T> Sync for VectorSubscriber<T>
impl<T> Unpin for VectorSubscriber<T>where
T: Unpin,
impl<T> !UnwindSafe for VectorSubscriber<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