Trait glib::subclass::shared::SharedType

source ·
pub trait SharedType:
    StaticType
    + Clone
    + Sized
    + 'static {
    type RefCountedType: RefCounted;

    const NAME: &'static str;

    // Required methods
    fn into_refcounted(self) -> Self::RefCountedType;
    fn from_refcounted(this: Self::RefCountedType) -> Self;
}
Expand description

Trait for defining shared types.

Links together the type name with the type itself.

See register_shared_type for registering an implementation of this trait with the type system.

Required Associated Types§

source

type RefCountedType: RefCounted

The inner refcounted type

Required Associated Constants§

source

const NAME: &'static str

Shared type name.

This must be unique in the whole process.

Required Methods§

source

fn into_refcounted(self) -> Self::RefCountedType

Converts the SharedType into its inner RefCountedType

source

fn from_refcounted(this: Self::RefCountedType) -> Self

Constructs a SharedType from a RefCountedType

Object Safety§

This trait is not object safe.

Implementors§