pub enum TextObjectKind {
Function,
Class,
Argument,
Conditional,
Loop,
Comment,
Block,
}Expand description
Kind of semantic text object.
Maps to treesitter query capture prefixes (e.g., Function -> "function").
Variants§
Function
Function or method body.
Class
Class, struct, enum, trait, or impl block.
Argument
Function argument or parameter.
Conditional
Conditional (if/else, match/switch).
Loop
Loop (for, while, loop).
Comment
Comment (line or block).
Block
Block (braces, indented block).
Implementations§
Source§impl TextObjectKind
impl TextObjectKind
Sourcepub const fn capture_name(&self) -> &'static str
pub const fn capture_name(&self) -> &'static str
Get the treesitter capture name prefix for this kind.
Used to construct capture names like "function.inner" or "class.outer".
Trait Implementations§
Source§impl Clone for TextObjectKind
impl Clone for TextObjectKind
Source§fn clone(&self) -> TextObjectKind
fn clone(&self) -> TextObjectKind
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 TextObjectKind
impl Debug for TextObjectKind
Source§impl Display for TextObjectKind
impl Display for TextObjectKind
Source§impl Hash for TextObjectKind
impl Hash for TextObjectKind
Source§impl PartialEq for TextObjectKind
impl PartialEq for TextObjectKind
impl Copy for TextObjectKind
impl Eq for TextObjectKind
impl StructuralPartialEq for TextObjectKind
Auto Trait Implementations§
impl Freeze for TextObjectKind
impl RefUnwindSafe for TextObjectKind
impl Send for TextObjectKind
impl Sync for TextObjectKind
impl Unpin for TextObjectKind
impl UnsafeUnpin for TextObjectKind
impl UnwindSafe for TextObjectKind
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