pub enum XnotePlacement {
List,
InPlace,
}Expand description
Where the xnotes of an xnote kind are shown: in a list after the document’s content, or where each one is written.
The placement is part of the xnote kind’s configuration, fixed when the registry is built; no render request can change it. The reason is that an in-place xnote holding paragraphs is a block of the document: it ends the paragraph it is written in, as a list does, and the text after it is a new paragraph. The block-structure pass decides whether a node is a block before the document’s trees are frozen (no longer changed; see frozen trees), from the element value and the node alone, so the answer is a fact of the document, the same for every output; a listed xnote is always inline content. A document whose footnotes are listed on one output and shown in place on another is therefore rendered with two configurations, that is, with two registries.
Variants§
List
In a list after the document’s content: the xnote’s mark is placed where the xnote was written, linked to the xnote’s entry in the list. The default.
InPlace
Where the xnote is written: one inline span holding the mark and the content, or, for content holding paragraphs, a block of its own, which ends the paragraph it is written in.
Trait Implementations§
Source§impl Clone for XnotePlacement
impl Clone for XnotePlacement
impl Copy for XnotePlacement
Source§impl Debug for XnotePlacement
impl Debug for XnotePlacement
Source§impl Default for XnotePlacement
impl Default for XnotePlacement
Source§impl<'de> Deserialize<'de> for XnotePlacement
impl<'de> Deserialize<'de> for XnotePlacement
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 XnotePlacement
Source§impl Hash for XnotePlacement
impl Hash for XnotePlacement
Source§impl JsonSchema for XnotePlacement
impl JsonSchema for XnotePlacement
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 XnotePlacement
impl PartialEq for XnotePlacement
Source§impl Serialize for XnotePlacement
impl Serialize for XnotePlacement
impl StructuralPartialEq for XnotePlacement
Auto Trait Implementations§
impl Forget for XnotePlacement
impl Freeze for XnotePlacement
impl Move for XnotePlacement
impl RefUnwindSafe for XnotePlacement
impl Send for XnotePlacement
impl Sync for XnotePlacement
impl Unpin for XnotePlacement
impl UnsafeUnpin for XnotePlacement
impl UnwindSafe for XnotePlacement
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