Trait tantivy_common::TerminatingWrite

source ·
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§

source

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§

source

fn terminate(self) -> Result<()>
where Self: Sized,

Indicate that the writer will no longer be used. Internally call terminate_ref.

Implementations on Foreign Types§

source§

impl<'a> TerminatingWrite for &'a mut Vec<u8>

source§

impl<W: TerminatingWrite + ?Sized> TerminatingWrite for Box<W>

source§

fn terminate_ref(&mut self, token: AntiCallToken) -> Result<()>

source§

impl<W: TerminatingWrite> TerminatingWrite for BufWriter<W>

Implementors§