CheckHandleError

Trait CheckHandleError 

Source
pub trait CheckHandleError
where Self: ValidateHandle + Sized,
{ // Required method fn valid_or_e_handle(self) -> Result<Self>; }

Required Methods§

Source

fn valid_or_e_handle(self) -> Result<Self>

Passes a self, if successfully validated with is_invalid(), through to an Ok value, or, in case of it being invalid, returns Err with HRESULT E_HANDLE.

To be used with functions that don’t offer an error code via GetLastError(), and when there’s a need to validate with is_invalid().

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§