pub struct DartOpaque { /* private fields */ }

Implementations§

source§

impl DartOpaque

source

pub unsafe fn new(handle: DartObject, port: OpaqueMessagePort) -> Self

Creates a new DartOpaque.

Safety

The DartObject must be created on the current thread.

source

pub unsafe fn new_non_droppable(handle: DartObject) -> Self

Creates a DartOpaque for sending to dart.

Safety

The DartObject must be created on the current thread.

The DartOpaque created by this method must not be dropped on a non-parent DartObject thread.

source

pub fn try_unwrap(self) -> Result<DartWrapObject, Self>

Tries to get a Dart DartObject. Returns the DartObject if the DartOpaque was created on the current thread.

Trait Implementations§

source§

impl Debug for DartOpaque

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Drop for DartOpaque

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl From<DartOpaque> for DartAbi

source§

fn from(data: DartOpaque) -> Self

Converts to this type from the input type.
source§

impl Send for DartOpaque

Safety

The implementation checks the current thread and delegates it to the Dart thread when it is drops.

source§

impl Sync for DartOpaque

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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> IntoDart for Twhere T: Into<DartCObject>,

source§

fn into_dart(self) -> DartCObject

Consumes Self and Performs the conversion.
source§

impl<T, U> TryFrom<U> for Twhere 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 Twhere 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.
source§

impl<T> DartSafe for Twhere T: UnwindSafe + RefUnwindSafe,

source§

impl<T> IntoDartExceptPrimitive for Twhere T: IntoDart + Into<DartCObject>,