pub trait Bind<Ctx> {
type BindFut<'a>: Future<Output = Result<()>> + 'a
where Ctx: 'a,
Self: 'a;
// Required method
fn bind<'a>(
&'a self,
client: &'a mut Ctx,
object_id: u32
) -> Self::BindFut<'a>;
}
Expand description
Bind a global to a client
TODO: authorization support, i.e. some globals should only be accessible to authorized clients.
Required Associated Types§
Required Methods§
sourcefn bind<'a>(&'a self, client: &'a mut Ctx, object_id: u32) -> Self::BindFut<'a>
fn bind<'a>(&'a self, client: &'a mut Ctx, object_id: u32) -> Self::BindFut<'a>
Setup a proxy of this global, the proxy object has already been inserted into the client’s object store, with the given object id.
If Err() is returned, an protocol error will be sent to the client, and the client will be disconnected.