Trait PermissionExt

Source
pub trait PermissionExt: 'static {
    // Required methods
    fn acquire<P: IsA<Cancellable>>(
        &self,
        cancellable: Option<&P>,
    ) -> Result<(), Error>;
    fn acquire_async<P: IsA<Cancellable>, Q: FnOnce(Result<(), Error>) + Send + 'static>(
        &self,
        cancellable: Option<&P>,
        callback: Q,
    );
    fn get_allowed(&self) -> bool;
    fn get_can_acquire(&self) -> bool;
    fn get_can_release(&self) -> bool;
    fn impl_update(&self, allowed: bool, can_acquire: bool, can_release: bool);
    fn release<P: IsA<Cancellable>>(
        &self,
        cancellable: Option<&P>,
    ) -> Result<(), Error>;
    fn release_async<P: IsA<Cancellable>, Q: FnOnce(Result<(), Error>) + Send + 'static>(
        &self,
        cancellable: Option<&P>,
        callback: Q,
    );
    fn connect_property_allowed_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId;
    fn connect_property_can_acquire_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId;
    fn connect_property_can_release_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId;
}

Required Methods§

Source

fn acquire<P: IsA<Cancellable>>( &self, cancellable: Option<&P>, ) -> Result<(), Error>

Source

fn acquire_async<P: IsA<Cancellable>, Q: FnOnce(Result<(), Error>) + Send + 'static>( &self, cancellable: Option<&P>, callback: Q, )

Source

fn get_allowed(&self) -> bool

Source

fn get_can_acquire(&self) -> bool

Source

fn get_can_release(&self) -> bool

Source

fn impl_update(&self, allowed: bool, can_acquire: bool, can_release: bool)

Source

fn release<P: IsA<Cancellable>>( &self, cancellable: Option<&P>, ) -> Result<(), Error>

Source

fn release_async<P: IsA<Cancellable>, Q: FnOnce(Result<(), Error>) + Send + 'static>( &self, cancellable: Option<&P>, callback: Q, )

Source

fn connect_property_allowed_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_property_can_acquire_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_property_can_release_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

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§