CheckNullError

Trait CheckNullError 

Source
pub trait CheckNullError
where Self: Null + Sized,
{ // Required method fn nonnull_or_e_handle(self) -> Result<Self>; }

Required Methods§

Source

fn nonnull_or_e_handle(self) -> Result<Self>

Passes a non-null self through to an Ok value, or, in case of it being null, returns Err with HRESULT E_HANDLE.

To be used with functions like CreateBitmap() that return a handle type or null, not offering an error code via GetLastError().

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§

Source§

impl<T> CheckNullError for T
where T: Null,