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

Function parse_invoke_ip_address

crates/cargo-lambda-invoke/src/lib.rs:336–345  ·  view source on GitHub ↗
(address: &str)

Source from the content-addressed store, hash-verified

334}
335
336fn parse_invoke_ip_address(address: &str) -> Result<String> {
337 let invoke_address = IpAddr::from_str(address).map_err(|e| miette::miette!(e))?;
338
339 let invoke_address = match invoke_address {
340 IpAddr::V4(address) => address.to_string(),
341 IpAddr::V6(address) => format!("[{address}]"),
342 };
343
344 Ok(invoke_address)
345}
346
347#[cfg(test)]
348mod test {

Callers 1

invoke_localMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected