pub struct BridgeLine {
pub addr: [u8; 16],
pub port: u16,
pub uid_fingerprint: u64,
pub unhashed_fingerprint: [u8; 20],
pub info: [u8; 204],
}Expand description
A bridge information line
Fields§
§addr: [u8; 16]IPv4 or IPv6 address
port: u16port
uid_fingerprint: u64fingerprint
unhashed_fingerprint: [u8; 20]unhashed fingerprint (20-byte bridge ID)
info: [u8; 204]other protocol information, including pluggable transport, public key, etc.
Implementations§
Source§impl BridgeLine
impl BridgeLine
pub fn get_hashed_fingerprint(&self) -> [u8; 20]
Source§impl BridgeLine
impl BridgeLine
Sourcepub fn bucket_encode(
bucket: &[BridgeLine; 3],
reachable: &HashMap<BridgeLine, Vec<(u32, usize)>>,
today: u32,
bucket_attr: &Scalar,
reachability_priv: &IssuerPrivKey,
) -> [u8; 818]
pub fn bucket_encode( bucket: &[BridgeLine; 3], reachable: &HashMap<BridgeLine, Vec<(u32, usize)>>, today: u32, bucket_attr: &Scalar, reachability_priv: &IssuerPrivKey, ) -> [u8; 818]
Encode a bucket to a byte array, including a Bucket Reachability credential if appropriate
Trait Implementations§
Source§impl Clone for BridgeLine
impl Clone for BridgeLine
Source§fn clone(&self) -> BridgeLine
fn clone(&self) -> BridgeLine
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BridgeLine
impl Debug for BridgeLine
Source§impl Default for BridgeLine
impl Default for BridgeLine
Source§impl<'de> Deserialize<'de> for BridgeLine
impl<'de> Deserialize<'de> for BridgeLine
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for BridgeLine
impl Hash for BridgeLine
Source§impl PartialEq for BridgeLine
impl PartialEq for BridgeLine
Source§impl Serialize for BridgeLine
impl Serialize for BridgeLine
impl Copy for BridgeLine
impl Eq for BridgeLine
impl StructuralPartialEq for BridgeLine
Auto Trait Implementations§
impl Freeze for BridgeLine
impl RefUnwindSafe for BridgeLine
impl Send for BridgeLine
impl Sync for BridgeLine
impl Unpin for BridgeLine
impl UnwindSafe for BridgeLine
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
Mutably borrows from an owned value. Read more