BandwidthMeasurement

Struct BandwidthMeasurement 

Source
pub struct BandwidthMeasurement {
Show 25 fields pub node_id: String, pub bandwidth: u64, pub nick: Option<String>, pub master_key_ed25519: Option<String>, pub measured_at: Option<DateTime<Utc>>, pub updated_at: Option<DateTime<Utc>>, pub bw_mean: Option<u64>, pub bw_median: Option<u64>, pub desc_bw_avg: Option<u64>, pub desc_bw_obs_last: Option<u64>, pub desc_bw_obs_mean: Option<u64>, pub desc_bw_bur: Option<u64>, pub consensus_bandwidth: Option<u64>, pub consensus_bandwidth_is_unmeasured: Option<bool>, pub success: Option<u32>, pub error_circ: Option<u32>, pub error_stream: Option<u32>, pub error_misc: Option<u32>, pub error_destination: Option<u32>, pub error_second_relay: Option<u32>, pub relay_in_recent_consensus_count: Option<u32>, pub relay_recent_measurement_attempt_count: Option<u32>, pub relay_recent_measurements_excluded_error_count: Option<u32>, pub relay_recent_priority_list_count: Option<u32>, pub extra: HashMap<String, String>,
}
Expand description

Bandwidth measurement data for a single relay.

Each relay in the bandwidth file has an associated measurement entry containing the measured bandwidth and various metadata about the measurement process.

§Required Fields

  • node_id: The relay’s fingerprint (required)
  • bandwidth: The measured bandwidth value (required)

§Optional Fields

All other fields are optional and may not be present depending on the bandwidth file version and scanner configuration.

Fields§

§node_id: String

The relay’s fingerprint (40 hex characters, without $ prefix).

§bandwidth: u64

The measured bandwidth in bytes per second.

§nick: Option<String>

The relay’s nickname.

§master_key_ed25519: Option<String>

The relay’s Ed25519 master key (base64 encoded).

§measured_at: Option<DateTime<Utc>>

When this measurement was taken.

§updated_at: Option<DateTime<Utc>>

When this measurement was last updated.

§bw_mean: Option<u64>

Mean of bandwidth measurements.

§bw_median: Option<u64>

Median of bandwidth measurements.

§desc_bw_avg: Option<u64>

Average bandwidth from the relay’s descriptor.

§desc_bw_obs_last: Option<u64>

Last observed bandwidth from the relay’s descriptor.

§desc_bw_obs_mean: Option<u64>

Mean observed bandwidth from the relay’s descriptor.

§desc_bw_bur: Option<u64>

Burst bandwidth from the relay’s descriptor.

§consensus_bandwidth: Option<u64>

Bandwidth value from the consensus.

§consensus_bandwidth_is_unmeasured: Option<bool>

Whether the consensus bandwidth was unmeasured.

§success: Option<u32>

Number of successful measurements.

§error_circ: Option<u32>

Number of circuit-related errors.

§error_stream: Option<u32>

Number of stream-related errors.

§error_misc: Option<u32>

Number of miscellaneous errors.

§error_destination: Option<u32>

Number of destination-related errors.

§error_second_relay: Option<u32>

Number of second relay errors.

§relay_in_recent_consensus_count: Option<u32>

Number of consensuses this relay appeared in recently.

§relay_recent_measurement_attempt_count: Option<u32>

Number of recent measurement attempts for this relay.

§relay_recent_measurements_excluded_error_count: Option<u32>

Number of recent measurements excluded due to errors.

§relay_recent_priority_list_count: Option<u32>

Number of times this relay was in the priority list.

§extra: HashMap<String, String>

Additional key-value pairs not explicitly parsed.

Trait Implementations§

Source§

impl Clone for BandwidthMeasurement

Source§

fn clone(&self) -> BandwidthMeasurement

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 Debug for BandwidthMeasurement

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for BandwidthMeasurement

Source§

fn default() -> BandwidthMeasurement

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.