Struct GreenToken
#[repr(transparent)]pub(crate) struct GreenToken {
ptr: ThinArc<GreenTokenHead, u8>,
}Expand description
Leaf node in the immutable tree.
Fields§
§ptr: ThinArc<GreenTokenHead, u8>Implementations§
§impl GreenToken
impl GreenToken
pub fn new(kind: SyntaxKind, text: &str) -> GreenToken
pub fn new(kind: SyntaxKind, text: &str) -> GreenToken
Creates new Token.
Trait Implementations§
§impl Borrow<GreenTokenData> for GreenToken
impl Borrow<GreenTokenData> for GreenToken
§impl Clone for GreenToken
impl Clone for GreenToken
§fn clone(&self) -> GreenToken
fn clone(&self) -> GreenToken
Returns a duplicate 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 more§impl Debug for GreenToken
impl Debug for GreenToken
§impl Deref for GreenToken
impl Deref for GreenToken
§impl Display for GreenToken
impl Display for GreenToken
§impl<'a> From<&'a GreenToken> for NodeOrToken<&'a GreenNodeData, &'a GreenTokenData>
impl<'a> From<&'a GreenToken> for NodeOrToken<&'a GreenNodeData, &'a GreenTokenData>
§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.
§impl From<GreenToken> for NodeOrToken<GreenNode, GreenToken>
impl From<GreenToken> for NodeOrToken<GreenNode, GreenToken>
§fn from(token: GreenToken) -> NodeOrToken<GreenNode, GreenToken>
fn from(token: GreenToken) -> NodeOrToken<GreenNode, GreenToken>
Converts to this type from the input type.
§impl Hash for GreenToken
impl Hash for GreenToken
§impl PartialEq for GreenToken
impl PartialEq for GreenToken
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more