#[repr(transparent)]pub struct Size(pub u64);Expand description
Exact size in bytes.
The intended use is the configuration files where exact numbers are required, i.e. cache size, maximum HTTP body size etc.
Tuple Fields§
§0: u64Implementations§
Trait Implementations§
Source§impl<'a> Deserialize<'a> for Size
impl<'a> Deserialize<'a> for Size
Source§fn deserialize<D>(d: D) -> Result<Self, D::Error>where
D: Deserializer<'a>,
fn deserialize<D>(d: D) -> Result<Self, D::Error>where
D: Deserializer<'a>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl FormatSize for Size
impl FormatSize for Size
Source§fn format_size(self) -> FormattedSize
fn format_size(self) -> FormattedSize
Splits the original size into integral, fractional and adds a unit.
Source§impl Ord for Size
impl Ord for Size
Source§impl PartialOrd for Size
impl PartialOrd for Size
impl Copy for Size
impl Eq for Size
impl StructuralPartialEq for Size
Auto Trait Implementations§
impl Freeze for Size
impl RefUnwindSafe for Size
impl Send for Size
impl Sync for Size
impl Unpin for Size
impl UnwindSafe for Size
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