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§
sourcetype ClientContext: Client<ServerContext = Self>
type ClientContext: Client<ServerContext = Self>
The per client context type.
sourcetype Conn
type Conn
Type of connection to the client, this is what the connection
listener yields. For example,
see wayland_listener_auto
.
sourcetype Error
type Error
Type of error returned by Self::new_connection
.
sourcetype GlobalStore: GlobalStore<Self::Global>
type GlobalStore: GlobalStore<Self::Global>
The global store
sourcetype Global: Bind<Self::ClientContext> + AnyGlobal<Object = <Self::ClientContext as Client>::Object>
type Global: Bind<Self::ClientContext> + AnyGlobal<Object = <Self::ClientContext as Client>::Object>
Type of globals
Required Methods§
sourcefn globals(&self) -> &RefCell<Self::GlobalStore>
fn globals(&self) -> &RefCell<Self::GlobalStore>
Returns a reference to the global store.