ExtraInfoDescriptorBuilder

Struct ExtraInfoDescriptorBuilder 

Source
pub struct ExtraInfoDescriptorBuilder { /* private fields */ }
Expand description

Builder for ExtraInfoDescriptor.

Implementations§

Source§

impl ExtraInfoDescriptorBuilder

Source

pub fn nickname<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

The relay’s nickname (1-19 alphanumeric characters).

Source

pub fn fingerprint<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

The relay’s identity fingerprint (40 uppercase hex characters).

This is the SHA-1 hash of the relay’s identity key.

Source

pub fn published<VALUE: Into<DateTime<Utc>>>( &mut self, value: VALUE, ) -> &mut Self

When this descriptor was published (UTC).

Source

pub fn geoip_db_digest<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self

SHA-1 digest of the GeoIP database for IPv4 addresses.

Source

pub fn geoip6_db_digest<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self

SHA-1 digest of the GeoIP database for IPv6 addresses.

Source

pub fn transports<VALUE: Into<HashMap<String, Transport>>>( &mut self, value: VALUE, ) -> &mut Self

Pluggable transports available on this relay (bridges only).

Maps transport name to transport details.

Source

pub fn read_history<VALUE: Into<BandwidthHistory>>( &mut self, value: VALUE, ) -> &mut Self

Bytes read by the relay over time.

Source

pub fn write_history<VALUE: Into<BandwidthHistory>>( &mut self, value: VALUE, ) -> &mut Self

Bytes written by the relay over time.

Source

pub fn dir_read_history<VALUE: Into<BandwidthHistory>>( &mut self, value: VALUE, ) -> &mut Self

Bytes read for directory requests over time.

Source

pub fn dir_write_history<VALUE: Into<BandwidthHistory>>( &mut self, value: VALUE, ) -> &mut Self

Bytes written for directory requests over time.

Source

pub fn conn_bi_direct_end<VALUE: Into<DateTime<Utc>>>( &mut self, value: VALUE, ) -> &mut Self

End time for bi-directional connection statistics.

Source

pub fn conn_bi_direct_interval<VALUE: Into<u32>>( &mut self, value: VALUE, ) -> &mut Self

Interval for bi-directional connection statistics (seconds).

Source

pub fn conn_bi_direct_below<VALUE: Into<u32>>( &mut self, value: VALUE, ) -> &mut Self

Connections that read/wrote less than 20 KiB.

Source

pub fn conn_bi_direct_read<VALUE: Into<u32>>( &mut self, value: VALUE, ) -> &mut Self

Connections that read at least 10x more than wrote.

Source

pub fn conn_bi_direct_write<VALUE: Into<u32>>( &mut self, value: VALUE, ) -> &mut Self

Connections that wrote at least 10x more than read.

Source

pub fn conn_bi_direct_both<VALUE: Into<u32>>( &mut self, value: VALUE, ) -> &mut Self

Connections with balanced read/write (remaining).

Source

pub fn cell_stats_end<VALUE: Into<DateTime<Utc>>>( &mut self, value: VALUE, ) -> &mut Self

End time for cell statistics collection.

Source

pub fn cell_stats_interval<VALUE: Into<u32>>( &mut self, value: VALUE, ) -> &mut Self

Interval for cell statistics (seconds).

Source

pub fn cell_processed_cells<VALUE: Into<Vec<f64>>>( &mut self, value: VALUE, ) -> &mut Self

Mean processed cells per circuit, by decile.

Source

pub fn cell_queued_cells<VALUE: Into<Vec<f64>>>( &mut self, value: VALUE, ) -> &mut Self

Mean queued cells per circuit, by decile.

Source

pub fn cell_time_in_queue<VALUE: Into<Vec<f64>>>( &mut self, value: VALUE, ) -> &mut Self

Mean time cells spent in queue (milliseconds), by decile.

Source

pub fn cell_circuits_per_decile<VALUE: Into<u32>>( &mut self, value: VALUE, ) -> &mut Self

Mean number of circuits in a decile.

Source

pub fn dir_stats_end<VALUE: Into<DateTime<Utc>>>( &mut self, value: VALUE, ) -> &mut Self

End time for directory statistics collection.

Source

pub fn dir_stats_interval<VALUE: Into<u32>>( &mut self, value: VALUE, ) -> &mut Self

Interval for directory statistics (seconds).

Source

pub fn dir_v3_ips<VALUE: Into<HashMap<String, u32>>>( &mut self, value: VALUE, ) -> &mut Self

V3 directory request client IPs by country code.

Source

pub fn dir_v3_requests<VALUE: Into<HashMap<String, u32>>>( &mut self, value: VALUE, ) -> &mut Self

V3 directory request counts by country code.

Source

pub fn dir_v3_responses<VALUE: Into<HashMap<DirResponse, u32>>>( &mut self, value: VALUE, ) -> &mut Self

V3 directory response status counts.

Source

pub fn dir_v3_responses_unknown<VALUE: Into<HashMap<String, u32>>>( &mut self, value: VALUE, ) -> &mut Self

Unrecognized V3 directory response statuses.

Source

pub fn dir_v3_direct_dl<VALUE: Into<HashMap<DirStat, u32>>>( &mut self, value: VALUE, ) -> &mut Self

V3 direct download statistics (via DirPort).

Source

pub fn dir_v3_direct_dl_unknown<VALUE: Into<HashMap<String, u32>>>( &mut self, value: VALUE, ) -> &mut Self

Unrecognized V3 direct download statistics.

Source

pub fn dir_v3_tunneled_dl<VALUE: Into<HashMap<DirStat, u32>>>( &mut self, value: VALUE, ) -> &mut Self

V3 tunneled download statistics (via ORPort).

Source

pub fn dir_v3_tunneled_dl_unknown<VALUE: Into<HashMap<String, u32>>>( &mut self, value: VALUE, ) -> &mut Self

Unrecognized V3 tunneled download statistics.

Source

pub fn dir_v2_ips<VALUE: Into<HashMap<String, u32>>>( &mut self, value: VALUE, ) -> &mut Self

V2 directory request client IPs by country code (deprecated).

Source

pub fn dir_v2_requests<VALUE: Into<HashMap<String, u32>>>( &mut self, value: VALUE, ) -> &mut Self

V2 directory request counts by country code (deprecated).

Source

pub fn dir_v2_responses<VALUE: Into<HashMap<DirResponse, u32>>>( &mut self, value: VALUE, ) -> &mut Self

V2 directory response status counts (deprecated).

Source

pub fn dir_v2_responses_unknown<VALUE: Into<HashMap<String, u32>>>( &mut self, value: VALUE, ) -> &mut Self

Unrecognized V2 directory response statuses (deprecated).

Source

pub fn dir_v2_direct_dl<VALUE: Into<HashMap<DirStat, u32>>>( &mut self, value: VALUE, ) -> &mut Self

V2 direct download statistics (deprecated).

Source

pub fn dir_v2_direct_dl_unknown<VALUE: Into<HashMap<String, u32>>>( &mut self, value: VALUE, ) -> &mut Self

Unrecognized V2 direct download statistics (deprecated).

Source

pub fn dir_v2_tunneled_dl<VALUE: Into<HashMap<DirStat, u32>>>( &mut self, value: VALUE, ) -> &mut Self

V2 tunneled download statistics (deprecated).

Source

pub fn dir_v2_tunneled_dl_unknown<VALUE: Into<HashMap<String, u32>>>( &mut self, value: VALUE, ) -> &mut Self

Unrecognized V2 tunneled download statistics (deprecated).

Source

pub fn entry_stats_end<VALUE: Into<DateTime<Utc>>>( &mut self, value: VALUE, ) -> &mut Self

End time for entry guard statistics.

Source

pub fn entry_stats_interval<VALUE: Into<u32>>( &mut self, value: VALUE, ) -> &mut Self

Interval for entry guard statistics (seconds).

Source

pub fn entry_ips<VALUE: Into<HashMap<String, u32>>>( &mut self, value: VALUE, ) -> &mut Self

Entry guard client IPs by country code.

Source

pub fn exit_stats_end<VALUE: Into<DateTime<Utc>>>( &mut self, value: VALUE, ) -> &mut Self

End time for exit statistics.

Source

pub fn exit_stats_interval<VALUE: Into<u32>>( &mut self, value: VALUE, ) -> &mut Self

Interval for exit statistics (seconds).

Source

pub fn exit_kibibytes_written<VALUE: Into<HashMap<PortKey, u64>>>( &mut self, value: VALUE, ) -> &mut Self

Kibibytes written per destination port.

Source

pub fn exit_kibibytes_read<VALUE: Into<HashMap<PortKey, u64>>>( &mut self, value: VALUE, ) -> &mut Self

Kibibytes read per destination port.

Source

pub fn exit_streams_opened<VALUE: Into<HashMap<PortKey, u64>>>( &mut self, value: VALUE, ) -> &mut Self

Streams opened per destination port.

Source

pub fn bridge_stats_end<VALUE: Into<DateTime<Utc>>>( &mut self, value: VALUE, ) -> &mut Self

End time for bridge statistics.

Source

pub fn bridge_stats_interval<VALUE: Into<u32>>( &mut self, value: VALUE, ) -> &mut Self

Interval for bridge statistics (seconds).

Source

pub fn bridge_ips<VALUE: Into<HashMap<String, u32>>>( &mut self, value: VALUE, ) -> &mut Self

Bridge client IPs by country code.

Source

pub fn ip_versions<VALUE: Into<HashMap<String, u32>>>( &mut self, value: VALUE, ) -> &mut Self

Bridge client counts by IP version (v4, v6).

Source

pub fn ip_transports<VALUE: Into<HashMap<String, u32>>>( &mut self, value: VALUE, ) -> &mut Self

Bridge client counts by transport method.

Source

pub fn hs_stats_end<VALUE: Into<DateTime<Utc>>>( &mut self, value: VALUE, ) -> &mut Self

End time for hidden service statistics.

Source

pub fn hs_rend_cells<VALUE: Into<u64>>(&mut self, value: VALUE) -> &mut Self

Rounded count of RENDEZVOUS1 cells relayed.

Source

pub fn hs_rend_cells_attr<VALUE: Into<HashMap<String, String>>>( &mut self, value: VALUE, ) -> &mut Self

Additional attributes for hs_rend_cells.

Source

pub fn hs_dir_onions_seen<VALUE: Into<u64>>( &mut self, value: VALUE, ) -> &mut Self

Rounded count of unique onion service identities seen.

Source

pub fn hs_dir_onions_seen_attr<VALUE: Into<HashMap<String, String>>>( &mut self, value: VALUE, ) -> &mut Self

Additional attributes for hs_dir_onions_seen.

Source

pub fn padding_counts_end<VALUE: Into<DateTime<Utc>>>( &mut self, value: VALUE, ) -> &mut Self

End time for padding count statistics.

Source

pub fn padding_counts_interval<VALUE: Into<u32>>( &mut self, value: VALUE, ) -> &mut Self

Interval for padding count statistics (seconds).

Source

pub fn padding_counts<VALUE: Into<HashMap<String, String>>>( &mut self, value: VALUE, ) -> &mut Self

Padding-related statistics.

Source

pub fn ed25519_certificate<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self

Ed25519 certificate (PEM-encoded).

Source

pub fn ed25519_signature<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self

Ed25519 signature of the descriptor.

Source

pub fn signature<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

RSA signature of the descriptor (relay extra-info only).

Source

pub fn router_digest<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

Router digest for bridge extra-info descriptors.

Present only in bridge descriptors; indicates this is a bridge.

Source

pub fn router_digest_sha256<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self

SHA-256 router digest (base64).

Source

pub fn raw_content<VALUE: Into<Vec<u8>>>(&mut self, value: VALUE) -> &mut Self

Raw descriptor content for digest computation.

Source

pub fn unrecognized_lines<VALUE: Into<Vec<String>>>( &mut self, value: VALUE, ) -> &mut Self

Lines not recognized during parsing.

Source

pub fn build( &self, ) -> Result<ExtraInfoDescriptor, ExtraInfoDescriptorBuilderError>

Builds a new ExtraInfoDescriptor.

§Errors

If a required field has not been initialized.

Trait Implementations§

Source§

impl Clone for ExtraInfoDescriptorBuilder

Source§

fn clone(&self) -> ExtraInfoDescriptorBuilder

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for ExtraInfoDescriptorBuilder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V