Struct flutter_rust_bridge::ffi::DartOpaque
source · pub struct DartOpaque { /* private fields */ }
Implementations§
source§impl DartOpaque
impl DartOpaque
sourcepub unsafe fn new(handle: DartObject, port: OpaqueMessagePort) -> Self
pub unsafe fn new(handle: DartObject, port: OpaqueMessagePort) -> Self
sourcepub unsafe fn new_non_droppable(handle: DartObject) -> Self
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.
sourcepub fn try_unwrap(self) -> Result<DartWrapObject, Self>
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
impl Debug for DartOpaque
source§impl Drop for DartOpaque
impl Drop for DartOpaque
source§impl From<DartOpaque> for DartAbi
impl From<DartOpaque> for DartAbi
source§fn from(data: DartOpaque) -> Self
fn from(data: DartOpaque) -> Self
Converts to this type from the input type.
impl Send for DartOpaque
Safety
The implementation checks the current thread and delegates it to the Dart thread when it is drops.
impl Sync for DartOpaque
Auto Trait Implementations§
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
source§impl<T> IntoDart for Twhere
T: Into<DartCObject>,
impl<T> IntoDart for Twhere T: Into<DartCObject>,
source§fn into_dart(self) -> DartCObject
fn into_dart(self) -> DartCObject
Consumes
Self
and Performs the conversion.