Struct wayland_backend::rs::server_impl::handle::InnerHandle
source · pub struct InnerHandle {
pub(crate) state: Arc<Mutex<dyn ErasedState + Send>>,
}
Fields§
§state: Arc<Mutex<dyn ErasedState + Send>>
Implementations§
source§impl InnerHandle
impl InnerHandle
pub fn downgrade(&self) -> WeakInnerHandle
pub fn object_info(&self, id: InnerObjectId) -> Result<ObjectInfo, InvalidId>
pub fn insert_client( &self, stream: UnixStream, data: Arc<dyn ClientData>, ) -> Result<InnerClientId>
pub fn get_client(&self, id: InnerObjectId) -> Result<ClientId, InvalidId>
pub fn get_client_data( &self, id: InnerClientId, ) -> Result<Arc<dyn ClientData>, InvalidId>
pub fn get_client_credentials( &self, id: InnerClientId, ) -> Result<Credentials, InvalidId>
pub fn with_all_clients(&self, f: impl FnMut(ClientId))
pub fn with_all_objects_for( &self, client_id: InnerClientId, f: impl FnMut(ObjectId), ) -> Result<(), InvalidId>
pub fn object_for_protocol_id( &self, client_id: InnerClientId, interface: &'static Interface, protocol_id: u32, ) -> Result<ObjectId, InvalidId>
pub fn create_object<D: 'static>( &self, client_id: InnerClientId, interface: &'static Interface, version: u32, data: Arc<dyn ObjectData<D>>, ) -> Result<ObjectId, InvalidId>
pub fn null_id() -> ObjectId
pub fn send_event(&self, msg: Message<ObjectId, RawFd>) -> Result<(), InvalidId>
pub fn get_object_data<D: 'static>( &self, id: InnerObjectId, ) -> Result<Arc<dyn ObjectData<D>>, InvalidId>
pub fn get_object_data_any( &self, id: InnerObjectId, ) -> Result<Arc<dyn Any + Send + Sync>, InvalidId>
pub fn set_object_data<D: 'static>( &self, id: InnerObjectId, data: Arc<dyn ObjectData<D>>, ) -> Result<(), InvalidId>
pub fn post_error( &self, object_id: InnerObjectId, error_code: u32, message: CString, )
pub fn kill_client(&self, client_id: InnerClientId, reason: DisconnectReason)
pub fn create_global<D: 'static>( &self, interface: &'static Interface, version: u32, handler: Arc<dyn GlobalHandler<D>>, ) -> InnerGlobalId
pub fn disable_global<D: 'static>(&self, id: InnerGlobalId)
pub fn remove_global<D: 'static>(&self, id: InnerGlobalId)
pub fn global_info(&self, id: InnerGlobalId) -> Result<GlobalInfo, InvalidId>
pub fn get_global_handler<D: 'static>( &self, id: InnerGlobalId, ) -> Result<Arc<dyn GlobalHandler<D>>, InvalidId>
pub fn flush(&mut self, client: Option<ClientId>) -> Result<()>
Trait Implementations§
source§impl Clone for InnerHandle
impl Clone for InnerHandle
source§fn clone(&self) -> InnerHandle
fn clone(&self) -> InnerHandle
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for InnerHandle
impl RefUnwindSafe for InnerHandle
impl Send for InnerHandle
impl Sync for InnerHandle
impl Unpin for InnerHandle
impl UnwindSafe for InnerHandle
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.