pub struct Producer<T> { /* private fields */ }Expand description
Publishes a JSON value over a track, choosing snapshots and deltas automatically.
Cheaply clonable: clones share one underlying track and publishing state, like other MoQ producers.
Implementations§
Source§impl<T> Producer<T>
impl<T> Producer<T>
Sourcepub fn consume(&self) -> TrackConsumer
pub fn consume(&self) -> TrackConsumer
Create a subscriber for the underlying track.
Source§impl<T: Serialize> Producer<T>
impl<T: Serialize> Producer<T>
Sourcepub fn new(track: TrackProducer, config: Config) -> Self
pub fn new(track: TrackProducer, config: Config) -> Self
Create a producer that publishes to the given track.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Producer<T>
impl<T> RefUnwindSafe for Producer<T>
impl<T> Send for Producer<T>
impl<T> Sync for Producer<T>
impl<T> Unpin for Producer<T>
impl<T> UnsafeUnpin for Producer<T>
impl<T> UnwindSafe for Producer<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