INNER CODE UNIT · Rust

new_set_lossy

tensorflow/rust · src/lib.rs:462

    pub fn new_set_lossy(code: Code, msg: &str) -> Status {
        let mut status = Status::new();
        status.set_lossy(code, msg);
        status
    }

    /// Returns the status's code.
    pub fn code(&self) -> Code {
        unsafe { Code::from_int(tf::TF_GetCode(self.inner) as u32) }
    }

    /// Returns true if the status's code is `Code::Ok`.
    pub fn is_ok(&self) -> bool {
        self.code() == Code::Ok
    }

    /// Turns the current `Status` into a `Result`.
    fn into_result(self) -> Result<()> {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…