Skip to main content

DomNode

Struct DomNode 

Source
pub struct DomNode {
    pub tag: String,
    pub is_text: bool,
    pub id: String,
    pub classes: Vec<String>,
    pub style: BTreeMap<String, String>,
    pub attrs: BTreeMap<String, String>,
    pub text_override: Option<String>,
    pub initial_text: String,
    pub parent: Option<usize>,
    pub children: Vec<usize>,
    pub classes_dirty: bool,
    pub style_dirty: bool,
}
Expand description

ブリッジ上の 1 ノード。要素またはテキスト。

Fields§

§tag: String

要素タグ(小文字)。テキストノードは空。

§is_text: bool§id: String§classes: Vec<String>§style: BTreeMap<String, String>

インライン style(プロパティ→値)。

§attrs: BTreeMap<String, String>

その他の属性(id/class/style 以外も含む生の値)。

§text_override: Option<String>

テキストノードの内容、または textContent 上書き値。

§initial_text: String

構築時のテキスト(textContent ゲッタ用)。

§parent: Option<usize>§children: Vec<usize>§classes_dirty: bool

JS が classes を変更したか(apply で焼き戻す)。

§style_dirty: bool

JS が style を変更したか。

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> Same for T

Source§

type Output = T

Should always be Self
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.