Struct flutter_rust_bridge::rust2dart::Rust2Dart
source · [−]pub struct Rust2Dart { /* private fields */ }
Expand description
A wrapper around a Dart Isolate
.
Implementations
sourceimpl Rust2Dart
impl Rust2Dart
sourcepub fn success<T: IntoDart>(&self, result: T) -> bool
pub fn success<T: IntoDart>(&self, result: T) -> bool
Send a success message back to the specified port.
sourcepub fn error(&self, error_code: String, error_message: String) -> bool
pub fn error(&self, error_code: String, error_message: String) -> bool
Send an error back to the specified port.
sourcepub fn error_full(
&self,
error_code: String,
error_message: String,
error_details: impl IntoDart
) -> bool
pub fn error_full(
&self,
error_code: String,
error_message: String,
error_details: impl IntoDart
) -> bool
Send a detailed error back to the specified port.
sourcepub fn close_stream(&self) -> bool
pub fn close_stream(&self) -> bool
Close the stream and ignore further messages.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Rust2Dart
impl Send for Rust2Dart
impl Sync for Rust2Dart
impl Unpin for Rust2Dart
impl UnwindSafe for Rust2Dart
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more