pub type Result<T> = Result<T, Error>;Expand description
A specialised Result for bison-db operations.
Used throughout the public API so callers can rely on a single error type.
§Examples
use bison_db::{Document, Result, Value};
fn name_of(doc: &Document) -> Result<&str> {
// `Value::as_str` borrows; the surrounding code propagates with `?`.
Ok(doc.get("name").and_then(Value::as_str).unwrap_or("<unknown>"))
}Aliased Type§
pub enum Result<T> {
Ok(T),
Err(Error),
}