pub enum DetectedVersion {
Declared(VastVersion),
Inferred(VastVersion),
DeclaredAndInferred {
declared: VastVersion,
inferred: VastVersion,
consistent: bool,
},
Unknown,
}Expand description
How the version was determined.
Version detection is a two-pass process: first the version attribute on
the root <VAST> element is read (declared), then the document structure
is scanned for version-specific elements (inferred). When both are
available, consistency is checked and a mismatch produces a warning.
Variants§
Declared(VastVersion)
Version attribute was present and recognised.
Inferred(VastVersion)
Version attribute was absent or unrecognised; version inferred from document structure.
DeclaredAndInferred
Both declared and inferred — may or may not agree.
Unknown
Could not determine version.
Implementations§
Source§impl DetectedVersion
impl DetectedVersion
Sourcepub fn best(&self) -> Option<&VastVersion>
pub fn best(&self) -> Option<&VastVersion>
Returns the best available version, preferring the declared value.
Trait Implementations§
Source§impl Clone for DetectedVersion
impl Clone for DetectedVersion
Source§fn clone(&self) -> DetectedVersion
fn clone(&self) -> DetectedVersion
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DetectedVersion
impl Debug for DetectedVersion
Source§impl PartialEq for DetectedVersion
impl PartialEq for DetectedVersion
Source§fn eq(&self, other: &DetectedVersion) -> bool
fn eq(&self, other: &DetectedVersion) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for DetectedVersion
impl StructuralPartialEq for DetectedVersion
Auto Trait Implementations§
impl Freeze for DetectedVersion
impl RefUnwindSafe for DetectedVersion
impl Send for DetectedVersion
impl Sync for DetectedVersion
impl Unpin for DetectedVersion
impl UnsafeUnpin for DetectedVersion
impl UnwindSafe for DetectedVersion
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