pub struct ComponentDef {
pub name: String,
pub props: HashMap<String, PropDef>,
pub state: Option<HashMap<String, StateDef>>,
pub lifecycle: Option<LifecycleDef>,
pub render: String,
pub styles: Option<HashMap<String, String>>,
pub imports: Vec<String>,
}
Expand description
React component definition
Fields§
§name: String
§props: HashMap<String, PropDef>
§state: Option<HashMap<String, StateDef>>
§lifecycle: Option<LifecycleDef>
§render: String
§styles: Option<HashMap<String, String>>
§imports: Vec<String>
Trait Implementations§
Source§impl Clone for ComponentDef
impl Clone for ComponentDef
Source§fn clone(&self) -> ComponentDef
fn clone(&self) -> ComponentDef
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ComponentDef
impl Debug for ComponentDef
Source§impl<'de> Deserialize<'de> for ComponentDef
impl<'de> Deserialize<'de> for ComponentDef
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 ComponentDef
impl RefUnwindSafe for ComponentDef
impl Send for ComponentDef
impl Sync for ComponentDef
impl Unpin for ComponentDef
impl UnwindSafe for ComponentDef
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