Struct uniffi::RustCallStatus

#[repr(C)]
pub struct RustCallStatus { pub code: RustCallStatusCode, pub error_buf: MaybeUninit<RustBuffer>, }
Expand description

Reexport items from other uniffi creates Represents the success/error of a rust call

§Usage

§Layout/fields

The layout of this struct is important since consumers on the other side of the FFI need to construct it. If this were a C struct, it would look like:

struct RustCallStatus {
    int8_t code;
    RustBuffer error_buf;
};

Fields§

§code: RustCallStatusCode§error_buf: MaybeUninit<RustBuffer>

Implementations§

§

impl RustCallStatus

pub fn new() -> RustCallStatus

pub fn cancelled() -> RustCallStatus

pub fn error(message: impl Into<String>) -> RustCallStatus

Trait Implementations§

§

impl Default for RustCallStatus

§

fn default() -> RustCallStatus

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.