Struct tor_netdoc::doc::hsdesc::HsDescMiddle
source · pub struct HsDescMiddle { /* private fields */ }
Available on crate features
hs-common
and hsdesc-inner-docs
only.Expand description
A more-or-less verbatim representation of the middle document of an onion service descriptor.
Implementations§
source§impl HsDescMiddle
impl HsDescMiddle
sourcepub fn decrypt_inner(
&self,
blinded_id: &HsBlindId,
revision: RevisionCounter,
subcredential: &Subcredential,
key: Option<&HsClientDescEncSecretKey>
) -> Result<Vec<u8>, HsDescError>
pub fn decrypt_inner( &self, blinded_id: &HsBlindId, revision: RevisionCounter, subcredential: &Subcredential, key: Option<&HsClientDescEncSecretKey> ) -> Result<Vec<u8>, HsDescError>
Decrypt the encrypted inner document contained within this middle document.
If present, key
is an authorization key, and we assume that the
decryption is nontrivial.
A failure may mean either that the encryption was corrupted, or that we didn’t have the right key.
source§impl HsDescMiddle
impl HsDescMiddle
sourcepub fn parse(s: &str) -> Result<HsDescMiddle>
pub fn parse(s: &str) -> Result<HsDescMiddle>
Try to parse the middle document of an onion service descriptor from a provided string.
Trait Implementations§
source§impl Clone for HsDescMiddle
impl Clone for HsDescMiddle
source§fn clone(&self) -> HsDescMiddle
fn clone(&self) -> HsDescMiddle
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 Freeze for HsDescMiddle
impl RefUnwindSafe for HsDescMiddle
impl Send for HsDescMiddle
impl Sync for HsDescMiddle
impl Unpin for HsDescMiddle
impl UnwindSafe for HsDescMiddle
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
§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>
Converts
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>
Converts
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