MCPcopy Index your code
hub / github.com/cloud-hypervisor/cloud-hypervisor / Parseable

Interface Parseable

option_parser/src/lib.rs:39–49  ·  view source on GitHub ↗

Voldemort trait that dispatches to `FromStr::from_str` on externally-defined types and to custom parsing code for types in this module.

Source from the content-addressed store, hash-verified

37 // Voldemort trait that dispatches to `FromStr::from_str` on externally-defined types
38 // and to custom parsing code for types in this module.
39 pub trait Parseable
40 where
41 Self: Sized,
42 {
43 type Err;
44 // Actually does the parsing, but panics if the input doesn't have
45 // balanced quotes. This is fine because split_commas checks that the
46 // input has balanced quotes, and option names cannot contain anything
47 // that split_commas treats as special.
48 fn from_str(input: &str) -> Result<Self, <Self as Parseable>::Err>;
49 }
50}
51use private_trait::Parseable;
52

Callers

nothing calls this directly

Implementers 1

lib.rsoption_parser/src/lib.rs

Calls

no outgoing calls

Tested by

no test coverage detected