pub trait HostLogSink:
Send
+ Sync
+ Debug {
// Required method
fn emit(&self, message: &str);
}Expand description
Minimal host-side log sink for invoke diagnostics.
Production code uses StderrLogSink. Downstream test harnesses can
implement this trait to capture and verify log content without touching
stderr. Keeping this trait tiny avoids pulling in a full logging
framework while still making the runtime’s only log call testable.
The sink receives a single pre-formatted message per invoke error. The
message is constructed from the already-truncated
InvokeError::detail, so a malicious 16 KiB guest error payload can
never produce a 16 KiB log line.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".