[−][src]Struct cargo::core::source::SourceMap
A HashMap
of SourceId
-> Box<Source>
Methods
impl<'src> SourceMap<'src>
[src]
pub fn new() -> SourceMap<'src>
[src]
Create an empty map
pub fn contains(&self, id: SourceId) -> bool
[src]
Like HashMap::contains_key
pub fn get(&self, id: SourceId) -> Option<&(dyn Source + 'src)>
[src]
Like HashMap::get
pub fn get_mut(&mut self, id: SourceId) -> Option<&mut (dyn Source + 'src)>
[src]
Like HashMap::get_mut
pub fn get_by_package_id(
&self,
pkg_id: PackageId
) -> Option<&(dyn Source + 'src)>
[src]
&self,
pkg_id: PackageId
) -> Option<&(dyn Source + 'src)>
Like HashMap::get
, but first calculates the SourceId
from a
PackageId
pub fn insert(&mut self, source: Box<dyn Source + 'src>)
[src]
Like HashMap::insert
, but derives the SourceId key from the Source
pub fn is_empty(&self) -> bool
[src]
Like HashMap::is_empty
pub fn len(&self) -> usize
[src]
Like HashMap::len
pub fn sources<'a>(&'a self) -> impl Iterator<Item = &'a Box<dyn Source + 'src>>
[src]
Like HashMap::values
pub fn sources_mut<'a>(
&'a mut self
) -> impl Iterator<Item = (&'a SourceId, &'a mut (dyn Source + 'src))>
[src]
&'a mut self
) -> impl Iterator<Item = (&'a SourceId, &'a mut (dyn Source + 'src))>
Like HashMap::iter_mut
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom 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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto 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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same for T
type Output = T
Should always be Self