#[repr(i32)]pub enum LogRecordFlags {
DoNotUse = 0,
TraceFlagsMask = 255,
}
gen-tonic-messages
and logs
only.Expand description
LogRecordFlags represents constants used to interpret the LogRecord.flags field, which is protobuf ‘fixed32’ type and is to be used as bit-fields. Each non-zero value defined in this enum is a bit-mask. To extract the bit-field, for example, use an expression like:
(logRecord.flags & LOG_RECORD_FLAGS_TRACE_FLAGS_MASK)
Variants§
DoNotUse = 0
The zero value for the enum. Should not be used for comparisons. Instead use bitwise “and” with the appropriate mask as shown above.
TraceFlagsMask = 255
Bits 0-7 are used for trace flags.
Implementations§
source§impl LogRecordFlags
impl LogRecordFlags
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 LogRecordFlags
impl Clone for LogRecordFlags
source§fn clone(&self) -> LogRecordFlags
fn clone(&self) -> LogRecordFlags
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for LogRecordFlags
impl Debug for LogRecordFlags
source§impl Default for LogRecordFlags
impl Default for LogRecordFlags
source§fn default() -> LogRecordFlags
fn default() -> LogRecordFlags
source§impl<'de> Deserialize<'de> for LogRecordFlags
impl<'de> Deserialize<'de> for LogRecordFlags
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl From<LogRecordFlags> for i32
impl From<LogRecordFlags> for i32
source§fn from(value: LogRecordFlags) -> i32
fn from(value: LogRecordFlags) -> i32
source§impl Hash for LogRecordFlags
impl Hash for LogRecordFlags
source§impl Ord for LogRecordFlags
impl Ord for LogRecordFlags
source§fn cmp(&self, other: &LogRecordFlags) -> Ordering
fn cmp(&self, other: &LogRecordFlags) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for LogRecordFlags
impl PartialEq for LogRecordFlags
source§impl PartialOrd for LogRecordFlags
impl PartialOrd for LogRecordFlags
source§impl Serialize for LogRecordFlags
impl Serialize for LogRecordFlags
source§impl TryFrom<i32> for LogRecordFlags
impl TryFrom<i32> for LogRecordFlags
source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
source§fn try_from(value: i32) -> Result<LogRecordFlags, UnknownEnumValue>
fn try_from(value: i32) -> Result<LogRecordFlags, UnknownEnumValue>
impl Copy for LogRecordFlags
impl Eq for LogRecordFlags
impl StructuralPartialEq for LogRecordFlags
Auto Trait Implementations§
impl Freeze for LogRecordFlags
impl RefUnwindSafe for LogRecordFlags
impl Send for LogRecordFlags
impl Sync for LogRecordFlags
impl Unpin for LogRecordFlags
impl UnwindSafe for LogRecordFlags
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<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
key
and return true
if they are equal.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
key
and return true
if they are equal.source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request