pub enum NodeKind {
Fragment,
Document(Document),
FragmentNamed(String),
VariableTemplate(VariableTemplate),
InlineComment(InlineComment),
VariableLink(VariableLink),
VariableName(VariableName),
Literal(Literal),
VariableType(VariableType),
Variable(Variable),
}Variants
Fragment
Document(Document)
FragmentNamed(String)
VariableTemplate(VariableTemplate)
InlineComment(InlineComment)
VariableLink(VariableLink)
VariableName(VariableName)
Literal(Literal)
VariableType(VariableType)
Variable(Variable)
Implementations
sourceimpl NodeKind
impl NodeKind
sourcepub fn is_inline_comment(&self) -> bool
pub fn is_inline_comment(&self) -> bool
Returns true if the node kind is InlineComment.
pub fn try_into_inline_comment(self) -> Result<InlineComment, Self>
pub fn try_into_variable_value(self) -> Result<VariableTemplate, Self>
sourcepub fn is_variable_value(&self) -> bool
pub fn is_variable_value(&self) -> bool
Returns true if the node kind is VariableValue.
pub fn try_into_variable_link(self) -> Result<VariableLink, Self>
pub fn try_into_variable_name(self) -> Result<VariableName, Self>
Trait Implementations
sourceimpl From<InlineComment> for NodeKind
impl From<InlineComment> for NodeKind
sourcefn from(v: InlineComment) -> Self
fn from(v: InlineComment) -> Self
Converts to this type from the input type.
sourceimpl From<VariableLink> for NodeKind
impl From<VariableLink> for NodeKind
sourcefn from(v: VariableLink) -> Self
fn from(v: VariableLink) -> Self
Converts to this type from the input type.
sourceimpl From<VariableName> for NodeKind
impl From<VariableName> for NodeKind
sourcefn from(v: VariableName) -> Self
fn from(v: VariableName) -> Self
Converts to this type from the input type.
sourceimpl From<VariableTemplate> for NodeKind
impl From<VariableTemplate> for NodeKind
sourcefn from(v: VariableTemplate) -> Self
fn from(v: VariableTemplate) -> Self
Converts to this type from the input type.
sourceimpl From<VariableType> for NodeKind
impl From<VariableType> for NodeKind
sourcefn from(v: VariableType) -> Self
fn from(v: VariableType) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for NodeKind
impl Send for NodeKind
impl Sync for NodeKind
impl Unpin for NodeKind
impl UnwindSafe for NodeKind
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