ExpectLogcat

Trait ExpectLogcat 

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

Required Methods§

Source

fn expect_log(self, msg: &str) -> T

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.

Implementations on Foreign Types§

Source§

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

Implement ExpectLogcat for Option to handle None case

Source§

fn expect_log(self, msg: &str) -> T

Source§

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

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

Source§

fn expect_log(self, msg: &str) -> T

Implementors§