Struct holochain::prelude::MockKitsuneP2pEventHandler
source · pub struct MockKitsuneP2pEventHandler { /* private fields */ }
Implementations
sourceimpl MockKitsuneP2pEventHandler
impl MockKitsuneP2pEventHandler
sourcepub fn checkpoint(&mut self)
pub fn checkpoint(&mut self)
Validate that all current expectations for all methods have been satisfied, and discard them.
sourcepub fn new() -> MockKitsuneP2pEventHandler
pub fn new() -> MockKitsuneP2pEventHandler
Create a new mock object with no expectations.
This method will not be generated if the real struct
already has a new
method. However, it will be
generated if the struct implements a trait with a new
method. The trait’s new
method can still be called
like <MockX as TraitY>::new
sourceimpl MockKitsuneP2pEventHandler
impl MockKitsuneP2pEventHandler
sourcepub fn expect_handle_put_agent_info_signed(&mut self) -> &mut Expectation
pub fn expect_handle_put_agent_info_signed(&mut self) -> &mut Expectation
Create an Expectation
for mocking the handle_put_agent_info_signed
method
sourcepub fn expect_handle_query_agents(&mut self) -> &mut Expectation
pub fn expect_handle_query_agents(&mut self) -> &mut Expectation
Create an Expectation
for mocking the handle_query_agents
method
sourcepub fn expect_handle_query_peer_density(&mut self) -> &mut Expectation
pub fn expect_handle_query_peer_density(&mut self) -> &mut Expectation
Create an Expectation
for mocking the handle_query_peer_density
method
sourcepub fn expect_handle_call(&mut self) -> &mut Expectation
pub fn expect_handle_call(&mut self) -> &mut Expectation
Create an Expectation
for mocking the handle_call
method
sourcepub fn expect_handle_notify(&mut self) -> &mut Expectation
pub fn expect_handle_notify(&mut self) -> &mut Expectation
Create an Expectation
for mocking the handle_notify
method
sourcepub fn expect_handle_gossip(&mut self) -> &mut Expectation
pub fn expect_handle_gossip(&mut self) -> &mut Expectation
Create an Expectation
for mocking the handle_gossip
method
sourcepub fn expect_handle_query_op_hashes(&mut self) -> &mut Expectation
pub fn expect_handle_query_op_hashes(&mut self) -> &mut Expectation
Create an Expectation
for mocking the handle_query_op_hashes
method
sourcepub fn expect_handle_fetch_op_data(&mut self) -> &mut Expectation
pub fn expect_handle_fetch_op_data(&mut self) -> &mut Expectation
Create an Expectation
for mocking the handle_fetch_op_data
method
sourcepub fn expect_handle_sign_network_data(&mut self) -> &mut Expectation
pub fn expect_handle_sign_network_data(&mut self) -> &mut Expectation
Create an Expectation
for mocking the handle_sign_network_data
method
Trait Implementations
sourceimpl Default for MockKitsuneP2pEventHandler
impl Default for MockKitsuneP2pEventHandler
sourcefn default() -> MockKitsuneP2pEventHandler
fn default() -> MockKitsuneP2pEventHandler
sourceimpl GhostControlHandler for MockKitsuneP2pEventHandler
impl GhostControlHandler for MockKitsuneP2pEventHandler
sourcefn handle_ghost_actor_shutdown(self) -> MustBoxFuture<'static, ()> ⓘ
fn handle_ghost_actor_shutdown(self) -> MustBoxFuture<'static, ()> ⓘ
sourceimpl GhostHandler<KitsuneP2pEvent> for MockKitsuneP2pEventHandler
impl GhostHandler<KitsuneP2pEvent> for MockKitsuneP2pEventHandler
sourcefn ghost_actor_dispatch(&mut self, d: D)
fn ghost_actor_dispatch(&mut self, d: D)
sourceimpl KitsuneP2pEventHandler for MockKitsuneP2pEventHandler
impl KitsuneP2pEventHandler for MockKitsuneP2pEventHandler
sourcefn handle_put_agent_info_signed(
&mut self,
input: PutAgentInfoSignedEvt
) -> Result<MustBoxFuture<'static, Result<(), KitsuneP2pError>>, KitsuneP2pError>
fn handle_put_agent_info_signed(
&mut self,
input: PutAgentInfoSignedEvt
) -> Result<MustBoxFuture<'static, Result<(), KitsuneP2pError>>, KitsuneP2pError>
sourcefn handle_query_agents(
&mut self,
input: QueryAgentsEvt
) -> Result<MustBoxFuture<'static, Result<Vec<AgentInfoSigned, Global>, KitsuneP2pError>>, KitsuneP2pError>
fn handle_query_agents(
&mut self,
input: QueryAgentsEvt
) -> Result<MustBoxFuture<'static, Result<Vec<AgentInfoSigned, Global>, KitsuneP2pError>>, KitsuneP2pError>
sourcefn handle_query_peer_density(
&mut self,
space: Arc<KitsuneSpace>,
dht_arc: DhtArc
) -> Result<MustBoxFuture<'static, Result<PeerView, KitsuneP2pError>>, KitsuneP2pError>
fn handle_query_peer_density(
&mut self,
space: Arc<KitsuneSpace>,
dht_arc: DhtArc
) -> Result<MustBoxFuture<'static, Result<PeerView, KitsuneP2pError>>, KitsuneP2pError>
DhtArc
].sourcefn handle_call(
&mut self,
space: Arc<KitsuneSpace>,
to_agent: Arc<KitsuneAgent>,
payload: Vec<u8, Global>
) -> Result<MustBoxFuture<'static, Result<Vec<u8, Global>, KitsuneP2pError>>, KitsuneP2pError>
fn handle_call(
&mut self,
space: Arc<KitsuneSpace>,
to_agent: Arc<KitsuneAgent>,
payload: Vec<u8, Global>
) -> Result<MustBoxFuture<'static, Result<Vec<u8, Global>, KitsuneP2pError>>, KitsuneP2pError>
sourcefn handle_notify(
&mut self,
space: Arc<KitsuneSpace>,
to_agent: Arc<KitsuneAgent>,
payload: Vec<u8, Global>
) -> Result<MustBoxFuture<'static, Result<(), KitsuneP2pError>>, KitsuneP2pError>
fn handle_notify(
&mut self,
space: Arc<KitsuneSpace>,
to_agent: Arc<KitsuneAgent>,
payload: Vec<u8, Global>
) -> Result<MustBoxFuture<'static, Result<(), KitsuneP2pError>>, KitsuneP2pError>
sourcefn handle_gossip(
&mut self,
space: Arc<KitsuneSpace>,
ops: Vec<Arc<KitsuneOpData>, Global>
) -> Result<MustBoxFuture<'static, Result<(), KitsuneP2pError>>, KitsuneP2pError>
fn handle_gossip(
&mut self,
space: Arc<KitsuneSpace>,
ops: Vec<Arc<KitsuneOpData>, Global>
) -> Result<MustBoxFuture<'static, Result<(), KitsuneP2pError>>, KitsuneP2pError>
sourcefn handle_query_op_hashes(
&mut self,
input: QueryOpHashesEvt
) -> Result<MustBoxFuture<'static, Result<Option<(Vec<Arc<KitsuneOpHash>, Global>, RangeInclusive<Timestamp>)>, KitsuneP2pError>>, KitsuneP2pError>
fn handle_query_op_hashes(
&mut self,
input: QueryOpHashesEvt
) -> Result<MustBoxFuture<'static, Result<Option<(Vec<Arc<KitsuneOpHash>, Global>, RangeInclusive<Timestamp>)>, KitsuneP2pError>>, KitsuneP2pError>
sourcefn handle_fetch_op_data(
&mut self,
input: FetchOpDataEvt
) -> Result<MustBoxFuture<'static, Result<Vec<(Arc<KitsuneOpHash>, Arc<KitsuneOpData>), Global>, KitsuneP2pError>>, KitsuneP2pError>
fn handle_fetch_op_data(
&mut self,
input: FetchOpDataEvt
) -> Result<MustBoxFuture<'static, Result<Vec<(Arc<KitsuneOpHash>, Arc<KitsuneOpData>), Global>, KitsuneP2pError>>, KitsuneP2pError>
sourcefn handle_sign_network_data(
&mut self,
input: SignNetworkDataEvt
) -> Result<MustBoxFuture<'static, Result<KitsuneSignature, KitsuneP2pError>>, KitsuneP2pError>
fn handle_sign_network_data(
&mut self,
input: SignNetworkDataEvt
) -> Result<MustBoxFuture<'static, Result<KitsuneSignature, KitsuneP2pError>>, KitsuneP2pError>
Auto Trait Implementations
impl RefUnwindSafe for MockKitsuneP2pEventHandler
impl Send for MockKitsuneP2pEventHandler
impl Sync for MockKitsuneP2pEventHandler
impl Unpin for MockKitsuneP2pEventHandler
impl UnwindSafe for MockKitsuneP2pEventHandler
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.