pub fn open_simconnect<'a>(
        &self,
        name: &str,
    ) -> Result<std::pin::Pin<Box<crate::sim_connect::SimConnect<'a>>>, Box<dyn std::error::Error>>
    {
        let executor = self.executor;
        let sim = crate::sim_connect::SimConnect::open(name, move |_sim, recv| {
            let executor = unsafe { &mut *executor };
            let recv =
                unsafe { std::mem::transmute::<SimConnectRecv<'_>, SimConnectRecv<'static>>(recv) };
            executor
                .executor
                .send(Some(MSFSEvent::SimConnect(recv)))
                .unwrap();
        })?;
        Ok(sim)
    }
/// Send a request to the Microsoft Flight Simulator server to open up communications with a new client.
Send a request to the Microsoft Flight Simulator server to open up communications with a new client.
Send a request to the Microsoft Flight Simulator server to open up communications with a new client .
pub fn open_simconnect<'a>(
        &self,
        name: &str,
    ) -> Result<std::pin::Pin<Box<crate::sim_connect::SimConnect<'a>>>, Box<dyn std::error::Error>>
    {
        let executor = self.executor;
        let sim = crate::sim_connect::SimConnect::open(name, move |_sim, recv| {
            let executor = unsafe { &mut *executor };
            let recv =
                unsafe { std::mem::transmute::<SimConnectRecv<'_>, SimConnectRecv<'static>>(recv) };
            executor
                .executor
                .send(Some(MSFSEvent::SimConnect(recv)))
                .unwrap();
        })?;
        Ok(sim)
    }
pub fn open_simconnect < ' a > ( & self , name : & str , ) -> Result < std :: pin :: Pin < Box < crate :: sim_connect :: SimConnect < ' a > > > , Box < dyn std :: error :: Error > > { let executor = self . executor ; let sim = crate :: sim_connect :: SimConnect :: open ( name , move | _sim , recv | { let executor = unsafe { & mut * executor } ; let recv = unsafe { std :: mem :: transmute :: < SimConnectRecv < ' _ > , SimConnectRecv < ' static > > ( recv ) } ; executor . executor . send ( Some ( MSFSEvent :: SimConnect ( recv ) ) ) . unwrap ( ) ; } ) ? ; Ok ( sim ) }
Send a request to the Microsoft Flight Simulator server to open up communications with a new client.
Send a request to the Microsoft Flight Simulator server to open up communications with a new client .
&self
name
&str