pub struct Style { /* private fields */ }Expand description
§Style for ASTNodes
Implementations§
Source§impl Style
impl Style
pub fn new( name: &str, props: Props, ty: StyleType, children: Option<Vec<ASTNodes>>, parent: Option<ASTNodes>, ) -> Self
pub fn new_style_start(name: &str, ty: StyleType) -> Self
pub fn set_name(&mut self, name: &str)
pub fn set_ty(&mut self, ty: StyleType)
pub fn set_props(&mut self, props: Props)
pub fn extend_props(&mut self, props: HashMap<PropsKey, Value>)
pub fn set_children(&mut self, children: Vec<ASTNodes>)
pub fn set_parent(&mut self, parent: ASTNodes)
pub fn get_name(&self) -> &str
pub fn get_type(&self) -> StyleType
pub fn has_children(&self) -> bool
pub fn get_children(&self) -> Option<&Vec<ASTNodes>>
pub fn has_props(&self) -> bool
pub fn get_props(&self) -> Option<&HashMap<PropsKey, Value>>
pub fn get_parent(&self) -> Option<&ASTNodes>
pub fn has_parent(&self) -> bool
Trait Implementations§
impl StructuralPartialEq for Style
Auto Trait Implementations§
impl Freeze for Style
impl RefUnwindSafe for Style
impl Send for Style
impl Sync for Style
impl Unpin for Style
impl UnwindSafe for Style
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