pub trait TerminatingWrite:
Write
+ Send
+ Sync {
// Required method
fn terminate_ref(&mut self, _: AntiCallToken) -> Result<()>;
// Provided method
fn terminate(self) -> Result<()>
where Self: Sized { ... }
}Expand description
Trait used to indicate when no more write need to be done on a writer
Required Methods§
Sourcefn terminate_ref(&mut self, _: AntiCallToken) -> Result<()>
fn terminate_ref(&mut self, _: AntiCallToken) -> Result<()>
You should implement this function to define custom behavior. This function should flush any buffer it may hold.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".