pub struct SessionSnapshot { /* private fields */ }Expand description
Lock-free read-model published by the [SessionActor] (M245 A1).
Consistency contract (hybrid):
- Membership (which torrents exist) is read-after-write consistent — the actor patches this map synchronously on add/remove, so a torrent is visible the instant its add commits.
- Sampled stats (rates, progress, peer counts) are eventually-consistent to one stats tick — the same skew any sampled counter already carries.
Held in an arc_swap::ArcSwap so read-only callers clone an Arc snapshot
without touching the mutating command mailbox.
Implementations§
Source§impl SessionSnapshot
impl SessionSnapshot
Sourcepub fn summaries(&self) -> Vec<TorrentSummary>
pub fn summaries(&self) -> Vec<TorrentSummary>
All torrent summaries, ascending by info-hash. Owned clone — callers that
only need the count or a scan can use SessionSnapshot::as_map instead.
Trait Implementations§
Source§impl Clone for SessionSnapshot
impl Clone for SessionSnapshot
Source§fn clone(&self) -> SessionSnapshot
fn clone(&self) -> SessionSnapshot
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 SessionSnapshot
impl Debug for SessionSnapshot
Source§impl Default for SessionSnapshot
impl Default for SessionSnapshot
Source§fn default() -> SessionSnapshot
fn default() -> SessionSnapshot
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SessionSnapshot
impl RefUnwindSafe for SessionSnapshot
impl Send for SessionSnapshot
impl Sync for SessionSnapshot
impl Unpin for SessionSnapshot
impl UnsafeUnpin for SessionSnapshot
impl UnwindSafe for SessionSnapshot
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