Struct SharedModuleGraph

Source
pub struct SharedModuleGraph(/* private fields */);

Implementations§

Source§

impl SharedModuleGraph

Source

pub fn new() -> Self

Source

pub fn get_node( &self, path: &NormalizedPathBuf, ) -> Option<MappedRwLockReadGuard<'_, Node<NormalizedPathBuf, ()>>>

Source

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)

Source

pub fn deep_depends_on( &self, path: &NormalizedPathBuf, target: &NormalizedPathBuf, ) -> bool

Source

pub fn children(&self, path: &NormalizedPathBuf) -> Set<NormalizedPathBuf>

(usually) path is not contained. O(N)

Source

pub fn ancestors(&self, path: &NormalizedPathBuf) -> Set<NormalizedPathBuf>

(usually) path is not contained. O(N)

Source

pub fn add_node_if_none(&self, path: &NormalizedPathBuf)

Source

pub fn inc_ref( &self, referrer: &NormalizedPathBuf, depends_on: NormalizedPathBuf, ) -> Result<(), IncRefError>

Source

pub fn ref_inner(&self) -> RwLockReadGuard<'_, ModuleGraph>

Source

pub fn remove(&self, path: &NormalizedPathBuf)

Source

pub fn rename_path(&self, old: &NormalizedPathBuf, new: NormalizedPathBuf)

Source

pub fn sort(&self) -> Result<(), TopoSortError>

Source

pub fn entries(&self) -> Set<NormalizedPathBuf>

Source

pub fn initialize(&self)

Source

pub fn clone_inner(&self) -> ModuleGraph

Source

pub fn display(&self) -> String

Trait Implementations§

Source§

impl Clone for SharedModuleGraph

Source§

fn clone(&self) -> SharedModuleGraph

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SharedModuleGraph

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SharedModuleGraph

Source§

fn default() -> SharedModuleGraph

Returns the “default value” for a type. Read more
Source§

impl Display for SharedModuleGraph

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl IntoIterator for SharedModuleGraph

Source§

type Item = Node<NormalizedPathBuf, ()>

The type of the elements being iterated over.
Source§

type IntoIter = IntoIter<<SharedModuleGraph as IntoIterator>::Item>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.