pub struct DecomposedCatalog { /* private fields */ }Expand description
In-memory map of decomposed JSON schema files keyed by catalog-relative path.
Implementations§
Source§impl DecomposedCatalog
impl DecomposedCatalog
Sourcepub const fn from_json_files(json_files: HashMap<String, Value>) -> Self
pub const fn from_json_files(json_files: HashMap<String, Value>) -> Self
Wrap a pre-built path-to-JSON map.
Sourcepub const fn json_files(&self) -> &HashMap<String, Value>
pub const fn json_files(&self) -> &HashMap<String, Value>
Borrow the underlying path-to-JSON map.
Sourcepub fn from_catalog_index(index: &CatalogIndex) -> Self
pub fn from_catalog_index(index: &CatalogIndex) -> Self
Load decomposed JSON files from a CatalogIndex file table.
Sourcepub fn from_catalog_dict(data: &Value) -> Self
pub fn from_catalog_dict(data: &Value) -> Self
Load decomposed JSON from a survivor/catalog dict (json array entries).
Sourcepub fn merge_json_files(&mut self, other: &Self)
pub fn merge_json_files(&mut self, other: &Self)
Overlay another catalog’s JSON files (later keys win).
Sourcepub fn resolve_key(&self, file_path: &str) -> Option<String>
pub fn resolve_key(&self, file_path: &str) -> Option<String>
Resolve a survivor or absolute path to a stored decomposed key, if present.
Trait Implementations§
Source§impl Clone for DecomposedCatalog
impl Clone for DecomposedCatalog
Source§fn clone(&self) -> DecomposedCatalog
fn clone(&self) -> DecomposedCatalog
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 DecomposedCatalog
impl Debug for DecomposedCatalog
Source§impl Default for DecomposedCatalog
impl Default for DecomposedCatalog
Source§fn default() -> DecomposedCatalog
fn default() -> DecomposedCatalog
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DecomposedCatalog
impl RefUnwindSafe for DecomposedCatalog
impl Send for DecomposedCatalog
impl Sync for DecomposedCatalog
impl Unpin for DecomposedCatalog
impl UnsafeUnpin for DecomposedCatalog
impl UnwindSafe for DecomposedCatalog
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