StringExt

Trait StringExt 

Source
pub trait StringExt {
    // Required method
    fn as_der_bytes(&self) -> Result<Vec<u8>, DecodeError>;
}
Expand description

A trait for extending the functionality of Rust strings.

Required Methods§

Source

fn as_der_bytes(&self) -> Result<Vec<u8>, DecodeError>

Converts the string into a DER-encoded byte vector.

This method attempts to parse the string as a DER-encoded byte sequence and returns the result as a Vec<u8>. If the parsing fails, it returns a DecodeError.

§Errors

If the string cannot be successfully parsed as DER-encoded bytes, this method returns a DecodeError indicating the reason for the failure.

Implementations on Foreign Types§

Source§

impl StringExt for &str

Source§

impl StringExt for String

Implementors§