pub trait PermissionExt: 'static {
Show 13 methods // Required methods fn acquire( &self, cancellable: Option<&impl IsA<Cancellable>> ) -> Result<(), Error>; fn acquire_async<P: FnOnce(Result<(), Error>) + 'static>( &self, cancellable: Option<&impl IsA<Cancellable>>, callback: P ); fn acquire_future( &self ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>; fn is_allowed(&self) -> bool; fn can_acquire(&self) -> bool; fn can_release(&self) -> bool; fn impl_update(&self, allowed: bool, can_acquire: bool, can_release: bool); fn release( &self, cancellable: Option<&impl IsA<Cancellable>> ) -> Result<(), Error>; fn release_async<P: FnOnce(Result<(), Error>) + 'static>( &self, cancellable: Option<&impl IsA<Cancellable>>, callback: P ); fn release_future( &self ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>; fn connect_allowed_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId; fn connect_can_acquire_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId; fn connect_can_release_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId;
}

Required Methods§

source

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

source

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

source

fn acquire_future( &self ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>

source

fn is_allowed(&self) -> bool

source

fn can_acquire(&self) -> bool

source

fn can_release(&self) -> bool

source

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

source

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

source

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

source

fn release_future( &self ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>

source

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

source

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

source

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

Implementors§