Skip to main content

ValueStringCodecRegistry

Type Alias ValueStringCodecRegistry 

Source
pub type ValueStringCodecRegistry = ValueCodecRegistry<ValueStringCodecDescriptor>;
Expand description

An immutable string-wire value-codec registry sorted by stable ID.

§Examples

use qubit_codec::ValueStringCodecRegistry;

let registry = ValueStringCodecRegistry::empty();
assert!(registry.get("missing.example").is_none());

Aliased Type§

pub struct ValueStringCodecRegistry { /* private fields */ }

Implementations§

Source§

impl ValueStringCodecRegistry

Source

pub fn try_global() -> Result<&'static Self, ValueCodecRegistryError>

Initializes and returns the process-wide linked string registry.

Initialization is synchronized and cached, including construction failures.

§Returns

A shared static registry containing all linked string registrations.

§Errors

Returns the cached construction error when linked registrations conflict. The error identifies the lexically first duplicate ID and all declarations for that ID in source-field order.

Source

pub fn global() -> &'static Self

Returns the process-wide string registry or panics with a stable diagnostic.

§Returns

A shared static registry, initialized at most once by try_global.

§Panics

Panics when linked registrations conflict.