Struct tor_keymgr::key_specifier::KeyPathInfo
source · pub struct KeyPathInfo {
summary: String,
role: String,
extra_info: BTreeMap<String, String>,
}
Expand description
Information about a KeyPath
.
The information is extracted from the KeyPath
itself
(not from the key data) by a KeyPathInfoExtractor
.
Fields§
§summary: String
A human-readable summary string describing what the KeyPath
is for.
This should not recapitulate information in the extra_info
.
role: String
The key role, ie its official name in the Tor Protocols.
This should usually start with KS_
.
extra_info: BTreeMap<String, String>
Additional information, in the form of key-value pairs.
This will contain human-readable information that describes the individual
components of a KeyPath. For example, for the ArtiPath
hs/foo/KS_hs_id.expanded_ed25519_private
, the extra information could
be ("kind", "service)
, ("nickname", "foo")
, etc.
Implementations§
source§impl KeyPathInfo
impl KeyPathInfo
sourcepub fn summary(&self) -> &String
pub fn summary(&self) -> &String
Method borrowing KeyPathInfo::summary
field.
A human-readable summary string describing what the KeyPath
is for.
sourcepub fn role(&self) -> &String
pub fn role(&self) -> &String
Method borrowing KeyPathInfo::role
field.
The key role, ie its official name in the Tor Protocols.
sourcepub fn extra_info(&self) -> &BTreeMap<String, String>
pub fn extra_info(&self) -> &BTreeMap<String, String>
Method borrowing KeyPathInfo::extra_info
field.
Additional information, in the form of key-value pairs.
source§impl KeyPathInfo
impl KeyPathInfo
sourcepub fn builder() -> KeyPathInfoBuilder
pub fn builder() -> KeyPathInfoBuilder
Start to build a KeyPathInfo
: return a fresh KeyPathInfoBuilder
Trait Implementations§
source§impl Clone for KeyPathInfo
impl Clone for KeyPathInfo
source§fn clone(&self) -> KeyPathInfo
fn clone(&self) -> KeyPathInfo
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for KeyPathInfo
impl Debug for KeyPathInfo
source§impl PartialEq for KeyPathInfo
impl PartialEq for KeyPathInfo
source§fn eq(&self, other: &KeyPathInfo) -> bool
fn eq(&self, other: &KeyPathInfo) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for KeyPathInfo
Auto Trait Implementations§
impl Freeze for KeyPathInfo
impl RefUnwindSafe for KeyPathInfo
impl Send for KeyPathInfo
impl Sync for KeyPathInfo
impl Unpin for KeyPathInfo
impl UnwindSafe for KeyPathInfo
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§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>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§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>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§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.§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.§impl<T> DowncastSync for T
impl<T> DowncastSync for 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