win_crypto_ng::helpers

Trait Handle

Source
pub trait Handle: Send {
    // Required methods
    fn as_ptr(&self) -> BCRYPT_HANDLE;
    fn as_mut_ptr(&mut self) -> *mut BCRYPT_HANDLE;

    // Provided methods
    fn set_property<T: Property>(&self, value: &T::Value) -> Result<()> { ... }
    fn get_property<T: Property>(&self) -> Result<T::Value>
       where T::Value: Sized { ... }
    fn get_property_unsized<T: Property>(&self) -> Result<Box<T::Value>> { ... }
}

Required Methods§

Provided Methods§

Source

fn set_property<T: Property>(&self, value: &T::Value) -> Result<()>

Source

fn get_property<T: Property>(&self) -> Result<T::Value>
where T::Value: Sized,

Source

fn get_property_unsized<T: Property>(&self) -> Result<Box<T::Value>>

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§