pub struct Userdefs { /* private fields */ }Expand description
The userdefs feature (FlmFeature): it registers one element per user
definition with its lowering rules (one for an always definition, three
for a per-plan one), the capabilities, the two expansion rewrite stages,
the keep marker stage, the peer declarations of the LaTeX constructs, the
late-initialization build hook that compiles the templates, and the
feature’s settings. See the module documentation.
Construct it with Userdefs::new from a UserdefsConfig; the default
value defines nothing. The standard features construct it from the
userdefs field of StdlibConfig.
Registering the feature fails (BuildError::Feature) when two
definitions of one kind and one name apply in a common parsing mode, or when
two definitions would have the same element name.
Implementations§
Source§impl Userdefs
impl Userdefs
Sourcepub fn new(config: UserdefsConfig) -> Userdefs
pub fn new(config: UserdefsConfig) -> Userdefs
Returns the feature with the configuration config (the definitions and
the expansion depth limit), which stays fixed for the life of every
registry the feature is built into.
Sourcepub fn config(&self) -> &UserdefsConfig
pub fn config(&self) -> &UserdefsConfig
Returns the configuration the feature was constructed with.
Trait Implementations§
Source§impl FlmFeature for Userdefs
impl FlmFeature for Userdefs
Source§fn info(&self) -> FeatureInfo
fn info(&self) -> FeatureInfo
Source§fn settings(&self) -> Option<SettingsDecl>
fn settings(&self) -> Option<SettingsDecl>
None
for a feature that takes no settings as data. The default
implementation returns None. See crate::core::settings. Read moreSource§fn register(&self, b: &mut FeatureBuilder<'_>) -> Result<(), BuildError>
fn register(&self, b: &mut FeatureBuilder<'_>) -> Result<(), BuildError>
b. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for Userdefs
impl !UnwindSafe for Userdefs
impl Forget for Userdefs
impl Freeze for Userdefs
impl Move for Userdefs
impl Send for Userdefs
impl Sync for Userdefs
impl Unpin for Userdefs
impl UnsafeUnpin for Userdefs
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<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