pub type Result<T> = Result<T, IqdbError>;Expand description
A specialized Result whose error is IqdbError.
§Examples
use iqdb_types::{IqdbError, Result};
fn require_non_empty(dim: usize) -> Result<()> {
if dim == 0 {
return Err(IqdbError::InvalidConfig { reason: "dim must be greater than zero" });
}
Ok(())
}
assert!(require_non_empty(0).is_err());
assert!(require_non_empty(3).is_ok());Aliased Type§
pub enum Result<T> {
Ok(T),
Err(IqdbError),
}