pub struct UseItem<'a> { /* private fields */ }Implementations§
Source§impl UseItem<'_>
impl UseItem<'_>
Sourcepub fn as_name(&self) -> &str
pub fn as_name(&self) -> &str
e.g.
pub use foo::bar; -> as_name == “bar”, source == “foo::bar”, is_glob == false
pub use foo::*; -> as_name == “foo”, source == “foo”, is_glob == true
pub use foo::bar as baz; -> as_name == “baz”, source == “foo::bar”, is_glob == false
Sourcepub fn source(&self) -> &str
pub fn source(&self) -> &str
e.g.
pub use foo::bar; -> as_name == “bar”, source == “foo::bar”, is_glob == false
pub use foo::*; -> as_name == “foo”, source == “foo”, is_glob == true
pub use foo::bar as baz; -> as_name == “baz”, source == “foo::bar”, is_glob == false
pub fn is_glob(&self) -> bool
Trait Implementations§
Source§impl<'a> CrateItem<'a> for UseItem<'a>
impl<'a> CrateItem<'a> for UseItem<'a>
type Inner = Use
fn downcast(inner: &ItemEnum) -> Option<&Self::Inner>
fn new(krate: &'a Crate, item: &'a Item, import: &'a Self::Inner) -> Self
fn item(&self) -> &'a Item
fn inner(&self) -> &'a Self::Inner
fn krate(&self) -> &'a Crate
fn is_public(&self) -> bool
fn is_crate_item(&self) -> bool
fn is_root_item(&self) -> bool
fn is_external_item(&self) -> bool
fn id(&'a self) -> &'a Id
fn module(&self) -> Option<ModuleItem<'a>>
Auto Trait Implementations§
impl<'a> Freeze for UseItem<'a>
impl<'a> RefUnwindSafe for UseItem<'a>
impl<'a> Send for UseItem<'a>
impl<'a> Sync for UseItem<'a>
impl<'a> Unpin for UseItem<'a>
impl<'a> UnwindSafe for UseItem<'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