Struct cw_multi_test::AppResponse
source · pub struct AppResponse {
pub events: Vec<Event>,
pub data: Option<Binary>,
}
Expand description
A subset of data returned as a response of a contract entry point,
such as instantiate
, execute
or migrate
.
Fields§
§events: Vec<Event>
Response events.
data: Option<Binary>
Response data.
Implementations§
source§impl AppResponse
impl AppResponse
sourcepub fn custom_attrs(&self, idx: usize) -> &[Attribute]
pub fn custom_attrs(&self, idx: usize) -> &[Attribute]
Returns all custom attributes returned by the contract in the idx
event.
We assert the type is wasm, and skip the contract_address attribute.
sourcepub fn has_event(&self, expected: &Event) -> bool
pub fn has_event(&self, expected: &Event) -> bool
Checks if there is an Event that is a super-set of this.
It has the same type, and all compared attributes are included in it as well. You don’t need to specify them all.
sourcepub fn assert_event(&self, expected: &Event)
pub fn assert_event(&self, expected: &Event)
Like has_event but panics if there is no match.
Trait Implementations§
source§impl Clone for AppResponse
impl Clone for AppResponse
source§fn clone(&self) -> AppResponse
fn clone(&self) -> AppResponse
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AppResponse
impl Debug for AppResponse
source§impl Default for AppResponse
impl Default for AppResponse
source§fn default() -> AppResponse
fn default() -> AppResponse
Returns the “default value” for a type. Read more
source§impl From<SubMsgResponse> for AppResponse
impl From<SubMsgResponse> for AppResponse
They have the same shape, SubMsgResponse is what is returned in reply. This is just to make some test cases easier.
source§fn from(reply: SubMsgResponse) -> Self
fn from(reply: SubMsgResponse) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for AppResponse
impl RefUnwindSafe for AppResponse
impl Send for AppResponse
impl Sync for AppResponse
impl Unpin for AppResponse
impl UnwindSafe for AppResponse
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more