/// Set `self.last_error` to the error message, return the associated error code.
Set `self.last_error` to the error message, return the associated error code.
Set ` self . last_error ` to the error message return the associated error code .
fn observe_error(&mut self, err: Error) -> u32 {
        self.last_error = Some(err.to_string());
        match err {
            Error::IoError(..) => 1,
        }
    }
fn observe_error ( & mut self , err : Error ) -> u32 { self . last_error = Some ( err . to_string ( ) ) ; match err { Error :: IoError ( .. ) => 1 , } }
Set `self.last_error` to the error message, return the associated error code.
Set ` self . last_error ` to the error message return the associated error code .
&mut self
err
Error