pub struct RateWeight {
pub bucket_id: u8,
pub units: u8,
}Expand description
Combination of two rate limiting data types, for convenience
Fields§
§bucket_id: u8§units: u8Trait Implementations§
Source§impl Clone for RateWeight
impl Clone for RateWeight
Source§fn clone(&self) -> RateWeight
fn clone(&self) -> RateWeight
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 RateWeight
impl Debug for RateWeight
Source§impl Default for RateWeight
impl Default for RateWeight
Source§fn default() -> RateWeight
fn default() -> RateWeight
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RateWeight
impl<'de> Deserialize<'de> for RateWeight
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RateWeight, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RateWeight, <__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 RateWeight
impl Hash for RateWeight
Source§impl Ord for RateWeight
impl Ord for RateWeight
Source§fn cmp(&self, other: &RateWeight) -> Ordering
fn cmp(&self, other: &RateWeight) -> 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 RateWeight
impl PartialEq for RateWeight
Source§impl PartialOrd for RateWeight
impl PartialOrd for RateWeight
Source§impl Serialize for RateWeight
impl Serialize for RateWeight
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<&RateWeight> for SerializedBytes
impl TryFrom<&RateWeight> for SerializedBytes
Source§type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
Source§fn try_from(t: &RateWeight) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(t: &RateWeight) -> Result<SerializedBytes, SerializedBytesError>
Performs the conversion.
Source§impl TryFrom<RateWeight> for SerializedBytes
impl TryFrom<RateWeight> for SerializedBytes
Source§type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
Source§fn try_from(t: RateWeight) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(t: RateWeight) -> Result<SerializedBytes, SerializedBytesError>
Performs the conversion.
Source§impl TryFrom<SerializedBytes> for RateWeight
impl TryFrom<SerializedBytes> for RateWeight
Source§type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
Source§fn try_from(sb: SerializedBytes) -> Result<RateWeight, SerializedBytesError>
fn try_from(sb: SerializedBytes) -> Result<RateWeight, SerializedBytesError>
Performs the conversion.
impl Eq for RateWeight
impl StructuralPartialEq for RateWeight
Auto Trait Implementations§
impl Freeze for RateWeight
impl RefUnwindSafe for RateWeight
impl Send for RateWeight
impl Sync for RateWeight
impl Unpin for RateWeight
impl UnsafeUnpin for RateWeight
impl UnwindSafe for RateWeight
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.