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
) -> Wire
pub fn call(
space: Arc<KitsuneSpace>,
to_agent: Arc<KitsuneAgent>,
data: WireData
) -> Wire
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
) -> Wire
pub fn delegate_broadcast(
space: Arc<KitsuneSpace>,
basis: Arc<KitsuneBasis>,
to_agent: Arc<KitsuneAgent>,
mod_idx: u32,
mod_cnt: u32,
destination: BroadcastTo,
data: WireData
) -> Wire
Variant constructor helper function.
sourcepub fn broadcast(
space: Arc<KitsuneSpace>,
to_agent: Arc<KitsuneAgent>,
destination: BroadcastTo,
data: WireData
) -> Wire
pub fn broadcast(
space: Arc<KitsuneSpace>,
to_agent: Arc<KitsuneAgent>,
destination: BroadcastTo,
data: WireData
) -> Wire
Variant constructor helper function.
sourcepub fn gossip(
space: Arc<KitsuneSpace>,
data: WireData,
module: GossipModuleType
) -> Wire
pub fn gossip(
space: Arc<KitsuneSpace>,
data: WireData,
module: GossipModuleType
) -> Wire
Variant constructor helper function.
sourcepub fn peer_get(space: Arc<KitsuneSpace>, agent: Arc<KitsuneAgent>) -> Wire
pub fn peer_get(space: Arc<KitsuneSpace>, agent: Arc<KitsuneAgent>) -> Wire
Variant constructor helper function.
sourcepub fn peer_get_resp(agent_info_signed: AgentInfoSigned) -> Wire
pub fn peer_get_resp(agent_info_signed: AgentInfoSigned) -> Wire
Variant constructor helper function.
sourcepub fn peer_query(space: Arc<KitsuneSpace>, basis_loc: DhtLocation) -> Wire
pub fn peer_query(space: Arc<KitsuneSpace>, basis_loc: DhtLocation) -> Wire
Variant constructor helper function.
sourcepub fn peer_query_resp(peer_list: Vec<AgentInfoSigned, Global>) -> Wire
pub fn peer_query_resp(peer_list: Vec<AgentInfoSigned, Global>) -> Wire
Variant constructor helper function.
sourcepub fn metric_exchange(
space: Arc<KitsuneSpace>,
msgs: Vec<MetricExchangeMsg, Global>
) -> Wire
pub fn metric_exchange(
space: Arc<KitsuneSpace>,
msgs: Vec<MetricExchangeMsg, Global>
) -> Wire
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
sourcefn encode<W>(&self, w: &mut W) -> Result<(), Error>where
W: Write,
fn encode<W>(&self, w: &mut W) -> Result<(), Error>where
W: Write,
sourcefn decode<R>(r: &mut R) -> Result<Wire, Error>where
R: Read,
fn decode<R>(r: &mut R) -> Result<Wire, Error>where
R: Read,
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
impl<T> Any for Twhere
T: Any + ?Sized,
impl<T> Any for Twhere
T: Any + ?Sized,
fn type_id_compat(&self) -> TypeId
fn type_id_compat(&self) -> TypeId
impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
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> ⓘ
sourcefn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
impl<T> Pointable for T
impl<T> Pointable for T
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read morefn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.