MCPcopy Create free account
hub / github.com/ChainSafe/Delorean-Protocol / parse_bytes

Function parse_bytes

fendermint/app/options/src/parse.rs:67–72  ·  view source on GitHub ↗
(s: &str)

Source from the content-addressed store, hash-verified

65}
66
67pub fn parse_bytes(s: &str) -> Result<Bytes, String> {
68 match hex::decode(s) {
69 Ok(bz) => Ok(Bytes::from(bz)),
70 Err(e) => Err(format!("error parsing raw bytes as hex: {e}")),
71 }
72}
73
74/// Parse a percentage value [0-100]
75pub fn parse_percentage<T>(s: &str) -> Result<T, String>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected