pub trait OutputTarget:
Send
+ Sync
+ Debug {
// Required methods
fn id(&self) -> &str;
fn open_overwrite(&self) -> Result<Box<dyn Write + Send>>;
fn open_append(&self) -> Result<Box<dyn Write + Send>>;
}Expand description
Trait for synchronous output targets.
Implementors provide a way to open a writable stream to various destinations such as files, stdout/stderr, or in-memory buffers.
Required Methods§
Sourcefn id(&self) -> &str
fn id(&self) -> &str
Returns a unique identifier for this output target.
This is used for error messages and logging. Convention: “-” for stdout, file path for files.