#[non_exhaustive]pub struct PackageIndex<'a> { /* private fields */ }
Implementations§
Source§impl<'a> PackageIndex<'a>
impl<'a> PackageIndex<'a>
Sourcepub fn from_crate(crate_: &'a Crate) -> Self
pub fn from_crate(crate_: &'a Crate) -> Self
Create a new PackageIndex
for a given crate, in order to query it with Trustfall.
Prefer the PackageIndex::from_storage
function when possible, since it makes features
information available as well. Values constructed with the PackageIndex::from_crate
function will appear to have no information on features or other manifest data.
Sourcepub fn from_storage(storage: &'a PackageStorage) -> Self
pub fn from_storage(storage: &'a PackageStorage) -> Self
Create a new PackageIndex
for a given crate, in order to query it with Trustfall.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for PackageIndex<'a>
impl<'a> RefUnwindSafe for PackageIndex<'a>
impl<'a> Send for PackageIndex<'a>
impl<'a> Sync for PackageIndex<'a>
impl<'a> Unpin for PackageIndex<'a>
impl<'a> UnwindSafe for PackageIndex<'a>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more