pub enum ImportGroup {
Stdlib,
External,
Internal,
}Expand description
Which logical group an import belongs to (language-specific).
Ordering matches conventional import group sorting: Stdlib (first) < External < Internal (last)
Language mapping:
- TS/JS/TSX: External (no
.prefix), Internal (./..prefix) - Python: Stdlib, External (third-party), Internal (relative
./..) - Rust: Stdlib (std/core/alloc), External (crates), Internal (crate/self/super)
- Go: Stdlib (no dots in path), External (dots in path)
Variants§
Stdlib
Standard library (Python stdlib, Rust std/core/alloc, Go stdlib). TS/JS don’t use this group.
External
External/third-party packages.
Internal
Internal/relative imports (TS relative, Python local, Rust crate/self/super).
Implementations§
Trait Implementations§
Source§impl Clone for ImportGroup
impl Clone for ImportGroup
Source§fn clone(&self) -> ImportGroup
fn clone(&self) -> ImportGroup
Returns a duplicate 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 ImportGroup
impl Debug for ImportGroup
Source§impl Hash for ImportGroup
impl Hash for ImportGroup
Source§impl Ord for ImportGroup
impl Ord for ImportGroup
Source§fn cmp(&self, other: &ImportGroup) -> Ordering
fn cmp(&self, other: &ImportGroup) -> 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 ImportGroup
impl PartialEq for ImportGroup
Source§impl PartialOrd for ImportGroup
impl PartialOrd for ImportGroup
impl Copy for ImportGroup
impl Eq for ImportGroup
impl StructuralPartialEq for ImportGroup
Auto Trait Implementations§
impl Freeze for ImportGroup
impl RefUnwindSafe for ImportGroup
impl Send for ImportGroup
impl Sync for ImportGroup
impl Unpin for ImportGroup
impl UnsafeUnpin for ImportGroup
impl UnwindSafe for ImportGroup
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,
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