MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / parse_memory_size

Function parse_memory_size

size-parser/src/lib.rs:267–269  ·  view source on GitHub ↗

Parse a memory size string into bytes (for compatibility with existing code)

(s: &str)

Source from the content-addressed store, hash-verified

265
266/// Parse a memory size string into bytes (for compatibility with existing code)
267pub fn parse_memory_size(s: &str) -> Result<u64, MemorySizeError> {
268 MemorySize::parse(s).map(|size| size.bytes())
269}
270
271/// Generic serde support for using memory size parsing with field attributes
272///

Callers

nothing calls this directly

Calls 1

bytesMethod · 0.80

Tested by

no test coverage detected