pub struct AbbsTree(/* private fields */);Implementations§
Source§impl AbbsTree
impl AbbsTree
Sourcepub fn sections(&self) -> AbbsResult<Vec<SectionName>>
pub fn sections(&self) -> AbbsResult<Vec<SectionName>>
Iterates over sections in the tree, e.g. app-admin and runtime-display.
Sourcepub fn package<S: AsRef<str>>(
&self,
section: &SectionName,
name: S,
) -> Option<AbbsSourcePackage>
pub fn package<S: AsRef<str>>( &self, section: &SectionName, name: S, ) -> Option<AbbsSourcePackage>
Creates a source package accessor.
Sourcepub fn all_packages(&self) -> AbbsResult<Vec<AbbsSourcePackage>>
pub fn all_packages(&self) -> AbbsResult<Vec<AbbsSourcePackage>>
Iterates over all source packages and creates accessors.
Sourcepub fn section_packages(
&self,
section: &SectionName,
) -> AbbsResult<Vec<AbbsSourcePackage>>
pub fn section_packages( &self, section: &SectionName, ) -> AbbsResult<Vec<AbbsSourcePackage>>
Iterates over all source packages in a certain section and creates accessors.
Sourcepub fn find_package<S: AsRef<str>>(
&self,
name: S,
) -> AbbsResult<AbbsSourcePackage>
pub fn find_package<S: AsRef<str>>( &self, name: S, ) -> AbbsResult<AbbsSourcePackage>
Finds a source package and creates an accessor for it.
Sourcepub fn find_subpackage<S: AsRef<str>>(
&self,
name: S,
) -> AbbsResult<AbbsSubPackage>
pub fn find_subpackage<S: AsRef<str>>( &self, name: S, ) -> AbbsResult<AbbsSubPackage>
Returns a subpackage with the given name.
This will first try to find the package in the source package with the same name. If failed to do so, it will fallback to search the whole tree.
Thus this is a very high-cost operation and you must use it carefully.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AbbsTree
impl RefUnwindSafe for AbbsTree
impl Send for AbbsTree
impl Sync for AbbsTree
impl Unpin for AbbsTree
impl UnwindSafe for AbbsTree
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