pub struct EntryRateWeight {
pub bucket_id: RateBucketId,
pub units: RateUnits,
pub rate_bytes: RateBytes,
}
Expand description
Combination of the three main rate limiting data types, for convenience
Fields
bucket_id: RateBucketId
units: RateUnits
rate_bytes: RateBytes
Trait Implementations
sourceimpl Clone for EntryRateWeight
impl Clone for EntryRateWeight
sourcefn clone(&self) -> EntryRateWeight
fn clone(&self) -> EntryRateWeight
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for EntryRateWeight
impl Debug for EntryRateWeight
sourceimpl Default for EntryRateWeight
impl Default for EntryRateWeight
sourceimpl<'de> Deserialize<'de> for EntryRateWeight
impl<'de> Deserialize<'de> for EntryRateWeight
sourcefn 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
sourceimpl From<EntryRateWeight> for RateWeight
impl From<EntryRateWeight> for RateWeight
sourcefn from(w: EntryRateWeight) -> Self
fn from(w: EntryRateWeight) -> Self
Converts to this type from the input type.
sourceimpl Hash for EntryRateWeight
impl Hash for EntryRateWeight
sourceimpl Ord for EntryRateWeight
impl Ord for EntryRateWeight
sourcefn cmp(&self, other: &EntryRateWeight) -> Ordering
fn cmp(&self, other: &EntryRateWeight) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<EntryRateWeight> for EntryRateWeight
impl PartialEq<EntryRateWeight> for EntryRateWeight
sourcefn eq(&self, other: &EntryRateWeight) -> bool
fn eq(&self, other: &EntryRateWeight) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &EntryRateWeight) -> bool
fn ne(&self, other: &EntryRateWeight) -> bool
This method tests for !=
.
sourceimpl PartialOrd<EntryRateWeight> for EntryRateWeight
impl PartialOrd<EntryRateWeight> for EntryRateWeight
sourcefn partial_cmp(&self, other: &EntryRateWeight) -> Option<Ordering>
fn partial_cmp(&self, other: &EntryRateWeight) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl Serialize for EntryRateWeight
impl Serialize for EntryRateWeight
sourceimpl TryFrom<&EntryRateWeight> for SerializedBytes
impl TryFrom<&EntryRateWeight> for SerializedBytes
type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
sourcefn try_from(
t: &EntryRateWeight
) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(
t: &EntryRateWeight
) -> Result<SerializedBytes, SerializedBytesError>
Performs the conversion.
sourceimpl TryFrom<EntryRateWeight> for SerializedBytes
impl TryFrom<EntryRateWeight> for SerializedBytes
type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
sourcefn try_from(t: EntryRateWeight) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(t: EntryRateWeight) -> Result<SerializedBytes, SerializedBytesError>
Performs the conversion.
sourceimpl TryFrom<SerializedBytes> for EntryRateWeight
impl TryFrom<SerializedBytes> for EntryRateWeight
type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
sourcefn try_from(
sb: SerializedBytes
) -> Result<EntryRateWeight, SerializedBytesError>
fn try_from(
sb: SerializedBytes
) -> Result<EntryRateWeight, SerializedBytesError>
Performs the conversion.
impl Eq for EntryRateWeight
impl StructuralEq for EntryRateWeight
impl StructuralPartialEq for EntryRateWeight
Auto Trait Implementations
impl RefUnwindSafe for EntryRateWeight
impl Send for EntryRateWeight
impl Sync for EntryRateWeight
impl Unpin for EntryRateWeight
impl UnwindSafe for EntryRateWeight
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.