pub struct LuaSyntaxId { /* private fields */ }
Implementations§
Source§impl LuaSyntaxId
impl LuaSyntaxId
pub fn new(kind: LuaKind, range: TextRange) -> Self
pub fn from_ptr(ptr: LuaSyntaxNodePtr) -> Self
pub fn from_node(node: &LuaSyntaxNode) -> Self
pub fn from_token(token: &LuaSyntaxToken) -> Self
pub fn get_kind(&self) -> LuaSyntaxKind
pub fn get_token_kind(&self) -> LuaTokenKind
pub fn is_token(&self) -> bool
pub fn is_node(&self) -> bool
pub fn get_range(&self) -> TextRange
pub fn to_node(&self, tree: &LuaSyntaxTree) -> Option<LuaSyntaxNode>
pub fn to_node_from_root(&self, root: &LuaSyntaxNode) -> Option<LuaSyntaxNode>
pub fn to_token(&self, tree: &LuaSyntaxTree) -> Option<LuaSyntaxToken>
pub fn to_token_from_root(&self, root: &LuaSyntaxNode) -> Option<LuaSyntaxToken>
pub fn to_node_at_range( root: &LuaSyntaxNode, range: TextRange, ) -> Option<LuaSyntaxNode>
Trait Implementations§
Source§impl Clone for LuaSyntaxId
impl Clone for LuaSyntaxId
Source§fn clone(&self) -> LuaSyntaxId
fn clone(&self) -> LuaSyntaxId
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 moreSource§impl Debug for LuaSyntaxId
impl Debug for LuaSyntaxId
Source§impl<'de> Deserialize<'de> for LuaSyntaxId
impl<'de> Deserialize<'de> for LuaSyntaxId
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for LuaSyntaxId
impl Hash for LuaSyntaxId
Source§impl PartialEq for LuaSyntaxId
impl PartialEq for LuaSyntaxId
Source§impl Serialize for LuaSyntaxId
impl Serialize for LuaSyntaxId
impl Copy for LuaSyntaxId
impl Eq for LuaSyntaxId
impl StructuralPartialEq for LuaSyntaxId
Auto Trait Implementations§
impl Freeze for LuaSyntaxId
impl RefUnwindSafe for LuaSyntaxId
impl Send for LuaSyntaxId
impl Sync for LuaSyntaxId
impl Unpin for LuaSyntaxId
impl UnwindSafe for LuaSyntaxId
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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