Struct holochain::conductor::conductor::MockDpkiService
source · pub struct MockDpkiService { /* private fields */ }
Expand description
Interface for the DPKI service
Implementations§
source§impl MockDpkiService
impl MockDpkiService
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() -> Self
pub fn new() -> Self
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 MockDpkiService
impl MockDpkiService
sourcepub fn expect_is_key_valid(&mut self) -> &mut Expectation<'static>
pub fn expect_is_key_valid(&mut self) -> &mut Expectation<'static>
Create an Expectation
for mocking the is_key_valid
method
sourcepub fn expect_key_mutation(&mut self) -> &mut Expectation<'static>
pub fn expect_key_mutation(&mut self) -> &mut Expectation<'static>
Create an Expectation
for mocking the key_mutation
method
sourcepub fn expect_cell_ids(&mut self) -> &mut Expectation<'static>
pub fn expect_cell_ids(&mut self) -> &mut Expectation<'static>
Create an Expectation
for mocking the cell_ids
method
Trait Implementations§
source§impl Debug for MockDpkiService
impl Debug for MockDpkiService
source§impl Default for MockDpkiService
impl Default for MockDpkiService
source§impl DpkiService for MockDpkiService
impl DpkiService for MockDpkiService
Interface for the DPKI service
source§fn is_key_valid<'life0, 'async_trait>(
&'life0 self,
key: AgentPubKey,
timestamp: Timestamp
) -> Pin<Box<dyn Future<Output = DpkiServiceResult<bool>> + Send + 'async_trait>>where
'life0: 'async_trait,
fn is_key_valid<'life0, 'async_trait>( &'life0 self, key: AgentPubKey, timestamp: Timestamp ) -> Pin<Box<dyn Future<Output = DpkiServiceResult<bool>> + Send + 'async_trait>>where 'life0: 'async_trait,
Check if the key is valid (properly created and not revoked) as-at the given Timestamp
source§fn key_mutation<'life0, 'async_trait>(
&'life0 self,
old_key: Option<AgentPubKey>,
new_key: Option<AgentPubKey>
) -> Pin<Box<dyn Future<Output = DpkiServiceResult<()>> + Send + 'async_trait>>where
'life0: 'async_trait,
fn key_mutation<'life0, 'async_trait>( &'life0 self, old_key: Option<AgentPubKey>, new_key: Option<AgentPubKey> ) -> Pin<Box<dyn Future<Output = DpkiServiceResult<()>> + Send + 'async_trait>>where 'life0: 'async_trait,
Defines the different ways that keys can be created and destroyed: If an old key is specified, it will be destroyed If a new key is specified, it will be registered If both a new and an old key are specified, the new key will atomically replace the old key (If no keys are specified, nothing will happen)
Auto Trait Implementations§
impl RefUnwindSafe for MockDpkiService
impl Send for MockDpkiService
impl Sync for MockDpkiService
impl Unpin for MockDpkiService
impl UnwindSafe for MockDpkiService
Blanket Implementations§
§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 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.