pub trait PanelBuilder {
// Required method
fn build(&mut self, state: &PanelState, info: &PanelInfo) -> PanelId;
}Expand description
Everything gpui_base::dock exports, so a consumer never has to depend
on the foundation crate directly to write a skin or read a container’s
state. Kept in step with base’s own list by
every_base_dock_export_is_reachable_from_here.
Two names are handled elsewhere and one is deliberately absent:
base’s Panel and PanelView arrive as BasePanel and BasePanelView
because this module’s Panel/PanelView are the presentation halves that
extend them, and base’s Dock — a plain state struct holding one dock’s
open, collapsible, size and resizing flags — is not re-exported at all,
because the name meant a panel container in every released version of this
crate and handing it back with a different meaning is worse than dropping
it. A skin reads a dock through DockContext.
Turns a persisted leaf into a live panel id.
The production implementation (at the gpui-component layer, above this
crate) consults PanelRegistry and falls back to an invalid-panel
placeholder that retains the original PanelState, so a panel type this
build does not know about survives a load/save round trip instead of
being erased.
Required Methods§
fn build(&mut self, state: &PanelState, info: &PanelInfo) -> PanelId
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".