pub struct MatchBlock {
pub id: Option<String>,
pub kind: String,
pub raw_hash: String,
pub norm_hash: String,
pub text: String,
pub anchors: Vec<String>,
pub parent_key: Option<String>,
pub index: usize,
pub key: String,
}Expand description
A flattened block (§1.2). Old blocks carry their id; new blocks do not
until assigned. The positional key is stable within one tree and lets
the phases compare parents and sibling order across the two trees — it is
not an identity.
Fields§
§id: Option<String>The block’s persisted id: present on the old side, None on the new.
kind: StringThe block type name — a spec/format §3 kind (paragraph, list, …).
raw_hash: Stringsha256(raw), lowercase hex (spec/format §4.2).
norm_hash: Stringsha256(text), lowercase hex.
text: StringThe block’s visible text (spec/format §4.1), computed in tree context.
anchors: Vec<String>Authored ^block-ref anchors on this block.
parent_key: Option<String>The parent’s positional key, or None at the top level.
index: usizeOrdinal among its siblings, from 0.
key: StringPositional key: (parent_key ?? "") + "/" + index (/0, /1/2).
Implementations§
Source§impl MatchBlock
impl MatchBlock
Trait Implementations§
Source§impl Clone for MatchBlock
impl Clone for MatchBlock
Source§fn clone(&self) -> MatchBlock
fn clone(&self) -> MatchBlock
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 MatchBlock
impl Debug for MatchBlock
impl Eq for MatchBlock
Source§impl PartialEq for MatchBlock
impl PartialEq for MatchBlock
impl StructuralPartialEq for MatchBlock
Auto Trait Implementations§
impl Freeze for MatchBlock
impl RefUnwindSafe for MatchBlock
impl Send for MatchBlock
impl Sync for MatchBlock
impl Unpin for MatchBlock
impl UnsafeUnpin for MatchBlock
impl UnwindSafe for MatchBlock
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,
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.