ExpectLogcat

Trait ExpectLogcat 

Source
pub trait ExpectLogcat<T> {
    // Required method
    fn expect_log<S>(self, msg: S) -> T
       where S: AsRef<str>;
}

Required Methods§

Source

fn expect_log<S>(self, msg: S) -> T
where S: AsRef<str>,

Expect with Log.e If the Result is Err, log the error message using Log.e and panic with the same message. If the Result is Ok, return the value.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T> ExpectLogcat<T> for Option<T>

Implement ExpectLogcat for Option to handle None case

Source§

fn expect_log<S>(self, msg: S) -> T
where S: AsRef<str>,

Source§

impl<T, E: Debug> ExpectLogcat<T> for Result<T, E>

Implement ExpectLogcat for Result<T, E> where E: Debug

Source§

fn expect_log<S>(self, msg: S) -> T
where S: AsRef<str>,

Implementors§