pub struct FieldFormat(/* private fields */);Expand description
Values for the format byte of a field definition.
The low 7 bits of the format byte contain the field’s format.
In the case of the Struct encoding, the low 7 bits of the format byte contain
the number of logical fields in the struct (which must not be 0).
The top bit of the field format byte is the ChainFlag. If set, it indicates
that a field tag (uint16) is present after the format byte. If not set, the
field tag is not present and is assumed to be 0.
Implementations§
Source§impl FieldFormat
impl FieldFormat
Sourcepub const Default: FieldFormat
pub const Default: FieldFormat
Use the default format of the encoding.
Sourcepub const UnsignedInt: FieldFormat
pub const UnsignedInt: FieldFormat
unsigned integer, event byte order. Use with Value8..Value64 encodings.
Sourcepub const SignedInt: FieldFormat
pub const SignedInt: FieldFormat
signed integer, event byte order. Use with Value8..Value64 encodings.
Sourcepub const HexInt: FieldFormat
pub const HexInt: FieldFormat
hex integer, event byte order. Use with Value8..Value64 encodings.
Sourcepub const Errno: FieldFormat
pub const Errno: FieldFormat
errno, event byte order. Use with Value32 encoding.
Sourcepub const Pid: FieldFormat
pub const Pid: FieldFormat
process id, event byte order. Use with Value32 encoding.
Sourcepub const Time: FieldFormat
pub const Time: FieldFormat
signed integer, event byte order, seconds since 1970. Use with Value32 or Value64 encodings.
Sourcepub const Boolean: FieldFormat
pub const Boolean: FieldFormat
0 = false, 1 = true, event byte order. Use with Value8..Value32 encodings.
Sourcepub const Float: FieldFormat
pub const Float: FieldFormat
floating point, event byte order. Use with Value32..Value64 encodings.
Sourcepub const HexBytes: FieldFormat
pub const HexBytes: FieldFormat
binary, decoded as hex dump of bytes. Use with any encoding.
Sourcepub const String8: FieldFormat
pub const String8: FieldFormat
8-bit char string, unspecified character set (usually treated as ISO-8859-1 or CP-1252). Use with Value8 and Char8 encodings.
Sourcepub const StringUtf: FieldFormat
pub const StringUtf: FieldFormat
UTF string, event byte order, code unit size based on encoding. Use with Value16..Value32 and Char8..Char32 encodings.
Sourcepub const StringUtfBom: FieldFormat
pub const StringUtfBom: FieldFormat
UTF string, BOM used if present, otherwise behaves like string_utf. Use with Char8..Char32 encodings.
Sourcepub const StringXml: FieldFormat
pub const StringXml: FieldFormat
XML string, otherwise behaves like string_utf_bom. Use with Char8..Char32 encodings.
Sourcepub const StringJson: FieldFormat
pub const StringJson: FieldFormat
JSON string, otherwise behaves like string_utf_bom. Use with Char8..Char32 encodings.
Sourcepub const Uuid: FieldFormat
pub const Uuid: FieldFormat
UUID, network byte order (RFC 4122 format). Use with Value128 encoding.
Sourcepub const Port: FieldFormat
pub const Port: FieldFormat
IP port, network byte order (in_port_t layout). Use with Value16 encoding.
Sourcepub const IPAddress: FieldFormat
pub const IPAddress: FieldFormat
IP address, network byte order (in_addr/in6_addr layout). Use with Value32 or Value128 encoding.
Sourcepub const IPAddressObsolete: FieldFormat
pub const IPAddressObsolete: FieldFormat
Do not produce this format. Decode the same as IPAddress.
Sourcepub const IPv4: FieldFormat = Self::IPAddress
pub const IPv4: FieldFormat = Self::IPAddress
Deprecated alias for IPAddress.
Sourcepub const IPv6: FieldFormat = Self::IPAddressObsolete
pub const IPv6: FieldFormat = Self::IPAddressObsolete
Deprecated alias for IPAddressObsolete.
Sourcepub const fn from_int(value: u8) -> FieldFormat
pub const fn from_int(value: u8) -> FieldFormat
Returns a FieldFormat with the specified value.
Sourcepub const fn as_int(self) -> u8
pub const fn as_int(self) -> u8
Returns the numeric value corresponding to this FieldFormat value.
Sourcepub const fn without_flags(self) -> FieldFormat
pub const fn without_flags(self) -> FieldFormat
Returns the encoding without any flags (format & ValueMask).
Sourcepub const fn has_chain_flag(self) -> bool
pub const fn has_chain_flag(self) -> bool
Returns true if ChainFlag is present (tag present in event).
Trait Implementations§
Source§impl Clone for FieldFormat
impl Clone for FieldFormat
Source§fn clone(&self) -> FieldFormat
fn clone(&self) -> FieldFormat
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more