#[non_exhaustive]pub enum ImportKind {
Use,
PubUse,
ExternCrate,
Mod,
PathReference,
MacroReference,
}Expand description
The Rust syntax that produced a dependency edge.
Multiple forms can produce the same file-to-file edge. ImportKindSet retains all of them so
later rules and reports can distinguish, for example, a private import from a public re-export.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Use
A private use path; declaration.
PubUse
A public or restricted-visibility pub use path; re-export.
ExternCrate
An extern crate name; declaration.
Mod
An outlined mod child; declaration.
PathReference
A qualified path used outside an import declaration.
MacroReference
A visible macro invocation, derive, or attribute-macro path.
Implementations§
Trait Implementations§
Source§impl Clone for ImportKind
impl Clone for ImportKind
Source§fn clone(&self) -> ImportKind
fn clone(&self) -> ImportKind
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ImportKind
impl Debug for ImportKind
Source§impl Display for ImportKind
impl Display for ImportKind
Source§impl From<ImportKind> for ImportKindSet
impl From<ImportKind> for ImportKindSet
Source§fn from(kind: ImportKind) -> Self
fn from(kind: ImportKind) -> Self
Converts to this type from the input type.
Source§impl FromIterator<ImportKind> for ImportKindSet
impl FromIterator<ImportKind> for ImportKindSet
Source§fn from_iter<T: IntoIterator<Item = ImportKind>>(kinds: T) -> Self
fn from_iter<T: IntoIterator<Item = ImportKind>>(kinds: T) -> Self
Creates a value from an iterator. Read more
Source§impl Hash for ImportKind
impl Hash for ImportKind
Source§impl Ord for ImportKind
impl Ord for ImportKind
Source§fn cmp(&self, other: &ImportKind) -> Ordering
fn cmp(&self, other: &ImportKind) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ImportKind
impl PartialEq for ImportKind
Source§impl PartialOrd for ImportKind
impl PartialOrd for ImportKind
impl Copy for ImportKind
impl Eq for ImportKind
impl StructuralPartialEq for ImportKind
Auto Trait Implementations§
impl Freeze for ImportKind
impl RefUnwindSafe for ImportKind
impl Send for ImportKind
impl Sync for ImportKind
impl Unpin for ImportKind
impl UnwindSafe for ImportKind
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§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.