pub struct BorrowGraph<Loc: Copy, Lbl: Clone + Ord>(_);

Implementations

creates an empty borrow graph

checks if the given reference is mutable or not

Adds a new reference to the borrow graph Fails if the id is already in use

Return the references borrowing the id reference The borrows are collected by first label in the borrow edge BTreeMap<RefID, Loc> represents all of the “full” or “epsilon” borrows (non field borrows) BTreeMap<Lbl, BTreeMap<RefID, Loc>>) represents the field borrows, collected over the first label

Return the edges between parent and child

Return the outgoing edges from id

Return the incoming edges into id

Add a strong (exact) epsilon borrow from parent_id to child_id

Add a strong (exact) field borrow from parent_id to child_id at field field

Add a weak (prefix) epsilon borrow from parent_id to child_id i.e. child_id might be borrowing from ANY field in parent_id

Add a weak (prefix) field borrow from parent_id to child_id at field field i.e. child_id might be borrowing from ANY field in parent_id rooted at field

Remove reference id from the graph Fixes any transitive borrows, so if parent borrowed by id borrowed by child After the release, parent borrowed by child

checks if self covers other

Utility for remapping the reference ids according the id_map provided If it is not in the map, the id remains the same

Joins other into self It adds only ‘unmatched’ edges from other into self, i.e. for any edge in other, if there is an edge in self that is <= than that edge, it is not added.

Checks if the current reference is in the graph

Returns all ref ids in the map

Prints out a view of the borrow graph

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.