pub struct BitsPerSec<T: Prefix> {
    pub value: u64,
    pub prefix: T,
}Expand description
A throughput in bits-per-second.
Fields§
§value: u64§prefix: TImplementations§
Trait Implementations§
Source§impl<T: Clone + Prefix> Clone for BitsPerSec<T>
 
impl<T: Clone + Prefix> Clone for BitsPerSec<T>
Source§fn clone(&self) -> BitsPerSec<T>
 
fn clone(&self) -> BitsPerSec<T>
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<T: Prefix> Default for BitsPerSec<T>
 
impl<T: Prefix> Default for BitsPerSec<T>
Source§impl<'de, T: Prefix> Deserialize<'de> for BitsPerSec<T>
 
impl<'de, T: Prefix> Deserialize<'de> for BitsPerSec<T>
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<T: Prefix> Display for BitsPerSec<T>
 
impl<T: Prefix> Display for BitsPerSec<T>
Source§impl<T: Prefix> FromStr for BitsPerSec<T>
 
impl<T: Prefix> FromStr for BitsPerSec<T>
Source§impl<T: Prefix> JsonSchema for BitsPerSec<T>
 
impl<T: Prefix> JsonSchema for BitsPerSec<T>
Source§fn json_schema(_: &mut SchemaGenerator) -> Schema
 
fn json_schema(_: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
 
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the 
$ref keyword. Read moreSource§impl<T: Prefix> Serialize for BitsPerSec<T>
 
impl<T: Prefix> Serialize for BitsPerSec<T>
Source§impl<T: Prefix> Unit for BitsPerSec<T>
 
impl<T: Prefix> Unit for BitsPerSec<T>
type U = u64
type T = T
fn suffixes() -> &'static [&'static str]
Source§fn convert(&self, prefix: Self::T) -> Result<Self, String>
 
fn convert(&self, prefix: Self::T) -> Result<Self, String>
Convert value to a different prefix, but return an error if the conversion
cannot be done without possibly losing precision.
Source§fn convert_lossy(&self, prefix: Self::T) -> Self
 
fn convert_lossy(&self, prefix: Self::T) -> Self
Convert value to a different prefix, even if it loses precision.
impl<T: Copy + Prefix> Copy for BitsPerSec<T>
impl<T: Eq + Prefix> Eq for BitsPerSec<T>
impl<T: Prefix> StructuralPartialEq for BitsPerSec<T>
Auto Trait Implementations§
impl<T> Freeze for BitsPerSec<T>where
    T: Freeze,
impl<T> RefUnwindSafe for BitsPerSec<T>where
    T: RefUnwindSafe,
impl<T> Send for BitsPerSec<T>where
    T: Send,
impl<T> Sync for BitsPerSec<T>where
    T: Sync,
impl<T> Unpin for BitsPerSec<T>where
    T: Unpin,
impl<T> UnwindSafe for BitsPerSec<T>where
    T: UnwindSafe,
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> 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.Source§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
 
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more