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