pub type Result<T> = Result<T, SpecError>;Expand description
Shorthand alias for std::result::Result<T, SpecError>.
All fallible operations in this crate return this type.
§Example
use lightshuttle_spec::{Result, SpecError};
fn check(ok: bool) -> Result<u32> {
if ok {
Ok(42)
} else {
Err(SpecError::InvalidSpec("something went wrong".into()))
}
}
assert!(check(true).is_ok());
assert!(check(false).is_err());Aliased Type§
pub enum Result<T> {
Ok(T),
Err(SpecError),
}