Struct windows_gen::TypeName[][src]

pub struct TypeName {
    pub namespace: &'static str,
    pub name: &'static str,
    pub generics: Vec<TypeKind>,
    pub def: TypeDef,
    // some fields omitted
}

A type's name including module namespace and generics

Fields

namespace: &'static str

The type's module namespace as a period separated string

e.g. "Outer.Inner"

name: &'static str

The type's unqualified name without generics as a string

e.g. "MyType"

generics: Vec<TypeKind>

A collection of the types generics

def: TypeDef

The type definition for this type

Implementations

impl TypeName[src]

pub fn new(
    def: &TypeDef,
    generics: Vec<TypeKind>,
    calling_namespace: &'static str
) -> Self
[src]

pub fn gen_constraint(&self) -> TokenStream[src]

pub fn from_type_def_or_ref(
    code: &TypeDefOrRef,
    generics: &[TypeKind],
    calling_namespace: &'static str
) -> Self
[src]

pub fn from_type_def(def: &TypeDef, calling_namespace: &'static str) -> Self[src]

pub fn from_type_spec_blob(
    blob: &mut Blob,
    generics: &[TypeKind],
    calling_namespace: &'static str
) -> Self
[src]

pub fn from_type_spec(
    spec: &TypeSpec,
    generics: &[TypeKind],
    calling_namespace: &'static str
) -> Self
[src]

pub fn gen_signature(&self, signature: &str) -> TokenStream[src]

pub fn gen_guid(&self, guid: &TypeGuid) -> TokenStream[src]

pub fn interface_signature(&self) -> String[src]

pub fn class_signature(&self) -> String[src]

pub fn enum_signature(&self) -> String[src]

pub fn struct_signature(&self) -> String[src]

pub fn delegate_signature(&self) -> String[src]

pub fn runtime_name(&self) -> String[src]

pub fn dependencies(&self) -> Vec<TypeDef>[src]

pub fn gen(&self) -> TokenStream[src]

Create tokens

For example: Vector<OtherType>

pub fn gen_full(&self) -> TokenStream[src]

pub fn gen_full_abi(&self) -> TokenStream[src]

pub fn gen_abi(&self) -> TokenStream[src]

Create abi tokens

For example: abi_Vector<OtherType>

pub fn gen_definition(&self) -> TokenStream[src]

Create definition tokens

For example: Vector::<OtherType>

Note: ideally gen_definition and to_abi_definiton_tokens would not be required and we would simply use gen and gen_abi everywhere but Rust is really weird in requiring IVector<T> in some places and IVector::<T> in others.

pub fn gen_abi_definition(&self) -> TokenStream[src]

Create abi definition tokens

For example: abi_Vector::<OtherType>

pub fn phantoms(&self) -> TokenStream[src]

Trait Implementations

impl Clone for TypeName[src]

impl Debug for TypeName[src]

impl Eq for TypeName[src]

impl Ord for TypeName[src]

impl PartialEq<TypeName> for TypeName[src]

impl PartialOrd<TypeName> for TypeName[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.