pub struct Session {
pub entries: Vec<SessionEntry>,
/* private fields */
}Fields§
§entries: Vec<SessionEntry>Implementations§
Source§impl Session
impl Session
pub fn current(&self) -> Option<&PathBuf>
pub fn previous(&self) -> Option<&PathBuf>
Sourcepub fn list(&self) -> &[SessionEntry]
pub fn list(&self) -> &[SessionEntry]
List all directories (most recent first).
pub fn contains(&self, path: &PathBuf) -> bool
Sourcepub fn load_or_new() -> Self
pub fn load_or_new() -> Self
Load the existing session or create and return a new one if the old one is expired or it doesn’t exist yet.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Session
impl<'de> Deserialize<'de> for Session
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Persistable for Session
impl Persistable for Session
Auto Trait Implementations§
impl Freeze for Session
impl RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnsafeUnpin for Session
impl UnwindSafe for Session
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