pub trait Server: Sized {
    type ClientContext: Client<ServerContext = Self>;
    type Conn;
    type Error;
    type GlobalStore: GlobalStore<Self::Global>;
    type Global: Bind<Self::ClientContext> + AnyGlobal<Object = <Self::ClientContext as Client>::Object>;

    // Required methods
    fn globals(&self) -> &RefCell<Self::GlobalStore>;
    fn new_connection(&self, conn: Self::Conn) -> Result<(), Self::Error>;
}
Expand description

A server context

Required Associated Types§

source

type ClientContext: Client<ServerContext = Self>

The per client context type.

source

type Conn

Type of connection to the client, this is what the connection listener yields. For example, see wayland_listener_auto.

source

type Error

Type of error returned by Self::new_connection.

source

type GlobalStore: GlobalStore<Self::Global>

The global store

source

type Global: Bind<Self::ClientContext> + AnyGlobal<Object = <Self::ClientContext as Client>::Object>

Type of globals

Required Methods§

source

fn globals(&self) -> &RefCell<Self::GlobalStore>

Returns a reference to the global store.

source

fn new_connection(&self, conn: Self::Conn) -> Result<(), Self::Error>

Call each time a new client connects.

Implementors§