#[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

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.