pub struct ScanDatabaseHeader {
pub pattern_set_digest: [u8; 32],
pub compiler_version: String,
pub mode: ScanDatabaseMode,
pub table_sections: Vec<ScanDatabaseSectionHeader>,
pub unsupported_features: Vec<UnsupportedScanFeature>,
pub compatibility: ScanDatabaseCompatibilityRecord,
}Expand description
Versioned, self-describing header for a serialized scan database.
Fields§
§pattern_set_digest: [u8; 32]32-byte digest of the compiled pattern set.
compiler_version: StringVersion string of the compiler that produced the database.
mode: ScanDatabaseModeScan mode the database was compiled for.
table_sections: Vec<ScanDatabaseSectionHeader>Locators for the table sections in the database body.
unsupported_features: Vec<UnsupportedScanFeature>Constructs that require verifier handoff.
compatibility: ScanDatabaseCompatibilityRecordConstruct-tier and dialect compatibility fingerprint.
Implementations§
Source§impl ScanDatabaseHeader
impl ScanDatabaseHeader
Sourcepub fn section_count(&self) -> usize
pub fn section_count(&self) -> usize
Number of table sections in the database body.
Sourcepub fn unsupported_feature_count(&self) -> usize
pub fn unsupported_feature_count(&self) -> usize
Number of unsupported-feature diagnostics recorded in the header.
Sourcepub fn validate_compatible(
&self,
expected_compiler_version: &str,
expected_mode: ScanDatabaseMode,
) -> Result<(), String>
pub fn validate_compatible( &self, expected_compiler_version: &str, expected_mode: ScanDatabaseMode, ) -> Result<(), String>
Validate this header against the consumer’s required compiler version and scan mode before any table payload is trusted.
§Errors
Returns an actionable Fix: diagnostic when compiler version or mode
differs from the expected cache key.
Sourcepub fn validate_database_compatibility(
&self,
expected_construct_tier_digest: u64,
expected_dialect_digest: u64,
accepted_reader_compatibility: &[ScanDatabaseReaderCompatibility],
) -> Result<(), String>
pub fn validate_database_compatibility( &self, expected_construct_tier_digest: u64, expected_dialect_digest: u64, accepted_reader_compatibility: &[ScanDatabaseReaderCompatibility], ) -> Result<(), String>
Validate construct-tier and dialect compatibility before trusting table payload bytes.
§Errors
Returns a Fix: diagnostic when the construct-tier digest, dialect
digest, or reader compatibility class is not accepted by the caller.
Trait Implementations§
Source§impl Clone for ScanDatabaseHeader
impl Clone for ScanDatabaseHeader
Source§fn clone(&self) -> ScanDatabaseHeader
fn clone(&self) -> ScanDatabaseHeader
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ScanDatabaseHeader
impl Debug for ScanDatabaseHeader
Source§impl<'de> Deserialize<'de> for ScanDatabaseHeader
impl<'de> Deserialize<'de> for ScanDatabaseHeader
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ScanDatabaseHeader
Source§impl Hash for ScanDatabaseHeader
impl Hash for ScanDatabaseHeader
Source§impl PartialEq for ScanDatabaseHeader
impl PartialEq for ScanDatabaseHeader
Source§impl Serialize for ScanDatabaseHeader
impl Serialize for ScanDatabaseHeader
impl StructuralPartialEq for ScanDatabaseHeader
Auto Trait Implementations§
impl Freeze for ScanDatabaseHeader
impl RefUnwindSafe for ScanDatabaseHeader
impl Send for ScanDatabaseHeader
impl Sync for ScanDatabaseHeader
impl Unpin for ScanDatabaseHeader
impl UnsafeUnpin for ScanDatabaseHeader
impl UnwindSafe for ScanDatabaseHeader
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
key and return true if they are equal.