pub unsafe trait Bounds {
type Memory: Memory;
type Declarer: Declarer;
}
Expand description
Library-implemented trait to check bounds on GodotClass
types.
See bounds
module for how to use this for bounds checking.
§No manual impl
Never implement this trait manually.
Most of the time, this trait is covered by #[derive(GodotClass)]
.
If you implement GodotClass
manually, use the implement_godot_bounds!
macro.
There are two reasons to avoid a handwritten impl Bounds
:
- The trait is
unsafe
and it is very easy to get internal bounds wrong. This will lead to immediate UB. - Apart from the documented members, the trait may have undocumented items that may be broken at any time and stand under no SemVer guarantees.
§Safety
Internal. The library implements this trait and ensures safety.