pub enum DeviceLeaseKind {
Connection,
RequestStream,
}Expand description
Discriminates the rate-limit accounting model for a PrincipalKind::Device
principal.
distributed-ratelimit consults this to decide whether to track Device
principals as a connection gauge or a time-windowed request counter.
Variants§
Connection
Concurrent-connection gauge. The ratelimit counter is decremented
on disconnect; DeviceLease::max_concurrent caps simultaneous
connections from this device.
RequestStream
Time-windowed request counter. Same accounting shape as User /
Service; DeviceLease::max_concurrent is the burst ceiling per
window.
Trait Implementations§
Source§impl Clone for DeviceLeaseKind
impl Clone for DeviceLeaseKind
Source§fn clone(&self) -> DeviceLeaseKind
fn clone(&self) -> DeviceLeaseKind
Returns a duplicate of the value. Read more
1.0.0 · 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 DeviceLeaseKind
impl Debug for DeviceLeaseKind
Source§impl<'de> Deserialize<'de> for DeviceLeaseKind
impl<'de> Deserialize<'de> for DeviceLeaseKind
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
Source§impl Hash for DeviceLeaseKind
impl Hash for DeviceLeaseKind
Source§impl PartialEq for DeviceLeaseKind
impl PartialEq for DeviceLeaseKind
Source§impl Serialize for DeviceLeaseKind
impl Serialize for DeviceLeaseKind
impl Copy for DeviceLeaseKind
impl Eq for DeviceLeaseKind
impl StructuralPartialEq for DeviceLeaseKind
Auto Trait Implementations§
impl Freeze for DeviceLeaseKind
impl RefUnwindSafe for DeviceLeaseKind
impl Send for DeviceLeaseKind
impl Sync for DeviceLeaseKind
impl Unpin for DeviceLeaseKind
impl UnsafeUnpin for DeviceLeaseKind
impl UnwindSafe for DeviceLeaseKind
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