pub struct LatexRawPayload {
pub text: String,
}Expand description
The payload of flm.pres.latex.raw: LaTeX text the emitter writes byte
for byte. The node is childless.
A rule uses a raw node only where the bytes are LaTeX syntax that no other
construct expresses and that need no escaping: a blank line that writes a
paragraph break, a parameter (#1) inside a recomposed definition, a line
of a display-math environment rebuilt from its equation lines, a literal
character’s spelling as the author wrote it (\%, \textbackslash).
Document text never goes here: it goes through the emitter’s escaping as a
text node. Neither does any structure that a macro or environment construct
can carry, because a raw node carries no structure, no source position for
its parts and no escaping, so the lowered output loses everything that
makes it inspectable.
The text must not hold a % that starts a LaTeX comment: the sink refuses
such a text (super::sink::LatexSink::raw).
Fields§
§text: StringThe LaTeX text, written as it is.
Implementations§
Source§impl LatexRawPayload
impl LatexRawPayload
Sourcepub fn new(text: impl Into<String>) -> LatexRawPayload
pub fn new(text: impl Into<String>) -> LatexRawPayload
A raw node’s payload holding text.
Sourcepub fn from_projection(
value: &SerialValue,
) -> Result<LatexRawPayload, DeserializeError>
pub fn from_projection( value: &SerialValue, ) -> Result<LatexRawPayload, DeserializeError>
The payload rebuilt from its projection, the value
project produced.
§Errors
Returns a DeserializeError that identifies flm.pres.latex.raw
when the projection is not a map or text is missing or is not a
string.
Trait Implementations§
Source§impl Clone for LatexRawPayload
impl Clone for LatexRawPayload
Source§impl Debug for LatexRawPayload
impl Debug for LatexRawPayload
Source§impl Default for LatexRawPayload
impl Default for LatexRawPayload
impl Eq for LatexRawPayload
Source§impl PartialEq for LatexRawPayload
impl PartialEq for LatexRawPayload
Source§impl PresPayload for LatexRawPayload
impl PresPayload for LatexRawPayload
Source§fn project(&self) -> SerialValue
fn project(&self) -> SerialValue
impl StructuralPartialEq for LatexRawPayload
Auto Trait Implementations§
impl Forget for LatexRawPayload
impl Freeze for LatexRawPayload
impl Move for LatexRawPayload
impl RefUnwindSafe for LatexRawPayload
impl Send for LatexRawPayloadwhere
RawVecInner: Send,
impl Sync for LatexRawPayloadwhere
RawVecInner: Sync,
impl Unpin for LatexRawPayload
impl UnsafeUnpin for LatexRawPayload
impl UnwindSafe for LatexRawPayloadwhere
RawVecInner: UnwindSafe,
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