Struct holochain::prelude::dependencies::kitsune_p2p_types::tx2::tx2_adapter::MockConAdapt
source · pub struct MockConAdapt { /* private fields */ }
Expand description
Tx backend adapter represents an open connection to a remote.
Implementations§
source§impl MockConAdapt
impl MockConAdapt
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() -> MockConAdapt
pub fn new() -> MockConAdapt
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 MockConAdapt
impl MockConAdapt
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_dir(&mut self) -> &mut Expectation
pub fn expect_dir(&mut self) -> &mut Expectation
Create an Expectation
for mocking the dir
method
sourcepub fn expect_peer_addr(&mut self) -> &mut Expectation
pub fn expect_peer_addr(&mut self) -> &mut Expectation
Create an Expectation
for mocking the peer_addr
method
sourcepub fn expect_peer_cert(&mut self) -> &mut Expectation
pub fn expect_peer_cert(&mut self) -> &mut Expectation
Create an Expectation
for mocking the peer_cert
method
sourcepub fn expect_out_chan(&mut self) -> &mut Expectation
pub fn expect_out_chan(&mut self) -> &mut Expectation
Create an Expectation
for mocking the out_chan
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 ConAdapt for MockConAdapt
impl ConAdapt for MockConAdapt
Tx backend adapter represents an open connection to a remote.
source§fn peer_addr(&self) -> Result<TxUrl, KitsuneError>
fn peer_addr(&self) -> Result<TxUrl, KitsuneError>
Get the string address (url) of the remote.
source§fn out_chan(
&self,
timeout: KitsuneTimeout
) -> Pin<Box<dyn Future<Output = Result<Box<dyn AsFramedWriter>, KitsuneError>> + Send>>
fn out_chan( &self, timeout: KitsuneTimeout ) -> Pin<Box<dyn Future<Output = Result<Box<dyn AsFramedWriter>, KitsuneError>> + Send>>
Create a new outgoing channel to the remote.
source§impl Debug for MockConAdapt
impl Debug for MockConAdapt
source§impl Default for MockConAdapt
impl Default for MockConAdapt
source§fn default() -> MockConAdapt
fn default() -> MockConAdapt
Auto Trait Implementations§
impl RefUnwindSafe for MockConAdapt
impl Send for MockConAdapt
impl Sync for MockConAdapt
impl Unpin for MockConAdapt
impl UnwindSafe for MockConAdapt
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§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
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
§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>
source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
source§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> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
§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.