Trait gio::prelude::LoadableIconExt
source · pub trait LoadableIconExt: 'static {
// Required methods
fn load(
&self,
size: i32,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(InputStream, GString), Error>;
fn load_async<P: FnOnce(Result<(InputStream, 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, GString), Error>> + 'static>>;
}Expand description
Required Methods§
sourcefn load(
&self,
size: i32,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(InputStream, GString), Error>
fn load( &self, size: i32, cancellable: Option<&impl IsA<Cancellable>> ) -> Result<(InputStream, GString), Error>
Loads a loadable icon. For the asynchronous version of this function,
see load_async().
size
an integer.
cancellable
optional Cancellable object, None to
ignore.
Returns
a InputStream to read the icon from.
type_
a location to store the type of the loaded
icon, None to ignore.
sourcefn load_async<P: FnOnce(Result<(InputStream, GString), Error>) + 'static>(
&self,
size: i32,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
)
fn load_async<P: FnOnce(Result<(InputStream, 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 load().
size
an integer.
cancellable
optional Cancellable object, None to ignore.
callback
a GAsyncReadyCallback to call when the
request is satisfied