Skip to main content

SignatureBuilderError

Enum SignatureBuilderError 

Source
pub enum SignatureBuilderError {
Show 14 variants InvalidNamespacePrefix(String), InvalidNamespaceUri(String), NamespacePrefixConflict(String), InvalidId { element: &'static str, value: String, }, MissingReference, Policy(PolicyViolation), InvalidXPath(String), SigningAlgorithmDisabled(&'static str), Serialization(Error), InvalidUtf8(FromUtf8Error), GeneratedXml(Error), Canonicalization(C14nError), MissingGeneratedSignedInfo, GeneratedMutation(XmlMutationError),
}
Expand description

Errors produced while validating or serializing an XMLDSig template.

Variants§

§

InvalidNamespacePrefix(String)

A namespace prefix was not a supported XML NCName.

§

InvalidNamespaceUri(String)

A namespace URI could not be represented in an XML 1.0 declaration.

§

NamespacePrefixConflict(String)

An XPath binding would rebind the prefix used by XMLDSig elements.

§

InvalidId

An XMLDSig Id attribute was not a valid XML NCName.

Fields

§element: &'static str

XMLDSig element carrying the Id attribute.

§value: String

Rejected attribute value.

§

MissingReference

XMLDSig requires at least one reference in SignedInfo.

§

Policy(PolicyViolation)

The immutable signing policy rejected the template.

§

InvalidXPath(String)

An XPath parameter cannot be parsed or exceeds its resource bounds.

§

SigningAlgorithmDisabled(&'static str)

SHA-1 algorithms are available for verification but not new signatures.

§

Serialization(Error)

The XML writer failed.

§

InvalidUtf8(FromUtf8Error)

The writer unexpectedly emitted bytes that are not UTF-8.

§

GeneratedXml(Error)

The generated template could not be parsed under the selected policy.

§

Canonicalization(C14nError)

The generated SignedInfo could not be canonicalized.

§

MissingGeneratedSignedInfo

The generated template did not contain its required SignedInfo child.

§

GeneratedMutation(XmlMutationError)

The generated template could not be prepared for policy validation.

Trait Implementations§

Source§

impl Debug for SignatureBuilderError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for SignatureBuilderError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for SignatureBuilderError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<C14nError> for SignatureBuilderError

Source§

fn from(source: C14nError) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for SignatureBuilderError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for SignatureBuilderError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<FromUtf8Error> for SignatureBuilderError

Source§

fn from(source: FromUtf8Error) -> Self

Converts to this type from the input type.
Source§

impl From<PolicyViolation> for SignatureBuilderError

Source§

fn from(source: PolicyViolation) -> Self

Converts to this type from the input type.
Source§

impl From<SignatureBuilderError> for SigningError

Source§

fn from(error: SignatureBuilderError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AsErrorSource for T
where T: Error + 'static,

Source§

fn as_error_source(&self) -> &(dyn Error + 'static)

For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method receivers.
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.