Expand description
The GPUI prelude is a collection of traits and types that are widely used throughout the library. It is recommended to import this prelude into your application to avoid having to import each trait individually.
Re-exports§
pub use crate::AppContext as _;pub use crate::AppContext as _;pub use crate::BorrowAppContext;pub use crate::Context;pub use crate::Element;pub use crate::InteractiveElement;pub use crate::IntoElement;pub use crate::ParentElement;pub use crate::Render;pub use crate::RenderOnce;pub use crate::StatefulInteractiveElement;pub use crate::Styled;pub use crate::StyledImage;pub use crate::TaskExt as _;pub use crate::VisualContext;
Traits§
- Fluent
Builder - A helper trait for building complex objects with imperative conditionals in a fluent style.
- Refineable
- A trait for types that can be refined with partial updates.
Derive Macros§
- Into
Element - #[derive(IntoElement)] is used to create a Component out of anything that implements
the
RenderOncetrait. - Refineable
- Visual
Context - #[derive(VisualContext)] is used to create a visual context out of anything that holds a
&mut Windowand implementsAppContextNote that a#[app]and a#[window]attribute are required to identify the variables holding the &mut App, and &mut Window respectively.