Struct windsh_core::history::History [−][src]
pub struct History { /* fields omitted */ }Implementations
impl History[src]
pub fn new(cmd: &str) -> Self[src]
pub fn save(&self, history_file: Option<&str>)[src]
pub fn set_datetime(&mut self, datetime: DateTime<Utc>)[src]
Set the datetime of history
use windsh_core::history::History; use chrono::prelude::*; let mut my_history = History::new("print Hello, World!"); my_history.set_datetime(Utc::now());
pub fn set_cmd(&mut self, cmd: &str)[src]
Set the cmd of history
use windsh_core::history::History; use chrono::prelude::*; let mut my_history = History::new("ls -lsa"); my_history.set_cmd("exec docker run -ti ubuntu:20.04 bash");
pub fn get_datetime(&self) -> DateTime<Utc>[src]
pub fn get_cmd(&self) -> String[src]
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for History
impl Send for History
impl Sync for History
impl Unpin for History
impl UnwindSafe for History
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> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
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>,