Skip to main content

HostTreeBuilder

Struct HostTreeBuilder 

Source
pub struct HostTreeBuilder { /* private fields */ }

Implementations§

Source§

impl HostTreeBuilder

Source

pub fn new() -> Self

Source

pub fn from_retained(tree: HostTree) -> Self

Source

pub fn push(&mut self, node: UiNode) -> UiId

Source

pub fn node(&mut self, id: UiId, kind: UiNodeKind, rect: UiRect) -> UiId

Source

pub fn interactive( &mut self, id: UiId, kind: UiNodeKind, rect: UiRect, interaction: InteractionRole, ) -> UiId

Source

pub fn styled( &mut self, id: UiId, kind: UiNodeKind, rect: UiRect, style: VisualStyle, ) -> UiId

Source

pub fn text( &mut self, id: UiId, rect: UiRect, text: impl Into<Cow<'static, str>>, style: TextStyle, ) -> UiId

Source

pub fn laid_out( &mut self, id: UiId, kind: UiNodeKind, rect: UiRect, layout: LayoutSpec, ) -> UiId

Source

pub fn in_phase( &mut self, id: UiId, kind: UiNodeKind, rect: UiRect, phase: RenderPhase, ) -> UiId

Source

pub fn with_parent<T>( &mut self, id: UiId, build: impl FnOnce(&mut Self) -> T, ) -> T

Source

pub fn element(&mut self, element: UiElement) -> UiId

Source

pub fn mount( &mut self, component: impl RootComponent, viewport: UiRect, interaction: &UiInteractionState, animations: &AnimationRegistry, component_states: &ComponentStateStore, component_tree: &ComponentTree, contexts: &ContextRegistry, hook_states: &HookStateStore, hook_updates: &Arc<UiUpdateQueue>, task_spawner: Option<&UiTaskSpawner>, effects: &EffectRegistry, scale: UiScale, ) -> UiId

Source

pub fn finish(self) -> HostTree

Source

pub fn projection_metrics(&self) -> HostProjectionMetrics

Trait Implementations§

Source§

impl Default for HostTreeBuilder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.