pub struct DataRendererSystem { /* private fields */ }Expand description
Owns the data-to-live-subtree projection lifecycle for editor UI slots.
Tracks rendered subtrees per slot so that subsequent renders can remove previous content before attaching new content (full-rerender semantics).
Implementations§
Source§impl DataRendererSystem
impl DataRendererSystem
pub fn new() -> Self
Sourcepub fn render_list(
&mut self,
world: &mut World,
emit: &mut dyn SignalEmitter,
slot: ComponentId,
spec: &ItemRendererSpec,
items: &[UiItem],
) -> Result<ComponentId, String>
pub fn render_list( &mut self, world: &mut World, emit: &mut dyn SignalEmitter, slot: ComponentId, spec: &ItemRendererSpec, items: &[UiItem], ) -> Result<ComponentId, String>
Render a list of items into a target slot.
Each item is rendered independently via spec. Results are collected
under a container that becomes the slot’s single child.
Any previously rendered subtree for this slot is removed first.
Returns the container ComponentId so callers can attach additional
panel-specific state (e.g. SelectionComponent).
Sourcepub fn render_detail(
&mut self,
world: &mut World,
emit: &mut dyn SignalEmitter,
slot: ComponentId,
spec: &DetailRendererSpec,
detail: &UiDetailItem,
) -> Result<ComponentId, String>
pub fn render_detail( &mut self, world: &mut World, emit: &mut dyn SignalEmitter, slot: ComponentId, spec: &DetailRendererSpec, detail: &UiDetailItem, ) -> Result<ComponentId, String>
Render a detail view into a target slot.
Any previously rendered subtree for this slot is removed first.
Returns the root ComponentId of the rendered subtree.
Sourcepub fn clear_slot(
&mut self,
world: &mut World,
emit: &mut dyn SignalEmitter,
slot: ComponentId,
)
pub fn clear_slot( &mut self, world: &mut World, emit: &mut dyn SignalEmitter, slot: ComponentId, )
Remove any rendered content for this slot. No-op if slot is not tracked.
Trait Implementations§
Source§impl Debug for DataRendererSystem
impl Debug for DataRendererSystem
Source§impl Default for DataRendererSystem
impl Default for DataRendererSystem
Source§fn default() -> DataRendererSystem
fn default() -> DataRendererSystem
Auto Trait Implementations§
impl Freeze for DataRendererSystem
impl RefUnwindSafe for DataRendererSystem
impl Send for DataRendererSystem
impl Sync for DataRendererSystem
impl Unpin for DataRendererSystem
impl UnsafeUnpin for DataRendererSystem
impl UnwindSafe for DataRendererSystem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.