pub enum ReferenceMode {
Strict,
Lenient,
}Expand description
Reference resolution mode for controlling validation behavior.
Determines how the reference resolver handles unresolved or problematic references.
Variants§
Strict
Strict mode: Unresolved references cause errors.
This is the default and recommended mode for production parsing. Any reference that cannot be resolved will result in a parse error.
§Behavior
- Unresolved references → Error
- Ambiguous references → Error (always, regardless of mode)
Lenient
Lenient mode: Unresolved references are ignored.
Useful for partial parsing, work-in-progress documents, or when reference validation is deferred to a separate validation pass.
§Behavior
- Unresolved references → Silently ignored
- Ambiguous references → Error (always, regardless of mode)
§Use Cases
- Parsing incomplete documents during development
- Incremental parsing where not all nodes are loaded
- Custom validation workflows
Implementations§
Source§impl ReferenceMode
impl ReferenceMode
Trait Implementations§
Source§impl Clone for ReferenceMode
impl Clone for ReferenceMode
Source§fn clone(&self) -> ReferenceMode
fn clone(&self) -> ReferenceMode
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 ReferenceMode
impl Debug for ReferenceMode
Source§impl Default for ReferenceMode
impl Default for ReferenceMode
Source§fn default() -> ReferenceMode
fn default() -> ReferenceMode
Returns the “default value” for a type. Read more
Source§impl From<bool> for ReferenceMode
impl From<bool> for ReferenceMode
Source§impl Hash for ReferenceMode
impl Hash for ReferenceMode
Source§impl PartialEq for ReferenceMode
impl PartialEq for ReferenceMode
impl Copy for ReferenceMode
impl Eq for ReferenceMode
impl StructuralPartialEq for ReferenceMode
Auto Trait Implementations§
impl Freeze for ReferenceMode
impl RefUnwindSafe for ReferenceMode
impl Send for ReferenceMode
impl Sync for ReferenceMode
impl Unpin for ReferenceMode
impl UnwindSafe for ReferenceMode
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