pub unsafe fn from_handle(snapshot: HANDLE) -> Result<Self> {
        match snapshot {
            INVALID_HANDLE_VALUE => Err(Error::last_os_error()),
            snapshot => {
                let mut entry = T::init_raw();
                let current = if T::ITER_FIRST(snapshot, &mut entry) == 0 {
                    None
                } else {
                    Some(entry)
                };
                Ok(Snapshot { snapshot, current })
            }
        }
    }
/// Creates a snapshot from a given handle. Avoid using this unless you have a specific reason to.
/// # Safety
/// This function does not check whether the generic type and the flags belong together.
/// If used incorrectly this will produce an iterator that returns [`None`] from the very beginning.
Creates a snapshot from a given handle. Avoid using this unless you have a specific reason to.
Creates a snapshot from a given handle . Avoid using this unless you have a specific reason to .
pub unsafe fn from_handle(snapshot: HANDLE) -> Result<Self> {
        match snapshot {
            INVALID_HANDLE_VALUE => Err(Error::last_os_error()),
            snapshot => {
                let mut entry = T::init_raw();
                let current = if T::ITER_FIRST(snapshot, &mut entry) == 0 {
                    None
                } else {
                    Some(entry)
                };
                Ok(Snapshot { snapshot, current })
            }
        }
    }
pub unsafe fn from_handle ( snapshot : HANDLE ) -> Result < Self > { match snapshot { INVALID_HANDLE_VALUE => Err ( Error :: last_os_error ( ) ) , snapshot => { let mut entry = T :: init_raw ( ) ; let current = if T :: ITER_FIRST ( snapshot , & mut entry ) == 0 { None } else { Some ( entry ) } ; Ok ( Snapshot { snapshot , current } ) } } }
Creates a snapshot from a given handle.
Creates a snapshot from a given handle .
snapshot
HANDLE
safety
This function does not check whether the generic type and the flags belong together.
If used incorrectly this will produce an iterator that returns [`None`] from the very beginning.
This function does not check whether the generic type and the flags belong together . If used incorrectly this will produce an iterator that returns [ ` None ` ] from the very beginning .