pub struct RouteResponse {
pub connection_id: ConnectionId,
pub pk: PublicKey,
}
Expand description
Sent by server to client.
The response to the routing request, tell the client if the
routing request succeeded (valid connection_id
) and if it did,
tell them the id of the connection (connection_id
). The public
key sent in the routing request is also sent in the response so
that the client can send many requests at the same time to the
server without having code to track which response belongs to which public key.
Serialized form:
Length | Content |
---|---|
1 | 0x01 |
1 | connection_id [ 0x10 .. 0xFF ] |
32 | Public Key |
Fields§
§connection_id: ConnectionId
The id of the requested PK
pk: PublicKey
The requested PK
Trait Implementations§
Source§impl Clone for RouteResponse
impl Clone for RouteResponse
Source§fn clone(&self) -> RouteResponse
fn clone(&self) -> RouteResponse
Returns a copy 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 RouteResponse
impl Debug for RouteResponse
Source§impl FromBytes for RouteResponse
impl FromBytes for RouteResponse
Source§fn from_bytes(i: &[u8]) -> IResult<&[u8], RouteResponse, (&[u8], ErrorKind)>
fn from_bytes(i: &[u8]) -> IResult<&[u8], RouteResponse, (&[u8], ErrorKind)>
Deserialize struct using
nom
from raw bytesSource§impl PartialEq for RouteResponse
impl PartialEq for RouteResponse
Source§impl ToBytes for RouteResponse
impl ToBytes for RouteResponse
impl StructuralPartialEq for RouteResponse
Auto Trait Implementations§
impl Freeze for RouteResponse
impl RefUnwindSafe for RouteResponse
impl Send for RouteResponse
impl Sync for RouteResponse
impl Unpin for RouteResponse
impl UnwindSafe for RouteResponse
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