pub enum AnchorFlag {
None,
AtRoot,
AtScenario(String),
AtPhase(String),
AtOp {
phase: String,
op: String,
},
ContextualAuto,
ContextualRoot,
ContextualScenario,
ContextualPhase,
ContextualOp,
}Expand description
CLI anchor flag, pre-parsed from the --at / --contextual
command-line surface. Mirrors the SRD-64 §6.1 grammar.
Variants§
None
Bare --add — root anchor, no data inspection.
AtRoot
--at root.
AtScenario(String)
--at scenario:<name>.
AtPhase(String)
--at phase:<name>.
AtOp
--at op:<phase>.<op>.
ContextualAuto
--contextual auto — walk the data to derive the
deepest unique level.
ContextualRoot
--contextual root — explicit root, equivalent to
--at root but routes through the data-inspection
path so --dry-run shows the same diagnostic shape.
ContextualScenario
--contextual scenario — error if data spans
multiple scenarios.
ContextualPhase
--contextual phase — error if data spans multiple
phases.
ContextualOp
--contextual op — error today (schema gap).
Implementations§
Source§impl AnchorFlag
impl AnchorFlag
Sourcepub fn parse_at(value: &str) -> Result<AnchorFlag, String>
pub fn parse_at(value: &str) -> Result<AnchorFlag, String>
Parse the --at <scope> value form. Returns None for
unrecognised shapes.
Sourcepub fn parse_contextual(value: &str) -> Result<AnchorFlag, String>
pub fn parse_contextual(value: &str) -> Result<AnchorFlag, String>
Parse the --contextual <mode> value form.
Trait Implementations§
Source§impl Clone for AnchorFlag
impl Clone for AnchorFlag
Source§impl Debug for AnchorFlag
impl Debug for AnchorFlag
impl Eq for AnchorFlag
Source§impl PartialEq for AnchorFlag
impl PartialEq for AnchorFlag
impl StructuralPartialEq for AnchorFlag
Auto Trait Implementations§
impl Freeze for AnchorFlag
impl RefUnwindSafe for AnchorFlag
impl Send for AnchorFlag
impl Sync for AnchorFlag
impl Unpin for AnchorFlag
impl UnsafeUnpin for AnchorFlag
impl UnwindSafe for AnchorFlag
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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