Struct tor_hscrypto::pk::HsId
source · pub struct HsId(/* private fields */);
Expand description
The identity of a v3 onion service. (KP_hs_id)
This is the decoded and validated ed25519 public key that is encoded as a
${base32}.onion
address. When expanded, it is a public key whose
corresponding secret key is controlled by the onion service.
HsId
’s Display
and FromStr
representation is the domain name
"${base32}.onion"
. (Without any subdomains.)
Note: This is a separate type from HsIdKey
because it is about 6x
smaller.
Trait Implementations§
source§impl FromStr for HsId
impl FromStr for HsId
§type Err = HsIdParseError
type Err = HsIdParseError
The associated error which can be returned from parsing.
source§impl PartialEq for HsId
impl PartialEq for HsId
source§impl Redactable for HsId
impl Redactable for HsId
source§fn display_redacted(&self, f: &mut Formatter<'_>) -> Result
fn display_redacted(&self, f: &mut Formatter<'_>) -> Result
As
Display::fmt
, but produce a redacted representation.source§fn debug_redacted(&self, f: &mut Formatter<'_>) -> Result<(), Error>
fn debug_redacted(&self, f: &mut Formatter<'_>) -> Result<(), Error>
As
Debug::fmt
, but produce a redacted representation.source§fn redacted(&self) -> Redacted<&Self>
fn redacted(&self) -> Redacted<&Self>
Return a smart pointer that will display or debug this object as its
redacted form.
source§fn maybe_redacted(&self, redact: bool) -> MaybeRedacted<&Self>
fn maybe_redacted(&self, redact: bool) -> MaybeRedacted<&Self>
Return a smart pointer that redacts this object if
redact
is true.source§impl Writeable for HsId
impl Writeable for HsId
source§fn write_onto<B: Writer + ?Sized>(&self, w: &mut B) -> EncodeResult<()>
fn write_onto<B: Writer + ?Sized>(&self, w: &mut B) -> EncodeResult<()>
Encode this object into the writer
b
.impl Copy for HsId
impl Eq for HsId
impl StructuralPartialEq for HsId
Auto Trait Implementations§
impl Freeze for HsId
impl RefUnwindSafe for HsId
impl Send for HsId
impl Sync for HsId
impl Unpin for HsId
impl UnwindSafe for HsId
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
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 moresource§impl<W> WriteableOnce for Wwhere
W: Writeable,
impl<W> WriteableOnce for Wwhere
W: Writeable,
source§fn write_into<B>(self, b: &mut B) -> Result<(), EncodeError>
fn write_into<B>(self, b: &mut B) -> Result<(), EncodeError>
Encode this object into the writer
b
, and consume it.