pub struct TokenSet(/* private fields */);Implementations§
Source§impl TokenSet
impl TokenSet
pub const EMPTY: TokenSet
Sourcepub const fn create(kinds: &[SyntaxKind]) -> TokenSet
pub const fn create(kinds: &[SyntaxKind]) -> TokenSet
TokenSet.create(...).
Sourcepub fn contains(self, kind: impl Into<Option<SyntaxKind>>) -> bool
pub fn contains(self, kind: impl Into<Option<SyntaxKind>>) -> bool
Accepts SyntaxKind or Option<SyntaxKind>; like Java, contains(null) is false.
pub fn intersects(self, other: TokenSet) -> bool
pub fn types(self) -> impl Iterator<Item = SyntaxKind>
Trait Implementations§
impl Copy for TokenSet
impl Eq for TokenSet
impl StructuralPartialEq for TokenSet
Auto Trait Implementations§
impl Freeze for TokenSet
impl RefUnwindSafe for TokenSet
impl Send for TokenSet
impl Sync for TokenSet
impl Unpin for TokenSet
impl UnsafeUnpin for TokenSet
impl UnwindSafe for TokenSet
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