gix_packetline_blocking/write/mod.rs
1// DO NOT EDIT - this is a copy of gix-packetline/src/write/mod.rs. Run `just copy-packetline` to update it.
2
3use crate::Writer;
4
5#[cfg(all(not(feature = "blocking-io"), feature = "async-io"))]
6pub(crate) mod async_io;
7
8#[cfg(feature = "blocking-io")]
9pub(crate) mod blocking_io;
10
11/// Common methods
12impl<T> Writer<T> {
13 /// As [`enable_text_mode()`][Writer::enable_text_mode()], but suitable for chaining.
14 pub fn text_mode(mut self) -> Self {
15 self.enable_text_mode();
16 self
17 }
18 /// As [`enable_binary_mode()`][Writer::enable_binary_mode()], but suitable for chaining.
19 pub fn binary_mode(mut self) -> Self {
20 self.enable_binary_mode();
21 self
22 }
23}