pub struct SignatureBuilder { /* private fields */ }Expand description
Builder for a complete XMLDSig <Signature> template.
Implementations§
Source§impl SignatureBuilder
impl SignatureBuilder
Sourcepub fn new(c14n_method: C14nAlgorithm, sign_method: SignatureAlgorithm) -> Self
pub fn new(c14n_method: C14nAlgorithm, sign_method: SignatureAlgorithm) -> Self
Create a signature template using the required algorithms.
Sourcepub fn ns_prefix(self, prefix: impl Into<String>) -> Self
pub fn ns_prefix(self, prefix: impl Into<String>) -> Self
Use a namespace prefix such as ds; the default is an unprefixed namespace.
Sourcepub fn signature_id(self, id: impl Into<String>) -> Self
pub fn signature_id(self, id: impl Into<String>) -> Self
Set the optional Signature Id.
Sourcepub fn add_reference(self, reference: ReferenceBuilder) -> Self
pub fn add_reference(self, reference: ReferenceBuilder) -> Self
Append a reference, preserving insertion order.
Sourcepub fn key_info(self, include: bool) -> Self
pub fn key_info(self, include: bool) -> Self
Control whether an empty KeyInfo placeholder is emitted.
Sourcepub fn build_template(&self) -> Result<String, SignatureBuilderError>
pub fn build_template(&self) -> Result<String, SignatureBuilderError>
Build a namespace-correct XMLDSig template with empty digest and signature values.
Trait Implementations§
Source§impl Clone for SignatureBuilder
impl Clone for SignatureBuilder
Source§fn clone(&self) -> SignatureBuilder
fn clone(&self) -> SignatureBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SignatureBuilder
impl RefUnwindSafe for SignatureBuilder
impl Send for SignatureBuilder
impl Sync for SignatureBuilder
impl Unpin for SignatureBuilder
impl UnsafeUnpin for SignatureBuilder
impl UnwindSafe for SignatureBuilder
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more