pub struct InlineSpacing {
pub absorb_before: bool,
pub absorb_after: bool,
}Expand description
How an inline element treats the whitespace immediately before and after
it: the data of BlockRole::Inline.
Setting either field removes the whitespace on that side entirely, so that
an element such as a citation mark can control its own spacing. The
whitespace removed is every piece of whitespace between the element and the
nearest content on that side, the nodes that are whitespace
(Whitespace, such as ~ and \ ) included: before an element that
absorbs the whitespace before it, word~, word ~ and word~~ all leave
word alone. Source comments between the whitespace and the element do not
prevent the removal, and are kept: in word %% note followed on the next
line by the element, the space after word is removed too. Ordinary inline
content keeps the spaces around it: InlineSpacing::CONTENT.
Fields§
§absorb_before: boolRemove the whitespace immediately before the element.
absorb_after: boolRemove the whitespace immediately after the element.
Implementations§
Source§impl InlineSpacing
impl InlineSpacing
Sourcepub const CONTENT: InlineSpacing
pub const CONTENT: InlineSpacing
Ordinary inline content: the spaces on both sides are kept.
Trait Implementations§
Source§impl Clone for InlineSpacing
impl Clone for InlineSpacing
impl Copy for InlineSpacing
Source§impl Debug for InlineSpacing
impl Debug for InlineSpacing
Source§impl Default for InlineSpacing
impl Default for InlineSpacing
Source§impl<'de> Deserialize<'de> for InlineSpacing
impl<'de> Deserialize<'de> for InlineSpacing
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 InlineSpacing
Source§impl Hash for InlineSpacing
impl Hash for InlineSpacing
Source§impl JsonSchema for InlineSpacing
impl JsonSchema for InlineSpacing
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 InlineSpacing
impl PartialEq for InlineSpacing
impl StructuralPartialEq for InlineSpacing
Auto Trait Implementations§
impl Forget for InlineSpacing
impl Freeze for InlineSpacing
impl Move for InlineSpacing
impl RefUnwindSafe for InlineSpacing
impl Send for InlineSpacing
impl Sync for InlineSpacing
impl Unpin for InlineSpacing
impl UnsafeUnpin for InlineSpacing
impl UnwindSafe for InlineSpacing
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