pub struct EntryRateWeight {
pub bucket_id: u8,
pub units: u8,
pub rate_bytes: u8,
}Expand description
Combination of the three main rate limiting data types, for convenience
Fields§
§bucket_id: u8§units: u8§rate_bytes: u8Trait Implementations§
Source§impl Clone for EntryRateWeight
impl Clone for EntryRateWeight
Source§fn clone(&self) -> EntryRateWeight
fn clone(&self) -> EntryRateWeight
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 EntryRateWeight
impl Debug for EntryRateWeight
Source§impl Default for EntryRateWeight
impl Default for EntryRateWeight
Source§fn default() -> EntryRateWeight
fn default() -> EntryRateWeight
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for EntryRateWeight
impl<'de> Deserialize<'de> for EntryRateWeight
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<EntryRateWeight, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<EntryRateWeight, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<EntryRateWeight> for RateWeight
impl From<EntryRateWeight> for RateWeight
Source§fn from(w: EntryRateWeight) -> RateWeight
fn from(w: EntryRateWeight) -> RateWeight
Converts to this type from the input type.
Source§impl Hash for EntryRateWeight
impl Hash for EntryRateWeight
Source§impl Ord for EntryRateWeight
impl Ord for EntryRateWeight
Source§fn cmp(&self, other: &EntryRateWeight) -> Ordering
fn cmp(&self, other: &EntryRateWeight) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for EntryRateWeight
impl PartialEq for EntryRateWeight
Source§impl PartialOrd for EntryRateWeight
impl PartialOrd for EntryRateWeight
Source§impl Serialize for EntryRateWeight
impl Serialize for EntryRateWeight
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl TryFrom<&EntryRateWeight> for SerializedBytes
impl TryFrom<&EntryRateWeight> for SerializedBytes
Source§type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
Source§fn try_from(
t: &EntryRateWeight,
) -> Result<SerializedBytes, SerializedBytesError>
fn try_from( t: &EntryRateWeight, ) -> Result<SerializedBytes, SerializedBytesError>
Performs the conversion.
Source§impl TryFrom<EntryRateWeight> for SerializedBytes
impl TryFrom<EntryRateWeight> for SerializedBytes
Source§type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
Source§fn try_from(t: EntryRateWeight) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(t: EntryRateWeight) -> Result<SerializedBytes, SerializedBytesError>
Performs the conversion.
Source§impl TryFrom<SerializedBytes> for EntryRateWeight
impl TryFrom<SerializedBytes> for EntryRateWeight
Source§type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
Source§fn try_from(
sb: SerializedBytes,
) -> Result<EntryRateWeight, SerializedBytesError>
fn try_from( sb: SerializedBytes, ) -> Result<EntryRateWeight, SerializedBytesError>
Performs the conversion.
impl Eq for EntryRateWeight
impl StructuralPartialEq for EntryRateWeight
Auto Trait Implementations§
impl Freeze for EntryRateWeight
impl RefUnwindSafe for EntryRateWeight
impl Send for EntryRateWeight
impl Sync for EntryRateWeight
impl Unpin for EntryRateWeight
impl UnsafeUnpin for EntryRateWeight
impl UnwindSafe for EntryRateWeight
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.