Struct tor_netdoc::doc::authcert::AuthCertBuilder
source · pub struct AuthCertBuilder { /* private fields */ }
build_docs
only.Expand description
A builder object used to construct an authority certificate.
Create one of these with the AuthCert::builder
method.
This facility is only enabled when the crate is built with
the build_docs
feature.
Implementations§
source§impl AuthCertBuilder
impl AuthCertBuilder
sourcepub fn address(&mut self, address: SocketAddrV4) -> &mut Self
pub fn address(&mut self, address: SocketAddrV4) -> &mut Self
Set the IPv4 address for this authority.
This field is optional.
sourcepub fn identity_key(&mut self, key: PublicKey) -> &mut Self
pub fn identity_key(&mut self, key: PublicKey) -> &mut Self
Set the identity key for this authority.
This field is required.
sourcepub fn signing_key(&mut self, key: PublicKey) -> &mut Self
pub fn signing_key(&mut self, key: PublicKey) -> &mut Self
Set the identity key for this certificate.
This field is required.
sourcepub fn lifespan(&mut self, lifespan: Range<SystemTime>) -> &mut Self
pub fn lifespan(&mut self, lifespan: Range<SystemTime>) -> &mut Self
Set the lifespan for this certificate.
These fields are required.
sourcepub fn dangerous_testing_cert(&self) -> BuildResult<AuthCert>
pub fn dangerous_testing_cert(&self) -> BuildResult<AuthCert>
Try to construct an AuthCert
from this builder.
This function can fail if any of the builder’s fields are missing or ill-formed.
§Danger
This function is dangerous because it can be used to construct a certificate where no certificate actually exists: The identity key here has not, in fact, attested to the signing key.
You should only use this function for testing.
Auto Trait Implementations§
impl Freeze for AuthCertBuilder
impl RefUnwindSafe for AuthCertBuilder
impl Send for AuthCertBuilder
impl Sync for AuthCertBuilder
impl Unpin for AuthCertBuilder
impl UnwindSafe for AuthCertBuilder
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more