pub struct Encoded {
pub payload: Bytes,
pub keyframe: bool,
}Expand description
One encoded frame, and the group boundary it implies.
Fields§
§payload: BytesThe frame payload, DEFLATE-compressed when ProducerConfig::compression is set.
keyframe: boolWhether this frame is a full snapshot, which must open a new group.
true means the caller writes it as the first frame of a fresh group; false means it is a
merge patch that must be appended to the group the last snapshot opened. Mapping straight onto
moq_mux::container::Frame::keyframe is the point of the name.
The encoder decides this, never the caller: a value that sets a field to JSON null, or whose root isn’t an object, cannot be expressed as a merge patch at all, and the delta budget and frame cap force a snapshot independently of what the caller wanted.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Encoded
impl RefUnwindSafe for Encoded
impl Send for Encoded
impl Sync for Encoded
impl Unpin for Encoded
impl UnsafeUnpin for Encoded
impl UnwindSafe for Encoded
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