pub struct SharedModuleGraph(/* private fields */);
Implementations§
pub fn new() -> Self
pub fn get_node( &self, path: &NormalizedPathBuf, ) -> Option<MappedRwLockReadGuard<'_, Node<NormalizedPathBuf, ()>>>
Sourcepub fn depends_on(
&self,
path: &NormalizedPathBuf,
target: &NormalizedPathBuf,
) -> bool
pub fn depends_on( &self, path: &NormalizedPathBuf, target: &NormalizedPathBuf, ) -> bool
if path
directly depends on target
, returns true
, else false
.
if path
not found, returns false
.
O(1)
pub fn deep_depends_on( &self, path: &NormalizedPathBuf, target: &NormalizedPathBuf, ) -> bool
Sourcepub fn children(&self, path: &NormalizedPathBuf) -> Set<NormalizedPathBuf>
pub fn children(&self, path: &NormalizedPathBuf) -> Set<NormalizedPathBuf>
(usually) path
is not contained.
O(N)
Sourcepub fn ancestors(&self, path: &NormalizedPathBuf) -> Set<NormalizedPathBuf>
pub fn ancestors(&self, path: &NormalizedPathBuf) -> Set<NormalizedPathBuf>
(usually) path
is not contained.
O(N)
pub fn add_node_if_none(&self, path: &NormalizedPathBuf)
pub fn inc_ref( &self, referrer: &NormalizedPathBuf, depends_on: NormalizedPathBuf, ) -> Result<(), IncRefError>
pub fn ref_inner(&self) -> RwLockReadGuard<'_, ModuleGraph>
pub fn remove(&self, path: &NormalizedPathBuf)
pub fn rename_path(&self, old: &NormalizedPathBuf, new: NormalizedPathBuf)
pub fn sort(&self) -> Result<(), TopoSortError>
pub fn entries(&self) -> Set<NormalizedPathBuf>
pub fn initialize(&self)
pub fn clone_inner(&self) -> ModuleGraph
pub fn display(&self) -> String
Trait Implementations§
Source§fn clone(&self) -> SharedModuleGraph
fn clone(&self) -> SharedModuleGraph
Returns a duplicate 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§fn default() -> SharedModuleGraph
fn default() -> SharedModuleGraph
Returns the “default value” for a type. Read more
Auto Trait Implementations§
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