Skip to main content

EditionSessionExt

Trait EditionSessionExt 

Source
pub trait EditionSessionExt: SessionExt {
    // Provided methods
    fn editions(&self) -> SessionGuard<'_, EditionSession> { ... }
    fn enabled_editions(&self) -> SessionGuard<'_, EnabledEditions> { ... }
    fn register_edition(
        &self,
        declaration: &EditionDeclaration,
    ) -> VortexResult<()> { ... }
    fn enable_edition(&self, edition: EditionId) -> VortexResult<()> { ... }
    fn enabled_component_ids(&self, kind: ComponentKind) -> Vec<Id> { ... }
}
Expand description

Session data for Vortex editions.

Provided Methods§

Source

fn editions(&self) -> SessionGuard<'_, EditionSession>

Returns the edition registry.

Source

fn enabled_editions(&self) -> SessionGuard<'_, EnabledEditions>

Returns the editions enabled for writing.

Accessing this method installs the enabled-editions session variable if it is absent, with an initially empty selection.

Source

fn register_edition(&self, declaration: &EditionDeclaration) -> VortexResult<()>

Register an edition declaration with this session.

Source

fn enable_edition(&self, edition: EditionId) -> VortexResult<()>

Enable a registered edition for writing.

Enabling an edition replaces the enabled edition from the same family. An edition must be registered first so a typo or unavailable third-party declaration cannot silently produce an empty writable set.

Source

fn enabled_component_ids(&self, kind: ComponentKind) -> Vec<Id>

Resolve the ids of one ComponentKind across all enabled editions: what a writer may emit for that kind.

Ids are only unique within a kind, so this never mixes kinds. An empty result means the enabled editions permit no components of this kind.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§