Struct NoColor

pub struct NoColor<W>(/* private field */);

Satisfies WriteColor but ignores all color options.

Implementations

impl<W: Write> NoColor<W>

fn new(wtr: W) -> NoColor<W>

Create a new writer that satisfies WriteColor but drops all color information.

fn into_inner(self) -> W

Consume this NoColor value and return the inner writer.

fn get_ref(&self) -> &W

Return a reference to the inner writer.

fn get_mut(&mut self) -> &mut W

Return a mutable reference to the inner writer.

Trait Implementations

impl<W: Clone> Clone for NoColor<W>

fn clone(&self) -> NoColor<W>

impl<W: Debug> Debug for NoColor<W>

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl<W: Write> Write for NoColor<W>

fn write(&mut self, buf: &[u8]) -> Result<usize>
fn flush(&mut self) -> Result<()>

impl<W: Write> WriteColor for NoColor<W>

fn supports_color(&self) -> bool
fn set_color(&mut self, &ColorSpec) -> Result<()>
fn reset(&mut self) -> Result<()>
fn is_synchronous(&self) -> bool

Auto Trait Implementations

impl<W> Freeze for NoColor<W> where W: Freeze,

impl<W> RefUnwindSafe for NoColor<W> where W: RefUnwindSafe,

impl<W> Send for NoColor<W> where W: Send,

impl<W> Sync for NoColor<W> where W: Sync,

impl<W> Unpin for NoColor<W> where W: Unpin,

impl<W> UnsafeUnpin for NoColor<W> where W: UnsafeUnpin,

impl<W> UnwindSafe for NoColor<W> where W: UnwindSafe,

Blanket Implementations

impl<T> Any for NoColor<W> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for NoColor<W> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for NoColor<W> where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for NoColor<W> where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for NoColor<W>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for NoColor<W> where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for NoColor<W> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for NoColor<W> where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for NoColor<W> where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>