pub struct LifecycleDetector { /* private fields */ }Expand description
Lifecycle pattern detector
Detects lifecycle pattern issues by analyzing memory lifecycle and borrow patterns.
§Detection Methods
- Drop trait: Analyzes Drop trait implementations
- Borrow violations: Detects borrow checker violations
- Lifetime violations: Detects lifetime annotation issues
- Ownership patterns: Analyzes ownership transfer and clone patterns
Implementations§
Source§impl LifecycleDetector
impl LifecycleDetector
Sourcepub fn new(config: LifecycleDetectorConfig) -> Self
pub fn new(config: LifecycleDetectorConfig) -> Self
Sourcepub fn lifecycle_config(&self) -> &LifecycleDetectorConfig
pub fn lifecycle_config(&self) -> &LifecycleDetectorConfig
Get the lifecycle detector configuration
Sourcepub fn update_lifecycle_config(&mut self, config: LifecycleDetectorConfig)
pub fn update_lifecycle_config(&mut self, config: LifecycleDetectorConfig)
Update the lifecycle detector configuration
Trait Implementations§
Source§impl Debug for LifecycleDetector
impl Debug for LifecycleDetector
Source§impl Detector for LifecycleDetector
impl Detector for LifecycleDetector
Source§fn detect(&self, allocations: &[AllocationInfo]) -> DetectionResult
fn detect(&self, allocations: &[AllocationInfo]) -> DetectionResult
Detect issues in allocations Read more
Source§fn config(&self) -> &DetectorConfig
fn config(&self) -> &DetectorConfig
Get configuration Read more
Source§fn update_config(&mut self, config: DetectorConfig) -> Result<(), DetectorError>
fn update_config(&mut self, config: DetectorConfig) -> Result<(), DetectorError>
Update configuration Read more
Auto Trait Implementations§
impl Freeze for LifecycleDetector
impl RefUnwindSafe for LifecycleDetector
impl Send for LifecycleDetector
impl Sync for LifecycleDetector
impl Unpin for LifecycleDetector
impl UnsafeUnpin for LifecycleDetector
impl UnwindSafe for LifecycleDetector
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> 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