ibc_client_cw/types/helper.rs
use ibc_client_wasm_types::{SUBJECT_PREFIX, SUBSTITUTE_PREFIX};
/// The MigrationPrefix enumerates the prefix type used during migration mode.
///
/// The migration mode is activated when there is an incoming
/// [`MigrateClientStoreMsg`](crate::types::msgs::MigrateClientStoreMsg)
/// message. It specifies the prefix key for either the
/// subject or substitute store, or none if the migration is not active.
#[derive(Clone, Debug)]
pub enum MigrationPrefix {
Subject,
Substitute,
None,
}
impl MigrationPrefix {
pub fn key(&self) -> &[u8] {
match self {
Self::Subject => SUBJECT_PREFIX,
Self::Substitute => SUBSTITUTE_PREFIX,
Self::None => b"",
}
}
}
/// Travel is an enum to represent the direction of travel in the context of
/// height.
#[derive(Clone, Debug)]
pub enum HeightTravel {
Next,
Prev,
}