Skip to main content

parse_protocol

Function parse_protocol 

Source
pub fn parse_protocol(raw: Option<&str>) -> Option<ApiProtocol>
Expand description

Parses a protocol = value, or None when it names nothing the SDK speaks.

The single definition of what a protocol name means, and it owns none of the names: ApiProtocol::from_wire is the SDK’s own parser, so drep cannot come to disagree with the layer that acts on the answer. An absent value is the default protocol rather than an error, which is what keeps every config written before 0.9.0 valid.