[−][src]Enum rowan::NodeOrToken
Variants
Implementations
impl NodeOrToken<GreenNode, GreenToken>
[src]
pub fn kind(&self) -> SyntaxKind
[src]
Returns kind of this element.
pub fn text_len(&self) -> TextSize
[src]
Returns the length of the text covered by this element.
impl<'_> NodeOrToken<&'_ GreenNode, &'_ GreenToken>
[src]
pub fn kind(&self) -> SyntaxKind
[src]
Returns kind of this element.
pub fn text_len(self) -> TextSize
[src]
Returns the length of the text covered by this element.
impl NodeOrToken<SyntaxNode, SyntaxToken>
[src]
pub fn text_range(&self) -> TextRange
[src]
pub fn kind(&self) -> SyntaxKind
[src]
pub fn parent(&self) -> Option<SyntaxNode>
[src]
pub fn ancestors(&self) -> impl Iterator<Item = SyntaxNode>
[src]
pub fn first_token(&self) -> Option<SyntaxToken>
[src]
pub fn last_token(&self) -> Option<SyntaxToken>
[src]
pub fn next_sibling_or_token(&self) -> Option<SyntaxElement>
[src]
pub fn prev_sibling_or_token(&self) -> Option<SyntaxElement>
[src]
impl<L: Language> NodeOrToken<SyntaxNode<L>, SyntaxToken<L>>
[src]
pub fn text_range(&self) -> TextRange
[src]
pub fn kind(&self) -> L::Kind
[src]
pub fn parent(&self) -> Option<SyntaxNode<L>>
[src]
pub fn ancestors(&self) -> impl Iterator<Item = SyntaxNode<L>>
[src]
pub fn next_sibling_or_token(&self) -> Option<SyntaxElement<L>>
[src]
pub fn prev_sibling_or_token(&self) -> Option<SyntaxElement<L>>
[src]
impl<N, T> NodeOrToken<N, T>
[src]
pub fn into_node(self) -> Option<N>
[src]
pub fn into_token(self) -> Option<T>
[src]
pub fn as_node(&self) -> Option<&N>
[src]
pub fn as_token(&self) -> Option<&T>
[src]
Trait Implementations
impl<N: Clone, T: Clone> Clone for NodeOrToken<N, T>
[src]
fn clone(&self) -> NodeOrToken<N, T>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<N: Copy, T: Copy> Copy for NodeOrToken<N, T>
[src]
impl<N: Debug, T: Debug> Debug for NodeOrToken<N, T>
[src]
impl<N: Eq, T: Eq> Eq for NodeOrToken<N, T>
[src]
impl<'a> From<&'a GreenNode> for NodeOrToken<&'a GreenNode, &'a GreenToken>
[src]
fn from(node: &'a GreenNode) -> NodeOrToken<&'a GreenNode, &'a GreenToken>
[src]
impl<'a> From<&'a GreenToken> for NodeOrToken<&'a GreenNode, &'a GreenToken>
[src]
fn from(token: &'a GreenToken) -> NodeOrToken<&'a GreenNode, &'a GreenToken>
[src]
impl From<GreenNode> for NodeOrToken<GreenNode, GreenToken>
[src]
fn from(node: GreenNode) -> NodeOrToken<GreenNode, GreenToken>
[src]
impl From<GreenToken> for NodeOrToken<GreenNode, GreenToken>
[src]
fn from(token: GreenToken) -> NodeOrToken<GreenNode, GreenToken>
[src]
impl<L: Language> From<NodeOrToken<SyntaxNode, SyntaxToken>> for SyntaxElement<L>
[src]
fn from(raw: SyntaxElement) -> SyntaxElement<L>
[src]
impl<L: Language> From<NodeOrToken<SyntaxNode<L>, SyntaxToken<L>>> for SyntaxElement
[src]
fn from(element: SyntaxElement<L>) -> SyntaxElement
[src]
impl<N: Hash, T: Hash> Hash for NodeOrToken<N, T>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<N: Ord, T: Ord> Ord for NodeOrToken<N, T>
[src]
fn cmp(&self, other: &NodeOrToken<N, T>) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<N: PartialEq, T: PartialEq> PartialEq<NodeOrToken<N, T>> for NodeOrToken<N, T>
[src]
fn eq(&self, other: &NodeOrToken<N, T>) -> bool
[src]
fn ne(&self, other: &NodeOrToken<N, T>) -> bool
[src]
impl<N: PartialOrd, T: PartialOrd> PartialOrd<NodeOrToken<N, T>> for NodeOrToken<N, T>
[src]
fn partial_cmp(&self, other: &NodeOrToken<N, T>) -> Option<Ordering>
[src]
fn lt(&self, other: &NodeOrToken<N, T>) -> bool
[src]
fn le(&self, other: &NodeOrToken<N, T>) -> bool
[src]
fn gt(&self, other: &NodeOrToken<N, T>) -> bool
[src]
fn ge(&self, other: &NodeOrToken<N, T>) -> bool
[src]
impl<N, T> StructuralEq for NodeOrToken<N, T>
[src]
impl<N, T> StructuralPartialEq for NodeOrToken<N, T>
[src]
Auto Trait Implementations
impl<N, T> RefUnwindSafe for NodeOrToken<N, T> where
N: RefUnwindSafe,
T: RefUnwindSafe,
N: RefUnwindSafe,
T: RefUnwindSafe,
impl<N, T> Send for NodeOrToken<N, T> where
N: Send,
T: Send,
N: Send,
T: Send,
impl<N, T> Sync for NodeOrToken<N, T> where
N: Sync,
T: Sync,
N: Sync,
T: Sync,
impl<N, T> Unpin for NodeOrToken<N, T> where
N: Unpin,
T: Unpin,
N: Unpin,
T: Unpin,
impl<N, T> UnwindSafe for NodeOrToken<N, T> where
N: UnwindSafe,
T: UnwindSafe,
N: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,