Skip to main content

ServerFacts

Trait ServerFacts 

Source
pub trait ServerFacts:
    Sync
    + Send
    + 'static
    + Sized {
    // Required methods
    fn get_config(&self) -> &ServerConfig;
    fn new_logger(&self) -> Arc<LogFilter>;
}
Expand description

A central hub defined by the user for the server-side, to define the customizable plugin.

§NOTE

Required Methods§

Source

fn get_config(&self) -> &ServerConfig

You should keep ServerConfig inside, get_config() will return the reference.

Source

fn new_logger(&self) -> Arc<LogFilter>

Construct a captains_log::filter::Filter to oganize log of a client

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§