pub enum DefinitionOverride {
ProvidedByHost,
Parts(Vec<DefContent>),
}Expand description
The delivery of a style or script definition: how the definition reaches the page.
A style or script definition (StyleDef,
ScriptDef) is a stylesheet or a script
that a feature’s output depends on, recorded in the registry under an
identifier; the backend that writes the output decides its delivery:
written into the output, loaded from an address, or left to the host (see
style and script
definitions).
This type has two uses:
- a host gives one per definition identifier in the render option
HtmlRenderOptions::definitions, in place of the definition’s declared content; - each row of the definitions table records the delivery the definition
ended up with
(
ResolvedDefinition::delivery).
An entry of the option replaces the declared content and never changes what the document requires: the definition is still listed in the definitions table, so a host or a bundler reading that table learns that the document needs it.
A delivery is an ordered list of parts, as a definition’s declared content is, and an entry of the option replaces the whole list. The formula renderer’s definition, for example, holds a configuration and then the address of the program: a host that wants its own address writes both parts, because a page without the configuration renders mathematics wrongly.
Variants§
ProvidedByHost
The host’s own page or bundle supplies the definition, and the page writes nothing for it.
An empty list of parts also writes nothing, but only this variant tells a reader of the definitions table that the host supplies the definition.
Parts(Vec<DefContent>)
The page writes these parts, in this order. Each part is text written
into the page, an address the page loads, or a file, which this library
does not read and reports
(DefinitionNotInlinable).
Trait Implementations§
Source§impl Clone for DefinitionOverride
impl Clone for DefinitionOverride
Source§impl Debug for DefinitionOverride
impl Debug for DefinitionOverride
Source§impl<'de> Deserialize<'de> for DefinitionOverride
impl<'de> Deserialize<'de> for DefinitionOverride
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>,
impl Eq for DefinitionOverride
Source§impl Hash for DefinitionOverride
impl Hash for DefinitionOverride
Source§impl JsonSchema for DefinitionOverride
impl JsonSchema for DefinitionOverride
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for DefinitionOverride
impl PartialEq for DefinitionOverride
impl StructuralPartialEq for DefinitionOverride
Auto Trait Implementations§
impl Forget for DefinitionOverride
impl Freeze for DefinitionOverride
impl Move for DefinitionOverride
impl RefUnwindSafe for DefinitionOverride
impl Send for DefinitionOverride
impl Sync for DefinitionOverride
impl Unpin for DefinitionOverride
impl UnsafeUnpin for DefinitionOverride
impl UnwindSafe for DefinitionOverride
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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