Struct tsproto_structs::book::Property [−][src]
pub struct Property { pub name: String, pub type_s: String, pub doc: Option<String>, pub opt: bool, pub modifier: Option<String>, pub key: Option<String>, }
Fields
name: String
Expand description
The name of this property (in PascalCase) which can be called from rust when generated.
type_s: String
Expand description
The rust declaration type.
doc: Option<String>
opt: bool
modifier: Option<String>
key: Option<String>
Implementations
impl Property
[src]
impl Property
[src]pub fn get_inner_type(&self) -> Result<RustType, Error>
[src]
pub fn get_type(&self) -> Result<RustType, Error>
[src]
pub fn get_inner_type_as_name(&self) -> Result<String, Error>
[src]
pub fn get_inner_type_as_name(&self) -> Result<String, Error>
[src]Gets the type as a name, used for storing it in an enum.
pub fn get_ids(&self, structs: &[Struct], struc: &Struct) -> String
[src]
pub fn is_array(&self) -> bool
[src]
pub fn is_set(&self) -> bool
[src]
pub fn is_map(&self) -> bool
[src]
Trait Implementations
impl<'de> Deserialize<'de> for Property
[src]
impl<'de> Deserialize<'de> for Property
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Property
impl Send for Property
impl Sync for Property
impl Unpin for Property
impl UnwindSafe for Property
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
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,