Struct rowan::GreenToken
source · pub struct GreenToken { /* private fields */ }
Expand description
Leaf node in the immutable tree.
Implementations§
source§impl GreenToken
impl GreenToken
sourcepub fn new(kind: SyntaxKind, text: &str) -> GreenToken
pub fn new(kind: SyntaxKind, text: &str) -> GreenToken
Creates new Token.
Methods from Deref<Target = GreenTokenData>§
sourcepub fn kind(&self) -> SyntaxKind
pub fn kind(&self) -> SyntaxKind
Kind of this Token.
Trait Implementations§
source§impl Borrow<GreenTokenData> for GreenToken
impl Borrow<GreenTokenData> for GreenToken
source§fn borrow(&self) -> &GreenTokenData
fn borrow(&self) -> &GreenTokenData
Immutably borrows from an owned value. Read more
source§impl Clone for GreenToken
impl Clone for GreenToken
source§fn clone(&self) -> GreenToken
fn clone(&self) -> GreenToken
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for GreenToken
impl Debug for GreenToken
source§impl Deref for GreenToken
impl Deref for GreenToken
§type Target = GreenTokenData
type Target = GreenTokenData
The resulting type after dereferencing.
source§fn deref(&self) -> &GreenTokenData
fn deref(&self) -> &GreenTokenData
Dereferences the value.
source§impl Display for GreenToken
impl Display for GreenToken
source§impl<'a> From<&'a GreenToken> for NodeOrToken<&'a GreenNodeData, &'a GreenTokenData>
impl<'a> From<&'a GreenToken> for NodeOrToken<&'a GreenNodeData, &'a GreenTokenData>
source§fn from(
token: &'a GreenToken,
) -> NodeOrToken<&'a GreenNodeData, &'a GreenTokenData>
fn from( token: &'a GreenToken, ) -> NodeOrToken<&'a GreenNodeData, &'a GreenTokenData>
Converts to this type from the input type.
source§impl From<GreenToken> for NodeOrToken<GreenNode, GreenToken>
impl From<GreenToken> for NodeOrToken<GreenNode, GreenToken>
source§fn from(token: GreenToken) -> NodeOrToken<GreenNode, GreenToken>
fn from(token: GreenToken) -> NodeOrToken<GreenNode, GreenToken>
Converts to this type from the input type.
source§impl Hash for GreenToken
impl Hash for GreenToken
source§impl PartialEq for GreenToken
impl PartialEq for GreenToken
source§fn eq(&self, other: &GreenToken) -> bool
fn eq(&self, other: &GreenToken) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for GreenToken
impl StructuralPartialEq for GreenToken
Auto Trait Implementations§
impl Freeze for GreenToken
impl RefUnwindSafe for GreenToken
impl Send for GreenToken
impl Sync for GreenToken
impl Unpin for GreenToken
impl UnwindSafe for GreenToken
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)