Contents
use utopia_registry::Registry;Rust
pub struct RegistryNamed factories, and the instances they created in each context.
Rust
use utopia_registry::Registry;
let mut registry = Registry::new();
registry.set("list", || vec![String::from("test")]);
registry.get::<Vec<String>>("list")?.push("Hello World".into());
assert_eq!(registry.get::<Vec<String>>("list")?.len(), 2);Also implements
Default, Debug.use utopia_registry::Error;Rust
pub enum ErrorWhy a resource could not be read.