pub trait PromptExtManual: 'static {
    // Required methods
    fn perform<P: FnOnce(Result<Variant, Error>) + 'static>(
        &self,
        window_id: Option<&str>,
        return_type: &VariantTy,
        cancellable: Option<&impl IsA<Cancellable>>,
        callback: P
    );
    fn perform_future(
        &self,
        window_id: Option<&str>,
        return_type: &VariantTy
    ) -> Pin<Box_<dyn Future<Output = Result<Variant, Error>> + 'static>>;
}

Required Methods§

source

fn perform<P: FnOnce(Result<Variant, Error>) + 'static>( &self, window_id: Option<&str>, return_type: &VariantTy, cancellable: Option<&impl IsA<Cancellable>>, callback: P )

Runs a prompt and performs the prompting.

Returns true if the prompt was completed and not dismissed.

If @window_id is non-null then it is used as an XWindow id on Linux. The API expects this id to be converted to a string using the d printf format. The Secret Service can make its prompt transient for the window with this id. In some Secret Service implementations this is not possible, so the behavior depending on this should degrade gracefully.

This method will return immediately and complete asynchronously.

§window_id

string form of XWindow id for parent window to be transient for

§return_type

the variant type of the prompt result

§cancellable

optional cancellation object

§callback

called when the operation completes

source

fn perform_future( &self, window_id: Option<&str>, return_type: &VariantTy ) -> Pin<Box_<dyn Future<Output = Result<Variant, Error>> + 'static>>

Object Safety§

This trait is not object safe.

Implementors§