[][src]Trait intercom_common::tyhandlers::TypeHandler

pub trait TypeHandler {
    fn rust_ty(&self) -> Type;

    fn com_ty(&self, _dir: Direction) -> Type { ... }
fn com_to_rust(&self, ident: &Ident, _dir: Direction) -> TypeConversion { ... }
fn rust_to_com(&self, ident: &Ident, _dir: Direction) -> TypeConversion { ... }
fn default_value(&self) -> TokenStream { ... } }

Defines Type-specific logic for handling the various parameter types in the Rust/COM interface.

Required methods

fn rust_ty(&self) -> Type

The Rust type.

Loading content...

Provided methods

fn com_ty(&self, _dir: Direction) -> Type

The COM type.

fn com_to_rust(&self, ident: &Ident, _dir: Direction) -> TypeConversion

Converts a COM parameter named by the ident into a Rust type.

fn rust_to_com(&self, ident: &Ident, _dir: Direction) -> TypeConversion

Converts a Rust parameter named by the ident into a COM type.

fn default_value(&self) -> TokenStream

Gets the default value for the type.

Loading content...

Implementors

Loading content...