MCPcopy Create free account
hub / github.com/cowprotocol/services / from_str

Method from_str

crates/solver/src/solver.rs:20–28  ·  view source on GitHub ↗
(s: &str)

Source from the content-addressed store, hash-verified

18 type Err = anyhow::Error;
19
20 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
21 // Could be more strict here, but this should suffice to catch
22 // unintended configuration mistakes
23 if s.starts_with("arn:aws:kms:") {
24 Ok(Self(s.to_string()))
25 } else {
26 Err(anyhow!("Invalid ARN identifier: {}", s))
27 }
28 }
29}
30
31impl BaselineSolvable for ConstantProductOrder {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected