[−][src]Struct interaction::History
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
impl RefUnwindSafe for History
[src]
impl Send for History
[src]
impl Sync for History
[src]
impl Unpin for History
[src]
impl UnwindSafe for History
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
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]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,