pub struct AccountLimits {
pub machines: Option<u64>,
pub sessions: Option<u64>,
pub rate: Option<u64>,
pub monthly: Option<u64>,
pub used: u64,
}Expand description
An account’s limits on its relay (#104), each None for none, and what
it used this month: what a device checks before it asks for more (a new
session past the limit would run on its machine, but the relay would keep
no record of it).
Fields§
§machines: Option<u64>Machines registered.
sessions: Option<u64>Sessions kept, over all its machines.
rate: Option<u64>Bytes a second its machines and devices send through the relay.
monthly: Option<u64>Bytes a month (UTC) they send.
used: u64Bytes they sent this month.
Implementations§
Source§impl AccountLimits
impl AccountLimits
Sourcepub fn no_room_for_a_session(&self, kept: usize) -> Option<String>
pub fn no_room_for_a_session(&self, kept: usize) -> Option<String>
Why a new session is refused when the account keeps kept sessions
already, if it is.
Trait Implementations§
Source§impl Clone for AccountLimits
impl Clone for AccountLimits
impl Copy for AccountLimits
Source§impl Debug for AccountLimits
impl Debug for AccountLimits
Source§impl Default for AccountLimits
impl Default for AccountLimits
Source§impl<'de> Deserialize<'de> for AccountLimits
impl<'de> Deserialize<'de> for AccountLimits
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
impl Eq for AccountLimits
Source§impl PartialEq for AccountLimits
impl PartialEq for AccountLimits
Source§impl Serialize for AccountLimits
impl Serialize for AccountLimits
impl StructuralPartialEq for AccountLimits
Auto Trait Implementations§
impl Forget for AccountLimits
impl Freeze for AccountLimits
impl Move for AccountLimits
impl RefUnwindSafe for AccountLimits
impl Send for AccountLimits
impl Sync for AccountLimits
impl Unpin for AccountLimits
impl UnsafeUnpin for AccountLimits
impl UnwindSafe for AccountLimits
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