Struct PackageSources
pub struct PackageSources { /* private fields */ }Expand description
Source name mappings for resolved packages (no_std compatible).
Implementations§
§impl PackageSources
impl PackageSources
pub fn from_single_source( package_id: Id<Package>, source: &str, ) -> PackageSources
pub fn from_source_maps( source_maps: Vec<SourceMap>, package_id_to_source_map_idx: BTreeMap<Id<Package>, usize>, ) -> PackageSources
pub fn source_names(&self) -> impl Iterator<Item = &str>
pub fn source_names(&self) -> impl Iterator<Item = &str>
All unique source names.
pub fn package_source_names(
&self,
id: Id<Package>,
) -> Option<impl Iterator<Item = &str>>
pub fn package_source_names( &self, id: Id<Package>, ) -> Option<impl Iterator<Item = &str>>
Source names for a specific package.
Trait Implementations§
§impl Clone for PackageSources
impl Clone for PackageSources
§fn clone(&self) -> PackageSources
fn clone(&self) -> PackageSources
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PackageSources
impl RefUnwindSafe for PackageSources
impl Send for PackageSources
impl Sync for PackageSources
impl Unpin for PackageSources
impl UnsafeUnpin for PackageSources
impl UnwindSafe for PackageSources
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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