pub struct FileSessionStore<'a> { /* private fields */ }Expand description
Stores the session as TOML at a fixed path, through the filesystem service.
Implementations§
Source§impl<'a> FileSessionStore<'a>
impl<'a> FileSessionStore<'a>
pub fn new(fs: &'a dyn FileSystemService, path: impl Into<PathBuf>) -> Self
Trait Implementations§
Source§impl SessionStore for FileSessionStore<'_>
impl SessionStore for FileSessionStore<'_>
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 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<'a> !RefUnwindSafe for FileSessionStore<'a>
impl<'a> !UnwindSafe for FileSessionStore<'a>
impl<'a> Freeze for FileSessionStore<'a>
impl<'a> Send for FileSessionStore<'a>
impl<'a> Sync for FileSessionStore<'a>
impl<'a> Unpin for FileSessionStore<'a>
impl<'a> UnsafeUnpin for FileSessionStore<'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