Skip to main content

IsABin

Trait IsABin 

Source
pub(crate) trait IsABin: IsA<Bin> { }
Expand description

Helper trait to implement for widgets that subclass AdwBin, to be able to use the ChildPropertyExt trait.

This trait is to circumvent conflicts in Rust’s type system, where if we try to implement ChildPropertyExt for W where W: IsA<adw::Bin> it complains that the other external types that implement ChildPropertyExt might implement IsA<adw::Bin> in the future… So instead of reimplementing ChildPropertyExt for every type where we need it, which requires to implement two methods, we only implement this which requires nothing.

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.

Implementations on Foreign Types§

Source§

impl IsABin for Bin

Implementors§