Struct holochain_types::dna::MockDnaStore
source · [−]pub struct MockDnaStore { /* private fields */ }
Expand description
A readable and writable store of DnaFiles and EntryDefs
Implementations
sourceimpl MockDnaStore
impl MockDnaStore
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
sourceimpl MockDnaStore
impl MockDnaStore
sourcepub fn expect_add_dna(&mut self) -> &mut Expectation
pub fn expect_add_dna(&mut self) -> &mut Expectation
Create an Expectation
for mocking the add_dna
method
sourcepub fn expect_add_dnas<T: IntoIterator<Item = (DnaHash, DnaFile)> + 'static>(
&mut self
) -> &mut Expectation<T>
pub fn expect_add_dnas<T: IntoIterator<Item = (DnaHash, DnaFile)> + 'static>(
&mut self
) -> &mut Expectation<T>
Create an Expectation
for mocking the add_dnas
method
sourcepub fn expect_add_entry_def(&mut self) -> &mut Expectation
pub fn expect_add_entry_def(&mut self) -> &mut Expectation
Create an Expectation
for mocking the add_entry_def
method
sourcepub fn expect_add_entry_defs<T: IntoIterator<Item = (EntryDefBufferKey, EntryDef)> + 'static>(
&mut self
) -> &mut Expectation<T>
pub fn expect_add_entry_defs<T: IntoIterator<Item = (EntryDefBufferKey, EntryDef)> + 'static>(
&mut self
) -> &mut Expectation<T>
Create an Expectation
for mocking the add_entry_defs
method
sourcepub fn expect_list(&mut self) -> &mut Expectation
pub fn expect_list(&mut self) -> &mut Expectation
Create an Expectation
for mocking the list
method
sourcepub fn expect_get(&mut self) -> &mut Expectation
pub fn expect_get(&mut self) -> &mut Expectation
Create an Expectation
for mocking the get
method
sourcepub fn expect_get_entry_def(&mut self) -> &mut Expectation
pub fn expect_get_entry_def(&mut self) -> &mut Expectation
Create an Expectation
for mocking the get_entry_def
method
Trait Implementations
sourceimpl Debug for MockDnaStore
impl Debug for MockDnaStore
sourceimpl Default for MockDnaStore
impl Default for MockDnaStore
sourceimpl DnaStore for MockDnaStore
impl DnaStore for MockDnaStore
A readable and writable store of DnaFiles and EntryDefs
sourcefn add_dnas<T: IntoIterator<Item = (DnaHash, DnaFile)> + 'static>(
&mut self,
dnas: T
)
fn add_dnas<T: IntoIterator<Item = (DnaHash, DnaFile)> + 'static>(
&mut self,
dnas: T
)
Add multiple DnaFiles to the store
sourcefn add_entry_def(&mut self, k: EntryDefBufferKey, entry_def: EntryDef)
fn add_entry_def(&mut self, k: EntryDefBufferKey, entry_def: EntryDef)
Add an EntryDef to the store
sourcefn add_entry_defs<T: IntoIterator<Item = (EntryDefBufferKey, EntryDef)> + 'static>(
&mut self,
entry_defs: T
)
fn add_entry_defs<T: IntoIterator<Item = (EntryDefBufferKey, EntryDef)> + 'static>(
&mut self,
entry_defs: T
)
Add multiple EntryDefs to the store
sourcefn list(&self) -> Vec<DnaHash>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn list(&self) -> Vec<DnaHash>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
List all DNAs in the store
sourcefn get_entry_def(&self, k: &EntryDefBufferKey) -> Option<EntryDef>
fn get_entry_def(&self, k: &EntryDefBufferKey) -> Option<EntryDef>
Get a particular EntryDef
Auto Trait Implementations
impl !RefUnwindSafe for MockDnaStore
impl Send for MockDnaStore
impl Sync for MockDnaStore
impl Unpin for MockDnaStore
impl !UnwindSafe for MockDnaStore
Blanket Implementations
impl<T> Any for T where
T: Any + ?Sized,
impl<T> Any for T where
T: Any + ?Sized,
fn type_id_compat(&self) -> TypeId
fn type_id_compat(&self) -> TypeId
TODO: once 1.33.0 is the minimum supported compiler version, remove Any::type_id_compat and use StdAny::type_id instead. https://github.com/rust-lang/rust/issues/27745 Read more
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
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<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more