[−][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.
Implementations
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
impl<T: Debug> Debug for PathMap<T>[src]
impl<T> Default for PathMap<T>[src]
impl<T> Serialize for PathMap<T> where
T: Serialize, [src]
T: Serialize,
Auto Trait Implementations
impl<T> RefUnwindSafe for PathMap<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for PathMap<T> where
T: Send,
T: Send,
impl<T> Sync for PathMap<T> where
T: Sync,
T: Sync,
impl<T> Unpin for PathMap<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for PathMap<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,