pub struct KeyEntry {
pub key: String,
pub id: String,
pub path: RepoPath,
pub line: usize,
pub heading_slug: Option<String>,
pub holds_anchor: bool,
pub scope: KeyScope,
pub knowledge: usize,
pub rule_id: Option<String>,
}Expand description
A KeyEntry is one captured key.
Fields§
§key: StringThe key.
id: StringThe id of the key’s anchor, which a fragment names the key by: the
engine’s Capture::anchor of the capture, which every capture of the
key shares (SOKF_FORMAT_72).
path: RepoPathThe document that captures it.
line: usizeThe line that captures the key.
heading_slug: Option<String>The slug of the heading, when a heading captures the key.
holds_anchor: boolWhether this capture holds the key’s anchor: the capture at whose spot the engine places the anchor, or a heading whose slug is the id. Every capture of the key in one block, such as the lines of one fence, shares the block’s spot, so each of them holds the anchor, until the engine exports which capture it chose.
scope: KeyScopeThe scope that the schema declares for the key.
knowledge: usizeThe knowledge of the document that captures the key.
rule_id: Option<String>The rule-id of the key. It is the nearest rule-id around the rule
that captures the key. for-each-key-of and cited-by refer
to this rule-id.
Trait Implementations§
impl Eq for KeyEntry
Source§impl Extend<KeyEntry> for KeyIndex
impl Extend<KeyEntry> for KeyIndex
Source§fn extend<I: IntoIterator<Item = KeyEntry>>(&mut self, entries: I)
fn extend<I: IntoIterator<Item = KeyEntry>>(&mut self, entries: I)
Source§fn extend_one(&mut self, item: T)
fn extend_one(&mut self, item: T)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)impl StructuralPartialEq for KeyEntry
Auto Trait Implementations§
impl Forget for KeyEntry
impl Freeze for KeyEntry
impl Move for KeyEntry
impl RefUnwindSafe for KeyEntry
impl Send for KeyEntry
impl Sync for KeyEntry
impl Unpin for KeyEntry
impl UnsafeUnpin for KeyEntry
impl UnwindSafe for KeyEntry
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
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
key and return true if they are equal.