pub struct HsDescBuilder<'a> { /* private fields */ }
hs-common
and hs-service
only.Expand description
Builder for HsDesc
.
Implementations§
Source§impl<'a> HsDescBuilder<'a>
impl<'a> HsDescBuilder<'a>
Sourcepub fn blinded_id(self, value: &'a HsBlindIdKey) -> Self
pub fn blinded_id(self, value: &'a HsBlindIdKey) -> Self
The blinded hidden service public key used for the first half of the “SECRET_DATA” field.
(See rend-spec v3 2.5.1.1 and 2.5.2.1.)
Sourcepub fn hs_desc_sign(self, value: &'a Keypair) -> Self
pub fn hs_desc_sign(self, value: &'a Keypair) -> Self
The short-term descriptor signing key (KP_hs_desc_sign, KS_hs_desc_sign).
Sourcepub fn hs_desc_sign_cert(self, value: EncodedEd25519Cert) -> Self
pub fn hs_desc_sign_cert(self, value: EncodedEd25519Cert) -> Self
The descriptor signing key certificate.
This certificate can be created using create_desc_sign_key_cert
.
Sourcepub fn create2_formats(self, value: &'a [HandshakeType]) -> Self
pub fn create2_formats(self, value: &'a [HandshakeType]) -> Self
A list of recognized CREATE handshakes that this onion service supports.
Sourcepub fn auth_required(self, value: Option<SmallVec<[IntroAuthType; 2]>>) -> Self
pub fn auth_required(self, value: Option<SmallVec<[IntroAuthType; 2]>>) -> Self
A list of authentication types that this onion service supports.
Sourcepub fn is_single_onion_service(self, value: bool) -> Self
pub fn is_single_onion_service(self, value: bool) -> Self
If true, this a “single onion service” and is not trying to keep its own location private.
Sourcepub fn intro_points(self, value: &'a [IntroPointDesc]) -> Self
pub fn intro_points(self, value: &'a [IntroPointDesc]) -> Self
One or more introduction points used to contact the onion service.
Sourcepub fn intro_auth_key_cert_expiry(self, value: SystemTime) -> Self
pub fn intro_auth_key_cert_expiry(self, value: SystemTime) -> Self
The expiration time of an introduction point authentication key certificate.
Sourcepub fn intro_enc_key_cert_expiry(self, value: SystemTime) -> Self
pub fn intro_enc_key_cert_expiry(self, value: SystemTime) -> Self
The expiration time of an introduction point encryption key certificate.
Sourcepub fn pow_params(self, value: Option<&'a PowParams>) -> Self
Available on crate feature hs-pow-full
only.
pub fn pow_params(self, value: Option<&'a PowParams>) -> Self
hs-pow-full
only.Proof-of-work parameters.
Sourcepub fn auth_clients(self, value: Option<&'a [PublicKey]>) -> Self
pub fn auth_clients(self, value: Option<&'a [PublicKey]>) -> Self
The list of clients authorized to discover the hidden service.
If None
, restricted discovery is disabled.
If Some(&[])
, restricted discovery is enabled,
but there will be no authorized clients.
If restricted discovery is disabled, the resulting middle document will contain a single
auth-client
line populated with random values.
Restricted discovery is disabled by default.
Sourcepub fn lifetime(self, value: IntegerMinutes<u16>) -> Self
pub fn lifetime(self, value: IntegerMinutes<u16>) -> Self
The lifetime of this descriptor, in minutes.
This doesn’t actually list the starting time or the end time for the descriptor: presumably, because we didn’t want to leak the onion service’s view of the wallclock.
Sourcepub fn revision_counter(self, value: RevisionCounter) -> Self
pub fn revision_counter(self, value: RevisionCounter) -> Self
A revision counter to tell whether this descriptor is more or less recent than another one for the same blinded ID.
Sourcepub fn subcredential(self, value: Subcredential) -> Self
pub fn subcredential(self, value: Subcredential) -> Self
The “subcredential” of the onion service.
Trait Implementations§
Source§impl<'a> Clone for HsDescBuilder<'a>
impl<'a> Clone for HsDescBuilder<'a>
Source§fn clone(&self) -> HsDescBuilder<'a>
fn clone(&self) -> HsDescBuilder<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<'a> Debug for HsDescBuilder<'a>
impl<'a> Debug for HsDescBuilder<'a>
Source§impl<'a> Default for HsDescBuilder<'a>
impl<'a> Default for HsDescBuilder<'a>
Source§impl<'a> NetdocBuilder for HsDescBuilder<'a>
impl<'a> NetdocBuilder for HsDescBuilder<'a>
Source§fn build_sign<R: RngCore + CryptoRng>(
self,
rng: &mut R,
) -> Result<String, EncodeError>
fn build_sign<R: RngCore + CryptoRng>( self, rng: &mut R, ) -> Result<String, EncodeError>
Auto Trait Implementations§
impl<'a> Freeze for HsDescBuilder<'a>
impl<'a> RefUnwindSafe for HsDescBuilder<'a>
impl<'a> Send for HsDescBuilder<'a>
impl<'a> Sync for HsDescBuilder<'a>
impl<'a> Unpin for HsDescBuilder<'a>
impl<'a> UnwindSafe for HsDescBuilder<'a>
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
, which can then be
downcast
into Box<dyn ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
, which can then be further
downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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