Struct executorch_sys::torch::executor::Result
source · #[repr(C)]pub struct Result<T> {
pub __bindgen_anon_1: Result__bindgen_ty_1<T>,
pub hasValue_: bool,
pub _phantom_0: PhantomData<UnsafeCell<T>>,
}Expand description
Result type wrapping either a value of type T or an error.
Example use case:
@code
Result
Error useOp(int opcode) {
Result
Fields§
§__bindgen_anon_1: Result__bindgen_ty_1<T>§hasValue_: boolTrue if the Result contains a value.
_phantom_0: PhantomData<UnsafeCell<T>>Auto Trait Implementations§
impl<T> Freeze for Result<T>where
T: Freeze,
impl<T> !RefUnwindSafe for Result<T>
impl<T> Send for Result<T>where
T: Send,
impl<T> !Sync for Result<T>
impl<T> Unpin for Result<T>where
T: Unpin,
impl<T> UnwindSafe for Result<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more