ServerMessages

Trait ServerMessages 

Source
pub trait ServerMessages: Sized {
    const NAME: &'static str;

    // Required method
    fn messages() -> &'static [MessageDef<Self>] ;
}
Expand description

This trait contains the actual message definitions that the server can handle. It should not be used manually, but via the #[derive(server::Server)] macro.

Required Associated Constants§

Source

const NAME: &'static str

The name of the server, as registered in the nameserver. If empty, a random SID will be assigned and no nameserver registration happens.

Required Methods§

Source

fn messages() -> &'static [MessageDef<Self>]

Define the messages that are handled by this server. See MessageDef and the related functions.

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§