Struct compose_yml::v2::MemorySize
[−]
[src]
pub struct MemorySize(_);
The size of a block of memory. This can be serialized as a
Docker-compatible size string using specifiers like k
, m
and g
.
Methods
impl MemorySize
[src]
fn bytes(bytes: usize) -> MemorySize
[src]
Create a MemorySize
from a size in bytes.
fn kb(kb: usize) -> MemorySize
[src]
Create from a size in kilobytes.
fn mb(mb: usize) -> MemorySize
[src]
Create from a size in megabytes.
fn gb(gb: usize) -> MemorySize
[src]
Create from a size in gigabytes.
fn to_bytes(self) -> usize
[src]
Convert to a size in bytes.
Trait Implementations
impl Debug for MemorySize
[src]
impl PartialEq for MemorySize
[src]
fn eq(&self, __arg_0: &MemorySize) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &MemorySize) -> bool
[src]
This method tests for !=
.
impl Eq for MemorySize
[src]
impl Clone for MemorySize
[src]
fn clone(&self) -> MemorySize
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for MemorySize
[src]
impl Display for MemorySize
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more