1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// DO NOT EDIT - this is a copy of gix-packetline/src/write/mod.rs. Run `just copy-packetline` to update it.

use crate::Writer;

#[cfg(all(not(feature = "blocking-io"), feature = "async-io"))]
pub(crate) mod async_io;

#[cfg(feature = "blocking-io")]
pub(crate) mod blocking_io;

/// Common methods
impl<T> Writer<T> {
    /// As [`enable_text_mode()`][Writer::enable_text_mode()], but suitable for chaining.
    pub fn text_mode(mut self) -> Self {
        self.enable_text_mode();
        self
    }
    /// As [`enable_binary_mode()`][Writer::enable_binary_mode()], but suitable for chaining.
    pub fn binary_mode(mut self) -> Self {
        self.enable_binary_mode();
        self
    }
}