medea-jason 0.5.0

Client library for Medea media server.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Miscellaneous utility structs and functions.

mod err;

use dart_sys::Dart_Handle;
use flutter_rust_bridge::DartOpaque;

use crate::platform::utils::dart_api;

pub use self::err::{new_panic_error, DartError};

/// Creates a new [`DartOpaque`] value out of the provided [`Dart_Handle`].
pub unsafe fn new_dart_opaque(handle: Dart_Handle) -> DartOpaque {
    let h = unsafe { dart_api::new_persistent_handle(handle) };
    unsafe { DartOpaque::new_non_droppable(h.cast()) }
}