gio::prelude

Trait MenuAttributeIterExt

source
pub trait MenuAttributeIterExt:
    IsA<MenuAttributeIter>
    + Sealed
    + 'static {
    // Provided method
    fn next(&self) -> Option<(GString, Variant)> { ... }
}
Expand description

Trait containing all MenuAttributeIter methods.

§Implementors

MenuAttributeIter

Provided Methods§

source

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

This function combines g_menu_attribute_iter_next() with g_menu_attribute_iter_get_name() and g_menu_attribute_iter_get_value().

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

If successful, @name and @value are set to the name and value of the attribute that has just been advanced to. At this point, g_menu_attribute_iter_get_name() and g_menu_attribute_iter_get_value() will return the same values again.

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

§Returns

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

§out_name

the type of the attribute

§value

the attribute value

Object Safety§

This trait is not object safe.

Implementors§