pub struct PeerHello {
pub device_id: Uuid,
pub peering_protocol: String,
pub peering_protocol_min: Option<String>,
pub directory_version: u64,
pub proof: HybridSignature,
}Expand description
The handshake hello each side sends over the encrypted channel: who it claims to be, the peering protocol window it speaks, the directory version it pins, and a hybrid signature over the channel-binding exporter material.
Fields§
§device_id: UuidThe sender’s directory device id.
peering_protocol: StringThe newest peering transport protocol version the sender speaks (its window’s max).
peering_protocol_min: Option<String>The oldest version the sender speaks. Absent from a hello older than the window, which
spoke exactly peering_protocol.
directory_version: u64The directory_version of the directory the sender pins. Absent (0) from a hello older
than the window.
proof: HybridSignatureA hybrid signature over the TLS exporter material — the proof this device holds the key
published for device_id.
Implementations§
Source§impl PeerHello
impl PeerHello
Sourcepub fn window(&self) -> Result<VersionWindow, PeeringError>
pub fn window(&self) -> Result<VersionWindow, PeeringError>
The window this hello advertises.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PeerHello
impl<'de> Deserialize<'de> for PeerHello
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
Auto Trait Implementations§
impl Freeze for PeerHello
impl RefUnwindSafe for PeerHello
impl Send for PeerHello
impl Sync for PeerHello
impl Unpin for PeerHello
impl UnsafeUnpin for PeerHello
impl UnwindSafe for PeerHello
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> CompatExt for T
impl<T> CompatExt for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
Consume a handle, getting back the initial
Arc<> Read more§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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