pub struct ClientSessions { /* private fields */ }Expand description
The ledger file under one data directory.
Implementations§
Source§impl ClientSessions
impl ClientSessions
pub fn in_data_dir(dir: &Path) -> Self
Sourcepub fn record(
&self,
client: &str,
pid: u32,
started: u64,
mark: Mark,
) -> Result<(), String>
pub fn record( &self, client: &str, pid: u32, started: u64, mark: Mark, ) -> Result<(), String>
Records mark for the session (pid, started) of client. Every mark
creates the session when it is missing, so their order does not matter.
A session that ends sooner than MIN_SESSION_SECS without a call is
removed, so probes never push real sessions out. Clients without a
setup target are not recorded.
Sourcepub fn empty_streaks(&self) -> Vec<EmptyStreak>
pub fn empty_streaks(&self) -> Vec<EmptyStreak>
Clients whose last SESSIONS_PER_CLIENT sessions all ran at least
MIN_SESSION_SECS and ended without a call.
Trait Implementations§
Source§impl Clone for ClientSessions
impl Clone for ClientSessions
Auto Trait Implementations§
impl Forget for ClientSessions
impl Freeze for ClientSessions
impl Move for ClientSessions
impl RefUnwindSafe for ClientSessions
impl Send for ClientSessionswhere
RawVecInner: Send,
impl Sync for ClientSessionswhere
RawVecInner: Sync,
impl Unpin for ClientSessions
impl UnsafeUnpin for ClientSessions
impl UnwindSafe for ClientSessionswhere
RawVecInner: UnwindSafe,
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