pub struct ContainerBorrow {
pub container: String,
pub pointee: String,
pub container_scope: usize,
pub pointee_scope: usize,
pub line: usize,
}Expand description
Track pointers/references stored in containers When a pointer is stored in a container, the pointee must outlive the container
Fields§
§container: StringThe container variable (e.g., “vec”)
pointee: StringThe pointee variable (e.g., “x” in vec.push_back(&x))
container_scope: usizeScope level where the container was declared
pointee_scope: usizeScope level where the pointee was declared
line: usizeLine number for error reporting
Trait Implementations§
Source§impl Clone for ContainerBorrow
impl Clone for ContainerBorrow
Source§fn clone(&self) -> ContainerBorrow
fn clone(&self) -> ContainerBorrow
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 moreAuto Trait Implementations§
impl Freeze for ContainerBorrow
impl RefUnwindSafe for ContainerBorrow
impl Send for ContainerBorrow
impl Sync for ContainerBorrow
impl Unpin for ContainerBorrow
impl UnwindSafe for ContainerBorrow
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