pub struct SliceProjection { /* private fields */ }Expand description
An immutable, reusable mapping from project-relative Rust files to slice names.
Implementations§
Source§impl SliceProjection
impl SliceProjection
Sourcepub fn label_for(&self, path: &str) -> Option<String>
pub fn label_for(&self, path: &str) -> Option<String>
Returns the slice name selected for one normalized file path.
Sourcepub fn map_edge(&self, edge: &Edge) -> Option<MappedEdge>
pub fn map_edge(&self, edge: &Edge) -> Option<MappedEdge>
Maps one raw dependency while retaining external targets and dropping intra-slice edges.
Sourcepub fn project(&self, graph: &Graph) -> ProjectedGraph
pub fn project(&self, graph: &Graph) -> ProjectedGraph
Projects and cumulates a complete extracted graph through this slice definition.
Sourcepub fn slice_labels(&self, graph: &Graph) -> Vec<String>
pub fn slice_labels(&self, graph: &Graph) -> Vec<String>
Returns every selected internal slice, including isolated files represented by self-edges.
Trait Implementations§
Source§impl Clone for SliceProjection
impl Clone for SliceProjection
Source§fn clone(&self) -> SliceProjection
fn clone(&self) -> SliceProjection
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 moreAuto Trait Implementations§
impl Freeze for SliceProjection
impl RefUnwindSafe for SliceProjection
impl Send for SliceProjection
impl Sync for SliceProjection
impl Unpin for SliceProjection
impl UnwindSafe for SliceProjection
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