pub struct UsedItems { /* private fields */ }Implementations§
Source§impl UsedItems
impl UsedItems
pub fn new() -> Self
pub fn get_module( &self, path: &ModulePath, ) -> Option<&HashMap<Ident, Visibility>>
pub fn contains_module(&self, path: &ModulePath) -> bool
pub fn get_ident(&self, path: &ModulePath, ident: &Ident) -> Option<Visibility>
pub fn get_name( &self, path: &ModulePath, name: &str, ) -> Option<(Ident, Visibility)>
Sourcepub fn insert_module(
&mut self,
path: ModulePath,
idents: HashMap<Ident, Visibility>,
) -> bool
pub fn insert_module( &mut self, path: ModulePath, idents: HashMap<Ident, Visibility>, ) -> bool
Returns true if inserted.
Sourcepub fn insert_ident(
&mut self,
path: ModulePath,
ident: Ident,
visibility: Visibility,
) -> bool
pub fn insert_ident( &mut self, path: ModulePath, ident: Ident, visibility: Visibility, ) -> bool
Returns true if inserted. Sets the visibility to max(vis, old_vis) if there was an entry.
Sourcepub fn remove_module(&mut self, path: &ModulePath) -> bool
pub fn remove_module(&mut self, path: &ModulePath) -> bool
Returns true if deleted.
pub fn is_empty(&mut self) -> bool
pub fn iter( &self, ) -> impl Iterator<Item = (&ModulePath, &HashMap<Ident, Visibility>)>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UsedItems
impl RefUnwindSafe for UsedItems
impl Send for UsedItems
impl Sync for UsedItems
impl Unpin for UsedItems
impl UnsafeUnpin for UsedItems
impl UnwindSafe for UsedItems
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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