pub struct Metadata {
pub filename: Option<String>,
pub media_type: Option<String>,
pub signature: Option<SignatureStanza>,
}Fields§
§filename: Option<String>§media_type: Option<String>§signature: Option<SignatureStanza>A signature visible only to recipients. Excluded from the signing base, because it cannot cover itself.
Implementations§
Source§impl Metadata
impl Metadata
pub fn encode(&self) -> Result<Vec<u8>, FormatError>
Sourcepub fn signing_base(&self) -> Result<Vec<u8>, FormatError>
pub fn signing_base(&self) -> Result<Vec<u8>, FormatError>
The metadata as it looked before a signature was attached.
pub fn decode(bytes: &[u8]) -> Result<Self, FormatError>
Trait Implementations§
impl Eq for Metadata
impl StructuralPartialEq for Metadata
Auto Trait Implementations§
impl Freeze for Metadata
impl RefUnwindSafe for Metadata
impl Send for Metadata
impl Sync for Metadata
impl Unpin for Metadata
impl UnsafeUnpin for Metadata
impl UnwindSafe for Metadata
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
Mutably borrows from an owned value. Read more