pub struct DigitalSignature {
pub signer: SignerInfo,
pub hash_algorithm: HashAlgorithm,
pub sign_time: Option<String>,
pub commitment: SignatureCommitment,
}Expand description
Represents the metadata structure for a digital signature part.
Generates a W3C XML Signature skeleton within the _xmlsignatures/ directory of the OPC
package. Does not perform cryptographic signing — DigestValue and SignatureValue are
empty placeholders. To produce a valid signature, use an external signing tool or ceremony
after generating the PPTX.
Fields§
§signer: SignerInfoInformation about the signer.
hash_algorithm: HashAlgorithmThe hash algorithm for digest computation.
sign_time: Option<String>Optional ISO 8601 datetime string for when the signature was created.
commitment: SignatureCommitmentThe commitment type for the signature.
Implementations§
Source§impl DigitalSignature
impl DigitalSignature
Sourcepub const fn new(signer: SignerInfo, algorithm: HashAlgorithm) -> Self
pub const fn new(signer: SignerInfo, algorithm: HashAlgorithm) -> Self
Create a new digital signature with the given signer and algorithm.
Sourcepub const fn with_commitment(self, commitment: SignatureCommitment) -> Self
pub const fn with_commitment(self, commitment: SignatureCommitment) -> Self
Builder method: set the commitment type.
Sourcepub fn with_sign_time(self, time: impl Into<String>) -> Self
pub fn with_sign_time(self, time: impl Into<String>) -> Self
Builder method: set the signing time.
Trait Implementations§
Source§impl Clone for DigitalSignature
impl Clone for DigitalSignature
Source§fn clone(&self) -> DigitalSignature
fn clone(&self) -> DigitalSignature
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DigitalSignature
impl Debug for DigitalSignature
Source§impl PartialEq for DigitalSignature
impl PartialEq for DigitalSignature
Source§impl WriteXml for DigitalSignature
impl WriteXml for DigitalSignature
Source§fn write_xml<W: Write>(&self, w: &mut W) -> Result
fn write_xml<W: Write>(&self, w: &mut W) -> Result
Writes the structural W3C XML Signature document for this metadata.
Important: This method produces metadata/structural XML only. DigestValue and
SignatureValue are empty placeholders — no cryptographic computation is performed.
To produce a cryptographically valid signature, pass the generated PPTX through an
external signing tool or ceremony after saving.
Source§fn to_xml_string(&self) -> String
fn to_xml_string(&self) -> String
String.impl Eq for DigitalSignature
impl StructuralPartialEq for DigitalSignature
Auto Trait Implementations§
impl Freeze for DigitalSignature
impl RefUnwindSafe for DigitalSignature
impl Send for DigitalSignature
impl Sync for DigitalSignature
impl Unpin for DigitalSignature
impl UnsafeUnpin for DigitalSignature
impl UnwindSafe for DigitalSignature
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.