pub struct SessionStore { /* private fields */ }Expand description
A read-only, in-memory snapshot of a Brave profile’s Sessions directory.
Discovery globs Session_*/Tabs_*/Apps_* (filenames rotate while Brave
runs, so never hardcode a name), snapshots each file’s bytes, and decodes them
into Sources. There is no write path: this type cannot mutate Brave’s
store. A file that fails to decode becomes a Warning::UnreadableSource
while the other sources stay usable.
Implementations§
Source§impl SessionStore
impl SessionStore
Sourcepub fn open_default_profile() -> Result<Self, SnssError>
pub fn open_default_profile() -> Result<Self, SnssError>
Open the default macOS Brave profile’s Sessions directory (read-only).
§Errors
SnssError::Io if the home directory cannot be resolved or the
directory cannot be listed.
Sourcepub fn open_dir(dir: &Path) -> Result<Self, SnssError>
pub fn open_dir(dir: &Path) -> Result<Self, SnssError>
Open an explicit Sessions directory (other profiles, forensic copies).
§Errors
SnssError::Io if the directory cannot be listed.
Trait Implementations§
Source§impl Clone for SessionStore
impl Clone for SessionStore
Source§fn clone(&self) -> SessionStore
fn clone(&self) -> SessionStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SessionStore
impl Debug for SessionStore
impl Eq for SessionStore
Source§impl PartialEq for SessionStore
impl PartialEq for SessionStore
Source§fn eq(&self, other: &SessionStore) -> bool
fn eq(&self, other: &SessionStore) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SessionStore
Auto Trait Implementations§
impl Freeze for SessionStore
impl RefUnwindSafe for SessionStore
impl Send for SessionStore
impl Sync for SessionStore
impl Unpin for SessionStore
impl UnsafeUnpin for SessionStore
impl UnwindSafe for SessionStore
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