pub struct LinePayload {
pub indent_left: Length,
pub indent_right: Length,
pub align: LineAlign,
}Expand description
The payload of flm.pres.line, one line of a flm.pres.lines node: the
line’s indentation from the left and from the right, each a Length,
and its alignment.
An indentation is a length, never a bare number: its unit is part of the
value, so that each backend applies it the same way, a
tab at the width that backend sets for it, any
other unit at its own size (see Length). Both default to the zero
length.
Fields§
§indent_left: LengthIndentation from the left.
indent_right: LengthIndentation from the right.
align: LineAlignThe alignment.
Implementations§
Source§impl LinePayload
impl LinePayload
Sourcepub fn from_projection(
value: &SerialValue,
) -> Result<LinePayload, DeserializeError>
pub fn from_projection( value: &SerialValue, ) -> Result<LinePayload, DeserializeError>
The payload rebuilt from its projection, the value
project produced.
§Errors
Returns a DeserializeError mentioning flm.pres.line when the
projection is not a map, when indent_left or indent_right is
present and is not the text of a length (Length::parse), or when
align is present and matches no alignment (LineAlign::parse).
Trait Implementations§
Source§impl Clone for LinePayload
impl Clone for LinePayload
impl Copy for LinePayload
Source§impl Debug for LinePayload
impl Debug for LinePayload
Source§impl Default for LinePayload
impl Default for LinePayload
impl Eq for LinePayload
Source§impl PartialEq for LinePayload
impl PartialEq for LinePayload
Source§impl PresPayload for LinePayload
impl PresPayload for LinePayload
Source§fn project(&self) -> SerialValue
fn project(&self) -> SerialValue
impl StructuralPartialEq for LinePayload
Auto Trait Implementations§
impl Forget for LinePayload
impl Freeze for LinePayload
impl Move for LinePayload
impl RefUnwindSafe for LinePayload
impl Send for LinePayload
impl Sync for LinePayload
impl Unpin for LinePayload
impl UnsafeUnpin for LinePayload
impl UnwindSafe for LinePayload
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