pub struct ElementRenderCx<'a, 'ctx, 'scope> {
pub id: UiId,
pub scope: &'scope UiScope,
pub context: &'ctx UiRenderContext<'a>,
pub children: Vec<UiElement>,
/* private fields */
}Fields§
§id: UiId§scope: &'scope UiScope§context: &'ctx UiRenderContext<'a>§children: Vec<UiElement>Implementations§
Source§impl ElementRenderCx<'_, '_, '_>
impl ElementRenderCx<'_, '_, '_>
Sourcepub fn auto_id(&self) -> UiId
pub fn auto_id(&self) -> UiId
Returns a unique auto-generated child ID within the current scope.
Use this instead of manually calling cx.scope.id(format!(...)).
pub fn use_context<T>(&self) -> Twhere
T: Clone + 'static,
pub fn try_use_context<T>(&self) -> Option<T>where
T: Clone + 'static,
Source§impl ElementRenderCx<'_, '_, '_>
impl ElementRenderCx<'_, '_, '_>
pub fn animation_value(&self, property: AnimProperty) -> f32
pub fn compile(&self, element: Element) -> UiElement
pub fn compile_deferred_children(&mut self) -> Vec<UiElement>
Auto Trait Implementations§
impl<'a, 'ctx, 'scope> !Freeze for ElementRenderCx<'a, 'ctx, 'scope>
impl<'a, 'ctx, 'scope> !RefUnwindSafe for ElementRenderCx<'a, 'ctx, 'scope>
impl<'a, 'ctx, 'scope> !Send for ElementRenderCx<'a, 'ctx, 'scope>
impl<'a, 'ctx, 'scope> !Sync for ElementRenderCx<'a, 'ctx, 'scope>
impl<'a, 'ctx, 'scope> !UnwindSafe for ElementRenderCx<'a, 'ctx, 'scope>
impl<'a, 'ctx, 'scope> Unpin for ElementRenderCx<'a, 'ctx, 'scope>
impl<'a, 'ctx, 'scope> UnsafeUnpin for ElementRenderCx<'a, 'ctx, 'scope>
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