pub enum RustType {
Primitive(RustPrimitive),
Named(String),
Ref {
reference: Reference,
base: Box<RustType>,
},
Tuple(Vec<RustType>),
Slice(Box<RustType>),
Generic {
base: Box<RustType>,
generics: Vec<RustType>,
},
}Expand description
A Rust type.
Variants§
Primitive(RustPrimitive)
A primitive type.
Named(String)
A named type.
Ref
A reference type.
Tuple(Vec<RustType>)
A tuple type.
Slice(Box<RustType>)
A slice type.
Generic
A generic type.
Implementations§
Trait Implementations§
Source§impl Expression for RustType
impl Expression for RustType
Source§fn write(&self, b: &mut CodeBuffer)
fn write(&self, b: &mut CodeBuffer)
Writes the code to the buffer
b.Source§impl From<RustPrimitive> for RustType
impl From<RustPrimitive> for RustType
Source§fn from(primitive: RustPrimitive) -> Self
fn from(primitive: RustPrimitive) -> Self
Converts to this type from the input type.
Source§impl Ord for RustType
impl Ord for RustType
Source§impl PartialOrd for RustType
impl PartialOrd for RustType
impl Eq for RustType
impl StructuralPartialEq for RustType
Auto Trait Implementations§
impl Freeze for RustType
impl RefUnwindSafe for RustType
impl Send for RustType
impl Sync for RustType
impl Unpin for RustType
impl UnwindSafe for RustType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more