Struct rushell_deps_linefeed::writer::Writer[][src]

pub struct Writer<'a, 'b: 'a, Term: 'b + Terminal> { /* fields omitted */ }

Provides an interface to write line-by-line output to the terminal device.

Holds a lock on terminal write operations. See Interface for more information about concurrent operations.

An instance of this type can be constructed using either the Interface::lock_writer_append or the Interface::lock_writer_erase method.

Implementations

impl<'a, 'b: 'a, Term: 'b + Terminal> Writer<'a, 'b, Term>[src]

pub fn history(&self) -> HistoryIter<'_>

Notable traits for HistoryIter<'a>

impl<'a> Iterator for HistoryIter<'a> type Item = &'a str;
[src]

Returns an iterator over history entries.

pub fn write_str(&mut self, s: &str) -> Result<()>[src]

Writes some text to the terminal device.

Before the Writer is dropped, any output written should be followed by a newline. A newline is automatically written if the writeln! macro is used.

pub fn write_fmt(&mut self, args: Arguments<'_>) -> Result<()>[src]

Writes formatted text to the terminal display.

This method enables Interface to be used as the receiver to the writeln! macro.

If the text contains any unprintable characters (e.g. escape sequences), those characters will be escaped before printing.

Trait Implementations

impl<'a, 'b: 'a, Term: 'b + Terminal> Drop for Writer<'a, 'b, Term>[src]

fn drop(&mut self)[src]

Executes the destructor for this type. Read more

Auto Trait Implementations

impl<'a, 'b, Term> !RefUnwindSafe for Writer<'a, 'b, Term>

impl<'a, 'b, Term> !Send for Writer<'a, 'b, Term>

impl<'a, 'b, Term> !Sync for Writer<'a, 'b, Term>

impl<'a, 'b, Term> Unpin for Writer<'a, 'b, Term> where
    'b: 'a, 

impl<'a, 'b, Term> !UnwindSafe for Writer<'a, 'b, Term>

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.