pub enum LogKind {
Ingest,
Create,
Update,
Delete,
Rename,
Link,
Validate,
IndexRebuild,
Contradiction,
Custom(String),
}Expand description
A recognized log.md entry kind. Custom kinds are valid in the format
(dbmd validate warns on unrecognized via LOG_UNKNOWN_KIND); this enum
carries the recognized vocabulary plus a LogKind::Custom catch-all so an
unknown kind round-trips without loss.
Variants§
Ingest
A source artifact was ingested.
Create
A file was created.
Update
A file was updated.
Delete
A file was deleted.
Rename
A file was renamed/moved.
Link
A wiki-link was added.
Validate
A validation pass ran.
IndexRebuild
The index was rebuilt.
Contradiction
A contradiction between sources was flagged.
Custom(String)
Any kind outside the recognized vocabulary, preserved verbatim.
Implementations§
Source§impl LogKind
impl LogKind
Sourcepub fn as_str(&self) -> &str
pub fn as_str(&self) -> &str
The canonical lowercase string for this kind, as it appears in a log
header (ingest, index-rebuild, …).
Sourcepub fn parse(token: &str) -> LogKind
pub fn parse(token: &str) -> LogKind
Parse a kind from its header token; non-canonical tokens become
LogKind::Custom.
Sourcepub fn is_recognized(&self) -> bool
pub fn is_recognized(&self) -> bool
True if this is one of the recognized kinds (i.e. not
LogKind::Custom).
Trait Implementations§
impl Eq for LogKind
impl StructuralPartialEq for LogKind
Auto Trait Implementations§
impl Freeze for LogKind
impl RefUnwindSafe for LogKind
impl Send for LogKind
impl Sync for LogKind
impl Unpin for LogKind
impl UnsafeUnpin for LogKind
impl UnwindSafe for LogKind
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.