Struct holochain_types::dna::MockDnaStore[][src]

pub struct MockDnaStore { /* fields omitted */ }
Expand description

A readable and writable store of DnaFiles and EntryDefs

Implementations

Validate that all current expectations for all methods have been satisfied, and discard them.

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

Create an Expectation for mocking the add_dna method

Create an Expectation for mocking the add_dnas method

pub fn expect_add_entry_def(&mut self) -> &mut Expectation

Create an Expectation for mocking the add_entry_def method

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

Create an Expectation for mocking the list method

Create an Expectation for mocking the get method

pub fn expect_get_entry_def(&mut self) -> &mut Expectation

Create an Expectation for mocking the get_entry_def method

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

A readable and writable store of DnaFiles and EntryDefs

Add a DnaFile to the store

Add multiple DnaFiles to the store

fn add_entry_def(&mut self, k: EntryDefBufferKey, entry_def: EntryDef)

Add an EntryDef to the store

fn add_entry_defs<T: IntoIterator<Item = (EntryDefBufferKey, EntryDef)> + 'static>(
    &mut self,
    entry_defs: T
)

Add multiple EntryDefs to the store

List all DNAs in the store

Get a particular DnaFile

fn get_entry_def(&self, k: &EntryDefBufferKey) -> Option<EntryDef>

Get a particular EntryDef

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

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

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Attaches the provided Context to this type, returning a WithContext wrapper. Read more

Attaches the current Context to this type, returning a WithContext wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more