pub enum HolochainP2pMockMsg {
Wire {
to_agent: HoloHash<Agent>,
dna: HoloHash<Dna>,
msg: WireMessage,
},
CallResp(WireData),
PeerGet(PeerGet),
PeerGetResp(PeerGetResp),
PeerQuery(PeerQuery),
PeerQueryResp(PeerQueryResp),
Gossip {
dna: HoloHash<Dna>,
module: GossipModuleType,
gossip: GossipProtocol,
},
MetricExchange(MetricExchange),
PublishedAgentInfo {
to_agent: HoloHash<Agent>,
dna: HoloHash<Dna>,
info: AgentInfoSigned,
},
Failure(String),
}
Expand description
The network message for communicating with holochain. This collapses a few levels of wire messages to make it easier to build a network simulation. Some wire messages are handled entirely within kitsune which means there would be no way to simulate things like gossip without this type.
Variants
Wire
Fields
msg: WireMessage
The actual wire message.
The holochain p2p wire messages. These can be either notifies or requests (Calls).
CallResp(WireData)
A response to a request (Call).
PeerGet(PeerGet)
A request from kitsune for a peers agent info.
PeerGetResp(PeerGetResp)
A response to a peer get.
PeerQuery(PeerQuery)
A query for multiple peers agent info.
PeerQueryResp(PeerQueryResp)
A response to peer query.
Gossip
Fields
module: GossipModuleType
The type of gossip module this message is for.
gossip: GossipProtocol
The actual gossip wire protocol.
A gossip protocol message. These messages are all notifies and not request.
MetricExchange(MetricExchange)
MetricExchange
PublishedAgentInfo
Fields
info: AgentInfoSigned
The agent info that is published.
Agent info publish.
Failure(String)
Aan error has occurred.
Implementations
sourceimpl HolochainP2pMockMsg
impl HolochainP2pMockMsg
sourcepub fn addressed(self, agent: HoloHash<Agent>) -> AddressedHolochainP2pMockMsg
pub fn addressed(self, agent: HoloHash<Agent>) -> AddressedHolochainP2pMockMsg
Associate a message with the simulated agent that is sending or receiving this message. From holochain’s point of view this is the remote node that the message is being sent to or received from.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for HolochainP2pMockMsg
impl Send for HolochainP2pMockMsg
impl Sync for HolochainP2pMockMsg
impl Unpin for HolochainP2pMockMsg
impl UnwindSafe for HolochainP2pMockMsg
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.