#[repr(i32)]pub enum DataLossReason {
DataLossUnspecified = 0,
DataLossPresent = 1,
DataLossReadGap = 2,
DataLossChunkCorrupted = 4,
DataLossOrphanContinuation = 8,
DataLossReassemblyGap = 16,
DataLossReassemblyBrokenChain = 32,
DataLossOverwrite = 64,
DataLossWriterAbort = 128,
DataLossSmbFull = 256,
}Expand description
Bit flags OR-ed together into |previous_packet_dropped| to describe why packets were dropped. DATA_LOSS_PRESENT is set on every loss; the remaining bits attribute the cause and are set either by TraceBufferV2 in the service or by the producer’s trace writer.
Variants§
DataLossUnspecified = 0
DataLossPresent = 1
A loss was detected (set on every loss). On its own (value 1) it means dropped with no specific cause, e.g. TraceBufferV1 or a producer.
DataLossReadGap = 2
A read started on a non-successor ChunkID (a gap in the stream).
DataLossChunkCorrupted = 4
A chunk’s fragments couldn’t be tokenized (malformed / out-of-bounds).
DataLossOrphanContinuation = 8
A continuation/end fragment with no preceding begin fragment.
DataLossReassemblyGap = 16
Reassembly abandoned because of a ChunkID gap mid-packet.
DataLossReassemblyBrokenChain = 32
Reassembly abandoned because the fragment chain was broken even though the ChunkIDs were contiguous.
DataLossOverwrite = 64
Unconsumed fragments were evicted while overwriting (ring buffer wrap).
DataLossWriterAbort = 128
The trace writer aborted an in-progress fragmented packet (it stamped the kPacketSizeDropPacket sentinel in the last fragment header).
DataLossSmbFull = 256
The producer’s shared memory buffer was full: the trace writer couldn’t acquire a chunk and dropped packets until one became available. Set by the producer, not the service.
Implementations§
Source§impl DataLossReason
impl DataLossReason
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for DataLossReason
impl Clone for DataLossReason
Source§fn clone(&self) -> DataLossReason
fn clone(&self) -> DataLossReason
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DataLossReason
impl Debug for DataLossReason
Source§impl Default for DataLossReason
impl Default for DataLossReason
Source§fn default() -> DataLossReason
fn default() -> DataLossReason
Source§impl From<DataLossReason> for i32
impl From<DataLossReason> for i32
Source§fn from(value: DataLossReason) -> i32
fn from(value: DataLossReason) -> i32
Source§impl Hash for DataLossReason
impl Hash for DataLossReason
Source§impl Ord for DataLossReason
impl Ord for DataLossReason
Source§fn cmp(&self, other: &DataLossReason) -> Ordering
fn cmp(&self, other: &DataLossReason) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for DataLossReason
impl PartialEq for DataLossReason
Source§fn eq(&self, other: &DataLossReason) -> bool
fn eq(&self, other: &DataLossReason) -> bool
self and other values to be equal, and is used by ==.