pub enum StructuralTarget {
Function {
name: String,
},
Method {
type_name: String,
method_name: String,
},
Struct {
name: String,
},
Enum {
name: String,
},
Const {
name: String,
},
ConstMatching {
pattern: String,
},
Static {
name: String,
},
Impl {
type_name: String,
},
ImplTrait {
trait_name: String,
type_name: String,
},
Use {
path_pattern: String,
},
Custom {
query: String,
},
}Expand description
High-level structural target for locating Rust code constructs.
Variants§
Function
A function by name (top-level or in module)
Method
A method in an impl block
Struct
A struct by name
Enum
An enum by name
Const
A const item by name
ConstMatching
Const items matching a regex pattern
Static
A static item by name
Impl
An impl block for a type
ImplTrait
An impl block for a trait on a type
Use
A use declaration matching a path pattern
Custom
Custom tree-sitter query
Implementations§
Trait Implementations§
Source§impl Clone for StructuralTarget
impl Clone for StructuralTarget
Source§fn clone(&self) -> StructuralTarget
fn clone(&self) -> StructuralTarget
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 StructuralTarget
impl Debug for StructuralTarget
Source§impl PartialEq for StructuralTarget
impl PartialEq for StructuralTarget
impl Eq for StructuralTarget
impl StructuralPartialEq for StructuralTarget
Auto Trait Implementations§
impl Freeze for StructuralTarget
impl RefUnwindSafe for StructuralTarget
impl Send for StructuralTarget
impl Sync for StructuralTarget
impl Unpin for StructuralTarget
impl UnsafeUnpin for StructuralTarget
impl UnwindSafe for StructuralTarget
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.