pub trait PluginWrite<T>: Send + Sync {
// Required methods
fn write(&self, data: &T) -> Result<(), ShellError>;
fn flush(&self) -> Result<(), ShellError>;
// Provided method
fn is_stdout(&self) -> bool { ... }
}
Expand description
Write input/output to the stream.
The write should be atomic, without interference from other threads.
Required Methods§
fn write(&self, data: &T) -> Result<(), ShellError>
Sourcefn flush(&self) -> Result<(), ShellError>
fn flush(&self) -> Result<(), ShellError>
Flush any internal buffers, if applicable.