INNER CODE UNIT · Rust

to_result

SitinCloud/Owlyshield · owlyshield_predict/moonfire-tflite/src/lib.rs:106

    fn to_result(self) -> Result<(), ()> {
        match self.0 {
            0 => Ok(()),
            _ => Err(()),
        }
    }
}

pub struct InterpreterBuilder<'a> {
    options: ptr::NonNull<TfLiteInterpreterOptions>,
    owned_delegates: Vec<Delegate>,
    _delegate_refs: PhantomData<&'a ()>,
}

impl<'a> InterpreterBuilder<'a> {
    pub fn new() -> Self {
        Self {
            options: ptr::NonNull::new(unsafe { TfLiteInterpreterOptionsCreate() }).unwrap(),

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…