Struct edcert_letter::letter::Letter
[−]
[src]
pub struct Letter<T: Fingerprint> { /* fields omitted */ }
Use this type to sign content.
Methods
impl<T: Fingerprint> Letter<T>
[src]
fn new(content: T, signature: Signature) -> Letter<T>
This method creates a Letter from its parts: A piece of content (which must be convertable to a &u8) and a Signature.
fn with_private_key(content: T, private_key: &[u8]) -> Letter<T>
This method creates a Letter by signing itself with the given private key
fn with_certificate(content: T, cert: &Certificate) -> Result<Letter<T>, ()>
This method creates a Letter by signing itself with the given certificate. The certificate must have a private key.
fn get(&self) -> &T
This method returns a reference to the contained object.
Trait Implementations
impl<T: PartialEq + Fingerprint> PartialEq for Letter<T>
[src]
fn eq(&self, __arg_0: &Letter<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Letter<T>) -> bool
This method tests for !=
.
impl<T: Debug + Fingerprint> Debug for Letter<T>
[src]
impl<T: Fingerprint> Validatable for Letter<T>
[src]
fn self_validate<V: Validator>(&self, cv: &V) -> Result<(), ValidationError>
This method is given a validator. It can access the master public key indirectly using the Validator
. Read more
impl<T: Fingerprint> Fingerprint for Letter<T>
[src]
fn fingerprint(&self) -> Vec<u8>
The fingerprint method should return a value that is unique to the implementing type.
impl<T: Fingerprint> Deref for Letter<T>
[src]
type Target = T
The resulting type after dereferencing
fn deref(&self) -> &Self::Target
The method called to dereference a value
impl<T: Fingerprint> Revokable for Letter<T>
[src]
fn self_check_revoked<R: Revoker>(&self, _: &R) -> Result<(), RevokeError>
This method can use the revoker to check if it has been revoked. Read more