BugExt

Trait BugExt 

Source
pub trait BugExt<T> {
    // Required method
    fn assume(self, msg: &'static str) -> Result<T, Bug>;
}
Expand description

Extension trait for assuming an option or result can be unwrapped.

Required Methods§

Source

fn assume(self, msg: &'static str) -> Result<T, Bug>

Assume this value can be unwrapped. See [crate] docs.

Implementations on Foreign Types§

Source§

impl<T> BugExt<T> for Option<T>

Source§

fn assume(self, msg: &'static str) -> Result<T, Bug>

Source§

impl<T, E: Display> BugExt<T> for Result<T, E>

Source§

fn assume(self, msg: &'static str) -> Result<T, Bug>

Implementors§