#[repr(i32)]pub enum BufferExhaustedPolicy {
BufferExhaustedUnspecified = 0,
BufferExhaustedDrop = 1,
BufferExhaustedStallThenAbort = 2,
BufferExhaustedStallThenDrop = 3,
}Variants§
BufferExhaustedUnspecified = 0
The data source will use its default buffer exhausted policy, specified by the code when the data source is registered.
BufferExhaustedDrop = 1
The data source will drop packets when there’s no space in the shared memory buffer.
BufferExhaustedStallThenAbort = 2
The data source will wait when there’s no space in the shared memory buffer. If there’s still not space, after a few seconds, the whole producer process will be aborted.
BufferExhaustedStallThenDrop = 3
The data source will wait when there’s no space in the shared memory buffer. If there’s still not space, after a few seconds, the data source will drop packets.
Implementations§
Source§impl BufferExhaustedPolicy
impl BufferExhaustedPolicy
Sourcepub const fn is_valid(value: i32) -> bool
pub const fn is_valid(value: i32) -> bool
Returns true if value is a variant of BufferExhaustedPolicy.
Sourcepub fn from_i32(value: i32) -> Option<BufferExhaustedPolicy>
👎Deprecated: Use the TryFrom<i32> implementation instead
pub fn from_i32(value: i32) -> Option<BufferExhaustedPolicy>
Use the TryFrom<i32> implementation instead
Converts an i32 to a BufferExhaustedPolicy, or None if value is not a valid variant.
Source§impl BufferExhaustedPolicy
impl BufferExhaustedPolicy
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 BufferExhaustedPolicy
impl Clone for BufferExhaustedPolicy
Source§fn clone(&self) -> BufferExhaustedPolicy
fn clone(&self) -> BufferExhaustedPolicy
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 BufferExhaustedPolicy
impl Debug for BufferExhaustedPolicy
Source§impl Default for BufferExhaustedPolicy
impl Default for BufferExhaustedPolicy
Source§fn default() -> BufferExhaustedPolicy
fn default() -> BufferExhaustedPolicy
Source§impl From<BufferExhaustedPolicy> for i32
impl From<BufferExhaustedPolicy> for i32
Source§fn from(value: BufferExhaustedPolicy) -> i32
fn from(value: BufferExhaustedPolicy) -> i32
Source§impl Hash for BufferExhaustedPolicy
impl Hash for BufferExhaustedPolicy
Source§impl Ord for BufferExhaustedPolicy
impl Ord for BufferExhaustedPolicy
Source§fn cmp(&self, other: &BufferExhaustedPolicy) -> Ordering
fn cmp(&self, other: &BufferExhaustedPolicy) -> 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 BufferExhaustedPolicy
impl PartialEq for BufferExhaustedPolicy
Source§fn eq(&self, other: &BufferExhaustedPolicy) -> bool
fn eq(&self, other: &BufferExhaustedPolicy) -> bool
self and other values to be equal, and is used by ==.