Skip to main content

NodeInitPatch

Struct NodeInitPatch 

Source
pub struct NodeInitPatch { /* private fields */ }
Expand description

Compact zero-allocation initialization patch applied to a newly mounted view! primitive node under a single scene lock.

Implementations§

Source§

impl NodeInitPatch

Builder methods for NodeInitPatch consumed by view! procedural macro expansions.

Source

pub fn empty() -> Self

Creates an empty NodeInitPatch with all modifiers unset.

§Returns
  • Self - Empty node initialization patch.
Source

pub fn with_focusable(self, focusable: bool) -> Self

Sets explicit keyboard focusability on the target node.

§Arguments
  • Self - Patch builder.
  • bool - Whether keyboard focus is enabled.
§Returns
  • Self - Updated patch builder.
Source

pub fn with_on_click(self, handler: UiEventHandler) -> Self

Attaches an on_click callback handler to the target node.

§Arguments
  • Self - Patch builder.
  • UiEventHandler - Click event callback.
§Returns
  • Self - Updated patch builder.
Source

pub fn with_on_change(self, handler: UiEventHandler) -> Self

Attaches an on_change callback handler to the target node.

§Arguments
  • Self - Patch builder.
  • UiEventHandler - Change event callback.
§Returns
  • Self - Updated patch builder.
Source

pub fn with_on_scroll(self, handler: UiEventHandler) -> Self

Attaches an on_scroll callback handler to the target node.

§Arguments
  • Self - Patch builder.
  • UiEventHandler - Scroll event callback.
§Returns
  • Self - Updated patch builder.
Source

pub fn with_on_pointer_down(self, handler: UiEventHandler) -> Self

Attaches an on_pointer_down callback handler to the target node.

§Arguments
  • Self - Patch builder.
  • UiEventHandler - Pointer-down event callback.
§Returns
  • Self - Updated patch builder.
Source

pub fn with_on_pointer_move(self, handler: UiEventHandler) -> Self

Attaches an on_pointer_move callback handler to the target node.

§Arguments
  • Self - Patch builder.
  • UiEventHandler - Pointer-move event callback.
§Returns
  • Self - Updated patch builder.
Source

pub fn with_on_pointer_up(self, handler: UiEventHandler) -> Self

Attaches an on_pointer_up callback handler to the target node.

§Arguments
  • Self - Patch builder.
  • UiEventHandler - Pointer-up event callback.
§Returns
  • Self - Updated patch builder.
Source

pub fn with_on_pointer_enter(self, handler: UiEventHandler) -> Self

Attaches an on_pointer_enter callback handler to the target node.

§Arguments
  • Self - Patch builder.
  • UiEventHandler - Pointer-enter event callback.
§Returns
  • Self - Updated patch builder.
Source

pub fn with_on_pointer_leave(self, handler: UiEventHandler) -> Self

Attaches an on_pointer_leave callback handler to the target node.

§Arguments
  • Self - Patch builder.
  • UiEventHandler - Pointer-leave event callback.
§Returns
  • Self - Updated patch builder.
Source

pub fn with_on_hover(self, handler: UiEventHandler) -> Self

Attaches a unified on_hover handler invoked on both PointerEnter and PointerLeave.

§Arguments
  • Self - Patch builder.
  • UiEventHandler - Hover event callback.
§Returns
  • Self - Updated patch builder.
Source

pub fn with_on_key(self, handler: UiEventHandler) -> Self

Attaches an on_key callback handler to the target node.

§Arguments
  • Self - Patch builder.
  • UiEventHandler - Key-down event callback.
§Returns
  • Self - Updated patch builder.
Source

pub fn with_on_focus(self, handler: UiEventHandler) -> Self

Attaches an on_focus callback handler to the target node.

§Arguments
  • Self - Patch builder.
  • UiEventHandler - Focus event callback.
§Returns
  • Self - Updated patch builder.
Source

pub fn with_on_blur(self, handler: UiEventHandler) -> Self

Attaches an on_blur callback handler to the target node.

§Arguments
  • Self - Patch builder.
  • UiEventHandler - Blur event callback.
§Returns
  • Self - Updated patch builder.
Source

pub fn with_a11y(self, props: A11yProps) -> Self

Attaches semantic A11yProps accessibility metadata to the target node.

§Arguments
  • Self - Patch builder.
  • A11yProps - Accessibility role, label, hint, and state metadata.
§Returns
  • Self - Updated patch builder.
Source§

impl NodeInitPatch

Implements impl #impl_generics #name #ty_generics #where_clause.

Source

pub fn get_mut_focusable(&mut self) -> &mut Option<bool>

Source

pub fn set_focusable(&mut self, val: Option<bool>) -> &mut Self

Source

pub fn get_mut_on_click(&mut self) -> &mut Option<UiEventHandler>

Source

pub fn set_on_click(&mut self, val: Option<UiEventHandler>) -> &mut Self

Source

pub fn get_mut_on_change(&mut self) -> &mut Option<UiEventHandler>

Source

pub fn set_on_change(&mut self, val: Option<UiEventHandler>) -> &mut Self

Source

pub fn get_mut_on_scroll(&mut self) -> &mut Option<UiEventHandler>

Source

pub fn set_on_scroll(&mut self, val: Option<UiEventHandler>) -> &mut Self

Source

pub fn get_mut_on_pointer_down(&mut self) -> &mut Option<UiEventHandler>

Source

pub fn set_on_pointer_down(&mut self, val: Option<UiEventHandler>) -> &mut Self

Source

pub fn get_mut_on_pointer_move(&mut self) -> &mut Option<UiEventHandler>

Source

pub fn set_on_pointer_move(&mut self, val: Option<UiEventHandler>) -> &mut Self

Source

pub fn get_mut_on_pointer_up(&mut self) -> &mut Option<UiEventHandler>

Source

pub fn set_on_pointer_up(&mut self, val: Option<UiEventHandler>) -> &mut Self

Source

pub fn get_mut_on_pointer_enter(&mut self) -> &mut Option<UiEventHandler>

Source

pub fn set_on_pointer_enter(&mut self, val: Option<UiEventHandler>) -> &mut Self

Source

pub fn get_mut_on_pointer_leave(&mut self) -> &mut Option<UiEventHandler>

Source

pub fn set_on_pointer_leave(&mut self, val: Option<UiEventHandler>) -> &mut Self

Source

pub fn get_mut_on_key_down(&mut self) -> &mut Option<UiEventHandler>

Source

pub fn set_on_key_down(&mut self, val: Option<UiEventHandler>) -> &mut Self

Source

pub fn get_mut_on_focus(&mut self) -> &mut Option<UiEventHandler>

Source

pub fn set_on_focus(&mut self, val: Option<UiEventHandler>) -> &mut Self

Source

pub fn get_mut_on_blur(&mut self) -> &mut Option<UiEventHandler>

Source

pub fn set_on_blur(&mut self, val: Option<UiEventHandler>) -> &mut Self

Source

pub fn get_mut_a11y(&mut self) -> &mut Option<A11yProps>

Source

pub fn set_a11y(&mut self, val: Option<A11yProps>) -> &mut Self

Trait Implementations§

Source§

impl Default for NodeInitPatch

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.