pub struct PeerHello {
pub protocol_version: u32,
pub server_id: String,
pub name: String,
}Expand description
The first request on every connection: who the dialling server says it is. Its endpoint is proved by the connection; its server id is checked against the pin for that endpoint.
Fields§
§protocol_version: u32PROTOCOL_VERSION of the dialling server.
server_id: StringIts crate::ServerId, as written.
name: StringWhat it calls itself (name): shown to the other’s admins. Cut to
crate::MAX_HELLO_TEXT characters.
Implementations§
Source§impl PeerHello
impl PeerHello
Sourcepub fn within_bounds(self) -> Self
pub fn within_bounds(self) -> Self
This PeerHello with its name cut to crate::MAX_HELLO_TEXT
characters: what a server keeps of it.
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
impl Eq for PeerHello
impl StructuralPartialEq for PeerHello
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