MCPcopy Create free account
hub / github.com/cargo-lambda/cargo-lambda / try_from

Method try_from

crates/cargo-lambda-metadata/src/lambda.rs:102–107  ·  view source on GitHub ↗
(m: i64)

Source from the content-addressed store, hash-verified

100 type Error = MetadataError;
101
102 fn try_from(m: i64) -> Result<Memory, Self::Error> {
103 if !(128..=10240).contains(&m) {
104 return Err(MetadataError::InvalidMemory(format!("{m}")));
105 }
106 Ok(Memory(m as u32))
107 }
108}
109
110impl FromStr for Memory {

Callers

nothing calls this directly

Calls 3

MemoryClass · 0.85
as_strMethod · 0.80
to_lowercaseMethod · 0.80

Tested by

no test coverage detected