PermissionExt

Trait PermissionExt 

Source
pub trait PermissionExt: IsA<Permission> + 'static {
Show 13 methods // Provided 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 { ... }
}

Provided 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

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§