pub struct ResolvedDefinitions {
pub definitions: Vec<ResolvedDefinition>,
}Expand description
The definitions table, flm.html.definitions (DEFINITIONS_TABLE):
every style and script definition the document requires, once each, with
its delivery.
A requirement is only an identifier; this table records, for each
identifier, how the definition reaches the page. The regions stage reads it
and reads nothing else about definitions. A host that assembles its own page
around the per-tree HTML of flm.output.html reads it too, including the
rows whose delivery is ProvidedByHost,
so that it knows what the document needs; a bundler works from its
serialized form (Table::project). The stage ResolveDefinitionsStage
writes it once per document.
Fields§
§definitions: Vec<ResolvedDefinition>The rows: the stylesheets first, in the order in which the features registered them, then the scripts in the same way.
Implementations§
Source§impl ResolvedDefinitions
impl ResolvedDefinitions
Sourcepub fn get(&self, id: &str) -> Option<&ResolvedDefinition>
pub fn get(&self, id: &str) -> Option<&ResolvedDefinition>
Returns the row of the definition id, or None when the document
does not require it.
Sourcepub fn of_kind(
&self,
kind: DefinitionKind,
) -> impl Iterator<Item = &ResolvedDefinition>
pub fn of_kind( &self, kind: DefinitionKind, ) -> impl Iterator<Item = &ResolvedDefinition>
Returns the rows of one kind, in order: what the page writes in the head (stylesheets) or at the end of the body (scripts).
Trait Implementations§
Source§impl Clone for ResolvedDefinitions
impl Clone for ResolvedDefinitions
Source§impl Debug for ResolvedDefinitions
impl Debug for ResolvedDefinitions
Source§impl Default for ResolvedDefinitions
impl Default for ResolvedDefinitions
impl Eq for ResolvedDefinitions
Source§impl PartialEq for ResolvedDefinitions
impl PartialEq for ResolvedDefinitions
Source§impl SingletonTable for ResolvedDefinitions
impl SingletonTable for ResolvedDefinitions
impl StructuralPartialEq for ResolvedDefinitions
Source§impl Table for ResolvedDefinitions
impl Table for ResolvedDefinitions
Source§fn absorb(&mut self, piece: ResolvedDefinitions)
fn absorb(&mut self, piece: ResolvedDefinitions)
The stage writes the table once, for the whole document, so a non-empty table piece replaces what the table held.
Source§fn project(&self, _cx: &dyn ProjectCx) -> SerialValue
fn project(&self, _cx: &dyn ProjectCx) -> SerialValue
One entry per row: {id, kind, owner, provided_by_host, parts}, each
part one of {inline}, {file}, {url} or {table}. A bundler or a site
generator works from this list.
Source§fn piece_class(&self) -> PieceClass
fn piece_class(&self) -> PieceClass
Auto Trait Implementations§
impl Forget for ResolvedDefinitions
impl Freeze for ResolvedDefinitions
impl Move for ResolvedDefinitions
impl RefUnwindSafe for ResolvedDefinitions
impl Send for ResolvedDefinitions
impl Sync for ResolvedDefinitions
impl Unpin for ResolvedDefinitions
impl UnsafeUnpin for ResolvedDefinitions
impl UnwindSafe for ResolvedDefinitions
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> ⓘ
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> ⓘ
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 more