pub struct PreambleConstructor {
pub consensus_methods: NotPresent,
pub consensus_method: (u32,),
pub published: NotPresent,
pub lifetime: Lifetime,
pub client_versions: Vec<String>,
pub server_versions: Vec<String>,
pub known_flags: DocRelayFlags,
pub proto_statuses: Arc<ProtoStatuses>,
pub params: NetParams<i32>,
}Expand description
Constructor (required fields) for Preamble
See Preamble.
This constructor struct contains precisely the required fields.
You can make a Preamble out of it with .construct(),
or the From impl,
and use the result as a basis for further modifications.
§Example
let preamble = Preamble {
voting_delay: /* optional field value */,
shared_rand_previous_value: /* optional field value */,
shared_rand_current_value: /* optional field value */,
__non_exhaustive: /* optional field value */,
..PreambleConstructor {
consensus_methods: /* required field value */,
consensus_method: /* required field value */,
published: /* required field value */,
lifetime: /* required field value */,
client_versions: /* required field value */,
server_versions: /* required field value */,
known_flags: /* required field value */,
proto_statuses: /* required field value */,
params: /* required field value */,
}.construct()
};Fields§
§consensus_methods: NotPresentConsensus methods supported by this voter.
consensus_method: (u32,)What “method” was used to produce this consensus? (A consensus method is a version number used by authorities to upgrade the consensus algorithm.)
published: NotPresentPublication time (of a vote)
lifetime: LifetimeOver what time is this consensus valid? (For votes, this is the time over which the voted-upon consensus should be valid.)
client_versions: Vec<String>List of recommended Tor client versions.
server_versions: Vec<String>List of recommended Tor relay versions.
known_flags: DocRelayFlagsRouter flags which could be determined
proto_statuses: Arc<ProtoStatuses>Lists of recommended and required subprotocols.
{recommended,required}-{client,relay}-protocols
params: NetParams<i32>Declared parameters for tunable settings about how to the network should operator. Some of these adjust timeouts and whatnot; some features things on and off.
Implementations§
Trait Implementations§
Source§impl From<PreambleConstructor> for Preamble
impl From<PreambleConstructor> for Preamble
Source§fn from(constructor: PreambleConstructor) -> Preamble
fn from(constructor: PreambleConstructor) -> Preamble
Auto Trait Implementations§
impl Freeze for PreambleConstructor
impl RefUnwindSafe for PreambleConstructor
impl Send for PreambleConstructor
impl Sync for PreambleConstructor
impl Unpin for PreambleConstructor
impl UnsafeUnpin for PreambleConstructor
impl UnwindSafe for PreambleConstructor
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> 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