#[repr(C)]
pub enum CResult<T, E> {
Ok(T),
Err(E),
}
Expand description
FFI safe result.
This type is not meant for general use, but rather as a last-resort conversion for type wrapping.
Typical workflow would include temporarily converting into/from CResult.
But preferred way to pass results efficiently would be to implement IntError
trait on the E
type.
Variants
Ok(T)
Err(E)
Implementations
Trait Implementations
Auto Trait Implementations
impl<T, E> RefUnwindSafe for CResult<T, E> where
E: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, E> Send for CResult<T, E> where
E: Send,
T: Send,
impl<T, E> Sync for CResult<T, E> where
E: Sync,
T: Sync,
impl<T, E> Unpin for CResult<T, E> where
E: Unpin,
T: Unpin,
impl<T, E> UnwindSafe for CResult<T, E> where
E: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more