1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
use Error;
/// Error type returned by all fallible operations in this crate.
///
/// # Examples
///
/// ```
/// use slow5lib::SlowError;
///
/// let err = SlowError::NotFound("read-001".to_string());
/// assert!(err.to_string().contains("read-001"));
/// ```
/// Shorthand for `std::result::Result<T, SlowError>`.
///
/// All fallible functions in this crate return this type.
///
/// # Examples
///
/// ```
/// use slow5lib::Result;
///
/// fn always_ok() -> Result<u32> {
/// Ok(42)
/// }
/// assert_eq!(always_ok().unwrap(), 42);
/// ```
pub type Result<T> = Result;