MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / ByteSized

Class ByteSized

option_parser/src/lib.rs:321–321  ·  view source on GitHub ↗

A byte size parsed from a human-readable string with optional `K`, `M`, or `G` suffix. The suffix is binary (1K = 1024, 1M = 1048576, 1G = 1073741824). A bare integer is treated as bytes.

Source from the content-addressed store, hash-verified

319/// The suffix is binary (1K = 1024, 1M = 1048576, 1G = 1073741824).
320/// A bare integer is treated as bytes.
321pub struct ByteSized(pub u64);
322
323#[derive(Error, Debug)]
324pub enum ByteSizedParseError {

Callers 2

from_strMethod · 0.85
parseMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected