Skip to main content

DomainRegistry

Trait DomainRegistry 

Source
pub trait DomainRegistry {
    // Provided methods
    fn rules(
        &self,
        _schema: u16,
        _revision: u16,
    ) -> Option<&'static [FieldRule]> { ... }
    fn validate_block(
        &self,
        _block: Block<'_>,
        _context: &Context<'_, '_>,
    ) -> Result<(), Error> { ... }
    fn descriptor_target_schema(&self, _key: u16) -> Option<u16> { ... }
    fn validate_units(
        &self,
        _units: &str,
        _context: &Context<'_, '_>,
    ) -> Result<(), Error> { ... }
    fn validate_grid_frame(
        &self,
        _frame: Block<'_>,
        _context: &Context<'_, '_>,
    ) -> Result<(), Error> { ... }
    fn validate_spatial_entry(
        &self,
        _entry: Entry<'_>,
        frame: Block<'_>,
        _context: &Context<'_, '_>,
    ) -> Result<(), Error> { ... }
    fn validate_frame_profile(
        &self,
        _frame: Block<'_>,
        _context: &Context<'_, '_>,
    ) -> Result<(), Error> { ... }
}
Expand description

Domain registries own exact domain field rules and numeric/reference semantics. Returning rules commits the registry to validating that schema, not preserving it. Callbacks must charge variable work through Context::charge_work before doing it.

Provided Methods§

Source

fn rules(&self, _schema: u16, _revision: u16) -> Option<&'static [FieldRule]>

Source

fn validate_block( &self, _block: Block<'_>, _context: &Context<'_, '_>, ) -> Result<(), Error>

Source

fn descriptor_target_schema(&self, _key: u16) -> Option<u16>

Descriptor keys4/5/6 name family medium/transform/calibration schemas.

Source

fn validate_units( &self, _units: &str, _context: &Context<'_, '_>, ) -> Result<(), Error>

Source

fn validate_grid_frame( &self, _frame: Block<'_>, _context: &Context<'_, '_>, ) -> Result<(), Error>

A family-specific grid order may omit shared key7 only after explicit admission. Positive spacing and nonzero dimensions have already been checked.

Source

fn validate_spatial_entry( &self, _entry: Entry<'_>, frame: Block<'_>, _context: &Context<'_, '_>, ) -> Result<(), Error>

Additional family spatial-key/brick bounds. Called for every spatial entry. A grid without shared key7 has no generic ordering and fails closed by default.

Source

fn validate_frame_profile( &self, _frame: Block<'_>, _context: &Context<'_, '_>, ) -> Result<(), Error>

Needed for georeferenced or imported/nonbase frame conventions.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§