pub enum DeclarationGroup {
Show 14 variants
Tools,
ClassNames,
Extends,
Docstrings,
Signals,
Enums,
Consts,
StaticVars,
Exports,
PubVars,
PrvVars,
OnreadyPubVars,
OnreadyPrvVars,
Others,
}Expand description
The groups a project may put in an order of its own.
This is gdtoolkit’s vocabulary rather than gdck’s, deliberately: it
exists so a project that pinned class-definitions-order in a gdlintrc
keeps the order it chose. gdck sorts more finely than these fourteen
names can express — it knows _ready() from _process() from a static
function, where gdtoolkit has only others — and that finer order is
kept within whichever position Others is given.
Variants§
Tools
ClassNames
Extends
Docstrings
Signals
Enums
Consts
StaticVars
Exports
PubVars
PrvVars
OnreadyPubVars
OnreadyPrvVars
Others
Implementations§
Source§impl DeclarationGroup
impl DeclarationGroup
Sourcepub const GUIDE_ORDER: [Self; 14]
pub const GUIDE_ORDER: [Self; 14]
The order the style guide gives, which is what code-order checks
unless a project names one of its own.
Nothing reads the variants’ declaration order — there is no Ord here
and no cast to an integer — so this is the single place that says what
the default order is. It had been implicit in the Bucket enum over
in the linter, which left nothing to print and nothing to check a
document against, and the documented example drifted out of step as a
result: it showed staticvars last, where the guide puts it eighth,
directly after constants.
Trait Implementations§
Source§impl Clone for DeclarationGroup
impl Clone for DeclarationGroup
Source§fn clone(&self) -> DeclarationGroup
fn clone(&self) -> DeclarationGroup
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for DeclarationGroup
Source§impl Debug for DeclarationGroup
impl Debug for DeclarationGroup
impl Eq for DeclarationGroup
Source§impl PartialEq for DeclarationGroup
impl PartialEq for DeclarationGroup
impl StructuralPartialEq for DeclarationGroup
Auto Trait Implementations§
impl Freeze for DeclarationGroup
impl RefUnwindSafe for DeclarationGroup
impl Send for DeclarationGroup
impl Sync for DeclarationGroup
impl Unpin for DeclarationGroup
impl UnsafeUnpin for DeclarationGroup
impl UnwindSafe for DeclarationGroup
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.