Enum tsproto_structs::InnerRustType [−][src]
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>)
Expand description
Key, value
Set(Box<InnerRustType>)
Vec(Box<InnerRustType>)
Cow(Box<InnerRustType>)
Implementations
impl InnerRustType
[src]
impl InnerRustType
[src]pub fn fmt(&self, f: &mut Formatter<'_>, lifetime: bool, is_ref: bool) -> Result
[src]
pub fn fmt(&self, f: &mut Formatter<'_>, lifetime: bool, is_ref: bool) -> Result
[src]lifetime
: Include ’a for references
is_ref
: If this is a refercene, used to emit either str
or String
or slices
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
.
pub fn uses_lifetime(&self) -> bool
[src]
Trait Implementations
impl Clone for InnerRustType
[src]
impl Clone for InnerRustType
[src]fn clone(&self) -> InnerRustType
[src]
fn clone(&self) -> InnerRustType
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for InnerRustType
[src]
impl Debug for InnerRustType
[src]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 InnerRustType
impl Send for InnerRustType
impl Sync for InnerRustType
impl Unpin for InnerRustType
impl UnwindSafe for InnerRustType
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