pub struct ConnectNodeSend {
pub step_index: u8,
pub final_step: bool,
pub session_id: Option<[u8; 16]>,
pub handshake: Bytes,
pub dht_protocol_mode: DhtProtocolMode,
pub relay_custody: RelayCustody,
}Expand description
Initiator connect-signaling step message (step_index == 0 for the initial offer, even
step_index >= 2 for multi-round continuation steps).
Wire law: the codec writes a struct as its fields in declaration order with no framing, so
{step_index, final_step, session_id, handshake, dht_protocol_mode, relay_custody} encodes
byte-for-byte as {step_index, final_step, session_id, handshake, network_id, storage_redundancy, dht_virtual_nodes, relay_custody}.
Fields§
§step_index: u8Zero-based handshake step index (0 for the initial offer, even 2, 4, ... for initiator
continuation steps).
final_step: boolWhether this step concludes outbound signaling for the initiator (SendFinal).
session_id: Option<[u8; 16]>Optional 128-bit handshake session correlation identifier for multi-round (>= 3-step)
handshakes.
handshake: BytesOpaque binary transport handshake payload (at most MAX_HANDSHAKE_BYTES bytes).
dht_protocol_mode: DhtProtocolModeThe DHT protocol the offering node runs; the receiver answers only a matching one.
relay_custody: RelayCustodyWhether the offering node holds relay mail; relay custody moves past one that does not.
Implementations§
Source§impl ConnectNodeSend
impl ConnectNodeSend
Sourcepub fn initial_offer(
handshake: impl Into<Bytes>,
dht_protocol_mode: DhtProtocolMode,
relay_custody: RelayCustody,
) -> ConnectNodeSend
pub fn initial_offer( handshake: impl Into<Bytes>, dht_protocol_mode: DhtProtocolMode, relay_custody: RelayCustody, ) -> ConnectNodeSend
Construct an initial (step_index == 0, non-final) offer step.
Trait Implementations§
Source§impl Clone for ConnectNodeSend
impl Clone for ConnectNodeSend
Source§fn clone(&self) -> ConnectNodeSend
fn clone(&self) -> ConnectNodeSend
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ConnectNodeSend
impl Debug for ConnectNodeSend
Source§impl<'de> Deserialize<'de> for ConnectNodeSend
impl<'de> Deserialize<'de> for ConnectNodeSend
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ConnectNodeSend, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ConnectNodeSend, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for ConnectNodeSend
Source§impl HandleMsg<ConnectNodeSend> for MessageHandler
impl HandleMsg<ConnectNodeSend> for MessageHandler
Source§fn handle<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
context: &'life1 HandlerContext<'life2>,
msg: &'life3 ConnectNodeSend,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
MessageHandler: 'async_trait,
fn handle<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
context: &'life1 HandlerContext<'life2>,
msg: &'life3 ConnectNodeSend,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
MessageHandler: 'async_trait,
Source§impl PartialEq for ConnectNodeSend
impl PartialEq for ConnectNodeSend
Source§impl Serialize for ConnectNodeSend
impl Serialize for ConnectNodeSend
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for ConnectNodeSend
Auto Trait Implementations§
impl !Freeze for ConnectNodeSend
impl Forget for ConnectNodeSend
impl Move for ConnectNodeSend
impl RefUnwindSafe for ConnectNodeSend
impl Send for ConnectNodeSend
impl Sync for ConnectNodeSend
impl Unpin for ConnectNodeSend
impl UnsafeUnpin for ConnectNodeSend
impl UnwindSafe for ConnectNodeSend
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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> ⓘ
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> ⓘ
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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T> MaybeSend for T
impl<T> MaybeSendSync for T
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.