Trait rasn::de::Error [−][src]
pub trait Error: Display {
fn custom<D: Display>(msg: D) -> Self;
fn incomplete(needed: Needed) -> Self;
fn exceeds_max_length(length: usize) -> Self;
fn missing_field(name: &'static str) -> Self;
fn no_valid_choice(name: &'static str) -> Self;
fn field_error<D: Display>(name: &'static str, error: D) -> Self;
fn duplicate_field(name: &'static str) -> Self;
}
Expand description
A generic error that can occur while decoding ASN.1.
Required methods
Creates a new general error using msg
when decoding ASN.1.
fn incomplete(needed: Needed) -> Self
fn incomplete(needed: Needed) -> Self
Creates a new error about needing more data to finish parsing.
fn exceeds_max_length(length: usize) -> Self
fn exceeds_max_length(length: usize) -> Self
Creates a new error about exceeding the maximum allowed data for a type.
fn missing_field(name: &'static str) -> Self
fn missing_field(name: &'static str) -> Self
Creates a new error about a missing field.
fn no_valid_choice(name: &'static str) -> Self
fn no_valid_choice(name: &'static str) -> Self
Creates a new error about being unable to match any variant in a choice.
fn field_error<D: Display>(name: &'static str, error: D) -> Self
fn field_error<D: Display>(name: &'static str, error: D) -> Self
Creates a new error about being unable to decode a field in a compound type, such as a set or sequence.
fn duplicate_field(name: &'static str) -> Self
fn duplicate_field(name: &'static str) -> Self
Creates a new error about finding a duplicate field.