MCPcopy Create free account
hub / github.com/EnsoBuild/temper / deserialize

Method deserialize

src/simulation.rs:136–148  ·  view source on GitHub ↗
(deserializer: D)

Source from the content-addressed store, hash-verified

134
135impl<'de> Deserialize<'de> for PermissiveUint {
136 fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
137 where
138 D: serde::Deserializer<'de>,
139 {
140 // Accept value in hex or decimal formats
141 let value = String::deserialize(deserializer)?;
142 let parsed = if value.starts_with("0x") {
143 Uint::from_str(&value).map_err(serde::de::Error::custom)?
144 } else {
145 Uint::from_dec_str(&value).map_err(serde::de::Error::custom)?
146 };
147 Ok(Self(parsed))
148 }
149}
150
151fn chain_id_to_fork_url(chain_id: u64) -> Result<String, Rejection> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected