#[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