Skip to main content

Render

Trait Render 

Source
pub trait Render: Sized + 'static {
    // Required method
    fn render(
        &mut self,
        window: &mut Window,
        cx: &mut Context<'_, Self>,
    ) -> impl IntoElement;
}
Expand description

An object that can be drawn to the screen. This is the trait that distinguishes “views” from other entities. Views are Entity’s which impl Render and drawn to the screen.

Required Methods§

Source

fn render( &mut self, window: &mut Window, cx: &mut Context<'_, Self>, ) -> impl IntoElement

Render this view into an element tree.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Render for AppMenuBar

Source§

fn render( &mut self, _: &mut Window, cx: &mut Context<'_, AppMenuBar>, ) -> impl IntoElement

Source§

impl Render for CalendarState

Source§

fn render( &mut self, _: &mut Window, _: &mut Context<'_, CalendarState>, ) -> impl IntoElement

Source§

impl Render for ColorPickerState

Source§

fn render( &mut self, _: &mut Window, _: &mut Context<'_, ColorPickerState>, ) -> impl IntoElement

Source§

impl Render for CommandState

Source§

fn render( &mut self, window: &mut Window, cx: &mut Context<'_, CommandState>, ) -> impl IntoElement

Source§

impl Render for DatePickerState

Source§

fn render( &mut self, _: &mut Window, _: &mut Context<'_, DatePickerState>, ) -> impl IntoElement

Source§

impl Render for DivInspector

Source§

fn render( &mut self, _window: &mut Window, cx: &mut Context<'_, DivInspector>, ) -> impl IntoElement

Source§

impl Render for DockArea

Source§

fn render( &mut self, window: &mut Window, cx: &mut Context<'_, DockArea>, ) -> impl IntoElement

Source§

impl Render for DragPanel

Source§

fn render( &mut self, _window: &mut Window, _cx: &mut Context<'_, DragPanel>, ) -> impl IntoElement

Base draws nothing: the styled drag preview is appearance and belongs to crates/component, which reintroduces it as a separate render type.

Source§

impl Render for DragPanelPreview

Source§

fn render( &mut self, window: &mut Window, cx: &mut Context<'_, DragPanelPreview>, ) -> impl IntoElement

Source§

impl Render for HoverCardState

Source§

fn render( &mut self, _: &mut Window, _: &mut Context<'_, HoverCardState>, ) -> impl IntoElement

Source§

impl Render for Icon

Source§

fn render( &mut self, window: &mut Window, cx: &mut Context<'_, Icon>, ) -> impl IntoElement

Source§

impl Render for Notification

Source§

fn render( &mut self, window: &mut Window, cx: &mut Context<'_, Notification>, ) -> impl IntoElement

Source§

impl Render for NotificationList

Source§

fn render( &mut self, window: &mut Window, cx: &mut Context<'_, NotificationList>, ) -> impl IntoElement

Source§

impl Render for OtpState

Source§

fn render( &mut self, _: &mut Window, _: &mut Context<'_, OtpState>, ) -> impl IntoElement

Source§

impl Render for PopoverState

Source§

fn render( &mut self, _: &mut Window, _: &mut Context<'_, PopoverState>, ) -> impl IntoElement

Source§

impl Render for PopupMenu

Source§

fn render( &mut self, window: &mut Window, cx: &mut Context<'_, PopupMenu>, ) -> impl IntoElement

Source§

impl Render for Root

Source§

fn render( &mut self, window: &mut Window, cx: &mut Context<'_, Root>, ) -> impl IntoElement

Source§

impl Render for TabGroup

Source§

fn render( &mut self, window: &mut Window, cx: &mut Context<'_, TabGroup>, ) -> impl IntoElement

Source§

impl Render for TextViewState

Source§

fn render( &mut self, window: &mut Window, cx: &mut Context<'_, TextViewState>, ) -> impl IntoElement

Source§

impl Render for TilesState

Source§

fn render( &mut self, window: &mut Window, cx: &mut Context<'_, TilesState>, ) -> impl IntoElement

Source§

impl Render for Tooltip

Source§

fn render( &mut self, window: &mut Window, cx: &mut Context<'_, Tooltip>, ) -> impl IntoElement

Source§

impl Render for TooltipOverlay

Source§

fn render( &mut self, window: &mut Window, cx: &mut Context<'_, TooltipOverlay>, ) -> impl IntoElement

Source§

impl Render for TreeState

Source§

fn render( &mut self, _: &mut Window, cx: &mut Context<'_, TreeState>, ) -> impl IntoElement

Source§

impl<D> Render for ComboboxState<D>

Source§

fn render( &mut self, window: &mut Window, cx: &mut Context<'_, ComboboxState<D>>, ) -> impl IntoElement

Source§

impl<D> Render for ListState<D>
where D: ListDelegate,

Source§

fn render( &mut self, window: &mut Window, cx: &mut Context<'_, ListState<D>>, ) -> impl IntoElement

Source§

impl<D> Render for SelectState<D>

Source§

fn render( &mut self, window: &mut Window, cx: &mut Context<'_, SelectState<D>>, ) -> impl IntoElement

Source§

impl<D> Render for TableState<D>
where D: TableDelegate,

Source§

fn render( &mut self, window: &mut Window, cx: &mut Context<'_, TableState<D>>, ) -> impl IntoElement

Source§

impl<M> Render for InputBaseState<M>
where M: InputModeKind,

Source§

fn render( &mut self, window: &mut Window, cx: &mut Context<'_, InputBaseState<M>>, ) -> impl IntoElement

Implementors§