pub enum FragmentLayout {
Blocks,
Inline,
InlineOrBlocks,
}Expand description
How the content at the top level of a fragment is laid out when a run builds block structure: as blocks, as inline content, or as blocks only when it holds a block.
The block-structure rewrite (crate::lang::rewrites::blocks) reads it.
It is recorded on the fragment rather than on the document because it is a
property of the text: a title is inline content in every document that
uses it.
Variants§
Blocks
The top level holds blocks: paragraphs are built from its content.
Inline
Everything at the top level is inline content. An element whose block role is not inline is reported as an error there, and is left where it is written.
InlineOrBlocks
Inline content, unless the top level holds a paragraph break or an
element whose block role is
Block; then the whole top
level is laid out as blocks. This is the default.
Trait Implementations§
Source§impl Clone for FragmentLayout
impl Clone for FragmentLayout
impl Copy for FragmentLayout
Source§impl Debug for FragmentLayout
impl Debug for FragmentLayout
Source§impl Default for FragmentLayout
impl Default for FragmentLayout
Source§impl<'de> Deserialize<'de> for FragmentLayout
impl<'de> Deserialize<'de> for FragmentLayout
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for FragmentLayout
Source§impl Hash for FragmentLayout
impl Hash for FragmentLayout
Source§impl PartialEq for FragmentLayout
impl PartialEq for FragmentLayout
Source§impl Serialize for FragmentLayout
impl Serialize for FragmentLayout
impl StructuralPartialEq for FragmentLayout
Auto Trait Implementations§
impl Forget for FragmentLayout
impl Freeze for FragmentLayout
impl Move for FragmentLayout
impl RefUnwindSafe for FragmentLayout
impl Send for FragmentLayout
impl Sync for FragmentLayout
impl Unpin for FragmentLayout
impl UnsafeUnpin for FragmentLayout
impl UnwindSafe for FragmentLayout
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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