Struct eyeball_im::VectorSubscriber
source · 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>where
T: RefUnwindSafe,
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>where
T: UnwindSafe + RefUnwindSafe,
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