Struct terminal_io::TerminalWriter[][src]

pub struct TerminalWriter<Inner: Write> { /* fields omitted */ }

A wrapper around a Write which adds minimal terminal support.

Implementations

impl<Inner: Write + AsUnsafeHandle> TerminalWriter<Inner>[src]

pub fn with_handle(inner: Inner) -> Self[src]

Wrap a TerminalWriter around the given stream, autodetecting terminal properties using its AsUnsafeHandle implementation.

pub fn from(
    inner: Inner,
    is_terminal: bool,
    color_support: TerminalColorSupport,
    color_preference: bool
) -> Self
[src]

Wrap a TerminalWriter around the given stream, using the given terminal properties.

impl<Inner: Write> TerminalWriter<Inner>[src]

pub fn generic(inner: Inner) -> Self[src]

Wrap a TerminalWriter around the given stream, using conservative terminal properties.

pub fn into_inner(self) -> Inner[src]

Consume self and return the inner stream.

Trait Implementations

impl<Inner: Write + AsRawFd> AsRawFd for TerminalWriter<Inner>[src]

impl<Inner: Debug + Write> Debug for TerminalWriter<Inner>[src]

impl<Inner: Write + OwnsRaw> OwnsRaw for TerminalWriter<Inner>[src]

impl<Inner: Write> Terminal for TerminalWriter<Inner>[src]

impl<Inner: Write> Write for TerminalWriter<Inner>[src]

impl<Inner: Write> WriteTerminal for TerminalWriter<Inner>[src]

Auto Trait Implementations

impl<Inner> RefUnwindSafe for TerminalWriter<Inner> where
    Inner: RefUnwindSafe

impl<Inner> Send for TerminalWriter<Inner> where
    Inner: Send

impl<Inner> Sync for TerminalWriter<Inner> where
    Inner: Sync

impl<Inner> Unpin for TerminalWriter<Inner> where
    Inner: Unpin

impl<Inner> UnwindSafe for TerminalWriter<Inner> where
    Inner: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> AsUnsafeFile for T where
    T: OwnsRaw + AsRawFd
[src]

impl<T> AsUnsafeHandle for T where
    T: OwnsRaw + AsRawFd
[src]

impl<T> AsUnsafeSocket for T where
    T: OwnsRaw + AsRawFd
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.