Struct humanize_rs::bytes::Bytes[][src]

pub struct Bytes<T: Int = usize>(_);

Size calculated in Unit::Byte

Methods

impl Bytes
[src]

Returns a Bytes with a numeric value and a specific unit, or a ParseError if exists, only ParseError::Overflow here.

Example

use humanize_rs::bytes::{Bytes, Unit};

let megabytes = Bytes::new(1, Unit::MByte).unwrap();

Trait Implementations

impl<T: Debug + Int> Debug for Bytes<T>
[src]

Formats the value using the given formatter. Read more

impl<T: Copy + Int> Copy for Bytes<T>
[src]

impl<T: Clone + Int> Clone for Bytes<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: Eq + Int> Eq for Bytes<T>
[src]

impl<T: PartialEq + Int> PartialEq for Bytes<T>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<T: Int> FromStr for Bytes<T>
[src]

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

Auto Trait Implementations

impl<T> Send for Bytes<T> where
    T: Send

impl<T> Sync for Bytes<T> where
    T: Sync