Struct tor_cert::Ed25519CertConstructor
source · pub struct Ed25519CertConstructor { /* private fields */ }
Expand description
Builder for Ed25519Cert
.
Implementations§
source§impl Ed25519CertConstructor
impl Ed25519CertConstructor
sourcepub fn expiration(&mut self, expiration: SystemTime) -> &mut Self
Available on crate feature encode
only.
pub fn expiration(&mut self, expiration: SystemTime) -> &mut Self
encode
only.Set the approximate expiration time for this certificate.
(The time will be rounded forward to the nearest hour after the epoch.)
sourcepub fn signing_key(&mut self, key: Ed25519Identity) -> &mut Self
Available on crate feature encode
only.
pub fn signing_key(&mut self, key: Ed25519Identity) -> &mut Self
encode
only.Set the signing key to be included with this certificate.
This is optional: you don’t need to include the signing key at all. If you do, it must match the key that you actually use to sign the certificate.
sourcepub fn clear_signing_key(&mut self) -> &mut Self
Available on crate feature encode
only.
pub fn clear_signing_key(&mut self) -> &mut Self
encode
only.Remove any signing key previously set on this Ed25519CertConstructor.
sourcepub fn encode_and_sign<S>(
&self,
skey: &S
) -> Result<EncodedEd25519Cert, CertEncodeError>
Available on crate feature encode
only.
pub fn encode_and_sign<S>( &self, skey: &S ) -> Result<EncodedEd25519Cert, CertEncodeError>
encode
only.Encode a certificate into a new vector, signing the result
with skey
.
This function exists in lieu of a build()
function, since we have a rule that
we don’t produce an Ed25519Cert
except if the certificate is known to be
valid.
Trait Implementations§
source§impl Clone for Ed25519CertConstructor
impl Clone for Ed25519CertConstructor
source§fn clone(&self) -> Ed25519CertConstructor
fn clone(&self) -> Ed25519CertConstructor
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 moreAuto Trait Implementations§
impl RefUnwindSafe for Ed25519CertConstructor
impl Send for Ed25519CertConstructor
impl Sync for Ed25519CertConstructor
impl Unpin for Ed25519CertConstructor
impl UnwindSafe for Ed25519CertConstructor
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