pub struct ListSubscription<T, Codec = Default> { /* private fields */ }Expand description
Observable list subscription.
This can be sent to a remote endpoint via a remote channel. Then, on the remote endpoint, mirror can be used to build and keep up-to-date a mirror of the observed list.
The event stream can also be processed event-wise using recv.
Implementations§
Source§impl<T, Codec> ListSubscription<T, Codec>
impl<T, Codec> ListSubscription<T, Codec>
Sourcepub fn is_complete(&self) -> bool
👎Deprecated: remoc-obs has been integrated into remoc as module remoc::robs. Please update your references.
pub fn is_complete(&self) -> bool
Returns whether the initial value event or stream of events that build up the initial value has completed.
Sourcepub fn is_done(&self) -> bool
👎Deprecated: remoc-obs has been integrated into remoc as module remoc::robs. Please update your references.
pub fn is_done(&self) -> bool
Returns whether the observed list has indicated that no further change events will occur.
Sourcepub async fn recv(&mut self) -> Result<Option<ListEvent<T>>, RecvError>
👎Deprecated: remoc-obs has been integrated into remoc as module remoc::robs. Please update your references.
pub async fn recv(&mut self) -> Result<Option<ListEvent<T>>, RecvError>
Receives the next change event.
Sourcepub async fn recv_item(&mut self) -> Result<Option<T>, RecvError>
👎Deprecated: remoc-obs has been integrated into remoc as module remoc::robs. Please update your references.
pub async fn recv_item(&mut self) -> Result<Option<T>, RecvError>
Receives the next item.
Ok(None) is returned when all items have been received and the observed
list has been marked as done.
Source§impl<T, Codec> ListSubscription<T, Codec>
impl<T, Codec> ListSubscription<T, Codec>
Sourcepub fn mirror(self, max_size: usize) -> MirroredList<T>
👎Deprecated: remoc-obs has been integrated into remoc as module remoc::robs. Please update your references.
pub fn mirror(self, max_size: usize) -> MirroredList<T>
Mirror the list that this subscription is observing.
max_size specifies the maximum allowed size of the mirrored collection.
If this size is reached, processing of events is stopped and
RecvError::MaxSizeExceeded is returned.