INNER CODE UNIT · Rust

from

tensorflow/rust · src/lib.rs:568

    fn from(e: ParseIntError) -> Self {
        invalid_arg!("Error parsing an integer: {}", e)
    }
}

impl Error for Status {
    fn description(&self) -> &str {
        unsafe {
            match CStr::from_ptr(tf::TF_Message(self.inner)).to_str() {
                Ok(s) => s,
                Err(_) => "<invalid UTF-8 in message>",
            }
        }
    }

    fn cause(&self) -> Option<&dyn Error> {
        None
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…