Macros§
- clone
- Macro for passing variables as strong or weak references into a closure.
- closure
- Macro for creating a
Closureobject. This is a wrapper aroundClosure::newthat automatically type checks its arguments at run-time. - closure_
local - The same as
closure!but usesClosure::new_localas a constructor. This is useful for closures which can’t be sent across threads. See the documentation ofclosure!for details. - cstr_
bytes
Attribute Macros§
- async_
test - An attribute macro for writing asynchronous test functions.
- derived_
properties - When applied to
ObjectImpl - flags
- Attribute macro for defining flags using the
bitflagscrate. This macro will also define aGFlags::type_function and theglib::Valuetraits. - object_
interface - Macro for boilerplate of
ObjectInterfaceimplementations. - object_
subclass - Macro for boilerplate of
ObjectSubclassimplementations.
Derive Macros§
- Boxed
- Derive macro for defining a
BoxedType::type_function and theglib::Valuetraits. Optionally, the type can be marked asnullableto get an implementation ofglib::value::ToValueOptional. - Downgrade
- Macro for deriving implementations of
glib::clone::Downgradeandglib::clone::Upgradetraits and a weak type. - Enum
- Derive macro to register a Rust enum in the GLib type system and derive the
glib::Valuetraits. - Error
Domain - Derive macro for defining a GLib error domain and its associated
ErrorDomaintrait. - Properties
- This macro enables you to derive object properties in a quick way.
- Shared
Boxed - Derive macro for defining a
SharedType::get_typefunction and theglib::Valuetraits. Optionally, the type can be marked asnullableto get an implementation ofglib::value::ToValueOptional. - Value
Delegate - Example
- Variant
- Derive macro for serializing/deserializing custom structs/enums as
glib::Variants.