pub fn check_events(&mut self) -> Result<Option<Event>, Error> {
        // ENetEvent is Copy (aka has no Drop impl), so we don't have to make sure we `mem::forget` it later on
        let mut sys_event = MaybeUninit::uninit();

        let res = unsafe { enet_host_check_events(self.inner, sys_event.as_mut_ptr()) };

        match res {
            r if r > 0 => Ok(unsafe { self.process_event(sys_event.assume_init()) }),
            0 => Ok(None),
            r if r < 0 => Err(Error(r)),
            _ => panic!("unreachable"),
        }
    }
/// Checks for any queued events on this `Host` and dispatches one if available
Checks for any queued events on this `Host` and dispatches one if available
Checks for any queued events on this ` Host ` and dispatches one if available
pub fn check_events(&mut self) -> Result<Option<Event>, Error> {
        // ENetEvent is Copy (aka has no Drop impl), so we don't have to make sure we `mem::forget` it later on
        let mut sys_event = MaybeUninit::uninit();
        let res = unsafe { enet_host_check_events(self.inner, sys_event.as_mut_ptr()) };
        match res {
            r if r > 0 => Ok(unsafe { self.process_event(sys_event.assume_init()) }),
            0 => Ok(None),
            r if r < 0 => Err(Error(r)),
            _ => panic!("unreachable"),
        }
    }
pub fn check_events ( & mut self ) -> Result < Option < Event > , Error > { // ENetEvent is Copy (aka has no Drop impl), so we don't have to make sure we `mem::forget` it later on let mut sys_event = MaybeUninit :: uninit ( ) ; let res = unsafe { enet_host_check_events ( self . inner , sys_event . as_mut_ptr ( ) ) } ; match res { r if r > 0 => Ok ( unsafe { self . process_event ( sys_event . assume_init ( ) ) } ) , 0 => Ok ( None ) , r if r < 0 => Err ( Error ( r ) ) , _ => panic ! ( " " ) , } }
Checks for any queued events on this `Host` and dispatches one if available
Checks for any queued events on this ` Host ` and dispatches one if available
&mut self
&mut self