gio::prelude

Trait MenuLinkIterExt

Source
pub trait MenuLinkIterExt: IsA<MenuLinkIter> + 'static {
    // Provided method
    fn next(&self) -> Option<(GString, MenuModel)> { ... }
}
Expand description

Trait containing all MenuLinkIter methods.

§Implementors

MenuLinkIter

Provided Methods§

Source

fn next(&self) -> Option<(GString, MenuModel)>

This function combines g_menu_link_iter_next() with g_menu_link_iter_get_name() and g_menu_link_iter_get_value().

First the iterator is advanced to the next (possibly first) link. If that fails, then false is returned and there are no other effects.

If successful, @out_link and @value are set to the name and #GMenuModel of the link that has just been advanced to. At this point, g_menu_link_iter_get_name() and g_menu_link_iter_get_value() will return the same values again.

The value returned in @out_link remains valid for as long as the iterator remains at the current position. The value returned in @value must be unreffed using g_object_unref() when it is no longer in use.

§Returns

true on success, or false if there is no additional link

the name of the link

§value

the linked #GMenuModel

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§