pub struct Store { /* private fields */ }Expand description
Shared in-memory state for active connections and aggregated traffic.
Implementations§
Source§impl Store
impl Store
pub fn arc() -> Arc<Self>
pub fn get_traffic_all(&self) -> HashMap<String, UserStats>
pub fn get_conns_all(&self) -> HashMap<String, Vec<Connection>>
pub fn get_traffic_by_user(&self, user: &str) -> Option<Traffic>
pub fn get_traffic_by_hash(&self, hash: &str) -> Option<Traffic>
pub fn get_conns_by_user(&self, user: &str) -> Option<Vec<Connection>>
pub fn get_conns_by_hash(&self, hash: &str) -> Option<Vec<Connection>>
pub fn insert_conn<S>( &self, user: S, hash: S, conn_id: S, peer_addr: S, req_addr: S, padding: bool, )
pub fn delete_conn(&self, conn_id: &str)
pub fn add_up(&self, conn_id: &str, v: usize)
pub fn add_down(&self, conn_id: &str, v: usize)
Trait Implementations§
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