pub struct HeadingState {
pub visible: bool,
pub text: String,
pub source: HeadingSource,
}Expand description
Resolved heading state for a single page.
visible is the gate the build pipeline checks before injecting an
<h1 class="moss-article-title"> and the editor checks before rendering
its pinned heading element. source tells the editor where text came
from so it can route heading-element commits between rename (Filename)
and title-update (Title).
Fields§
§visible: boolWhether the article heading should render.
text: StringThe visible heading text (resolved through title or filename).
source: HeadingSourceWhere text was sourced from.
Trait Implementations§
Source§impl Clone for HeadingState
impl Clone for HeadingState
Source§fn clone(&self) -> HeadingState
fn clone(&self) -> HeadingState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HeadingState
impl Debug for HeadingState
Source§impl<'de> Deserialize<'de> for HeadingState
impl<'de> Deserialize<'de> for HeadingState
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for HeadingState
Source§impl PartialEq for HeadingState
impl PartialEq for HeadingState
Source§impl Serialize for HeadingState
impl Serialize for HeadingState
impl StructuralPartialEq for HeadingState
Auto Trait Implementations§
impl Freeze for HeadingState
impl RefUnwindSafe for HeadingState
impl Send for HeadingState
impl Sync for HeadingState
impl Unpin for HeadingState
impl UnsafeUnpin for HeadingState
impl UnwindSafe for HeadingState
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
Mutably borrows from an owned value. Read more
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§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
Compare self to
key and return true if they are equal.