pub enum UnionTagMode {
Eure,
Repr,
}Expand description
Mode for union tag resolution.
This determines how variant tags are resolved during union parsing:
Eure: Use$variantextension and untagged matching (for native Eure documents)Repr: Use onlyVariantReprpatterns (for JSON/YAML imports)
These modes are mutually exclusive to avoid false positives.
Variants§
Eure
Eure mode: Use $variant extension or untagged matching.
This is the default mode for native Eure documents.
- If
$variantextension is present, use it to determine the variant - Otherwise, use untagged matching (try all variants)
VariantRepris ignored in this mode
Repr
Repr mode: Use only VariantRepr patterns.
This mode is for documents imported from JSON/YAML.
- Extract variant tag using
VariantRepr(External, Internal, Adjacent) $variantextension is ignored in this mode- If repr doesn’t extract a tag, error (no untagged fallback)
Trait Implementations§
Source§impl Clone for UnionTagMode
impl Clone for UnionTagMode
Source§fn clone(&self) -> UnionTagMode
fn clone(&self) -> UnionTagMode
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 UnionTagMode
impl Debug for UnionTagMode
Source§impl Default for UnionTagMode
impl Default for UnionTagMode
Source§fn default() -> UnionTagMode
fn default() -> UnionTagMode
Returns the “default value” for a type. Read more
Source§impl Hash for UnionTagMode
impl Hash for UnionTagMode
Source§impl PartialEq for UnionTagMode
impl PartialEq for UnionTagMode
impl Copy for UnionTagMode
impl Eq for UnionTagMode
impl StructuralPartialEq for UnionTagMode
Auto Trait Implementations§
impl Freeze for UnionTagMode
impl RefUnwindSafe for UnionTagMode
impl Send for UnionTagMode
impl Sync for UnionTagMode
impl Unpin for UnionTagMode
impl UnwindSafe for UnionTagMode
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> 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.