#[repr(C)]pub struct LogMessage<'a> {
pub severity: u8,
pub tags: CppArray<'a, CppString<'a>>,
pub pid: u64,
pub tid: u64,
pub dropped: u64,
pub message: CppString<'a>,
pub file: CppString<'a>,
pub line: u64,
pub moniker_tag: CppString<'a>,
pub kvps: CppArray<'a, CppKeyValue<'a>>,
pub timestamp: i64,
}Expand description
Log message representation for FFI with C++.
§Lifetime and Borrowing
Strings within LogMessage (tags, message, and string keys/values in kvps)
borrow directly from the incoming encoded message buffer (bytes) when possible,
or from the provided arena allocator (Bump).
Consequently, the incoming message buffer MUST remain valid and unmodified
for at least as long as the LogMessage is in use.
Fields§
§severity: u8Severity of a log message.
Tags in a log message, guaranteed to be non-null.
pid: u64Process ID from a LogMessage, or 0 if unknown
tid: u64Thread ID from a LogMessage, or 0 if unknown
dropped: u64Number of dropped log messages.
message: CppString<'a>The UTF-encoded log message, guaranteed to be valid UTF-8.
file: CppString<'a>Source file where the log was emitted, if any.
line: u64Source line where the log was emitted, if any.
moniker_tag: CppString<'a>Last segment of the moniker, used as a default log tag if needed.
kvps: CppArray<'a, CppKeyValue<'a>>Key-value pairs in a log message.
timestamp: i64Timestamp on the boot timeline of the log message, in nanoseconds.
Auto Trait Implementations§
impl<'a> Freeze for LogMessage<'a>
impl<'a> RefUnwindSafe for LogMessage<'a>
impl<'a> !Send for LogMessage<'a>
impl<'a> !Sync for LogMessage<'a>
impl<'a> Unpin for LogMessage<'a>
impl<'a> UnsafeUnpin for LogMessage<'a>
impl<'a> UnwindSafe for LogMessage<'a>
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
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
fn fidl_into_native(self) -> Box<N>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more