pub enum BodyLayout {
Inline,
Blocks,
FromRole,
}Expand description
How the block-structure pass lays out an environment’s body: as inline content, as a region of blocks, or according to the element’s block role.
Inline and Blocks take
precedence over the element’s block role; FromRole
follows it. A verbatim body (BodyDef::verbatim), a body declared with
an opaque wrapper (BodyDef::opaque_wrapper) and a body read in
mathematics mode are opaque
regions: the
block-structure pass carries them over untouched, regardless of their
layout. A body declared with an opaque wrapper may not declare a layout
other than FromRole
(MintError::LayoutOnOpaqueWrappedBody).
It is written to data with Serialize; see serialized
forms.
Variants§
Inline
The body is inline content: no paragraph is built inside it, and a blank line in it is an error.
Blocks
The body is a region of blocks: paragraphs are built inside it.
FromRole
The body follows the element’s block role: a region of blocks for an
element whose role is BlockRole::Block,
inline content otherwise. This is the default, so that a body’s layout
follows from what the element is.
Trait Implementations§
Source§impl Clone for BodyLayout
impl Clone for BodyLayout
impl Copy for BodyLayout
Source§impl Debug for BodyLayout
impl Debug for BodyLayout
Source§impl Default for BodyLayout
impl Default for BodyLayout
impl Eq for BodyLayout
Source§impl Hash for BodyLayout
impl Hash for BodyLayout
Source§impl JsonSchema for BodyLayout
impl JsonSchema for BodyLayout
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for BodyLayout
impl PartialEq for BodyLayout
Source§impl Serialize for BodyLayout
impl Serialize for BodyLayout
impl StructuralPartialEq for BodyLayout
Auto Trait Implementations§
impl Forget for BodyLayout
impl Freeze for BodyLayout
impl Move for BodyLayout
impl RefUnwindSafe for BodyLayout
impl Send for BodyLayout
impl Sync for BodyLayout
impl Unpin for BodyLayout
impl UnsafeUnpin for BodyLayout
impl UnwindSafe for BodyLayout
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