[][src]Trait gio::prelude::LoadableIconExt

pub trait LoadableIconExt: 'static {
    fn load<P: IsA<Cancellable>>(
        &self,
        size: i32,
        cancellable: Option<&P>
    ) -> Result<(InputStream, GString), Error>;
fn load_async<P: IsA<Cancellable>, Q: FnOnce(Result<(InputStream, GString), Error>) + Send + 'static>(
        &self,
        size: i32,
        cancellable: Option<&P>,
        callback: Q
    );
fn load_async_future(
        &self,
        size: i32
    ) -> Pin<Box_<dyn Future<Output = Result<(InputStream, GString), Error>> + 'static>>; }

Trait containing all LoadableIcon methods.

Implementors

BytesIcon, FileIcon, LoadableIcon

Required methods

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

Loads a loadable icon. For the asynchronous version of this function, see LoadableIcon::load_async.

size

an integer.

type_

a location to store the type of the loaded icon, None to ignore.

cancellable

optional Cancellable object, None to ignore.

Returns

a InputStream to read the icon from.

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

Loads an icon asynchronously. To finish this function, see LoadableIcon::load_finish. For the synchronous, blocking version of this function, see LoadableIcon::load.

size

an integer.

cancellable

optional Cancellable object, None to ignore.

callback

a GAsyncReadyCallback to call when the request is satisfied

user_data

the data to pass to callback function

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

Loading content...

Implementors

impl<O: IsA<LoadableIcon>> LoadableIconExt for O[src]

Loading content...