pub trait WorldInfoFactory<P: PluginBridge> {
// Required methods
fn new(registry: Box<WorldInfoRegistry<P>>) -> Self;
fn set_name(&mut self, name: &str) -> &mut Self;
fn new_entry(&mut self, name: &str, order: u32) -> &mut WorldInfoEntry;
fn insert_entry(&mut self, entry: WorldInfoEntry) -> &mut Self;
fn set_permitted_processors(&mut self, processors: Vec<String>) -> &mut Self;
fn build(&self) -> &Self;
// Provided method
fn insert_entries(&mut self, entries: Vec<WorldInfoEntry>) -> &mut Self { ... }
}
Required Methods§
Sourcefn new(registry: Box<WorldInfoRegistry<P>>) -> Self
fn new(registry: Box<WorldInfoRegistry<P>>) -> Self
Creates a new empty world info
Sourcefn new_entry(&mut self, name: &str, order: u32) -> &mut WorldInfoEntry
fn new_entry(&mut self, name: &str, order: u32) -> &mut WorldInfoEntry
Creates a new world info entry with a random id and inserts it
Sourcefn insert_entry(&mut self, entry: WorldInfoEntry) -> &mut Self
fn insert_entry(&mut self, entry: WorldInfoEntry) -> &mut Self
Inserts a world info entry
Sourcefn set_permitted_processors(&mut self, processors: Vec<String>) -> &mut Self
fn set_permitted_processors(&mut self, processors: Vec<String>) -> &mut Self
Sets the list of permitted processors
Provided Methods§
Sourcefn insert_entries(&mut self, entries: Vec<WorldInfoEntry>) -> &mut Self
fn insert_entries(&mut self, entries: Vec<WorldInfoEntry>) -> &mut Self
Inserts a list of world info entries
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.