pub struct ContentsFile { /* private fields */ }Expand description
Represents a Contents file.
A Contents file maps paths to packages. It facilitates lookups of which paths
are in which packages.
Internally, paths are stored as String because bulk operations against paths can be expensive due to more expensive comparison/equality checks.
Implementations§
Source§impl ContentsFile
impl ContentsFile
Sourcepub fn add_package_path(&mut self, path: String, package: String)
pub fn add_package_path(&mut self, path: String, package: String)
Register a path as belonging to a package.
Sourcepub fn packages_with_path(
&self,
path: &str,
) -> Box<dyn Iterator<Item = &str> + '_>
pub fn packages_with_path( &self, path: &str, ) -> Box<dyn Iterator<Item = &str> + '_>
Obtain an iterator of packages having the specified path.
Trait Implementations§
Source§impl Clone for ContentsFile
impl Clone for ContentsFile
Source§fn clone(&self) -> ContentsFile
fn clone(&self) -> ContentsFile
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§impl Debug for ContentsFile
impl Debug for ContentsFile
Source§impl Default for ContentsFile
impl Default for ContentsFile
Source§fn default() -> ContentsFile
fn default() -> ContentsFile
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ContentsFile
impl RefUnwindSafe for ContentsFile
impl Send for ContentsFile
impl Sync for ContentsFile
impl Unpin for ContentsFile
impl UnwindSafe for ContentsFile
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