pub struct Catalog { /* private fields */ }Implementations§
Source§impl Catalog
impl Catalog
Sourcepub fn load(path: &str) -> Result<Self, EngineError>
pub fn load(path: &str) -> Result<Self, EngineError>
Strict loader: fails if the file is missing or invalid. Use this at
startup when you want the application to refuse to run without a
valid catalog (propagate with ? via anyhow in main).
Sourcepub fn load_or_fallback(path: &str) -> Self
pub fn load_or_fallback(path: &str) -> Self
Infallible loader. If the catalog can’t be read or parsed, returns a
Catalog with no entries, remembering the error so render() can
surface it as UNK-000 instead of panicking. This is the loader
most applications should use.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Catalog
impl RefUnwindSafe for Catalog
impl Send for Catalog
impl Sync for Catalog
impl Unpin for Catalog
impl UnsafeUnpin for Catalog
impl UnwindSafe for Catalog
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