Combinator for the ensure functions on the client module of Voyager
Author: aeryzCreated Jan 6, 2025Updated Aug 13, 2025
LabelsE-easyA-voyager
Currently the ensure functions only expect one type such as:
pub fn ensure_ibc_interface(
&self,
ibc_interface: impl AsRef<str>,
) -> Result<(), UnexpectedIbcInterfaceError> {
if ibc_interface.as_ref() != self.ibc_interface.as_str() {
Err(UnexpectedIbcInterfaceError {
expected: self.ibc_interface.clone(),
found: ibc_interface.as_ref().to_owned(),
})
} else {
Ok(())
}
}
We should make these functions to support multiple expected values such that we can have multiple supported values.
Source: unionlabs/union