pub struct DefaultImport {
pub module: &'static str,
pub unqualified: Unqualified,
}Expand description
One entry of the default import list.
Unqualified::Type and Unqualified::TypeAndVariants name no type of
their own because every entry using them exposes a type spelled exactly like
its module — List from List, Maybe from Maybe, Result from Result,
Task from Task, Char from Char, String from String.
Fields§
§module: &'static str§unqualified: UnqualifiedImplementations§
Source§impl DefaultImport
impl DefaultImport
Sourcepub fn to_import(&self) -> Import
pub fn to_import(&self) -> Import
The import this entry stands for, as though it had been written at the
top of the file.
The span is [NodeSpan::none]: there is no source text behind it, and a
diagnostic that would have underlined this line renders without a caret
rather than pointing at an arbitrary one.
Trait Implementations§
Source§impl Clone for DefaultImport
impl Clone for DefaultImport
Source§fn clone(&self) -> DefaultImport
fn clone(&self) -> DefaultImport
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 moreimpl Copy for DefaultImport
Source§impl Debug for DefaultImport
impl Debug for DefaultImport
impl Eq for DefaultImport
Source§impl PartialEq for DefaultImport
impl PartialEq for DefaultImport
impl StructuralPartialEq for DefaultImport
Auto Trait Implementations§
impl Freeze for DefaultImport
impl RefUnwindSafe for DefaultImport
impl Send for DefaultImport
impl Sync for DefaultImport
impl Unpin for DefaultImport
impl UnsafeUnpin for DefaultImport
impl UnwindSafe for DefaultImport
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more