pub struct Store {
pub last_heartbeat_ms: u64,
pub previous_heartbeat_ms: Option<u64>,
pub hooks: BTreeMap<String, BTreeMap<String, AgentSession>>,
pub snapshots: BTreeMap<String, BTreeMap<String, PluginSnapshot>>,
pub removed: BTreeMap<String, BTreeMap<String, u64>>,
}Fields§
§last_heartbeat_ms: u64§previous_heartbeat_ms: Option<u64>§hooks: BTreeMap<String, BTreeMap<String, AgentSession>>§snapshots: BTreeMap<String, BTreeMap<String, PluginSnapshot>>§removed: BTreeMap<String, BTreeMap<String, u64>>Implementations§
Source§impl Store
impl Store
pub fn on_server_start(&mut self)
pub fn heartbeat(&mut self)
pub fn update(&mut self, provider: &str, payload: Value) -> Result<Change>
pub fn mark_removed(&mut self, provider: &str, session_id: &str) -> u64
pub fn clear_removed(&mut self, provider: &str, session_id: &str)
pub fn is_removed(&self, provider: &str, session_id: &str) -> bool
pub fn discover(&mut self, ctx: &Context) -> bool
pub fn listed(&self) -> Vec<ListedSession>
pub fn active(&self) -> Vec<ListedSession>
pub fn stats(&self) -> Vec<ProviderStats>
pub fn resumable(&self, idle: Option<Duration>) -> Vec<ListedSession>
pub fn prune(&mut self, now_ms: u64, retention: Duration) -> bool
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Store
impl<'de> Deserialize<'de> for Store
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
Auto Trait Implementations§
impl Freeze for Store
impl RefUnwindSafe for Store
impl Send for Store
impl Sync for Store
impl Unpin for Store
impl UnsafeUnpin for Store
impl UnwindSafe for Store
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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