dioxus_native_core::real_dom

Struct ElementNodeMut

Source
pub struct ElementNodeMut<'a, V: FromAnyValue + Send + Sync = ()> { /* private fields */ }
Expand description

A mutable refrence to a text Element node in the RealDom

Implementations§

Source§

impl<V: FromAnyValue + Send + Sync> ElementNodeMut<'_, V>

Source

pub fn tag(&self) -> &str

Get the tag of the element

Source

pub fn tag_mut(&mut self) -> &mut String

Get a mutable reference to the tag of the element

Source

pub fn namespace(&self) -> Option<&str>

Get a reference to the namespace the element is in

Source

pub fn namespace_mut(&mut self) -> &mut Option<String>

Get a mutable reference to the namespace the element is in

Source

pub fn attributes( &self, ) -> &FxHashMap<OwnedAttributeDiscription, OwnedAttributeValue<V>>

Get a reference to all of the attributes currently set on the element

Source

pub fn set_attribute( &mut self, name: impl Into<OwnedAttributeDiscription>, value: impl Into<OwnedAttributeValue<V>>, ) -> Option<OwnedAttributeValue<V>>

Set an attribute in the element

Source

pub fn remove_attribute( &mut self, name: &OwnedAttributeDiscription, ) -> Option<OwnedAttributeValue<V>>

Remove an attribute from the element

Source

pub fn get_attribute_mut( &mut self, name: &OwnedAttributeDiscription, ) -> Option<&mut OwnedAttributeValue<V>>

Get an attribute of the element

Source

pub fn get_attribute( &self, name: &OwnedAttributeDiscription, ) -> Option<&OwnedAttributeValue<V>>

Get an attribute of the element

Source

pub fn listeners(&self) -> &FxHashSet<String>

Get the set of all events the element is listening to

Trait Implementations§

Source§

impl Debug for ElementNodeMut<'_>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a, V> Freeze for ElementNodeMut<'a, V>

§

impl<'a, V> RefUnwindSafe for ElementNodeMut<'a, V>
where V: RefUnwindSafe,

§

impl<'a, V> Send for ElementNodeMut<'a, V>

§

impl<'a, V> Sync for ElementNodeMut<'a, V>

§

impl<'a, V> Unpin for ElementNodeMut<'a, V>

§

impl<'a, V = ()> !UnwindSafe for ElementNodeMut<'a, V>

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.