Struct cw_iper_test::IbcClosures
source · pub struct IbcClosures<E1, E2, E3, E4, E5, C, Q = Empty>where
Q: CustomQuery,
C: CustomMsg,{
pub fn_ibc_channel_open: Box<dyn Fn(DepsMut<'_, Q>, Env, IbcChannelOpenMsg) -> Result<Option<Ibc3ChannelOpenResponse>, E1>>,
pub fn_ibc_channel_close: Box<dyn Fn(DepsMut<'_, Q>, Env, IbcChannelCloseMsg) -> Result<IbcBasicResponse<C>, E2>>,
pub fn_ibc_channel_connect: Box<dyn Fn(DepsMut<'_, Q>, Env, IbcChannelConnectMsg) -> Result<IbcBasicResponse<C>, E3>>,
pub fn_ibc_packet_receive: Box<dyn Fn(DepsMut<'_, Q>, Env, IbcPacketReceiveMsg) -> Result<IbcReceiveResponse<C>, Never>>,
pub fn_ibc_packet_ack: Box<dyn Fn(DepsMut<'_, Q>, Env, IbcPacketAckMsg) -> Result<IbcBasicResponse<C>, E4>>,
pub fn_ibc_packet_timeout: Box<dyn Fn(DepsMut<'_, Q>, Env, IbcPacketTimeoutMsg) -> Result<IbcBasicResponse<C>, E5>>,
}
Expand description
Structure containing the various ibc closures
Fields§
§fn_ibc_channel_open: Box<dyn Fn(DepsMut<'_, Q>, Env, IbcChannelOpenMsg) -> Result<Option<Ibc3ChannelOpenResponse>, E1>>
#[entry_point]
ibc_channel_open
closure
fn_ibc_channel_close: Box<dyn Fn(DepsMut<'_, Q>, Env, IbcChannelCloseMsg) -> Result<IbcBasicResponse<C>, E2>>
#[entry_point]
ibc_channel_close
closure
fn_ibc_channel_connect: Box<dyn Fn(DepsMut<'_, Q>, Env, IbcChannelConnectMsg) -> Result<IbcBasicResponse<C>, E3>>
#[entry_point]
ibc_channel_connect
closure
fn_ibc_packet_receive: Box<dyn Fn(DepsMut<'_, Q>, Env, IbcPacketReceiveMsg) -> Result<IbcReceiveResponse<C>, Never>>
#[entry_point]
ibc_packet_receive
closure
fn_ibc_packet_ack: Box<dyn Fn(DepsMut<'_, Q>, Env, IbcPacketAckMsg) -> Result<IbcBasicResponse<C>, E4>>
#[entry_point]
ibc_packet_ack
closure
fn_ibc_packet_timeout: Box<dyn Fn(DepsMut<'_, Q>, Env, IbcPacketTimeoutMsg) -> Result<IbcBasicResponse<C>, E5>>
#[entry_point]
ibc_packet_timeout
closure
Implementations§
source§impl<E1, E2, E3, E4, E5, C, Q> IbcClosures<E1, E2, E3, E4, E5, C, Q>
impl<E1, E2, E3, E4, E5, C, Q> IbcClosures<E1, E2, E3, E4, E5, C, Q>
sourcepub fn new(
fn_ibc_channel_open: fn(_: DepsMut<'_, Q>, _: Env, _: IbcChannelOpenMsg) -> Result<Option<Ibc3ChannelOpenResponse>, E1>,
fn_ibc_channel_close: fn(_: DepsMut<'_, Q>, _: Env, _: IbcChannelCloseMsg) -> Result<IbcBasicResponse<C>, E2>,
fn_ibc_channel_connect: fn(_: DepsMut<'_, Q>, _: Env, _: IbcChannelConnectMsg) -> Result<IbcBasicResponse<C>, E3>,
fn_ibc_packet_receive: fn(_: DepsMut<'_, Q>, _: Env, _: IbcPacketReceiveMsg) -> Result<IbcReceiveResponse<C>, Never>,
fn_ibc_packet_ack: fn(_: DepsMut<'_, Q>, _: Env, _: IbcPacketAckMsg) -> Result<IbcBasicResponse<C>, E4>,
fn_ibc_packet_timeout: fn(_: DepsMut<'_, Q>, _: Env, _: IbcPacketTimeoutMsg) -> Result<IbcBasicResponse<C>, E5>
) -> IbcClosures<E1, E2, E3, E4, E5, C, Q>
pub fn new( fn_ibc_channel_open: fn(_: DepsMut<'_, Q>, _: Env, _: IbcChannelOpenMsg) -> Result<Option<Ibc3ChannelOpenResponse>, E1>, fn_ibc_channel_close: fn(_: DepsMut<'_, Q>, _: Env, _: IbcChannelCloseMsg) -> Result<IbcBasicResponse<C>, E2>, fn_ibc_channel_connect: fn(_: DepsMut<'_, Q>, _: Env, _: IbcChannelConnectMsg) -> Result<IbcBasicResponse<C>, E3>, fn_ibc_packet_receive: fn(_: DepsMut<'_, Q>, _: Env, _: IbcPacketReceiveMsg) -> Result<IbcReceiveResponse<C>, Never>, fn_ibc_packet_ack: fn(_: DepsMut<'_, Q>, _: Env, _: IbcPacketAckMsg) -> Result<IbcBasicResponse<C>, E4>, fn_ibc_packet_timeout: fn(_: DepsMut<'_, Q>, _: Env, _: IbcPacketTimeoutMsg) -> Result<IbcBasicResponse<C>, E5> ) -> IbcClosures<E1, E2, E3, E4, E5, C, Q>
Constructor function
sourcepub fn new_as_ibc_contract(
fn_ibc_channel_open: fn(_: DepsMut<'_, Q>, _: Env, _: IbcChannelOpenMsg) -> Result<Option<Ibc3ChannelOpenResponse>, E1>,
fn_ibc_channel_close: fn(_: DepsMut<'_, Q>, _: Env, _: IbcChannelCloseMsg) -> Result<IbcBasicResponse<C>, E2>,
fn_ibc_channel_connect: fn(_: DepsMut<'_, Q>, _: Env, _: IbcChannelConnectMsg) -> Result<IbcBasicResponse<C>, E3>,
fn_ibc_packet_receive: fn(_: DepsMut<'_, Q>, _: Env, _: IbcPacketReceiveMsg) -> Result<IbcReceiveResponse<C>, Never>,
fn_ibc_packet_ack: fn(_: DepsMut<'_, Q>, _: Env, _: IbcPacketAckMsg) -> Result<IbcBasicResponse<C>, E4>,
fn_ibc_packet_timeout: fn(_: DepsMut<'_, Q>, _: Env, _: IbcPacketTimeoutMsg) -> Result<IbcBasicResponse<C>, E5>
) -> Box<dyn IbcContract<C, Q>>
pub fn new_as_ibc_contract( fn_ibc_channel_open: fn(_: DepsMut<'_, Q>, _: Env, _: IbcChannelOpenMsg) -> Result<Option<Ibc3ChannelOpenResponse>, E1>, fn_ibc_channel_close: fn(_: DepsMut<'_, Q>, _: Env, _: IbcChannelCloseMsg) -> Result<IbcBasicResponse<C>, E2>, fn_ibc_channel_connect: fn(_: DepsMut<'_, Q>, _: Env, _: IbcChannelConnectMsg) -> Result<IbcBasicResponse<C>, E3>, fn_ibc_packet_receive: fn(_: DepsMut<'_, Q>, _: Env, _: IbcPacketReceiveMsg) -> Result<IbcReceiveResponse<C>, Never>, fn_ibc_packet_ack: fn(_: DepsMut<'_, Q>, _: Env, _: IbcPacketAckMsg) -> Result<IbcBasicResponse<C>, E4>, fn_ibc_packet_timeout: fn(_: DepsMut<'_, Q>, _: Env, _: IbcPacketTimeoutMsg) -> Result<IbcBasicResponse<C>, E5> ) -> Box<dyn IbcContract<C, Q>>
Create a new IbcClosures
as [IbcContract
]
Auto Trait Implementations§
impl<E1, E2, E3, E4, E5, C, Q> Freeze for IbcClosures<E1, E2, E3, E4, E5, C, Q>
impl<E1, E2, E3, E4, E5, C, Q = Empty> !RefUnwindSafe for IbcClosures<E1, E2, E3, E4, E5, C, Q>
impl<E1, E2, E3, E4, E5, C, Q = Empty> !Send for IbcClosures<E1, E2, E3, E4, E5, C, Q>
impl<E1, E2, E3, E4, E5, C, Q = Empty> !Sync for IbcClosures<E1, E2, E3, E4, E5, C, Q>
impl<E1, E2, E3, E4, E5, C, Q> Unpin for IbcClosures<E1, E2, E3, E4, E5, C, Q>
impl<E1, E2, E3, E4, E5, C, Q = Empty> !UnwindSafe for IbcClosures<E1, E2, E3, E4, E5, C, Q>
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moresource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request