Struct tsproto_structs::RustType [−][src]
pub struct RustType { pub inner: InnerRustType, pub lifetime: bool, }
Fields
inner: InnerRustType
lifetime: bool
Expand description
Include a lifetime specifier ’a
Implementations
impl RustType
[src]
impl RustType
[src]pub fn with_opt(s: &str, opt: bool) -> Result<Self, Error>
[src]
pub fn with(
s: &str,
opt: bool,
map: Option<&str>,
set: bool,
vec: bool
) -> Result<Self, Error>
[src]
pub fn with(
s: &str,
opt: bool,
map: Option<&str>,
set: bool,
vec: bool
) -> Result<Self, Error>
[src]map
has a key
pub fn to_opt(&self, opt: bool) -> Self
[src]
pub fn to_ref(&self, as_ref: bool) -> Self
[src]
pub fn to_cow(&self) -> Self
[src]
pub fn lifetime(&self, lifetime: bool) -> Self
[src]
pub fn wrap_ref(&self) -> Self
[src]
pub fn wrap_opt(&self) -> Self
[src]
pub fn is_opt(&self) -> bool
[src]
pub fn is_primitive(&self) -> bool
[src]
pub fn is_vec(&self) -> bool
[src]
pub fn is_cow(&self) -> bool
[src]
pub fn uses_lifetime(&self) -> bool
[src]
pub fn code_as_ref(&self, name: &str) -> String
[src]
pub fn code_as_ref(&self, name: &str) -> String
[src]Get code snippet for as_ref
.
Trait Implementations
impl From<InnerRustType> for RustType
[src]
impl From<InnerRustType> for RustType
[src]fn from(inner: InnerRustType) -> Self
[src]
fn from(inner: InnerRustType) -> Self
[src]Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for RustType
impl Send for RustType
impl Sync for RustType
impl Unpin for RustType
impl UnwindSafe for RustType
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more