pub struct InlineStyleParseMemo {
entries: BTreeMap<(u64, u64), (StyleSheet, Vec<String>)>,
pub hits: u32,
pub misses: u32,
}Expand description
<style> ブロックごとのパース結果キャッシュ。
Fields§
§entries: BTreeMap<(u64, u64), (StyleSheet, Vec<String>)>§hits: u32§misses: u32Implementations§
Source§impl InlineStyleParseMemo
impl InlineStyleParseMemo
const MAX_ENTRIES: usize = 256
pub fn clear(&mut self)
pub fn len(&self) -> usize
Sourcepub fn resolve_blocks(
&mut self,
blocks: &[CollectedStyleBlock<'_>],
ext_layers: &[String],
) -> StyleSheet
pub fn resolve_blocks( &mut self, blocks: &[CollectedStyleBlock<'_>], ext_layers: &[String], ) -> StyleSheet
収集された各インライン <style> ブロックを順に解決・結合して 1 つの StyleSheet にまとめる。
既にキャッシュ済みのブロックはパースを省略し、変更・追加されたブロックのみパースする。
Trait Implementations§
Auto Trait Implementations§
impl Freeze for InlineStyleParseMemo
impl RefUnwindSafe for InlineStyleParseMemo
impl Send for InlineStyleParseMemo
impl Sync for InlineStyleParseMemo
impl Unpin for InlineStyleParseMemo
impl UnsafeUnpin for InlineStyleParseMemo
impl UnwindSafe for InlineStyleParseMemo
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