pub struct LinesBehavior { /* private fields */ }Expand description
The body parser (FlmBodyParser) of the six display-math environments:
techy’s ordinary parse of an environment body, up to and including
\end{name}, followed by the check of the equation lines, which reports
LabelWithoutNumber among the parse’s diagnostics. See the module
documentation, The error, and empty lines.
The parser records whether the environment numbers its lines (align does,
align* does not). The body’s parsing mode and its scoped package come
from the body declaration that carries the parser
(BodyDef). Build one with
body_behavior.
Trait Implementations§
Source§impl Debug for LinesBehavior
impl Debug for LinesBehavior
Source§impl EnvironmentBehavior<Flm> for LinesBehavior
impl EnvironmentBehavior<Flm> for LinesBehavior
Source§fn make_body_parser<'p>(
&'p self,
invocation: EnvironmentInvocation<'p, Flm>,
) -> Box<dyn ConstructParser<Flm, Output = EnvironmentBody<Flm>> + 'p>
fn make_body_parser<'p>( &'p self, invocation: EnvironmentInvocation<'p, Flm>, ) -> Box<dyn ConstructParser<Flm, Output = EnvironmentBody<Flm>> + 'p>
The parser that reads the environment’s body, entered right after the declared
arguments under the body state. Default: the core
EnvironmentBodyParser —
content up to and including the rigid \end{name} terminator, staged as one
body List. Override for takeover bodies (VerbatimBehavior’s raw read);
the returned parser must produce an EnvironmentBody and no pass-through
delta (its reported terminator facts feed the
invocation-syntax recording). Read moreSource§fn arguments(&self) -> &[Arc<ArgumentSpec<LLL>>]
fn arguments(&self) -> &[Arc<ArgumentSpec<LLL>>]
The declarative argument structure of the environment, in invocation order —
parsed right after
\begin{name}, before the body. Default:
no arguments.Source§fn body_state_delta(
&self,
invocation: EnvironmentInvocation<'_, LLL>,
) -> Result<Option<ParsingStateDelta<LLL>>, ParseError<<LLL as Lang>::SourceOrigin>>
fn body_state_delta( &self, invocation: EnvironmentInvocation<'_, LLL>, ) -> Result<Option<ParsingStateDelta<LLL>>, ParseError<<LLL as Lang>::SourceOrigin>>
The body’s parsing-state delta (mode changes, tokenization tweaks), stacked on
the invocation’s base state for the body’s whole extent — terminator included —
and reverted structurally after (pylatexenc’s
make_body_parsing_state_delta).
Default: none (Ok(None)). Read moreSource§impl FlmBodyParser for LinesBehavior
impl FlmBodyParser for LinesBehavior
Source§fn identity(&self) -> Vec<u8> ⓘ
fn identity(&self) -> Vec<u8> ⓘ
Returns the bytes that identify this body parser in the registry
digest, under the same rules as
FlmArgumentParser::identity.Source§fn description(&self) -> String
fn description(&self) -> String
Returns a description of how the body is read, in a short phrase. The
library does not act on it; a program that describes the registry’s
declarations
(
FlmRegistry::declarations)
shows it.Auto Trait Implementations§
impl Forget for LinesBehavior
impl Freeze for LinesBehavior
impl Move for LinesBehavior
impl RefUnwindSafe for LinesBehavior
impl Send for LinesBehavior
impl Sync for LinesBehavior
impl Unpin for LinesBehavior
impl UnsafeUnpin for LinesBehavior
impl UnwindSafe for LinesBehavior
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
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>,
Casts the value.
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>
Casts the value.
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<P> IntoFlmBodyParser for Pwhere
P: FlmBodyParser + 'static,
impl<P> IntoFlmBodyParser for Pwhere
P: FlmBodyParser + 'static,
Source§fn into_flm_body_parser(self) -> Arc<dyn FlmBodyParser> ⓘ
fn into_flm_body_parser(self) -> Arc<dyn FlmBodyParser> ⓘ
Returns the shared parser object a
BodyDef holds.Source§impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
Source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Performs the conversion.
Source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
Source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Performs the conversion.
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> StrictAs for T
impl<T> StrictAs for T
Source§fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
Casts the value.
Source§impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
Source§fn strict_cast_from(src: Src) -> Dst
fn strict_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.