Trait ibc::core::ics04_channel::context::ChannelKeeper
source · pub trait ChannelKeeper {
Show 13 methods
fn store_packet_commitment(
&mut self,
port_id: PortId,
channel_id: ChannelId,
sequence: Sequence,
commitment: PacketCommitment
) -> Result<(), Error>;
fn delete_packet_commitment(
&mut self,
port_id: &PortId,
channel_id: &ChannelId,
seq: Sequence
) -> Result<(), Error>;
fn store_packet_receipt(
&mut self,
port_id: PortId,
channel_id: ChannelId,
sequence: Sequence,
receipt: Receipt
) -> Result<(), Error>;
fn store_packet_acknowledgement(
&mut self,
port_id: PortId,
channel_id: ChannelId,
sequence: Sequence,
ack_commitment: AcknowledgementCommitment
) -> Result<(), Error>;
fn delete_packet_acknowledgement(
&mut self,
port_id: &PortId,
channel_id: &ChannelId,
sequence: Sequence
) -> Result<(), Error>;
fn store_connection_channels(
&mut self,
conn_id: ConnectionId,
port_id: PortId,
channel_id: ChannelId
) -> Result<(), Error>;
fn store_channel(
&mut self,
port_id: PortId,
channel_id: ChannelId,
channel_end: ChannelEnd
) -> Result<(), Error>;
fn store_next_sequence_send(
&mut self,
port_id: PortId,
channel_id: ChannelId,
seq: Sequence
) -> Result<(), Error>;
fn store_next_sequence_recv(
&mut self,
port_id: PortId,
channel_id: ChannelId,
seq: Sequence
) -> Result<(), Error>;
fn store_next_sequence_ack(
&mut self,
port_id: PortId,
channel_id: ChannelId,
seq: Sequence
) -> Result<(), Error>;
fn increase_channel_counter(&mut self);
fn store_channel_result(
&mut self,
result: ChannelResult
) -> Result<(), Error> { ... }
fn store_packet_result(
&mut self,
general_result: PacketResult
) -> Result<(), Error> { ... }
}
Expand description
A context supplying all the necessary write-only dependencies (i.e., storage writing facility)
for processing any ChannelMsg
.
Required Methods
fn store_packet_commitment(
&mut self,
port_id: PortId,
channel_id: ChannelId,
sequence: Sequence,
commitment: PacketCommitment
) -> Result<(), Error>
fn delete_packet_commitment(
&mut self,
port_id: &PortId,
channel_id: &ChannelId,
seq: Sequence
) -> Result<(), Error>
fn store_packet_receipt(
&mut self,
port_id: PortId,
channel_id: ChannelId,
sequence: Sequence,
receipt: Receipt
) -> Result<(), Error>
fn store_packet_acknowledgement(
&mut self,
port_id: PortId,
channel_id: ChannelId,
sequence: Sequence,
ack_commitment: AcknowledgementCommitment
) -> Result<(), Error>
fn delete_packet_acknowledgement(
&mut self,
port_id: &PortId,
channel_id: &ChannelId,
sequence: Sequence
) -> Result<(), Error>
fn store_connection_channels(
&mut self,
conn_id: ConnectionId,
port_id: PortId,
channel_id: ChannelId
) -> Result<(), Error>
sourcefn store_channel(
&mut self,
port_id: PortId,
channel_id: ChannelId,
channel_end: ChannelEnd
) -> Result<(), Error>
fn store_channel(
&mut self,
port_id: PortId,
channel_id: ChannelId,
channel_end: ChannelEnd
) -> Result<(), Error>
Stores the given channel_end at a path associated with the port_id and channel_id.
fn store_next_sequence_send(
&mut self,
port_id: PortId,
channel_id: ChannelId,
seq: Sequence
) -> Result<(), Error>
fn store_next_sequence_recv(
&mut self,
port_id: PortId,
channel_id: ChannelId,
seq: Sequence
) -> Result<(), Error>
fn store_next_sequence_ack(
&mut self,
port_id: PortId,
channel_id: ChannelId,
seq: Sequence
) -> Result<(), Error>
sourcefn increase_channel_counter(&mut self)
fn increase_channel_counter(&mut self)
Called upon channel identifier creation (Init or Try message processing). Increases the counter which keeps track of how many channels have been created. Should never fail.