Struct tracelogging::OutType
source · [−]#[repr(C)]pub struct OutType(_);
Expand description
Data formatting hint that may be used or ignored by decoders.
Each field of an event has an InType (specifies the field’s binary encoding) and an OutType (formatting hint for the decoder).
If a field has an OutType set and the decoder supports the field’s combination of InType + OutType then the decoder will use the OutType as a formatting hint when decoding the field.
For example, a field with InType::U8 and OutType::Default is formatted as decimal. If the field sets OutType::Hex and the decoder supports U8+Hex then the field would be formatted as hexadecimal. If the field sets OutType::String and the decoder supports U8+String then it would be formatted as a CP1252 CHAR.
If the OutType is OutType::Default or is not supported by the decoder then the field receives a default formatting based on the field’s InType.
Note: Setting the OutType to a value other than Default will add 1 byte per field per event in the resulting ETL file. Add a non-Default OutType only if OutType::Default does not produce the desired format.
Implementations
sourceimpl OutType
impl OutType
sourcepub const fn from_int(value: u8) -> OutType
pub const fn from_int(value: u8) -> OutType
Returns an OutType with the specified value.
Requires: value <= 127
.
sourcepub const Default: OutType = _
pub const Default: OutType = _
TlgOutNULL = default formatting will be applied based on the field’s InType.
sourcepub const NoPrint: OutType = _
pub const NoPrint: OutType = _
TlgOutNOPRINT = field should be hidden. (Most decoders show it anyway.)
sourcepub const String: OutType = _
pub const String: OutType = _
TlgOutSTRING = field should be formatted as a string. Use with InType::I8, InType::U8, or InType::U16 to log a char.
sourcepub const Boolean: OutType = _
pub const Boolean: OutType = _
TlgOutBOOLEAN = field should be formatted as a Boolean. Use with InType::U8.
sourcepub const Hex: OutType = _
pub const Hex: OutType = _
TlgOutHEX = field should be formatted as hexadecimal. Use with InType::U8, InType::U16.
sourcepub const Pid: OutType = _
pub const Pid: OutType = _
TlgOutPID = field should be formatted as a process id. Use with InType::U32.
sourcepub const Tid: OutType = _
pub const Tid: OutType = _
TlgOutTID = field should be formatted as a thread id. Use with InType::U32.
sourcepub const Port: OutType = _
pub const Port: OutType = _
TlgOutPORT = field should be formatted as a big-endian IP port. Use with InType::U16.
sourcepub const IPv4: OutType = _
pub const IPv4: OutType = _
TlgOutIPV4 = field should be formatted as an IPv4 address. Use with InType::U32.
sourcepub const IPv6: OutType = _
pub const IPv6: OutType = _
TlgOutIPV6 = field should be formatted as an IPv6 address. Use with InType::Binary or InType::BinaryC.
sourcepub const SocketAddress: OutType = _
pub const SocketAddress: OutType = _
TlgOutSOCKETADDRESS = field should be formatted as a sockaddr. Use with InType::Binary or InType::BinaryC.
sourcepub const Xml: OutType = _
pub const Xml: OutType = _
TlgOutXML = field should be formatted as XML. Use with InType::Str16, InType::Str8, InType::CStr16, and InType::CStr8 types. Implies UTF-8 when used with InType::Str8 or InType::CStr8.
sourcepub const Json: OutType = _
pub const Json: OutType = _
TlgOutJSON = field should be formatted as JSON. Use with InType::Str16, InType::Str8, InType::CStr16, and InType::CStr8 types. Implies UTF-8 when used with InType::Str8 or InType::CStr8.
sourcepub const Win32Error: OutType = _
pub const Win32Error: OutType = _
TlgOutWIN32ERROR = field should be formatted as a Win32 result code. Use with InType::U32.
sourcepub const NtStatus: OutType = _
pub const NtStatus: OutType = _
TlgOutNTSTATUS = field should be formatted as a Win32 NTSTATUS. Use with InType::U32.
sourcepub const HResult: OutType = _
pub const HResult: OutType = _
TlgOutHRESULT = field should be formatted as a Win32 HRESULT. Use with InType::I32.
sourcepub const DateTime: OutType = _
pub const DateTime: OutType = _
TlgOutFILETIME = not generally used. Appropriate InTypes already imply DateTime.
sourcepub const Signed: OutType = _
pub const Signed: OutType = _
TlgOutSIGNED = not generally used. Appropriate InTypes already imply Signed.
sourcepub const Unsigned: OutType = _
pub const Unsigned: OutType = _
TlgOutUNSIGNED = not generally used. Appropriate InTypes already imply Unsigned.
sourcepub const DateTimeCultureInsensitive: OutType = _
pub const DateTimeCultureInsensitive: OutType = _
TlgOutDATETIME_CULTURE_INSENSITIVE = Invariant-culture date-time. Use with InType::FileTime or InType::SystemTime.
sourcepub const Utf8: OutType = _
pub const Utf8: OutType = _
TlgOutUTF8 = field should be decoded as UTF-8. Use with InType::Str8 or InType::CStr8.
sourcepub const Pkcs7WithTypeInfo: OutType = _
pub const Pkcs7WithTypeInfo: OutType = _
TlgOutPKCS7_WITH_TYPE_INFO = field should be decoded as a PKCS7 packet followed by TLG type info. Use with InType::Binary or InType::BinaryC.
sourcepub const CodePointer: OutType = _
pub const CodePointer: OutType = _
TlgOutCODE_POINTER = field should be formatted as a code pointer. Use with InType::U32, InType::U64, InType::USize, InType::Hex32, InType::Hex64, InType::HexSize.
sourcepub const DateTimeUtc: OutType = _
pub const DateTimeUtc: OutType = _
TlgOutDATETIME_UTC = field should be decoded assuming UTC timezone. Use with InType::FileTime or InType::SystemTime.
Trait Implementations
sourceimpl Ord for OutType
impl Ord for OutType
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<OutType> for OutType
impl PartialEq<OutType> for OutType
sourceimpl PartialOrd<OutType> for OutType
impl PartialOrd<OutType> for OutType
sourcefn partial_cmp(&self, other: &OutType) -> Option<Ordering>
fn partial_cmp(&self, other: &OutType) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for OutType
impl Eq for OutType
impl StructuralEq for OutType
impl StructuralPartialEq for OutType
Auto Trait Implementations
impl RefUnwindSafe for OutType
impl Send for OutType
impl Sync for OutType
impl Unpin for OutType
impl UnwindSafe for OutType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more