[go: up one dir, main page]

P2P

Trait P2P 

Source
pub trait P2P {
    // Required methods
    fn object_as_accessible(
        &self,
        obj: &ObjectRefOwned,
    ) -> impl Future<Output = AtspiResult<AccessibleProxy<'_>>>;
    fn bus_name_as_root_accessible(
        &self,
        name: &BusName<'_>,
    ) -> impl Future<Output = AtspiResult<AccessibleProxy<'_>>>;
    fn peers(&self) -> Arc<Mutex<Vec<Peer>>>;
    fn get_peer(&self, bus_name: &BusName<'_>) -> Option<Peer>;
}
Expand description

Trait for P2P connection handling.

Required Methods§

Source

fn object_as_accessible( &self, obj: &ObjectRefOwned, ) -> impl Future<Output = AtspiResult<AccessibleProxy<'_>>>

Returns a P2P connected AccessibleProxyfor object, if available.
If the application does not support P2P, this returns an AccessibleProxy for the object with a bus connection.

Source

fn bus_name_as_root_accessible( &self, name: &BusName<'_>, ) -> impl Future<Output = AtspiResult<AccessibleProxy<'_>>>

Returns a P2P connected AccessibleProxy to the root accessible object for the given bus name, if available.
If the P2P connection is not available, it returns an AccessibleProxy with a bus connection.

Source

fn peers(&self) -> Arc<Mutex<Vec<Peer>>>

Return a list of peers that are currently connected.

Source

fn get_peer(&self, bus_name: &BusName<'_>) -> Option<Peer>

Returns a Peer by its bus name.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§