Struct FileHistory
struct FileHistory { ... }
Current state of the history stored in a file.
Implementations
impl FileHistory
fn new() -> SelfDefault constructor
fn with_config(config: &Config) -> SelfCustomized constructor with:
- [
Config::max_history_size()], - [
Config::history_ignore_space()], - [
Config::history_duplicates()].
- [
fn iter(self: &Self) -> impl DoubleEndedIterator<Item = &String> + '_Return a forward iterator.
impl Default for FileHistory
fn default() -> FileHistory
impl Freeze for FileHistory
impl History for FileHistory
fn get(self: &Self, index: usize, dir: SearchDirection) -> Result<Option<SearchResult<'_>>>fn add(self: &mut Self, line: &str) -> Result<bool>fn add_owned(self: &mut Self, line: String) -> Result<bool>fn len(self: &Self) -> usizefn is_empty(self: &Self) -> boolfn set_max_len(self: &mut Self, len: usize) -> Result<()>fn ignore_dups(self: &mut Self, yes: bool) -> Result<()>fn ignore_space(self: &mut Self, yes: bool)fn save(self: &mut Self, path: &Path) -> Result<()>fn append(self: &mut Self, path: &Path) -> Result<()>fn load(self: &mut Self, path: &Path) -> Result<()>fn clear(self: &mut Self) -> Result<()>fn search(self: &Self, term: &str, start: usize, dir: SearchDirection) -> Result<Option<SearchResult<'_>>>fn starts_with(self: &Self, term: &str, start: usize, dir: SearchDirection) -> Result<Option<SearchResult<'_>>>
impl Index for FileHistory
fn index(self: &Self, index: usize) -> &String
impl RefUnwindSafe for FileHistory
impl Send for FileHistory
impl Sync for FileHistory
impl Unpin for FileHistory
impl UnwindSafe for FileHistory
impl<T> Any for FileHistory
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for FileHistory
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for FileHistory
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> From for FileHistory
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into for FileHistory
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for FileHistory
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for FileHistory
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>