pub struct CwMapTesterBuilder<'a, ExecMsg, TError, K, V, UncheckedK, UncheckedV>where
    K: PrimaryKey<'a> + KeyDeserialize + Debug,
    K::Output: 'static,{ /* private fields */ }
Expand description

Builder for CwMapTester.

Implementations§

source§

impl<'a, ExecMsg, TError, K, V, UncheckedK, UncheckedV> CwMapTesterBuilder<'a, ExecMsg, TError, K, V, UncheckedK, UncheckedV>where K: PrimaryKey<'a> + KeyDeserialize + Debug, K::Output: 'static,

source

pub fn info(self, value: MessageInfo) -> Self

source

pub fn map(self, value: Map<'a, K, V>) -> Self

source

pub fn execute( self, value: fn(deps: DepsMut<'_>, env: Env, info: MessageInfo, msg: ExecMsg) -> Result<Response, TError> ) -> Self

source

pub fn msg_builder( self, value: fn(to_add: Vec<(UncheckedK, UncheckedV)>, to_remove: Vec<UncheckedK>) -> ExecMsg ) -> Self

source

pub fn mock_entry_builder(self, value: fn() -> (UncheckedK, UncheckedV)) -> Self

source

pub fn from_checked_entry( self, value: fn(_: (K::Output, V)) -> (UncheckedK, UncheckedV) ) -> Self

source

pub fn build( self ) -> Result<CwMapTester<'a, ExecMsg, TError, K, V, UncheckedK, UncheckedV>, CwMapTesterBuilderError>

Builds a new CwMapTester.

Errors

If a required field has not been initialized.

Trait Implementations§

source§

impl<'a, ExecMsg, TError, K, V, UncheckedK, UncheckedV> Default for CwMapTesterBuilder<'a, ExecMsg, TError, K, V, UncheckedK, UncheckedV>where K: PrimaryKey<'a> + KeyDeserialize + Debug, K::Output: 'static,

source§

fn default() -> Self

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

Auto Trait Implementations§

§

impl<'a, ExecMsg, TError, K, V, UncheckedK, UncheckedV> RefUnwindSafe for CwMapTesterBuilder<'a, ExecMsg, TError, K, V, UncheckedK, UncheckedV>where K: RefUnwindSafe, V: RefUnwindSafe,

§

impl<'a, ExecMsg, TError, K, V, UncheckedK, UncheckedV> Send for CwMapTesterBuilder<'a, ExecMsg, TError, K, V, UncheckedK, UncheckedV>where K: Send, V: Send,

§

impl<'a, ExecMsg, TError, K, V, UncheckedK, UncheckedV> Sync for CwMapTesterBuilder<'a, ExecMsg, TError, K, V, UncheckedK, UncheckedV>where K: Sync, V: Sync,

§

impl<'a, ExecMsg, TError, K, V, UncheckedK, UncheckedV> Unpin for CwMapTesterBuilder<'a, ExecMsg, TError, K, V, UncheckedK, UncheckedV>where K: Unpin, V: Unpin,

§

impl<'a, ExecMsg, TError, K, V, UncheckedK, UncheckedV> UnwindSafe for CwMapTesterBuilder<'a, ExecMsg, TError, K, V, UncheckedK, UncheckedV>where K: UnwindSafe, V: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<U> As for U

§

fn as_<T>(self) -> Twhere T: CastFrom<U>,

Casts self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.