Skip to main content

LoadableIconExt

Trait LoadableIconExt 

Source
pub trait LoadableIconExt: IsA<LoadableIcon> + 'static {
    // Provided methods
    fn load(
        &self,
        size: i32,
        cancellable: Option<&impl IsA<Cancellable>>,
    ) -> Result<(InputStream, Option<GString>), Error> { ... }
    fn load_async<P: FnOnce(Result<(InputStream, Option<GString>), Error>) + 'static>(
        &self,
        size: i32,
        cancellable: Option<&impl IsA<Cancellable>>,
        callback: P,
    ) { ... }
    fn load_future(
        &self,
        size: i32,
    ) -> Pin<Box_<dyn Future<Output = Result<(InputStream, Option<GString>), Error>> + 'static>> { ... }
}
Expand description

Trait containing all LoadableIcon methods.

§Implementors

BytesIcon, FileIcon, LoadableIcon

Provided Methods§

Source

fn load( &self, size: i32, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(InputStream, Option<GString>), Error>

Loads a loadable icon. For the asynchronous version of this function, see g_loadable_icon_load_async().

§size

an integer.

§cancellable

optional #GCancellable object, None to ignore.

§Returns

a #GInputStream to read the icon from.

§type_

return location for the content type of the loaded icon, or None to ignore the result. The returned content type may be None if it is unknown.

Source

fn load_async<P: FnOnce(Result<(InputStream, Option<GString>), Error>) + 'static>( &self, size: i32, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )

Loads an icon asynchronously. To finish this function, see g_loadable_icon_load_finish(). For the synchronous, blocking version of this function, see g_loadable_icon_load().

§size

an integer.

§cancellable

optional #GCancellable object, None to ignore.

§callback

a #GAsyncReadyCallback to call when the request is satisfied

Source

fn load_future( &self, size: i32, ) -> Pin<Box_<dyn Future<Output = Result<(InputStream, Option<GString>), Error>> + 'static>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§