pub struct UiRenderContext<'a> { /* private fields */ }Implementations§
Source§impl<'a> UiRenderContext<'a>
impl<'a> UiRenderContext<'a>
pub fn new( interaction: &'a UiInteractionState, animations: &'a AnimationRegistry, component_states: &'a ComponentStateStore, component_tree: &'a ComponentTree, contexts: &'a ContextRegistry, hook_states: &'a HookStateStore, hook_updates: &'a Arc<UiUpdateQueue>, task_spawner: Option<&'a UiTaskSpawner>, effects: &'a EffectRegistry, viewport: UiRect, scale: UiScale, ) -> Self
pub fn viewport(&self) -> UiRect
pub fn scale(&self) -> UiScale
pub fn interaction_flags(&self, id: &UiId) -> InteractionFlags
pub fn animation_value(&self, id: &UiId, property: AnimProperty) -> f32
pub fn component_state_mut<T, R>( &self, id: &UiId, f: impl FnOnce(&mut T) -> R, ) -> R
pub fn preserve_component_state_scope(&self, scope: &UiScope)
pub fn component_tree(&self) -> &ComponentTree
pub fn contexts(&self) -> &ContextRegistry
pub fn hook_state<T>(&self, id: HookId, initial: impl FnOnce() -> T) -> Twhere
T: Clone + 'static,
pub fn hook_updates(&self) -> Arc<UiUpdateQueue> ⓘ
pub fn task_spawner(&self) -> Option<UiTaskSpawner>
pub fn effect<D, F, R>(&self, id: HookId, deps: D, effect: F)
Trait Implementations§
Source§impl<'a> Clone for UiRenderContext<'a>
impl<'a> Clone for UiRenderContext<'a>
Source§fn clone(&self) -> UiRenderContext<'a>
fn clone(&self) -> UiRenderContext<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for UiRenderContext<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for UiRenderContext<'a>
impl<'a> !Send for UiRenderContext<'a>
impl<'a> !Sync for UiRenderContext<'a>
impl<'a> !UnwindSafe for UiRenderContext<'a>
impl<'a> Freeze for UiRenderContext<'a>
impl<'a> Unpin for UiRenderContext<'a>
impl<'a> UnsafeUnpin for UiRenderContext<'a>
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
Mutably borrows from an owned value. Read more