pub struct SessionStats {
pub home_dc_id: i32,
pub dcs_total: usize,
pub dcs_with_auth_key: usize,
pub peers_total: usize,
pub peers_users: usize,
pub peers_channels: usize,
pub peers_chats: usize,
pub min_peers: usize,
pub channel_pts_entries: usize,
pub updates_initialised: bool,
pub approx_bytes: usize,
}Expand description
A breakdown of what a PersistedSession currently holds.
Returned by PersistedSession::stats.
Fields§
§home_dc_id: i32The DC this session considers home.
dcs_total: usizeTotal DC entries (may include IPv4 and IPv6 variants per DC).
dcs_with_auth_key: usizeDC entries that have an auth key negotiated.
peers_total: usizeTotal cached peer entries (users + channels + chats).
peers_users: usizeCached users (have a full access_hash).
peers_channels: usizeCached channels / supergroups (have a full access_hash).
peers_chats: usizeCached regular group chats (no access_hash needed).
min_peers: usizeMin-peer entries (InputPeerUserFromMessage contexts).
These are the main source of session bloat over time.
channel_pts_entries: usizeNumber of per-channel pts counters tracked for gap detection.
updates_initialised: boolWhether the update state has been initialised from Telegram.
approx_bytes: usizeApproximate serialized size in bytes (calls to_bytes() internally).
Trait Implementations§
Source§impl Clone for SessionStats
impl Clone for SessionStats
Source§fn clone(&self) -> SessionStats
fn clone(&self) -> SessionStats
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 moreAuto Trait Implementations§
impl Freeze for SessionStats
impl RefUnwindSafe for SessionStats
impl Send for SessionStats
impl Sync for SessionStats
impl Unpin for SessionStats
impl UnsafeUnpin for SessionStats
impl UnwindSafe for SessionStats
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