pub struct StyleDef {
pub id: Name,
pub content: Vec<DefContent>,
pub docs: String,
}Expand description
A style definition: a stylesheet that a feature’s output depends on.
A style definition (StyleDef) or a script definition
(ScriptDef) is a stylesheet or a script that a feature’s output depends
on, recorded in the registry under an identifier; a lowering rule or an
emitter requires it by identifier, and the backend that writes the output
decides its delivery: written into the output, loaded from an address, or
left to the host.
A requirement is an identifier that a lowering rule or an emitter records to say that its output needs a definition. Two features that require the same definition therefore require it once, because both use its identifier. A backend that has no use for a stylesheet, such as the plain-text backend, records the requirements and reads none.
Register a style definition with
FeatureBuilder::style_def; the
finished registry lists them in
FlmRegistry::styles. See also style and
script
definitions.
Fields§
§id: NameThe definition’s identifier, the one a requirement refers to; two definitions with the same identifier are the same stylesheet.
content: Vec<DefContent>The stylesheet, as an ordered list of parts (DefContent). An output
that includes the definition writes the parts in this order.
docs: StringDocumentation prose.
Trait Implementations§
impl Eq for StyleDef
impl StructuralPartialEq for StyleDef
Auto Trait Implementations§
impl Forget for StyleDef
impl Freeze for StyleDefwhere
*const ArcInner<str> is !null: Freeze,
PhantomData<ArcInner<str>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<DefContent>: Freeze,
PhantomData<u8>: Freeze,
impl Move for StyleDef
impl RefUnwindSafe for StyleDef
impl Send for StyleDef
impl Sync for StyleDef
impl Unpin for StyleDef
impl UnsafeUnpin for StyleDefwhere
*const ArcInner<str> is !null: UnsafeUnpin,
PhantomData<ArcInner<str>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<DefContent>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
impl UnwindSafe for StyleDef
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