Struct windows_gen::TypeName [−][src]
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]
def: &TypeDef,
generics: Vec<TypeKind>,
calling_namespace: &'static str
) -> Self
pub fn gen_constraint(&self) -> TokenStream
[src]
pub fn from_type_def_or_ref(
code: &TypeDefOrRef,
generics: &[TypeKind],
calling_namespace: &'static str
) -> Self
[src]
code: &TypeDefOrRef,
generics: &[TypeKind],
calling_namespace: &'static str
) -> Self
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]
blob: &mut Blob,
generics: &[TypeKind],
calling_namespace: &'static str
) -> Self
pub fn from_type_spec(
spec: &TypeSpec,
generics: &[TypeKind],
calling_namespace: &'static str
) -> Self
[src]
spec: &TypeSpec,
generics: &[TypeKind],
calling_namespace: &'static str
) -> Self
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]
fn cmp(&self, other: &Self) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<TypeName> for TypeName
[src]
impl PartialOrd<TypeName> for TypeName
[src]
Auto Trait Implementations
impl RefUnwindSafe for TypeName
[src]
impl Send for TypeName
[src]
impl Sync for TypeName
[src]
impl Unpin for TypeName
[src]
impl UnwindSafe for TypeName
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,