Widget

Trait Widget 

Source
pub trait Widget: Copy {
    // Required method
    fn raw(self) -> *mut lv_obj_t;
}
Expand description

Core trait for all LVGL widget wrappers. Provides access to the raw lv_obj_t pointer. All higher-level traits (Layout, Styleable, EventTarget) are blanket-implemented for any type implementing Widget.

§Safety contract

Implementors must ensure raw() returns a pointer obtained from LVGL. All access must happen under the LVGL lock.

Required Methods§

Source

fn raw(self) -> *mut lv_obj_t

Return the raw lv_obj_t pointer for this widget.

§Safety

Must only be used while holding the LVGL lock (see lock).

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.

Implementors§