pub struct ImportedName { /* private fields */ }Expand description
One imported binding, retaining the source name and local alias.
Implementations§
Source§impl ImportedName
impl ImportedName
Sourcepub fn new(
source_name: impl Into<String>,
local_name: impl Into<String>,
) -> Self
pub fn new( source_name: impl Into<String>, local_name: impl Into<String>, ) -> Self
Creates an imported source/local name pair.
Sourcepub fn source_name(&self) -> &str
pub fn source_name(&self) -> &str
Returns the name exported by the source package.
Sourcepub fn local_name(&self) -> &str
pub fn local_name(&self) -> &str
Returns the name bound in the importing package.
Trait Implementations§
Source§impl Clone for ImportedName
impl Clone for ImportedName
Source§impl Debug for ImportedName
impl Debug for ImportedName
impl Eq for ImportedName
Source§impl PartialEq for ImportedName
impl PartialEq for ImportedName
impl StructuralPartialEq for ImportedName
Auto Trait Implementations§
impl Freeze for ImportedName
impl RefUnwindSafe for ImportedName
impl Send for ImportedName
impl Sync for ImportedName
impl Unpin for ImportedName
impl UnsafeUnpin for ImportedName
impl UnwindSafe for ImportedName
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