pub struct BEMBlock {
pub name: String,
pub modifiers: Vec<String>,
pub elements: Vec<BEMElement>,
}
Expand description
Represents a BEM (Block Element Modifier) block, which consists of a name, a list of modifiers, and a list of elements.
A BEM block is the top-level abstraction in BEM, and it can have zero or more elements and modifiers associated with it.
§Example
use bem::BEMBlock;
let block = BEMBlock {
name: "media-player".to_string(),
modifiers: vec!["dark".to_string()],
elements: vec![/* BEMElement structs go here */],
};
Fields§
§name: String
§modifiers: Vec<String>
§elements: Vec<BEMElement>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for BEMBlock
impl<'de> Deserialize<'de> for BEMBlock
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
impl StructuralPartialEq for BEMBlock
Auto Trait Implementations§
impl Freeze for BEMBlock
impl RefUnwindSafe for BEMBlock
impl Send for BEMBlock
impl Sync for BEMBlock
impl Unpin for BEMBlock
impl UnwindSafe for BEMBlock
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