Struct holochain::prelude::kitsune_p2p::dependencies::kitsune_p2p_types::tx2::tx2_adapter::MockEndpointAdapt
source · pub struct MockEndpointAdapt { /* private fields */ }
Expand description
Tx backend adapter represents a bound local endpoint.
Implementations§
source§impl MockEndpointAdapt
impl MockEndpointAdapt
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() -> MockEndpointAdapt
pub fn new() -> MockEndpointAdapt
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
source§impl MockEndpointAdapt
impl MockEndpointAdapt
sourcepub fn expect_debug(&mut self) -> &mut Expectation
pub fn expect_debug(&mut self) -> &mut Expectation
Create an Expectation
for mocking the debug
method
sourcepub fn expect_uniq(&mut self) -> &mut Expectation
pub fn expect_uniq(&mut self) -> &mut Expectation
Create an Expectation
for mocking the uniq
method
sourcepub fn expect_local_addr(&mut self) -> &mut Expectation
pub fn expect_local_addr(&mut self) -> &mut Expectation
Create an Expectation
for mocking the local_addr
method
sourcepub fn expect_local_cert(&mut self) -> &mut Expectation
pub fn expect_local_cert(&mut self) -> &mut Expectation
Create an Expectation
for mocking the local_cert
method
sourcepub fn expect_connect(&mut self) -> &mut Expectation
pub fn expect_connect(&mut self) -> &mut Expectation
Create an Expectation
for mocking the connect
method
sourcepub fn expect_is_closed(&mut self) -> &mut Expectation
pub fn expect_is_closed(&mut self) -> &mut Expectation
Create an Expectation
for mocking the is_closed
method
sourcepub fn expect_close(&mut self) -> &mut Expectation
pub fn expect_close(&mut self) -> &mut Expectation
Create an Expectation
for mocking the close
method
Trait Implementations§
source§impl Debug for MockEndpointAdapt
impl Debug for MockEndpointAdapt
source§impl Default for MockEndpointAdapt
impl Default for MockEndpointAdapt
source§fn default() -> MockEndpointAdapt
fn default() -> MockEndpointAdapt
source§impl EndpointAdapt for MockEndpointAdapt
impl EndpointAdapt for MockEndpointAdapt
Tx backend adapter represents a bound local endpoint.
source§fn local_addr(&self) -> Result<TxUrl, KitsuneError>
fn local_addr(&self) -> Result<TxUrl, KitsuneError>
Get the string address (url) of this binding.
source§fn local_cert(&self) -> Tx2Cert
fn local_cert(&self) -> Tx2Cert
Get the local certificate digest.
source§fn connect(
&self,
url: TxUrl,
timeout: KitsuneTimeout
) -> Pin<Box<dyn Future<Output = Result<(Arc<dyn ConAdapt + 'static>, Box<dyn InChanRecvAdapt<Item = Pin<Box<dyn Future<Output = Result<Box<dyn AsFramedReader + 'static, Global>, KitsuneError>> + Send + 'static, Global>>> + 'static, Global>), KitsuneError>> + Send + 'static, Global>>
fn connect(
&self,
url: TxUrl,
timeout: KitsuneTimeout
) -> Pin<Box<dyn Future<Output = Result<(Arc<dyn ConAdapt + 'static>, Box<dyn InChanRecvAdapt<Item = Pin<Box<dyn Future<Output = Result<Box<dyn AsFramedReader + 'static, Global>, KitsuneError>> + Send + 'static, Global>>> + 'static, Global>), KitsuneError>> + Send + 'static, Global>>
Create a new outgoing connection to a remote.
Auto Trait Implementations§
impl RefUnwindSafe for MockEndpointAdapt
impl Send for MockEndpointAdapt
impl Sync for MockEndpointAdapt
impl Unpin for MockEndpointAdapt
impl UnwindSafe for MockEndpointAdapt
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
§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> ⓘ
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> 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> ⓘ
§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 more§fn 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.