pub enum PolyVariant {
Token(TokenRef),
Node(NodeRef),
}Expand description
Variants§
Token(TokenRef)
This polymorphic variant represents a TokenRef reference.
Node(NodeRef)
This polymorphic variant represents a NodeRef reference.
Trait Implementations§
Source§impl AsRef<dyn PolyRef> for PolyVariant
impl AsRef<dyn PolyRef> for PolyVariant
Source§impl Borrow<dyn PolyRef> for PolyVariant
impl Borrow<dyn PolyRef> for PolyVariant
Source§impl Clone for PolyVariant
impl Clone for PolyVariant
Source§fn clone(&self) -> PolyVariant
fn clone(&self) -> PolyVariant
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 PolyVariant
Source§impl Debug for PolyVariant
impl Debug for PolyVariant
impl Eq for PolyVariant
Source§impl Hash for PolyVariant
impl Hash for PolyVariant
Source§impl Identifiable for PolyVariant
impl Identifiable for PolyVariant
Source§impl Ord for PolyVariant
impl Ord for PolyVariant
Source§fn cmp(&self, other: &PolyVariant) -> Ordering
fn cmp(&self, other: &PolyVariant) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for PolyVariant
impl PartialEq for PolyVariant
Source§impl PartialOrd for PolyVariant
impl PartialOrd for PolyVariant
Source§impl PolyRef for PolyVariant
impl PolyRef for PolyVariant
Source§fn is_nil(&self) -> bool
fn is_nil(&self) -> bool
Returns true, if the underlying reference intentionally does not refer
to any node or token within any compilation unit.
Source§fn as_variant(&self) -> PolyVariant
fn as_variant(&self) -> PolyVariant
Source§fn as_token_ref(&self) -> &TokenRef
fn as_token_ref(&self) -> &TokenRef
Returns a TokenRef if this PolyRef represents a TokenRef; otherwise
returns a TokenRef::nil.
Source§fn as_node_ref(&self) -> &NodeRef
fn as_node_ref(&self) -> &NodeRef
Returns a NodeRef if this PolyRef represents a NodeRef; otherwise
returns a NodeRef::nil.
impl StructuralPartialEq for PolyVariant
Auto Trait Implementations§
impl Freeze for PolyVariant
impl RefUnwindSafe for PolyVariant
impl Send for PolyVariant
impl Sync for PolyVariant
impl Unpin for PolyVariant
impl UnsafeUnpin for PolyVariant
impl UnwindSafe for PolyVariant
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