[−][src]Struct librojo::path_map::PathMap
A map from paths to another type, like instance IDs, with a bit of additional data that enables removing a path and all of its child paths from the tree more quickly.
Methods
impl<T> PathMap<T>[src]
pub fn new() -> PathMap<T>[src]
pub fn get(&self, path: &Path) -> Option<&T>[src]
pub fn get_mut(&mut self, path: &Path) -> Option<&mut T>[src]
pub fn insert(&mut self, path: PathBuf, value: T)[src]
pub fn remove(&mut self, root_path: &Path) -> Option<T>[src]
pub fn descend(&self, start_path: &Path, target_path: &Path) -> PathBuf[src]
Traverses the route between start_path and target_path and returns
the path closest to target_path in the tree.
This is useful when trying to determine what paths need to be marked as altered when a change to a path is registered. Depending on the order of FS events, a file remove event could be followed by that file's directory being removed, in which case we should process that directory's parent.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> From for T[src]
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,