pub struct StyleTree {
pub uniq_layers: BTreeMap<ScopeId, (Order, Style)>,
}
Expand description
Store chain of extensions.
Fields§
§uniq_layers: BTreeMap<ScopeId, (Order, Style)>
Style by id of its layer We store it in a map[ScopeId => _] and not in map[Order => _] because we want to prevent usage of same style in different chains.
Implementations§
Source§impl StyleTree
impl StyleTree
Sourcepub fn render(
&self,
always_output_layer: bool,
root_scope_id: impl Into<ScopeId>,
) -> Option<String>
pub fn render( &self, always_output_layer: bool, root_scope_id: impl Into<ScopeId>, ) -> Option<String>
Returns None if root_scope_id is not registered. If always_output_layer is true, it will output layered css even when there only one layer. If always_output_layer is false, for single layer it will return plain css without layers.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StyleTree
impl RefUnwindSafe for StyleTree
impl Send for StyleTree
impl Sync for StyleTree
impl Unpin for StyleTree
impl UnwindSafe for StyleTree
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