fn from_str(string: &str) -> Result<Self, Self::Err> {
        let bits = match &string[..2] {
            "0b" => 1,
            "0x" => 4,
            "0o" => 3,
            _ => {
                return Err(Error::UnknownPrefix).context(ParseError {
                    string: string.to_string(),
                })
            }
        };
        Self::from_string_without_header(&string[2..], bits).context(ParseError {
            string: string.to_string(),
        })
    }
/// Creates MaskedByte from string representation. String needs to be preceded
/// with a base prefix. Allowed are "0b" for binary, "0x" for hexadecimal and
/// "0o" for octal number representation.
/// The "?" char stands for undefined bits.
/// Examples:
/// 0x?5 equals 0b????0101 which represents a value of 0b00000101 with a mask
/// of 0b00001111.
Creates MaskedByte from string representation. String needs to be preceded
with a base prefix.
Creates MaskedByte from string representation . String needs to be preceded with a base prefix .
fn from_str(string: &str) -> Result<Self, Self::Err> {
        let bits = match &string[..2] {
            "0b" => 1,
            "0x" => 4,
            "0o" => 3,
            _ => {
                return Err(Error::UnknownPrefix).context(ParseError {
                    string: string.to_string(),
                })
            }
        };
        Self::from_string_without_header(&string[2..], bits).context(ParseError {
            string: string.to_string(),
        })
    }
fn from_str ( string : & str ) -> Result < Self , Self :: Err > { let bits = match & string [ .. 2 ] { " " => 1 , " " => 4 , " " => 3 , _ => { return Err ( Error :: UnknownPrefix ) . context ( ParseError { string : string . to_string ( ) , } ) } } ; Self :: from_string_without_header ( & string [ 2 .. ] , bits ) . context ( ParseError { string : string . to_string ( ) , } ) }
Creates MaskedByte from string representation.
Creates MaskedByte from string representation .
string
&str