Struct test_generation::borrow_graph::BorrowGraph
source · pub struct BorrowGraph { /* private fields */ }
Expand description
The BorrowGraph
stores information sufficient to determine whether the instruction
of a bytecode instruction that interacts with references is memory safe.
Implementations§
source§impl BorrowGraph
impl BorrowGraph
sourcepub fn new(num_locals: u8) -> BorrowGraph
pub fn new(num_locals: u8) -> BorrowGraph
Construct a new BorrowGraph
given the number of locals it has
sourcepub fn fresh_partition(&mut self, n: (u16, Mutability)) -> Result<(), String>
pub fn fresh_partition(&mut self, n: (u16, Mutability)) -> Result<(), String>
Add a new partition to the graph containing nonce n
This operation may fail with an error a fresh partition ID
cannot be chosen.
sourcepub fn partition_mutability(
&self,
partition_id: u16
) -> Result<Mutability, String>
pub fn partition_mutability( &self, partition_id: u16 ) -> Result<Mutability, String>
Determine whether a partition is mutable, immutable, or either. This operation may fail with an error if the given partition does not exist in the graph.
Trait Implementations§
source§impl Clone for BorrowGraph
impl Clone for BorrowGraph
source§fn clone(&self) -> BorrowGraph
fn clone(&self) -> BorrowGraph
Returns a copy 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 moresource§impl Debug for BorrowGraph
impl Debug for BorrowGraph
source§impl PartialEq<BorrowGraph> for BorrowGraph
impl PartialEq<BorrowGraph> for BorrowGraph
source§fn eq(&self, other: &BorrowGraph) -> bool
fn eq(&self, other: &BorrowGraph) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for BorrowGraph
impl StructuralEq for BorrowGraph
impl StructuralPartialEq for BorrowGraph
Auto Trait Implementations§
impl RefUnwindSafe for BorrowGraph
impl Send for BorrowGraph
impl Sync for BorrowGraph
impl Unpin for BorrowGraph
impl UnwindSafe for BorrowGraph
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.