pub struct MemorySessionStore { /* private fields */ }Expand description
A store that keeps the session in memory. For tests, and for running with no home directory — persistence is a convenience, not a requirement.
Implementations§
Trait Implementations§
Source§impl Debug for MemorySessionStore
impl Debug for MemorySessionStore
Source§impl Default for MemorySessionStore
impl Default for MemorySessionStore
Source§fn default() -> MemorySessionStore
fn default() -> MemorySessionStore
Returns the “default value” for a type. Read more
Source§impl SessionStore for MemorySessionStore
impl SessionStore for MemorySessionStore
Source§fn load(&self) -> Session
fn load(&self) -> Session
Load the stored session. A missing or corrupt file yields a default session —
losing session state must never stop the editor from starting.
Source§fn save(&self, session: &Session) -> Result<(), FsError>
fn save(&self, session: &Session) -> Result<(), FsError>
Persist the session. Returns the error rather than panicking; failing to save
recents is a nuisance, not a crash.
Source§fn load_with_diagnostics(&self) -> (Session, Vec<SessionDiagnostic>)
fn load_with_diagnostics(&self) -> (Session, Vec<SessionDiagnostic>)
Load with the degradation details needed by the application status surface.
In-memory stores have no parsing boundary, so their default has no diagnostics.
Auto Trait Implementations§
impl !Freeze for MemorySessionStore
impl RefUnwindSafe for MemorySessionStore
impl Send for MemorySessionStore
impl Sync for MemorySessionStore
impl Unpin for MemorySessionStore
impl UnsafeUnpin for MemorySessionStore
impl UnwindSafe for MemorySessionStore
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