Trait aravis::DomNodeExt

source ·
pub trait DomNodeExt: 'static {
Show 17 methods // Required methods fn append_child<P: IsA<DomNode>>(&self, new_child: &P) -> Option<DomNode>; fn changed(&self); fn child_nodes(&self) -> Option<DomNodeList>; fn first_child(&self) -> Option<DomNode>; fn last_child(&self) -> Option<DomNode>; fn next_sibling(&self) -> Option<DomNode>; fn node_name(&self) -> Option<GString>; fn node_type(&self) -> DomNodeType; fn node_value(&self) -> Option<GString>; fn owner_document(&self) -> Option<DomDocument>; fn parent_node(&self) -> Option<DomNode>; fn previous_sibling(&self) -> Option<DomNode>; fn has_child_nodes(&self) -> bool; fn insert_before<P: IsA<DomNode>, Q: IsA<DomNode>>( &self, new_child: &P, ref_child: &Q ) -> Option<DomNode>; fn remove_child<P: IsA<DomNode>>(&self, old_child: &P) -> Option<DomNode>; fn replace_child<P: IsA<DomNode>, Q: IsA<DomNode>>( &self, new_child: &P, old_child: &Q ) -> Option<DomNode>; fn set_node_value(&self, new_value: &str);
}
Expand description

Required Methods§

source

fn append_child<P: IsA<DomNode>>(&self, new_child: &P) -> Option<DomNode>

Adds the node new_child to the end of the list of children of this node. If the new_child is already in the tree, it is first removed.

new_child

node to append

Returns

the added node.

source

fn changed(&self)

source

fn child_nodes(&self) -> Option<DomNodeList>

Returns

a DomNodeList, NULL on error.

source

fn first_child(&self) -> Option<DomNode>

Returns

self first child.

source

fn last_child(&self) -> Option<DomNode>

Returns

self last child.

source

fn next_sibling(&self) -> Option<DomNode>

Returns

self next sibling.

source

fn node_name(&self) -> Option<GString>

Gets the node name.

Returns

the node name.

source

fn node_type(&self) -> DomNodeType

source

fn node_value(&self) -> Option<GString>

Gets the node value.

Returns

the node value.

source

fn owner_document(&self) -> Option<DomDocument>

Returns

self owner document.

source

fn parent_node(&self) -> Option<DomNode>

Get the parent node of self.

Returns

self parent.

source

fn previous_sibling(&self) -> Option<DomNode>

Returns

self previous sibling.

source

fn has_child_nodes(&self) -> bool

source

fn insert_before<P: IsA<DomNode>, Q: IsA<DomNode>>( &self, new_child: &P, ref_child: &Q ) -> Option<DomNode>

Inserts the node new_child before the existing child node ref_child. If ref_child is null, insert new_child at the end of the list of children. If the new_child is already in the tree, it is first removed.

new_child

node to insert

ref_child

reference node, i.e., the node before which the new node must be inserted.

Returns

the inserted node.

source

fn remove_child<P: IsA<DomNode>>(&self, old_child: &P) -> Option<DomNode>

Removes the child node indicated by old_child from the list of children, and returns it.

old_child

node to remove.

Returns

the removed node.

source

fn replace_child<P: IsA<DomNode>, Q: IsA<DomNode>>( &self, new_child: &P, old_child: &Q ) -> Option<DomNode>

Replaces the child node old_child with new_child in the list of children, and returns the old_child node. If the new_child is already in the tree, it is first removed.

new_child

a replacement node

old_child

node to replace

Returns

the replaced node.

source

fn set_node_value(&self, new_value: &str)

Implementors§