pub struct ParameterUsagePattern {
pub is_read: bool,
pub is_mutated: bool,
pub is_moved: bool,
pub escapes_through_return: bool,
pub is_stored: bool,
pub used_in_closure: bool,
pub used_in_loop: bool,
pub field_accesses: HashSet<String>,
pub method_calls: HashSet<String>,
pub usage_sites: Vec<UsageSite>,
}Expand description
Detailed parameter usage pattern
Fields§
§is_read: boolParameter is read without modification
is_mutated: boolParameter is modified (assigned to)
is_moved: boolParameter is moved/consumed (passed to function that takes ownership)
escapes_through_return: boolParameter escapes through return
is_stored: boolParameter is stored in a struct/container
used_in_closure: boolParameter is used in a closure
used_in_loop: boolParameter is used in loops (affects borrowing strategy)
field_accesses: HashSet<String>Nested field access patterns
method_calls: HashSet<String>Method calls on the parameter
usage_sites: Vec<UsageSite>Specific expressions where parameter is used
Trait Implementations§
Source§impl Clone for ParameterUsagePattern
impl Clone for ParameterUsagePattern
Source§fn clone(&self) -> ParameterUsagePattern
fn clone(&self) -> ParameterUsagePattern
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 ParameterUsagePattern
impl Debug for ParameterUsagePattern
Source§impl Default for ParameterUsagePattern
impl Default for ParameterUsagePattern
Source§fn default() -> ParameterUsagePattern
fn default() -> ParameterUsagePattern
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ParameterUsagePattern
impl RefUnwindSafe for ParameterUsagePattern
impl Send for ParameterUsagePattern
impl Sync for ParameterUsagePattern
impl Unpin for ParameterUsagePattern
impl UnsafeUnpin for ParameterUsagePattern
impl UnwindSafe for ParameterUsagePattern
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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