Node

Struct Node 

Source
pub struct Node { /* private fields */ }
Expand description

Information about a node in the dependency graph: the file, whether it’s dirty, mtime, etc.

Implementations§

Source§

impl Node

Source

pub fn new(path: &[u8], slash_bits: u64) -> Self

Source

pub fn id(&self) -> isize

Source

pub fn set_id(&mut self, id: isize)

Source

pub fn path(&self) -> &[u8]

Source

pub fn slash_bits(&self) -> u64

Source

pub fn mtime(&self) -> TimeStamp

Source

pub fn is_dirty(&self) -> bool

Source

pub fn set_dirty(&mut self, dirty: bool)

Source

pub fn mark_dirty(&mut self)

Source

pub fn reset_state(&mut self)

Mark as not-yet-stat()ed and not dirty.

Source

pub fn mark_missing(&mut self)

Mark the Node as already-stat()ed and missing.

Source

pub fn exists(&self) -> bool

Source

pub fn status_known(&self) -> bool

Source

pub fn in_edge(&self) -> Option<EdgeIndex>

Source

pub fn set_in_edge(&mut self, edge: Option<EdgeIndex>)

Source

pub fn out_edges(&self) -> &[EdgeIndex]

Source

pub fn add_out_edge(&mut self, edge: EdgeIndex)

Source

pub fn path_decanonicalized(&self) -> Vec<u8>

Get |path()| but use slash_bits to convert back to original slash styles.

Source

pub fn stat(&mut self, disk_interface: &dyn DiskInterface) -> Result<(), String>

Return false on error.

Source

pub fn stat_if_necessary( &mut self, disk_interface: &dyn DiskInterface, ) -> Result<(), String>

Return false on error.

Auto Trait Implementations§

§

impl Freeze for Node

§

impl RefUnwindSafe for Node

§

impl Send for Node

§

impl Sync for Node

§

impl Unpin for Node

§

impl UnwindSafe for Node

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> 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, 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.