[−][src]Enum genco::csharp::Imported
Csharp token specialization.
Variants
Simple type.
Fields of Simple
An array of some type.
Struct(Type)
A struct of some type.
The special void
type.
Class(Type)
A class, with or without arguments, using from somewhere.
Enum(Type)
An enum of some type.
A local name with no specific qualification.
Fields of Local
name: Cons<'static>
Name of class.
Optional type.
Implementations
impl Imported
[src]
pub fn path<P: Into<Cons<'static>>>(&self, part: P) -> Imported
[src]
Extend the type with a nested path.
This discards any arguments associated with it.
pub fn with_arguments(&self, arguments: Vec<Imported>) -> Imported
[src]
Add arguments to the given variable.
Only applies to classes, any other will return the same value.
pub fn into_struct(self) -> Imported
[src]
Convert this type into a struct.
pub fn into_enum(self) -> Imported
[src]
Convert this type into an enum.
pub fn qualified(self) -> Imported
[src]
Make this type into a qualified type that is always used with a namespace.
pub fn equals(&self, other: &Imported) -> bool
[src]
Compare if two types are equal.
pub fn name(&self) -> Cons<'static>
[src]
Get the name of the type.
pub fn namespace(&self) -> Option<Cons<'static>>
[src]
Get the name of the type.
pub fn arguments(&self) -> Option<&[Imported]>
[src]
Get the arguments
pub fn as_value(&self) -> Imported
[src]
Get the value type (strips optionality).
pub fn is_optional(&self) -> bool
[src]
Check if type is optional.
pub fn is_nullable(&self) -> bool
[src]
Check if type is nullable.
pub fn is_simple(&self) -> bool
[src]
Check if variable is simple.
pub fn is_array(&self) -> bool
[src]
Check if type is array.
pub fn is_struct(&self) -> bool
[src]
Check if type is struct.
pub fn is_enum(&self) -> bool
[src]
Check if type is an enum.
pub fn as_optional(&self) -> Option<&Imported>
[src]
Get type as optional.
Trait Implementations
impl Clone for Imported
[src]
impl Debug for Imported
[src]
impl Eq for Imported
[src]
impl<'el> FormatTokens<'el, Csharp> for Imported
[src]
impl<'el> FormatTokens<'el, Csharp> for &'el Imported
[src]
impl<'el> From<&'el Imported> for LangBox<'el, Csharp>
[src]
impl<'el> From<Imported> for LangBox<'el, Csharp>
[src]
impl Hash for Imported
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl LangItem<Csharp> for Imported
[src]
fn format(
&self,
out: &mut Formatter,
config: &mut Config,
level: usize
) -> Result
[src]
&self,
out: &mut Formatter,
config: &mut Config,
level: usize
) -> Result
fn as_import(&self) -> Option<&Self>
[src]
impl Ord for Imported
[src]
fn cmp(&self, other: &Imported) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Imported> for Imported
[src]
impl PartialOrd<Imported> for Imported
[src]
fn partial_cmp(&self, other: &Imported) -> Option<Ordering>
[src]
fn lt(&self, other: &Imported) -> bool
[src]
fn le(&self, other: &Imported) -> bool
[src]
fn gt(&self, other: &Imported) -> bool
[src]
fn ge(&self, other: &Imported) -> bool
[src]
impl StructuralEq for Imported
[src]
impl StructuralPartialEq for Imported
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Imported
impl !Send for Imported
impl !Sync for Imported
impl Unpin for Imported
impl UnwindSafe for Imported
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,
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.
fn to_owned(&self) -> T
[src]
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.
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>,