pub struct SafetyFlowGraph {
structs: HashMap<String, HashSet<FnInfo>>,
edges: HashSet<(DefId, DefId, SafetyFlowEdge)>,
nodes: HashMap<DefId, String>,
}Expand description
Holds graph data for a single module before DOT generation.
Fields§
§structs: HashMap<String, HashSet<FnInfo>>§edges: HashSet<(DefId, DefId, SafetyFlowEdge)>§nodes: HashMap<DefId, String>Implementations§
Source§impl SafetyFlowGraph
impl SafetyFlowGraph
pub fn new() -> Self
pub fn add_node( &mut self, tcx: TyCtxt<'_>, node: FnInfo, custom_label: Option<String>, )
pub fn add_edge(&mut self, from: DefId, to: DefId, edge_type: SafetyFlowEdge)
pub fn to_dot(&self, module_name: &str) -> String
fn node_to_dot_attr( tcx: TyCtxt<'_>, node: &SafetyFlowNode, kind: FnKind, ) -> String
pub fn generate_dot_from_unit(tcx: TyCtxt<'_>, unit: &SafetyFlowUnit) -> String
Auto Trait Implementations§
impl Freeze for SafetyFlowGraph
impl RefUnwindSafe for SafetyFlowGraph
impl Send for SafetyFlowGraph
impl Sync for SafetyFlowGraph
impl Unpin for SafetyFlowGraph
impl UnwindSafe for SafetyFlowGraph
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> 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