Derive Macro glib_macros::SharedBoxed

source ·
#[derive(SharedBoxed)]
{
    // Attributes available to this derive:
    #[shared_boxed_type]
}
Expand description

Derive macro for defining a SharedType::get_type function and the glib::Value traits.

Example

use glib::prelude::*;
use glib::subclass::prelude::*;

#[derive(Clone, Debug, PartialEq, Eq)]
struct MySharedInner {
  foo: String,
}
#[derive(Clone, Debug, PartialEq, Eq, glib::SharedBoxed)]
#[shared_boxed_type(name = "MySharedBoxed")]
struct MyShared(std::sync::Arc<MySharedInner>);