pub struct SenderReport {
pub interval_start_counter: u64,
pub interval_end_counter: u64,
pub interval_start_timestamp: u32,
pub interval_end_timestamp: u32,
pub interval_bytes_sent: u32,
pub cumulative_packets_sent: u64,
pub cumulative_bytes_sent: u64,
}Expand description
Link-layer sender report.
Wire layout (48 bytes total, sent as link message):
[0] msg_type = 0x01
[1-3] reserved (zero)
[4-11] interval_start_counter: u64 LE
[12-19] interval_end_counter: u64 LE
[20-23] interval_start_timestamp: u32 LE
[24-27] interval_end_timestamp: u32 LE
[28-31] interval_bytes_sent: u32 LE
[32-39] cumulative_packets_sent: u64 LE
[40-47] cumulative_bytes_sent: u64 LEFields§
§interval_start_counter: u64§interval_end_counter: u64§interval_start_timestamp: u32§interval_end_timestamp: u32§interval_bytes_sent: u32§cumulative_packets_sent: u64§cumulative_bytes_sent: u64Implementations§
Source§impl SenderReport
impl SenderReport
Sourcepub fn encode(&self) -> Vec<u8> ⓘ
pub fn encode(&self) -> Vec<u8> ⓘ
Encode to wire format (48 bytes: msg_type + 3 reserved + 44 payload).
Sourcepub fn decode(payload: &[u8]) -> Result<Self, ProtocolError>
pub fn decode(payload: &[u8]) -> Result<Self, ProtocolError>
Decode from payload after msg_type byte has been consumed.
payload starts at the reserved bytes (offset 1 in the wire format).
Trait Implementations§
Source§impl Clone for SenderReport
impl Clone for SenderReport
Source§fn clone(&self) -> SenderReport
fn clone(&self) -> SenderReport
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SenderReport
impl Debug for SenderReport
Source§impl From<&SenderReport> for SessionSenderReport
impl From<&SenderReport> for SessionSenderReport
Source§fn from(r: &SenderReport) -> Self
fn from(r: &SenderReport) -> Self
Converts to this type from the input type.
Source§impl From<&SessionSenderReport> for SenderReport
impl From<&SessionSenderReport> for SenderReport
Source§fn from(r: &SessionSenderReport) -> Self
fn from(r: &SessionSenderReport) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SenderReport
impl PartialEq for SenderReport
Source§fn eq(&self, other: &SenderReport) -> bool
fn eq(&self, other: &SenderReport) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for SenderReport
impl StructuralPartialEq for SenderReport
Auto Trait Implementations§
impl Freeze for SenderReport
impl RefUnwindSafe for SenderReport
impl Send for SenderReport
impl Sync for SenderReport
impl Unpin for SenderReport
impl UnsafeUnpin for SenderReport
impl UnwindSafe for SenderReport
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more