pub enum IbcSourceCallbackMsg {
Acknowledgement(IbcAckCallbackMsg),
Timeout(IbcTimeoutCallbackMsg),
}
Expand description
The type of IBC source callback that is being called.
IBC source callbacks are needed for cases where your contract triggers the sending of an
IBC packet through some other message (i.e. not through crate::IbcMsg::SendPacket
) and needs to
know whether or not the packet was successfully received on the other chain.
A prominent example is the crate::IbcMsg::Transfer
message. Without callbacks, you cannot know
whether the transfer was successful or not.
Note that there are some prerequisites that need to be fulfilled to receive source callbacks:
- The contract must implement the
ibc_source_callback
entrypoint. - The IBC application in the source chain must have support for the callbacks middleware.
- You have to add serialized
IbcCallbackRequest
to a specific field of the message. ForIbcMsg::Transfer
, this is thememo
field and it needs to be json-encoded. - The receiver of the callback must also be the sender of the message.
Variants§
Acknowledgement(IbcAckCallbackMsg)
Timeout(IbcTimeoutCallbackMsg)
Trait Implementations§
Source§impl Clone for IbcSourceCallbackMsg
impl Clone for IbcSourceCallbackMsg
Source§fn clone(&self) -> IbcSourceCallbackMsg
fn clone(&self) -> IbcSourceCallbackMsg
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 IbcSourceCallbackMsg
impl Debug for IbcSourceCallbackMsg
Source§impl<'de> Deserialize<'de> for IbcSourceCallbackMsg
impl<'de> Deserialize<'de> for IbcSourceCallbackMsg
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for IbcSourceCallbackMsg
impl JsonSchema for IbcSourceCallbackMsg
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moreSource§impl PartialEq for IbcSourceCallbackMsg
impl PartialEq for IbcSourceCallbackMsg
Source§impl Serialize for IbcSourceCallbackMsg
impl Serialize for IbcSourceCallbackMsg
impl Eq for IbcSourceCallbackMsg
impl StructuralPartialEq for IbcSourceCallbackMsg
Auto Trait Implementations§
impl Freeze for IbcSourceCallbackMsg
impl RefUnwindSafe for IbcSourceCallbackMsg
impl Send for IbcSourceCallbackMsg
impl Sync for IbcSourceCallbackMsg
impl Unpin for IbcSourceCallbackMsg
impl UnwindSafe for IbcSourceCallbackMsg
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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