pub struct IoWriteAdapter<T: Write>(/* private fields */);Available on crate feature
std only.Expand description
An adapter that wraps a type implementing std::io::Write and provides an implementation of fmt::Write.
This adapter allows using types that implement std::io::Write in contexts where fmt::Write is required.
Implementations§
Source§impl<T: Write> IoWriteAdapter<T>
impl<T: Write> IoWriteAdapter<T>
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Consumes the IoWriteAdapter, returning the wrapped writer.
§Returns
The original writer that was wrapped by this adapter.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for IoWriteAdapter<T>where
T: Freeze,
impl<T> RefUnwindSafe for IoWriteAdapter<T>where
T: RefUnwindSafe,
impl<T> Send for IoWriteAdapter<T>where
T: Send,
impl<T> Sync for IoWriteAdapter<T>where
T: Sync,
impl<T> Unpin for IoWriteAdapter<T>where
T: Unpin,
impl<T> UnwindSafe for IoWriteAdapter<T>where
T: 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
Source§impl<T> Writer for Twhere
T: Write,
impl<T> Writer for Twhere
T: Write,
Source§fn writer(&mut self) -> &mut dyn Write
fn writer(&mut self) -> &mut dyn Write
Returns an implementation of
core::fmt::Write.Source§const ALIGN_WIDTH: usize = DEFAULT_ALIGN_WIDTH
const ALIGN_WIDTH: usize = DEFAULT_ALIGN_WIDTH
The align width of each help output item.
Source§fn write_version(&mut self, version: Version<'_>) -> Result
fn write_version(&mut self, version: Version<'_>) -> Result
Writes the version information. Read more
Source§fn write_suggestion(&mut self, suggestion: Suggestion<'_>) -> Result
fn write_suggestion(&mut self, suggestion: Suggestion<'_>) -> Result
Writes a command suggestion. Read more
Source§fn write_error(&mut self, error: ParseError<'_>) -> Result
fn write_error(&mut self, error: ParseError<'_>) -> Result
Writes an arguments parse error. Read more
Source§fn write_completion(&mut self, help: Help<'_>, shell: Shell) -> Result
fn write_completion(&mut self, help: Help<'_>, shell: Shell) -> Result
Available on crate feature
completion only.Writes a shell completion. Read more
Source§fn align_width(&self) -> usize
fn align_width(&self) -> usize
Returns the align width.