Enum kitsune_p2p::wire::Wire
source · [−]pub enum Wire {
Failure(Failure),
Call(Call),
CallResp(CallResp),
DelegateBroadcast(DelegateBroadcast),
Broadcast(Broadcast),
Gossip(Gossip),
PeerGet(PeerGet),
PeerGetResp(PeerGetResp),
PeerQuery(PeerQuery),
PeerQueryResp(PeerQueryResp),
MetricExchange(MetricExchange),
}
Expand description
KitsuneP2p Wire Protocol Top-Level Enum.
Variants
Failure(Failure)
Failure
Call(Call)
“Call” to the remote.
CallResp(CallResp)
“Call” response from the remote.
DelegateBroadcast(DelegateBroadcast)
“DelegateBroadcast” to the remote. Remote should in turn connect to nodes in neighborhood, and call “Notify” per broadcast algorithm. uses low-level notify, not request
Broadcast(Broadcast)
Fire-and-forget broadcast message. uses low-level notify, not request
Gossip(Gossip)
Gossip op with opaque data section, to be forwarded to gossip module. uses low-level notify, not request
PeerGet(PeerGet)
Ask a remote node if they know about a specific agent
PeerGetResp(PeerGetResp)
Response to a peer get
PeerQuery(PeerQuery)
Query a remote node for peers holding or nearest to holding a u32 location.
PeerQueryResp(PeerQueryResp)
Response to a peer query
MetricExchange(MetricExchange)
MetricsExchangeMessage
Implementations
sourceimpl Wire
impl Wire
sourcepub fn call(
space: Arc<KitsuneSpace>,
to_agent: Arc<KitsuneAgent>,
data: WireData
) -> Self
pub fn call(
space: Arc<KitsuneSpace>,
to_agent: Arc<KitsuneAgent>,
data: WireData
) -> Self
Variant constructor helper function.
sourcepub fn delegate_broadcast(
space: Arc<KitsuneSpace>,
basis: Arc<KitsuneBasis>,
to_agent: Arc<KitsuneAgent>,
mod_idx: u32,
mod_cnt: u32,
destination: BroadcastTo,
data: WireData
) -> Self
pub fn delegate_broadcast(
space: Arc<KitsuneSpace>,
basis: Arc<KitsuneBasis>,
to_agent: Arc<KitsuneAgent>,
mod_idx: u32,
mod_cnt: u32,
destination: BroadcastTo,
data: WireData
) -> Self
Variant constructor helper function.
sourcepub fn broadcast(
space: Arc<KitsuneSpace>,
to_agent: Arc<KitsuneAgent>,
destination: BroadcastTo,
data: WireData
) -> Self
pub fn broadcast(
space: Arc<KitsuneSpace>,
to_agent: Arc<KitsuneAgent>,
destination: BroadcastTo,
data: WireData
) -> Self
Variant constructor helper function.
sourcepub fn gossip(
space: Arc<KitsuneSpace>,
data: WireData,
module: GossipModuleType
) -> Self
pub fn gossip(
space: Arc<KitsuneSpace>,
data: WireData,
module: GossipModuleType
) -> Self
Variant constructor helper function.
sourcepub fn peer_get(space: Arc<KitsuneSpace>, agent: Arc<KitsuneAgent>) -> Self
pub fn peer_get(space: Arc<KitsuneSpace>, agent: Arc<KitsuneAgent>) -> Self
Variant constructor helper function.
sourcepub fn peer_get_resp(agent_info_signed: AgentInfoSigned) -> Self
pub fn peer_get_resp(agent_info_signed: AgentInfoSigned) -> Self
Variant constructor helper function.
sourcepub fn peer_query(space: Arc<KitsuneSpace>, basis_loc: DhtLocation) -> Self
pub fn peer_query(space: Arc<KitsuneSpace>, basis_loc: DhtLocation) -> Self
Variant constructor helper function.
sourcepub fn peer_query_resp(peer_list: Vec<AgentInfoSigned>) -> Self
pub fn peer_query_resp(peer_list: Vec<AgentInfoSigned>) -> Self
Variant constructor helper function.
sourcepub fn metric_exchange(
space: Arc<KitsuneSpace>,
msgs: Vec<MetricExchangeMsg>
) -> Self
pub fn metric_exchange(
space: Arc<KitsuneSpace>,
msgs: Vec<MetricExchangeMsg>
) -> Self
Variant constructor helper function.
Trait Implementations
sourceimpl Codec for Wire
impl Codec for Wire
sourcefn variant_type(&self) -> &'static str
fn variant_type(&self) -> &'static str
Variant identifier (for debugging or as a cheap discriminant).
sourcefn encode<W>(&self, w: &mut W) -> Result<()> where
W: Write,
fn encode<W>(&self, w: &mut W) -> Result<()> where
W: Write,
Encode this item to given writer. You may wish to first wrap your writer in a BufWriter. Read more
sourcefn decode<R>(r: &mut R) -> Result<Self, Error> where
R: Read,
fn decode<R>(r: &mut R) -> Result<Self, Error> where
R: Read,
Decode a reader into this item. You may wish to first wrap your reader in a BufReader. Read more
impl StructuralPartialEq for Wire
Auto Trait Implementations
impl RefUnwindSafe for Wire
impl Send for Wire
impl Sync for Wire
impl Unpin for Wire
impl UnwindSafe for Wire
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> FutureExt for T
impl<T> FutureExt for T
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more