Trait midenc_session::Emit
source · pub trait Emit {
// Required methods
fn name(&self) -> Option<Symbol>;
fn output_type(&self, mode: OutputMode) -> OutputType;
fn write_to<W: Write>(
&self,
writer: W,
mode: OutputMode,
session: &Session,
) -> Result<()>;
// Provided methods
fn write_to_stdout(&self, session: &Session) -> Result<()> { ... }
fn write_to_file(
&self,
path: &Path,
mode: OutputMode,
session: &Session,
) -> Result<()> { ... }
}Required Methods§
sourcefn output_type(&self, mode: OutputMode) -> OutputType
fn output_type(&self, mode: OutputMode) -> OutputType
The output type associated with this item and the given mode
sourcefn write_to<W: Write>(
&self,
writer: W,
mode: OutputMode,
session: &Session,
) -> Result<()>
fn write_to<W: Write>( &self, writer: W, mode: OutputMode, session: &Session, ) -> Result<()>
Write this item to the given std::io::Write handle, using mode to determine the output
type
Provided Methods§
sourcefn write_to_stdout(&self, session: &Session) -> Result<()>
fn write_to_stdout(&self, session: &Session) -> Result<()>
Write this item to standard output, inferring the best OutputMode based on whether or not stdout is a tty or not
sourcefn write_to_file(
&self,
path: &Path,
mode: OutputMode,
session: &Session,
) -> Result<()>
fn write_to_file( &self, path: &Path, mode: OutputMode, session: &Session, ) -> Result<()>
Write this item to the given file path, using mode to determine the output type
Object Safety§
This trait is not object safe.