pub struct Consumer { /* private fields */ }Expand description
Reads a datagram track’s datagrams, in arrival order, from when it was created.
Each consumer holds a subscriber priority that the track’s publisher sees aggregated as the highest among its consumers. A clone keeps the original’s priority and position.
Implementations§
Source§impl Consumer
impl Consumer
Sourcepub fn poll_info(&self, waiter: &Waiter) -> Poll<Result<Info>>
pub fn poll_info(&self, waiter: &Waiter) -> Poll<Result<Info>>
The track’s properties, once its publisher accepted it.
Sourcepub async fn info(&self) -> Result<Info>
pub async fn info(&self) -> Result<Info>
The track’s properties, once its publisher accepted it.
Awaits poll_info.
Sourcepub fn poll_recv(&mut self, waiter: &Waiter) -> Poll<Result<Option<Datagram>>>
pub fn poll_recv(&mut self, waiter: &Waiter) -> Poll<Result<Option<Datagram>>>
The next datagram, or None once the track finished and this consumer read what it
buffered. An aborted track errors at once.
A consumer that fell behind skips the datagrams the track no longer holds.
Sourcepub async fn recv(&mut self) -> Result<Option<Datagram>>
pub async fn recv(&mut self) -> Result<Option<Datagram>>
The next datagram, or None once the track finished and this consumer read what it
buffered. An aborted track errors at once.
A consumer that fell behind skips the datagrams the track no longer holds.
Awaits poll_recv.
Sourcepub fn set_priority(&mut self, priority: i8)
pub fn set_priority(&mut self, priority: i8)
Set this consumer’s subscriber priority, higher first.