#[repr(u64)]
pub enum NodeType {
Show 13 variants
NoType,
Val,
Key,
Map,
Seq,
Doc,
Stream,
KeyRef,
ValRef,
KeyAnch,
ValAnch,
KeyTag,
ValTag,
}Expand description
A bitmask for marking node types.
Variants
NoType
no type is set
Val
a leaf node, has a (possibly empty) value
Key
is member of a map, must have non-empty key
Map
a map: a parent of keyvals
Seq
a seq: a parent of vals
Doc
a document
Stream
a stream: a seq of docs
KeyRef
a *reference: the key references an &anchor
ValRef
a *reference: the val references an &anchor
KeyAnch
the key has an &anchor
ValAnch
the val has an &anchor
KeyTag
the key has an explicit tag/type
ValTag
the val has an explicit tag/type
Implementations
sourceimpl NodeType
impl NodeType
pub fn is_container(&self) -> bool
sourceimpl NodeType
impl NodeType
pub fn has_key_tag(&self) -> bool
sourceimpl NodeType
impl NodeType
pub fn has_val_tag(&self) -> bool
sourceimpl NodeType
impl NodeType
pub fn has_key_anchor(&self) -> bool
sourceimpl NodeType
impl NodeType
pub fn is_key_anchor(&self) -> bool
sourceimpl NodeType
impl NodeType
pub fn has_val_anchor(&self) -> bool
sourceimpl NodeType
impl NodeType
pub fn is_val_anchor(&self) -> bool
sourceimpl NodeType
impl NodeType
pub fn has_anchor(&self) -> bool
sourceimpl NodeType
impl NodeType
pub fn is_key_ref(&self) -> bool
sourceimpl NodeType
impl NodeType
pub fn is_val_ref(&self) -> bool
sourceimpl NodeType
impl NodeType
pub fn is_anchor_or_ref(&self) -> bool
sourceimpl NodeType
impl NodeType
pub fn is_key_quoted(&self) -> bool
sourceimpl NodeType
impl NodeType
pub fn is_val_quoted(&self) -> bool
Trait Implementations
sourceimpl ExternType for NodeType
impl ExternType for NodeType
type Id = (c, _4, (), y, m, l, (), N, o, d, e, T, y, p, e)
type Id = (c, _4, (), y, m, l, (), N, o, d, e, T, y, p, e)
A type-level representation of the type’s C++ namespace and type name. Read more
type Kind = Trivial
type Kind = Trivial
Either cxx::kind::Opaque or cxx::kind::Trivial. Read more
impl Copy for NodeType
impl Eq for NodeType
impl StructuralEq for NodeType
impl StructuralPartialEq for NodeType
Auto Trait Implementations
impl RefUnwindSafe for NodeType
impl Send for NodeType
impl Sync for NodeType
impl Unpin for NodeType
impl UnwindSafe for NodeType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more