pub struct BorrowAnalyzer { /* private fields */ }
Expand description
Borrow analysis system
Implementations§
Source§impl BorrowAnalyzer
impl BorrowAnalyzer
Sourcepub fn track_borrow(
&self,
ptr: usize,
borrow_type: BorrowType,
var_name: &str,
) -> BorrowId
pub fn track_borrow( &self, ptr: usize, borrow_type: BorrowType, var_name: &str, ) -> BorrowId
Track a new borrow
Sourcepub fn end_borrow(&self, borrow_id: BorrowId)
pub fn end_borrow(&self, borrow_id: BorrowId)
End a borrow
Sourcepub fn get_active_borrows(&self, ptr: usize) -> Vec<BorrowInfo>
pub fn get_active_borrows(&self, ptr: usize) -> Vec<BorrowInfo>
Get current active borrows for a pointer
Sourcepub fn get_borrow_statistics(&self) -> BorrowStatistics
pub fn get_borrow_statistics(&self) -> BorrowStatistics
Get borrow statistics
Sourcepub fn get_conflicts(&self) -> Vec<BorrowConflict>
pub fn get_conflicts(&self) -> Vec<BorrowConflict>
Get all detected conflicts
Sourcepub fn analyze_borrow_patterns(&self) -> BorrowPatternAnalysis
pub fn analyze_borrow_patterns(&self) -> BorrowPatternAnalysis
Analyze borrow patterns
Auto Trait Implementations§
impl !Freeze for BorrowAnalyzer
impl RefUnwindSafe for BorrowAnalyzer
impl Send for BorrowAnalyzer
impl Sync for BorrowAnalyzer
impl Unpin for BorrowAnalyzer
impl UnwindSafe for BorrowAnalyzer
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