#[repr(i32)]pub enum FillPolicy {
Unspecified = 0,
RingBuffer = 1,
Discard = 2,
}
Variants§
Unspecified = 0
RingBuffer = 1
Default behavior. The buffer operates as a conventional ring buffer. If the writer is faster than the reader (or if the reader reads only after tracing is stopped) newly written packets will overwrite old packets.
Discard = 2
Behaves like RING_BUFFER as long as there is space in the buffer or the reader catches up with the writer. As soon as the writer hits an unread chunk, it stops accepting new data in the buffer.
Implementations§
Source§impl FillPolicy
impl FillPolicy
Source§impl FillPolicy
impl FillPolicy
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 FillPolicy
impl Clone for FillPolicy
Source§fn clone(&self) -> FillPolicy
fn clone(&self) -> FillPolicy
Returns a copy of the value. Read more
1.0.0 · 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 FillPolicy
impl Debug for FillPolicy
Source§impl Default for FillPolicy
impl Default for FillPolicy
Source§fn default() -> FillPolicy
fn default() -> FillPolicy
Returns the “default value” for a type. Read more
Source§impl From<FillPolicy> for i32
impl From<FillPolicy> for i32
Source§fn from(value: FillPolicy) -> i32
fn from(value: FillPolicy) -> i32
Converts to this type from the input type.
Source§impl Hash for FillPolicy
impl Hash for FillPolicy
Source§impl Ord for FillPolicy
impl Ord for FillPolicy
Source§fn cmp(&self, other: &FillPolicy) -> Ordering
fn cmp(&self, other: &FillPolicy) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for FillPolicy
impl PartialEq for FillPolicy
Source§impl PartialOrd for FillPolicy
impl PartialOrd for FillPolicy
Source§impl TryFrom<i32> for FillPolicy
impl TryFrom<i32> for FillPolicy
Source§type Error = DecodeError
type Error = DecodeError
The type returned in the event of a conversion error.
Source§fn try_from(value: i32) -> Result<FillPolicy, DecodeError>
fn try_from(value: i32) -> Result<FillPolicy, DecodeError>
Performs the conversion.
impl Copy for FillPolicy
impl Eq for FillPolicy
impl StructuralPartialEq for FillPolicy
Auto Trait Implementations§
impl Freeze for FillPolicy
impl RefUnwindSafe for FillPolicy
impl Send for FillPolicy
impl Sync for FillPolicy
impl Unpin for FillPolicy
impl UnwindSafe for FillPolicy
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