ItemObjectParseable

Trait ItemObjectParseable 

Source
pub trait ItemObjectParseable: Sized {
    // Required methods
    fn check_label(label: &str) -> Result<(), ErrorProblem>;
    fn from_bytes(input: &[u8]) -> Result<Self, ErrorProblem>;
}
Available on crate feature parse2 only.
Expand description

A possibly-optional Object value that can appear in netdoc

Implemented for Option, so that field: Option<ObjectValue> allows parsing an optional object.

Required Methods§

Source

fn check_label(label: &str) -> Result<(), ErrorProblem>

Check that the Label is right

Source

fn from_bytes(input: &[u8]) -> Result<Self, ErrorProblem>

Convert the bytes of the Object (which was present) into the actual value

input has been base64-decoded.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ItemObjectParseable for PublicKey

Source§

fn check_label(label: &str) -> Result<(), EP>

Source§

fn from_bytes(input: &[u8]) -> Result<Self, EP>

Implementors§