Trait WorldInfoFactory

Source
pub trait WorldInfoFactory<P: PluginBridge> {
    // Required methods
    fn new(registry: Box<ProcessorRegistry<P>>) -> Self;
    fn set_name(&mut self, name: &str) -> &mut Self;
    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§

Source

fn new(registry: Box<ProcessorRegistry<P>>) -> Self

Creates a new empty world info

Source

fn set_name(&mut self, name: &str) -> &mut Self

Sets the name of the world info

Source

fn insert_entry(&mut self, entry: WorldInfoEntry) -> &mut Self

Inserts a world info entry

Source

fn set_permitted_processors(&mut self, processors: Vec<String>) -> &mut Self

Sets the list of permitted processors

Source

fn build(&self) -> &Self

Builds the world info

Provided Methods§

Source

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.

Implementors§