Trait windows::Abi[][src]

pub unsafe trait Abi: Sized {
    type Abi;
    fn abi(&self) -> Self::Abi { ... }
fn set_abi(&mut self) -> *mut Self::Abi { ... }
unsafe fn from_abi(abi: Self::Abi) -> Result<Self> { ... }
fn drop_param(_: &mut Param<'_, Self>) { ... } }

Provides a generic way of referring to and converting between a Rust object and its ABI equivalent.

This trait is automatically used by the generated bindings and should not be used directly.

Associated Types

type Abi[src]

The abi representation of the implementing type.

SAFETY: Self and Abi must have the same exact in-memory representation.

Loading content...

Provided methods

fn abi(&self) -> Self::Abi[src]

Casts the Rust object to its ABI type without copying the object.

fn set_abi(&mut self) -> *mut Self::Abi[src]

Returns a pointer for setting the object’s value via an ABI call.

unsafe fn from_abi(abi: Self::Abi) -> Result<Self>[src]

Casts the ABI representation to a Rust object by taking ownership of the bits.

fn drop_param(_: &mut Param<'_, Self>)[src]

Loading content...

Implementations on Foreign Types

impl<T: Interface> Abi for Option<T>[src]

type Abi = RawPtr

impl Abi for bool[src]

type Abi = Self

impl Abi for i8[src]

type Abi = Self

impl Abi for u8[src]

type Abi = Self

impl Abi for i16[src]

type Abi = Self

impl Abi for u16[src]

type Abi = Self

impl Abi for i32[src]

type Abi = Self

impl Abi for u32[src]

type Abi = Self

impl Abi for i64[src]

type Abi = Self

impl Abi for u64[src]

type Abi = Self

impl Abi for f32[src]

type Abi = Self

impl Abi for f64[src]

type Abi = Self

Loading content...

Implementors

impl Abi for ErrorCode[src]

type Abi = Self

impl Abi for Guid[src]

type Abi = Self

impl Abi for HString[src]

type Abi = RawPtr

impl<T: Interface> Abi for T[src]

type Abi = RawPtr

Loading content...