pub enum Datagram<'a> {
Hello {
cookie: u64,
},
Data {
cookie: u64,
first: u64,
count: u16,
serial: u32,
payload: &'a [u8],
},
DataComp {
cookie: u64,
first: u64,
count: u16,
serial: u32,
payload: &'a [u8],
},
Idle {
cookie: u64,
next: u64,
},
Feedback {
cookie: u64,
loss: u32,
gaps: Gaps<'a>,
},
}Expand description
One datagram, as the receiver reads it.
Variants§
Hello
The first datagram of the inlet.
Fields
The cookie of the answer.
Data
Samples with consecutive numbers.
Fields
The cookie of the answer.
DataComp
Compressed samples with consecutive numbers (comp/1).
Fields
The cookie of the answer.
§
payload: &'a [u8]Self-contained compressed block decoded by crate::comp::decode_dgram_payload.
Idle
No sample follows.
Feedback
The measured loss and the small gaps of the inlet.
Fields
The cookie of the answer.
§
loss: u32The loss of datagrams in parts per million, or NO_MEASURE.
Trait Implementations§
impl<'a> Copy for Datagram<'a>
impl<'a> Eq for Datagram<'a>
impl<'a> StructuralPartialEq for Datagram<'a>
Auto Trait Implementations§
impl<'a> Forget for Datagram<'a>
impl<'a> Freeze for Datagram<'a>
impl<'a> Move for Datagram<'a>
impl<'a> RefUnwindSafe for Datagram<'a>
impl<'a> Send for Datagram<'a>
impl<'a> Sync for Datagram<'a>
impl<'a> Unpin for Datagram<'a>
impl<'a> UnsafeUnpin for Datagram<'a>
impl<'a> UnwindSafe for Datagram<'a>
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