pub enum InnerRustType {
Primitive(String),
Struct(String),
Ref(Box<InnerRustType>),
Option(Box<InnerRustType>),
Map(Box<InnerRustType>, Box<InnerRustType>),
Set(Box<InnerRustType>),
Vec(Box<InnerRustType>),
Cow(Box<InnerRustType>),
}
Variants§
Primitive(String)
Struct(String)
Ref(Box<InnerRustType>)
Option(Box<InnerRustType>)
Map(Box<InnerRustType>, Box<InnerRustType>)
Key, value
Set(Box<InnerRustType>)
Vec(Box<InnerRustType>)
Cow(Box<InnerRustType>)
Implementations§
Source§impl InnerRustType
impl InnerRustType
Sourcepub fn fmt(&self, f: &mut Formatter<'_>, lifetime: bool, is_ref: bool) -> Result
pub fn fmt(&self, f: &mut Formatter<'_>, lifetime: bool, is_ref: bool) -> Result
lifetime
: Include ’a for references
is_ref
: If this is a refercene, used to emit either str
or String
or slices
Sourcepub fn code_as_ref(&self, name: &str) -> String
pub fn code_as_ref(&self, name: &str) -> String
Get code snippet for as_ref
.
pub fn uses_lifetime(&self) -> bool
Trait Implementations§
Source§impl Clone for InnerRustType
impl Clone for InnerRustType
Source§fn clone(&self) -> InnerRustType
fn clone(&self) -> InnerRustType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for InnerRustType
impl Debug for InnerRustType
Source§impl From<InnerRustType> for RustType
impl From<InnerRustType> for RustType
Source§fn from(inner: InnerRustType) -> Self
fn from(inner: InnerRustType) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for InnerRustType
impl RefUnwindSafe for InnerRustType
impl Send for InnerRustType
impl Sync for InnerRustType
impl Unpin for InnerRustType
impl UnwindSafe for InnerRustType
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