Struct pastebin::DbError
[−]
[src]
pub struct DbError(_);
A helper type that implements the std::error::Error
trait to store an arbitrary error.
Use DbError::new()
to create a new instance.
Example
use pastebin::DbError; use std::fs::File; fn foo() -> Result<File, DbError> { let f = File::create("/tmp/test").map_err(DbError::new)?; Ok(f) }
Methods
impl DbError
[src]
fn new<E: Error + Send + Sync + 'static>(e: E) -> Self
[src]
A helper method that creates a new instance of DbError
from an arbitrary error.