pub struct History { /* private fields */ }Implementations§
Source§impl History
impl History
Sourcepub fn load_with_cache<P: Into<PathBuf>>(path: P, cache_dir: PathBuf) -> Self
pub fn load_with_cache<P: Into<PathBuf>>(path: P, cache_dir: PathBuf) -> Self
Load history from path and configure cache_dir for GC + the
future image_cache_dir consumers in the event loop. The
cache_dir argument is wired through from
crate::platform::image_cache_dir() at startup.
Sourcepub fn load<P: Into<PathBuf>>(path: P) -> Self
pub fn load<P: Into<PathBuf>>(path: P) -> Self
Back-compat constructor used by tests and any caller that doesn’t
care about the cache. Sets cache_dir to a sibling image-cache
dir under the same parent so GC is a no-op when the dir doesn’t
exist.
Sourcepub fn default_path() -> Option<PathBuf>
pub fn default_path() -> Option<PathBuf>
Default history path: ~/.atomcode/history on Unix,
%USERPROFILE%\.atomcode\history on Windows (or a tempdir
fallback if home is unknown).
pub fn entries(&self) -> &Vec<HistoryEntry>
pub fn push(&mut self, entry: HistoryEntry)
pub fn save(&self) -> Result<()>
Auto Trait Implementations§
impl Freeze for History
impl RefUnwindSafe for History
impl Send for History
impl Sync for History
impl Unpin for History
impl UnsafeUnpin for History
impl UnwindSafe for History
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more