[][src]Struct interaction::History

pub struct History { /* fields omitted */ }

The struct is to management the history of command line.

Implementations

impl History[src]

pub fn new(limit: usize) -> Self[src]

Initialize history. limit is the maximum size of history. If limit is zero, unlimited.

pub fn append(&mut self, history: Vec<u8>)[src]

Append a new command.

pub fn load<P: AsRef<Path>>(&mut self, file_path: P) -> Result<()>[src]

Load a history from the given file_path.

pub fn save<P: AsRef<Path>>(&mut self, file_path: P) -> Result<()>[src]

Save the history to the given file_path.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[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.