pub struct RouterDescConstructor {
pub router: RouterDescIntroItem,
pub identity_ed25519: EmbeddedCert<Ed25519IdentityCert, KeyUnknownCert>,
pub master_key_ed25519: Ed25519Public,
pub published: Iso8601TimeSp,
pub ntor_onion_key: Curve25519Public,
pub ntor_onion_key_crosscert: NtorOnionKeyCrossCert,
pub signing_key: PublicKey,
}Expand description
Constructor (required fields) for RouterDesc
See RouterDesc.
This constructor struct contains precisely the required fields.
You can make a RouterDesc out of it with .construct(),
or the From impl,
and use the result as a basis for further modifications.
§Example
let router_desc = RouterDesc {
bandwidth: /* optional field value */,
platform: /* optional field value */,
fingerprint: /* optional field value */,
hibernating: /* optional field value */,
uptime: /* optional field value */,
ipv4_policy: /* optional field value */,
ipv6_policy: /* optional field value */,
overload_general: /* optional field value */,
contact: /* optional field value */,
family: /* optional field value */,
family_cert: /* optional field value */,
caches_extra_info: /* optional field value */,
extra_info_digest: /* optional field value */,
hidden_service_dir: /* optional field value */,
or_address: /* optional field value */,
tunnelled_dir_server: /* optional field value */,
proto: /* optional field value */,
__non_exhaustive: /* optional field value */,
..RouterDescConstructor {
router: /* required field value */,
identity_ed25519: /* required field value */,
master_key_ed25519: /* required field value */,
published: /* required field value */,
ntor_onion_key: /* required field value */,
ntor_onion_key_crosscert: /* required field value */,
signing_key: /* required field value */,
}.construct()
};Fields§
§router: RouterDescIntroItemrouter — Introduce a router descriptor.
https://spec.torproject.org/dir-spec/server-descriptor-format.html#item:router
identity_ed25519: EmbeddedCert<Ed25519IdentityCert, KeyUnknownCert>identity-ed25519 — Specify the router’s ed25519 identity.
https://spec.torproject.org/dir-spec/server-descriptor-format.html#item:identity-ed25519
master_key_ed25519: Ed25519Publicmaster-key-ed25519 — Redundantly specify the router’s ed25519 identity.
https://spec.torproject.org/dir-spec/server-descriptor-format.html#item:master-key-ed25519
published: Iso8601TimeSppublished — Time this descriptor (and extra-info) was generated.
https://spec.torproject.org/dir-spec/server-descriptor-format.html#item:published
ntor_onion_key: Curve25519Publicntor-onion-key — The circuit extension key.
https://spec.torproject.org/dir-spec/server-descriptor-format.html#item:ntor-onion-key
ntor_onion_key_crosscert: NtorOnionKeyCrossCertntor-onion-key-crosscert — Reverse cert by K_ntor on KP_relayid_ed
https://spec.torproject.org/dir-spec/server-descriptor-format.html#item:ntor-onion-key-crosscert
signing_key: PublicKeysigning-key — Obsolete RSA identity key.
https://spec.torproject.org/dir-spec/server-descriptor-format.html#item:signing-key
Implementations§
Source§impl RouterDescConstructor
impl RouterDescConstructor
Sourcepub fn construct(self) -> RouterDesc
pub fn construct(self) -> RouterDesc
Construct a minimal RouterDesc
In the returned RouterDesc,
optional fields all get the default values.
Trait Implementations§
Source§impl From<RouterDescConstructor> for RouterDesc
impl From<RouterDescConstructor> for RouterDesc
Source§fn from(constructor: RouterDescConstructor) -> RouterDesc
fn from(constructor: RouterDescConstructor) -> RouterDesc
Auto Trait Implementations§
impl Freeze for RouterDescConstructor
impl RefUnwindSafe for RouterDescConstructor
impl Send for RouterDescConstructor
impl Sync for RouterDescConstructor
impl Unpin for RouterDescConstructor
impl UnsafeUnpin for RouterDescConstructor
impl UnwindSafe for RouterDescConstructor
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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