pub struct SessionStore {
pub sessions: HashMap<ThreadId, SessionEntry>,
/* private fields */
}Fields§
§sessions: HashMap<ThreadId, SessionEntry>Implementations§
Source§impl SessionStore
impl SessionStore
pub fn load(path: &str, change_tx: UnboundedSender<ThreadId>) -> SessionStore
pub fn save(&self) -> Result<(), Box<dyn Error + Send + Sync>>
pub fn notify(&self, session_id: &ThreadId<str>)
pub fn create(&mut self, session_id: &ThreadId<str>, cwd: PathBuf)
pub fn get_cwd(&self, session_id: &ThreadId<str>) -> &PathBuf
pub fn mark_shut_down(&mut self, session_id: &ThreadId<str>)
pub fn clear_shut_down(&mut self, session_id: &ThreadId<str>) -> bool
pub fn mark_idle(&mut self, session_id: &ThreadId<str>)
pub fn clear_idle(&mut self, session_id: &ThreadId<str>) -> bool
pub fn is_idle(&self, session_id: &ThreadId<str>) -> bool
pub fn is_shut_down(&self, session_id: &ThreadId<str>) -> bool
pub fn mark_archived(&mut self, session_id: &ThreadId<str>)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SessionStore
impl<'de> Deserialize<'de> for SessionStore
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SessionStore, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SessionStore, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for SessionStore
impl Serialize for SessionStore
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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