Trait prse::LendingFromStr

source ·
pub trait LendingFromStr<'a> {
    fn from_str(s: &'a str) -> Result<Self, ParseError>
    where
        Self: Sized
; }
Expand description

Parse a string into the implemented type, unlike FromStr this trait allows you to borrow the string.

Required Methods§

Parses a string s to return value of this type.

If parsing succeeds, return the value inside Ok, otherwise when the string is ill-formatted return a ParseError.

Implementations on Foreign Types§

Implementors§