pub struct RustType {
pub inner: InnerRustType,
pub lifetime: bool,
}
Fields§
§inner: InnerRustType
§lifetime: bool
Include a lifetime specifier ’a
Implementations§
Source§impl RustType
impl RustType
pub fn with_opt(s: &str, opt: bool) -> Result<Self, Error>
Sourcepub fn with(
s: &str,
opt: bool,
map: Option<&str>,
set: bool,
vec: bool,
) -> Result<Self, Error>
pub fn with( s: &str, opt: bool, map: Option<&str>, set: bool, vec: bool, ) -> Result<Self, Error>
map
has a key
pub fn to_opt(&self, opt: bool) -> Self
pub fn to_ref(&self, as_ref: bool) -> Self
pub fn to_cow(&self) -> Self
pub fn lifetime(&self, lifetime: bool) -> Self
pub fn wrap_ref(&self) -> Self
pub fn wrap_opt(&self) -> Self
pub fn is_opt(&self) -> bool
pub fn is_primitive(&self) -> bool
pub fn is_vec(&self) -> bool
pub fn is_cow(&self) -> bool
pub fn uses_lifetime(&self) -> bool
Sourcepub fn code_as_ref(&self, name: &str) -> String
pub fn code_as_ref(&self, name: &str) -> String
Get code snippet for as_ref
.
Trait Implementations§
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 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