pub struct SignedLicence {
pub payload: LicencePayload,
/* private fields */
}Expand description
A parsed (not yet verified) licence.
Fields§
§payload: LicencePayloadImplementations§
Source§impl SignedLicence
impl SignedLicence
Sourcepub fn parse(text: &str) -> Result<Self, LicenceError>
pub fn parse(text: &str) -> Result<Self, LicenceError>
Parse a text block. Whitespace, line breaks and case do not matter.
Sourcepub fn verify(&self, keys: &TrustedKeys) -> Result<(), LicenceError>
pub fn verify(&self, keys: &TrustedKeys) -> Result<(), LicenceError>
Verify the signature against the trusted keys.
Trait Implementations§
Source§impl Clone for SignedLicence
impl Clone for SignedLicence
Source§fn clone(&self) -> SignedLicence
fn clone(&self) -> SignedLicence
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SignedLicence
impl Debug for SignedLicence
Source§impl PartialEq for SignedLicence
impl PartialEq for SignedLicence
impl Eq for SignedLicence
impl StructuralPartialEq for SignedLicence
Auto Trait Implementations§
impl Freeze for SignedLicence
impl RefUnwindSafe for SignedLicence
impl Send for SignedLicence
impl Sync for SignedLicence
impl Unpin for SignedLicence
impl UnwindSafe for SignedLicence
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