pub trait LogSink {
// Required method
fn write_str(&mut self, s: &str);
// Provided method
fn flush(&mut self) { ... }
}Expand description
A minimal sink for kernel/OS logging.
The sink decides where bytes go (serial, VGA, hypervisor console, ring buffer, etc.).
§Contract
write_stris expected to be best-effort and should not panic.- Implementations should handle being called many times with small fragments.
- The default
LogSink::flushis a no-op; override it if your device benefits from it.