pub struct EncodedTextWriter<W> { /* private fields */ }Expand description
Text writer that encodes Unicode text with an explicit encoding.
Implementations§
Source§impl<W> EncodedTextWriter<W>where
W: Write,
impl<W> EncodedTextWriter<W>where
W: Write,
Sourcepub const fn new(
inner: W,
encoding: &'static Encoding,
policy: CodingErrorPolicy,
) -> Self
pub const fn new( inner: W, encoding: &'static Encoding, policy: CodingErrorPolicy, ) -> Self
Sourcepub const fn with_line_ending(self, line_ending: LineEnding) -> Self
pub const fn with_line_ending(self, line_ending: LineEnding) -> Self
Sourcepub fn into_inner(self) -> W
pub fn into_inner(self) -> W
Trait Implementations§
Source§impl<W: Debug> Debug for EncodedTextWriter<W>
impl<W: Debug> Debug for EncodedTextWriter<W>
Source§impl<W> TextWrite for EncodedTextWriter<W>where
W: Write,
impl<W> TextWrite for EncodedTextWriter<W>where
W: Write,
Source§fn line_ending(&self) -> LineEnding
fn line_ending(&self) -> LineEnding
Returns the configured line ending for
TextWrite::write_line. Read moreSource§fn write_char(&mut self, ch: char) -> Result<(), Self::Error>
fn write_char(&mut self, ch: char) -> Result<(), Self::Error>
Writes one Unicode scalar value. Read more
Source§fn write_chars(&mut self, chars: &[char]) -> Result<(), Self::Error>
fn write_chars(&mut self, chars: &[char]) -> Result<(), Self::Error>
Writes a slice of Unicode scalar values. Read more
Source§fn write_str(&mut self, text: &str) -> Result<(), Self::Error>
fn write_str(&mut self, text: &str) -> Result<(), Self::Error>
Writes a string slice. Read more
Auto Trait Implementations§
impl<W> Freeze for EncodedTextWriter<W>where
W: Freeze,
impl<W> RefUnwindSafe for EncodedTextWriter<W>where
W: RefUnwindSafe,
impl<W> Send for EncodedTextWriter<W>where
W: Send,
impl<W> Sync for EncodedTextWriter<W>where
W: Sync,
impl<W> Unpin for EncodedTextWriter<W>where
W: Unpin,
impl<W> UnsafeUnpin for EncodedTextWriter<W>where
W: UnsafeUnpin,
impl<W> UnwindSafe for EncodedTextWriter<W>where
W: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more