[−][src]Enum genco::csharp::Csharp
Csharp token specialization.
Variants
Simple type.
Fields of Simple
An array of some type.
Struct(Type<'el>)
A struct of some type.
The special void
type.
Class(Type<'el>)
A class, with or without arguments, using from somewhere.
Enum(Type<'el>)
An enum of some type.
A local name with no specific qualification.
Fields of Local
name: Cons<'el>
Name of class.
Optional type.
Implementations
impl<'el> Csharp<'el>
[src]
pub fn path<P: Into<Cons<'el>>>(&self, part: P) -> Csharp<'el>
[src]
Extend the type with a nested path.
This discards any arguments associated with it.
pub fn with_arguments(&self, arguments: Vec<Csharp<'el>>) -> Csharp<'el>
[src]
Add arguments to the given variable.
Only applies to classes, any other will return the same value.
pub fn into_struct(self) -> Csharp<'el>
[src]
Convert this type into a struct.
pub fn into_enum(self) -> Csharp<'el>
[src]
Convert this type into an enum.
pub fn qualified(self) -> Csharp<'el>
[src]
Make this type into a qualified type that is always used with a namespace.
pub fn equals(&self, other: &Csharp<'el>) -> bool
[src]
Compare if two types are equal.
pub fn name(&self) -> Cons<'el>
[src]
Get the name of the type.
pub fn namespace(&self) -> Option<Cons<'el>>
[src]
Get the name of the type.
pub fn arguments(&self) -> Option<&[Csharp<'el>]>
[src]
Get the arguments
pub fn as_value(&self) -> Csharp<'el>
[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<&Csharp<'el>>
[src]
Get type as optional.
Trait Implementations
impl<'el> Clone for Csharp<'el>
[src]
impl<'el> Custom for Csharp<'el>
[src]
type Config = Config<'el>
Configuration associated with building a formatting element.
fn format(
&self,
out: &mut Formatter,
config: &mut Self::Config,
level: usize
) -> Result
[src]
&self,
out: &mut Formatter,
config: &mut Self::Config,
level: usize
) -> Result
fn quote_string(out: &mut Formatter, input: &str) -> Result
[src]
fn write_file<'a>(
tokens: Tokens<'a, Self>,
out: &mut Formatter,
config: &mut Self::Config,
level: usize
) -> Result
[src]
tokens: Tokens<'a, Self>,
out: &mut Formatter,
config: &mut Self::Config,
level: usize
) -> Result
impl<'el> Debug for Csharp<'el>
[src]
impl<'el> Eq for Csharp<'el>
[src]
impl<'el> From<&'el Csharp<'el>> for Tokens<'el, Csharp<'el>>
[src]
impl<'el> From<Csharp<'el>> for Tokens<'el, Csharp<'el>>
[src]
impl<'el> Hash for Csharp<'el>
[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<'el> IntoTokens<'el, Csharp<'el>> for Argument<'el>
[src]
fn into_tokens(self) -> Tokens<'el, Csharp<'el>>
[src]
impl<'el> IntoTokens<'el, Csharp<'el>> for Class<'el>
[src]
fn into_tokens(self) -> Tokens<'el, Csharp<'el>>
[src]
impl<'el> IntoTokens<'el, Csharp<'el>> for (Cons<'el>, Constructor<'el>)
[src]
fn into_tokens(self) -> Tokens<'el, Csharp<'el>>
[src]
impl<'el> IntoTokens<'el, Csharp<'el>> for Enum<'el>
[src]
fn into_tokens(self) -> Tokens<'el, Csharp<'el>>
[src]
impl<'el> IntoTokens<'el, Csharp<'el>> for Field<'el>
[src]
fn into_tokens(self) -> Tokens<'el, Csharp<'el>>
[src]
impl<'el> IntoTokens<'el, Csharp<'el>> for Interface<'el>
[src]
fn into_tokens(self) -> Tokens<'el, Csharp<'el>>
[src]
impl<'el> IntoTokens<'el, Csharp<'el>> for Method<'el>
[src]
fn into_tokens(self) -> Tokens<'el, Csharp<'el>>
[src]
impl<'el> IntoTokens<'el, Csharp<'el>> for BlockComment<'el>
[src]
fn into_tokens(self) -> Tokens<'el, Csharp<'el>>
[src]
impl<'el> Ord for Csharp<'el>
[src]
fn cmp(&self, other: &Csharp<'el>) -> 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<'el> PartialEq<Csharp<'el>> for Csharp<'el>
[src]
impl<'el> PartialOrd<Csharp<'el>> for Csharp<'el>
[src]
fn partial_cmp(&self, other: &Csharp<'el>) -> Option<Ordering>
[src]
fn lt(&self, other: &Csharp<'el>) -> bool
[src]
fn le(&self, other: &Csharp<'el>) -> bool
[src]
fn gt(&self, other: &Csharp<'el>) -> bool
[src]
fn ge(&self, other: &Csharp<'el>) -> bool
[src]
impl<'el> StructuralEq for Csharp<'el>
[src]
impl<'el> StructuralPartialEq for Csharp<'el>
[src]
Auto Trait Implementations
impl<'el> !RefUnwindSafe for Csharp<'el>
impl<'el> !Send for Csharp<'el>
impl<'el> !Sync for Csharp<'el>
impl<'el> Unpin for Csharp<'el>
impl<'el> UnwindSafe for Csharp<'el>
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>,