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

source

pub fn downgrade(&self) -> WeakInnerHandle

source

pub fn object_info(&self, id: InnerObjectId) -> Result<ObjectInfo, InvalidId>

source

pub fn insert_client( &self, stream: UnixStream, data: Arc<dyn ClientData>, ) -> Result<InnerClientId>

source

pub fn get_client(&self, id: InnerObjectId) -> Result<ClientId, InvalidId>

source

pub fn get_client_data( &self, id: InnerClientId, ) -> Result<Arc<dyn ClientData>, InvalidId>

source

pub fn get_client_credentials( &self, id: InnerClientId, ) -> Result<Credentials, InvalidId>

source

pub fn with_all_clients(&self, f: impl FnMut(ClientId))

source

pub fn with_all_objects_for( &self, client_id: InnerClientId, f: impl FnMut(ObjectId), ) -> Result<(), InvalidId>

source

pub fn object_for_protocol_id( &self, client_id: InnerClientId, interface: &'static Interface, protocol_id: u32, ) -> Result<ObjectId, InvalidId>

source

pub fn create_object<D: 'static>( &self, client_id: InnerClientId, interface: &'static Interface, version: u32, data: Arc<dyn ObjectData<D>>, ) -> Result<ObjectId, InvalidId>

source

pub fn null_id() -> ObjectId

source

pub fn send_event(&self, msg: Message<ObjectId, RawFd>) -> Result<(), InvalidId>

source

pub fn get_object_data<D: 'static>( &self, id: InnerObjectId, ) -> Result<Arc<dyn ObjectData<D>>, InvalidId>

source

pub fn get_object_data_any( &self, id: InnerObjectId, ) -> Result<Arc<dyn Any + Send + Sync>, InvalidId>

source

pub fn set_object_data<D: 'static>( &self, id: InnerObjectId, data: Arc<dyn ObjectData<D>>, ) -> Result<(), InvalidId>

source

pub fn post_error( &self, object_id: InnerObjectId, error_code: u32, message: CString, )

source

pub fn kill_client(&self, client_id: InnerClientId, reason: DisconnectReason)

source

pub fn create_global<D: 'static>( &self, interface: &'static Interface, version: u32, handler: Arc<dyn GlobalHandler<D>>, ) -> InnerGlobalId

source

pub fn disable_global<D: 'static>(&self, id: InnerGlobalId)

source

pub fn remove_global<D: 'static>(&self, id: InnerGlobalId)

source

pub fn global_info(&self, id: InnerGlobalId) -> Result<GlobalInfo, InvalidId>

source

pub fn get_global_handler<D: 'static>( &self, id: InnerGlobalId, ) -> Result<Arc<dyn GlobalHandler<D>>, InvalidId>

source

pub fn flush(&mut self, client: Option<ClientId>) -> Result<()>

Trait Implementations§

source§

impl Clone for InnerHandle

source§

fn clone(&self) -> InnerHandle

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for InnerHandle

source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> Downcast for T
where T: Any,

source§

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>

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)

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)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.