pub struct DetectLocation {
pub item_kind: String,
pub item_name: String,
pub symbol_path: Option<String>,
}Expand description
Location in the AST where an opportunity was detected
Fields§
§item_kind: StringItem kind (struct, impl, fn, etc.)
item_name: StringItem name
symbol_path: Option<String>Optional symbol path (e.g., “test_crate::config::Config”)
Implementations§
Source§impl DetectLocation
impl DetectLocation
pub fn new(kind: impl Into<String>, name: impl Into<String>) -> Self
pub fn struct_item(name: impl Into<String>) -> Self
pub fn impl_item(name: impl Into<String>) -> Self
pub fn fn_item(name: impl Into<String>) -> Self
pub fn with_symbol_path(self, path: impl Into<String>) -> Self
Trait Implementations§
Source§impl Clone for DetectLocation
impl Clone for DetectLocation
Source§fn clone(&self) -> DetectLocation
fn clone(&self) -> DetectLocation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DetectLocation
impl Debug for DetectLocation
Source§impl<'de> Deserialize<'de> for DetectLocation
impl<'de> Deserialize<'de> for DetectLocation
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
Auto Trait Implementations§
impl Freeze for DetectLocation
impl RefUnwindSafe for DetectLocation
impl Send for DetectLocation
impl Sync for DetectLocation
impl Unpin for DetectLocation
impl UnsafeUnpin for DetectLocation
impl UnwindSafe for DetectLocation
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