Struct cargo_hackerman::feat_graph::FeatGraph
source · [−]pub struct FeatGraph<'a> {
pub root: NodeIndex,
pub workspace_members: BTreeSet<Pid<'a>>,
pub features: Graph<Feature<'a>, Link>,
pub fid_cache: BTreeMap<Fid<'a>, NodeIndex>,
pub platforms: Vec<&'a str>,
pub cfgs: Vec<Cfg>,
pub triggers: BTreeMap<Pid<'a>, Vec<Trigger<'a>>>,
pub focus_nodes: Option<BTreeSet<NodeIndex>>,
pub focus_edges: Option<BTreeSet<EdgeIndex>>,
pub focus_targets: Option<BTreeSet<NodeIndex>>,
/* private fields */
}Fields
root: NodeIndexroot node, should be 0
workspace_members: BTreeSet<Pid<'a>>set of workspace members
features: Graph<Feature<'a>, Link>a dependency graph between features Feature = Fid + decoration if it’s external, internal or root
fid_cache: BTreeMap<Fid<'a>, NodeIndex>platforms: Vec<&'a str>cfgs: Vec<Cfg>triggers: BTreeMap<Pid<'a>, Vec<Trigger<'a>>>focus_nodes: Option<BTreeSet<NodeIndex>>focus_edges: Option<BTreeSet<EdgeIndex>>focus_targets: Option<BTreeSet<NodeIndex>>Implementations
sourceimpl<'a> FeatGraph<'a>
impl<'a> FeatGraph<'a>
pub fn fid_index(&mut self, fid: Fid<'a>) -> NodeIndex
sourcepub fn base_node(&self, node: NodeIndex) -> Option<NodeIndex>
pub fn base_node(&self, node: NodeIndex) -> Option<NodeIndex>
for any node find node for the base of this package
pub fn shrink_to_target(&mut self) -> Result<()>
pub fn init(
meta: &'a Metadata,
platforms: Vec<&'a str>,
cfgs: Vec<Cfg>
) -> Result<Self>
pub fn optimize(&mut self, no_transitive: bool) -> Result<()>
pub fn rebuild_cache(&mut self) -> Result<()>
pub fn add_edge<A, B>(
&mut self,
a: A,
b: B,
optional: bool,
kind: DepKindInfo
) -> Result<NodeIndex> where
A: HasIndex<'a>,
B: HasIndex<'a>,
Trait Implementations
sourceimpl<'a> Labeller<'a, NodeIndex<u32>, EdgeIndex<u32>> for FeatGraph<'a>
impl<'a> Labeller<'a, NodeIndex<u32>, EdgeIndex<u32>> for FeatGraph<'a>
sourcefn node_id(&'a self, n: &NodeIndex) -> Id<'a>
fn node_id(&'a self, n: &NodeIndex) -> Id<'a>
Maps n to a unique identifier with respect to self. The
implementer is responsible for ensuring that the returned name
is a valid DOT identifier. Read more
sourcefn node_shape(&'a self, node: &NodeIndex) -> Option<LabelText<'a>>
fn node_shape(&'a self, node: &NodeIndex) -> Option<LabelText<'a>>
Maps n to one of the graphviz shape names. If None
is returned, no shape attribute is specified. Read more
sourcefn node_label(&'a self, n: &NodeIndex) -> LabelText<'a>
fn node_label(&'a self, n: &NodeIndex) -> LabelText<'a>
Maps n to a label that will be used in the rendered output.
The label need not be unique, and may be the empty string; the
default is just the output from node_id. Read more
sourcefn edge_label(&'a self, e: &EdgeIndex) -> LabelText<'a>
fn edge_label(&'a self, e: &EdgeIndex) -> LabelText<'a>
Maps e to a label that will be used in the rendered output.
The label need not be unique, and may be the empty string; the
default is in fact the empty string. Read more
sourcefn node_style(&'a self, n: &NodeIndex) -> Style
fn node_style(&'a self, n: &NodeIndex) -> Style
Maps n to a style that will be used in the rendered output.
sourcefn node_color(&'a self, node: &NodeIndex) -> Option<LabelText<'a>>
fn node_color(&'a self, node: &NodeIndex) -> Option<LabelText<'a>>
Maps n to one of the graphviz color names. If None
is returned, no color attribute is specified. Read more
sourcefn edge_end_arrow(&'a self, _e: &EdgeIndex) -> Arrow
fn edge_end_arrow(&'a self, _e: &EdgeIndex) -> Arrow
Maps e to arrow style that will be used on the end of an edge.
Defaults to default arrow style. Read more
sourcefn edge_start_arrow(&'a self, _e: &EdgeIndex) -> Arrow
fn edge_start_arrow(&'a self, _e: &EdgeIndex) -> Arrow
Maps e to arrow style that will be used on the end of an edge.
Defaults to default arrow style. Read more
sourcefn edge_style(&'a self, e: &EdgeIndex) -> Style
fn edge_style(&'a self, e: &EdgeIndex) -> Style
Maps e to a style that will be used in the rendered output.
sourcefn edge_color(&'a self, e: &EdgeIndex) -> Option<LabelText<'a>>
fn edge_color(&'a self, e: &EdgeIndex) -> Option<LabelText<'a>>
Maps e to one of the graphviz color names. If None
is returned, no color attribute is specified. Read more
Auto Trait Implementations
impl<'a> RefUnwindSafe for FeatGraph<'a>
impl<'a> Send for FeatGraph<'a>
impl<'a> Sync for FeatGraph<'a>
impl<'a> Unpin for FeatGraph<'a>
impl<'a> UnwindSafe for FeatGraph<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more