custom_print/
flush.rs

1/// A trait for objects which can flush written data on request.
2///
3/// This trait is used by [`IoWriter`].
4///
5/// [`IoWriter`]: struct.IoWriter.html
6pub trait Flush {
7    /// The resulting type after flushing.
8    type Output;
9
10    /// Performs flush.
11    fn flush(&mut self) -> Self::Output;
12}
13
14impl Flush for () {
15    type Output = ();
16
17    #[inline]
18    fn flush(&mut self) -> Self::Output {}
19}