pub struct MathPassthroughPayload {
pub display: MathDisplay,
pub env: Option<String>,
pub role: Option<Name>,
}Expand description
The payload of flm.pres.math-passthrough, mathematics given to the backend as
source text: the display form, the environment name when the
mathematics is written as an environment, and the role.
The mathematics itself is not in the payload: it is the node’s content,
copied as source text, which a backend gives to a formula renderer or
writes out again. The only part of that content that is not source text
is a flm.pres.math-text node (MathTextPayload).
Fields§
§display: MathDisplayInline or display.
env: Option<String>The math environment’s name (align), when the mathematics is written
as an environment.
role: Option<Name>The role (see BlockPayload::role): the math-passthrough feature’s
rules give the role of a formula’s outermost element,
flm.math.formula,
whose class marks the formula in an HTML page.
Implementations§
Source§impl MathPassthroughPayload
impl MathPassthroughPayload
Sourcepub fn from_projection(
value: &SerialValue,
) -> Result<MathPassthroughPayload, DeserializeError>
pub fn from_projection( value: &SerialValue, ) -> Result<MathPassthroughPayload, DeserializeError>
The payload rebuilt from its projection, the value
project produced.
§Errors
Returns a DeserializeError mentioning flm.pres.math-passthrough when the
projection is not a map, when display is missing or matches no display
form (MathDisplay::parse), or when env or role is present and is
not a string.
Trait Implementations§
Source§impl Clone for MathPassthroughPayload
impl Clone for MathPassthroughPayload
Source§impl Debug for MathPassthroughPayload
impl Debug for MathPassthroughPayload
impl Eq for MathPassthroughPayload
Source§impl PartialEq for MathPassthroughPayload
impl PartialEq for MathPassthroughPayload
Source§impl PresPayload for MathPassthroughPayload
impl PresPayload for MathPassthroughPayload
Source§fn project(&self) -> SerialValue
fn project(&self) -> SerialValue
impl StructuralPartialEq for MathPassthroughPayload
Auto Trait Implementations§
impl Forget for MathPassthroughPayload
impl Freeze for MathPassthroughPayload
impl Move for MathPassthroughPayload
impl RefUnwindSafe for MathPassthroughPayload
impl Send for MathPassthroughPayload
impl Sync for MathPassthroughPayload
impl Unpin for MathPassthroughPayload
impl UnsafeUnpin for MathPassthroughPayloadwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<str> is !null: UnsafeUnpin,
PhantomData<ArcInner<str>>: UnsafeUnpin,
impl UnwindSafe for MathPassthroughPayload
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