#[non_exhaustive]pub enum HostNodeKind {
Document,
Session,
Definition,
Paragraph,
List,
ListItem,
Verbatim,
Table,
Annotation,
}Expand description
One of the AST node kinds a label can attach to. See module-level docs for the rationale behind centralising this list.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
Source§impl HostNodeKind
impl HostNodeKind
Sourcepub const ALL: &'static [HostNodeKind]
pub const ALL: &'static [HostNodeKind]
All variants in declaration order. The schema loader uses this for “allowed kinds” error messages; tests use it to exercise every variant.
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
Canonical wire string. Stable within WIRE_VERSION = 1.
Sourcepub fn parse(s: &str) -> Option<HostNodeKind>
pub fn parse(s: &str) -> Option<HostNodeKind>
Parse a wire kind name. Returns None for unknown names; the
schema loader uses this to reject attaches_to entries the
host doesn’t understand.
Sourcepub fn allowed_list() -> String
pub fn allowed_list() -> String
Canonical comma-separated list of allowed names — used in schema-loader error messages and any other surface that wants to enumerate the allowed set.
Trait Implementations§
Source§impl Clone for HostNodeKind
impl Clone for HostNodeKind
Source§fn clone(&self) -> HostNodeKind
fn clone(&self) -> HostNodeKind
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 moreimpl Copy for HostNodeKind
Source§impl Debug for HostNodeKind
impl Debug for HostNodeKind
Source§impl<'de> Deserialize<'de> for HostNodeKind
impl<'de> Deserialize<'de> for HostNodeKind
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
Source§impl Display for HostNodeKind
impl Display for HostNodeKind
impl Eq for HostNodeKind
Source§impl Hash for HostNodeKind
impl Hash for HostNodeKind
Source§impl PartialEq for HostNodeKind
impl PartialEq for HostNodeKind
Source§fn eq(&self, other: &HostNodeKind) -> bool
fn eq(&self, other: &HostNodeKind) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for HostNodeKind
impl Serialize for HostNodeKind
impl StructuralPartialEq for HostNodeKind
Auto Trait Implementations§
impl Freeze for HostNodeKind
impl RefUnwindSafe for HostNodeKind
impl Send for HostNodeKind
impl Sync for HostNodeKind
impl Unpin for HostNodeKind
impl UnsafeUnpin for HostNodeKind
impl UnwindSafe for HostNodeKind
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