pub fn new(
        port_id: DartPortId,
        completer_id: CompleterId,
    ) -> Result<Self, CompleterSetupFailed> {
        //TODO log err
        let rt = DartRuntime::instance().map_err(|_| CompleterSetupFailed)?;
        let send_port = rt.send_port_from_raw(port_id).ok_or(CompleterSetupFailed)?;
        Ok(Self {
            send_port: Some(send_port),
            completer_id,
        })
    }
/// Bundle the dart-language specific async call parameters.
///
/// The port id is the port the result must be send back through.
///
/// The completer id helps the ports message handle to complete the
/// right future.
///
/// # Errors
///
/// Fails if
/// - the dart runtime was not initialized
/// - a `DartPortId` with a value of `0` is passed in
///
Bundle the dart-language specific async call parameters.
The port id is the port the result must be send back through.

The completer id helps the ports message handle to complete the
right future.
Bundle the dart - language specific async call parameters . The port id is the port the result must be send back through . The completer id helps the ports message handle to complete the right future .
pub fn new(
        port_id: DartPortId,
        completer_id: CompleterId,
    ) -> Result<Self, CompleterSetupFailed> {
        //TODO log err
        let rt = DartRuntime::instance().map_err(|_| CompleterSetupFailed)?;
        let send_port = rt.send_port_from_raw(port_id).ok_or(CompleterSetupFailed)?;
        Ok(Self {
            send_port: Some(send_port),
            completer_id,
        })
    }
pub fn new ( port_id : DartPortId , completer_id : CompleterId , ) -> Result < Self , CompleterSetupFailed > { //TODO log err let rt = DartRuntime :: instance ( ) . map_err ( | _ | CompleterSetupFailed ) ? ; let send_port = rt . send_port_from_raw ( port_id ) . ok_or ( CompleterSetupFailed ) ? ; Ok ( Self { send_port : Some ( send_port ) , completer_id , } ) }
Bundle the dart-language specific async call parameters.
Bundle the dart - language specific async call parameters .
port_id
DartPortId
completer_id
CompleterId
errors
Fails if
the dart runtime was not initialized
a `DartPortId` with a value of `0` is passed in
Fails if the dart runtime was not initialized a ` DartPortId ` with a value of ` 0 ` is passed in