struct KnownFontFaceRules {
generation: bool,
contents: HashMap<Atom, Vec<KnownFontFaceRule>>,
}Fields§
§generation: boolUsed to distinguish new, incoming @font-face rules from existing ones.
Generations alternate between true and false, which is enough to tell one generation apart from the next.
contents: HashMap<Atom, Vec<KnownFontFaceRule>>Maps from a font family name to a list of @font-face rules declaring fonts
that belong to said family.
Implementations§
Source§impl KnownFontFaceRules
impl KnownFontFaceRules
Sourcefn diff_old_and_new_font_face_rules(
&mut self,
stylist: &Stylist,
guards: &StylesheetGuards<'_>,
) -> WebFontSetDifference
fn diff_old_and_new_font_face_rules( &mut self, stylist: &Stylist, guards: &StylesheetGuards<'_>, ) -> WebFontSetDifference
Computes the difference between the @font-face rules that are currently in effect
and the ones that the Stylist knows about. The caller is notified about new or removed rules
with callbacks.
Trait Implementations§
Source§impl Default for KnownFontFaceRules
impl Default for KnownFontFaceRules
Source§fn default() -> KnownFontFaceRules
fn default() -> KnownFontFaceRules
Returns the “default value” for a type. Read more
Source§impl MallocSizeOf for KnownFontFaceRules
impl MallocSizeOf for KnownFontFaceRules
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Auto Trait Implementations§
impl Freeze for KnownFontFaceRules
impl !RefUnwindSafe for KnownFontFaceRules
impl Send for KnownFontFaceRules
impl Sync for KnownFontFaceRules
impl Unpin for KnownFontFaceRules
impl UnsafeUnpin for KnownFontFaceRules
impl !UnwindSafe for KnownFontFaceRules
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert