pub trait StreamingFormatter {
// Required methods
fn format_to_writer<W: Write>(
&self,
repo: &Repository,
map: &RepoMap,
writer: &mut W,
) -> Result<()>;
fn format_repo_to_writer<W: Write>(
&self,
repo: &Repository,
writer: &mut W,
) -> Result<()>;
}Expand description
Streaming formatter trait for low-memory output
Implement this trait to enable streaming output directly to files, stdout, or network sockets without building intermediate strings.
Required Methods§
Sourcefn format_to_writer<W: Write>(
&self,
repo: &Repository,
map: &RepoMap,
writer: &mut W,
) -> Result<()>
fn format_to_writer<W: Write>( &self, repo: &Repository, map: &RepoMap, writer: &mut W, ) -> Result<()>
Sourcefn format_repo_to_writer<W: Write>(
&self,
repo: &Repository,
writer: &mut W,
) -> Result<()>
fn format_repo_to_writer<W: Write>( &self, repo: &Repository, writer: &mut W, ) -> Result<()>
Stream repository only to writer
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.