pub struct ShellHistorySource<'a> { /* private fields */ }Expand description
A ShellHistorySource wraps a borrowed slice of decoded history entries.
Each command becomes an Action::Executed UserActivity; a command that
disables or clears history becomes an Action::HistoryTampered event instead
(the clearing itself is the activity worth surfacing).
Implementations§
Source§impl<'a> ShellHistorySource<'a>
impl<'a> ShellHistorySource<'a>
Sourcepub fn new(entries: &'a [HistoryEntry]) -> Self
pub fn new(entries: &'a [HistoryEntry]) -> Self
Wrap decoded history entries with no attributed actor.
Sourcepub fn for_actor(entries: &'a [HistoryEntry], actor: impl Into<String>) -> Self
pub fn for_actor(entries: &'a [HistoryEntry], actor: impl Into<String>) -> Self
Wrap decoded history entries, attributing them to a known user/account.
Trait Implementations§
Source§impl ActivitySource for ShellHistorySource<'_>
impl ActivitySource for ShellHistorySource<'_>
Source§fn activities(&self) -> Vec<UserActivity>
fn activities(&self) -> Vec<UserActivity>
The activities this source contributes to the timeline.
Auto Trait Implementations§
impl<'a> Freeze for ShellHistorySource<'a>
impl<'a> RefUnwindSafe for ShellHistorySource<'a>
impl<'a> Send for ShellHistorySource<'a>
impl<'a> Sync for ShellHistorySource<'a>
impl<'a> Unpin for ShellHistorySource<'a>
impl<'a> UnsafeUnpin for ShellHistorySource<'a>
impl<'a> UnwindSafe for ShellHistorySource<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more