pub enum Archetype {
Show 15 variants
SccMutual,
StructuralRecursion,
MatchDispatcher,
PipelineResult,
ManualResultAdapter,
RendererFormatter,
MatchOnValue,
Orchestration,
EffectfulLeaf,
LetPipeline,
ConstructorWrapper,
DataAsFunction,
TrivialHelper,
PureExpression,
Unclassified,
}Expand description
Per-fn archetype label. Multi-label per fn — classify returns
a Vec<Archetype>; primary_label picks one by the precedence
declared in Archetype::all. Stringified only at presentation
boundaries (renderer, JSON, LSP hover).
Stage 3 of #232 (“Shape”) replaced the prior &'static str-keyed
representation with this typed enum. The string forms are still
the public JSON / text contract; as_str / parse translate
at the edges.
Variants§
SccMutual
StructuralRecursion
MatchDispatcher
PipelineResult
ManualResultAdapter
RendererFormatter
MatchOnValue
Orchestration
EffectfulLeaf
LetPipeline
ConstructorWrapper
DataAsFunction
TrivialHelper
PureExpression
Unclassified
Fallback for fn bodies that don’t match any classifier rule.
Surfaces as "unclassified" in JSON / text output.
Implementations§
Source§impl Archetype
impl Archetype
Sourcepub fn all() -> &'static [Archetype]
pub fn all() -> &'static [Archetype]
Precedence-ordered list. primary_label walks this in order;
the first archetype that fires on a fn wins. Renderers also
use this for histogram tie-breaking.
Trait Implementations§
impl Copy for Archetype
impl Eq for Archetype
Source§impl Ord for Archetype
impl Ord for Archetype
1.21.0 (const: unstable) · 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 PartialOrd for Archetype
impl PartialOrd for Archetype
impl StructuralPartialEq for Archetype
Auto Trait Implementations§
impl Freeze for Archetype
impl RefUnwindSafe for Archetype
impl Send for Archetype
impl Sync for Archetype
impl Unpin for Archetype
impl UnsafeUnpin for Archetype
impl UnwindSafe for Archetype
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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
Compare self to
key and return true if they are equal.