pub struct DomStore { /* private fields */ }Implementations§
Source§impl DomStore
impl DomStore
pub fn bootstrap_html(&mut self, html: impl Into<String>) -> Result<(), String>
pub fn select(&self, selector: &str) -> Result<Vec<NodeId>, String>
pub fn select_with_scope( &self, selector: &str, scope_root: Option<NodeId>, ) -> Result<Vec<NodeId>, String>
pub fn dump_dom(&self) -> String
pub fn document_title(&self) -> String
pub fn set_document_title( &mut self, value: impl Into<String>, ) -> Result<(), String>
pub fn get_attribute( &self, node_id: NodeId, name: &str, ) -> Result<Option<String>, String>
pub fn has_attribute(&self, node_id: NodeId, name: &str) -> Result<bool, String>
pub fn set_attribute( &mut self, node_id: NodeId, name: &str, value: impl Into<String>, ) -> Result<(), String>
pub fn remove_attribute( &mut self, node_id: NodeId, name: &str, ) -> Result<bool, String>
pub fn toggle_attribute( &mut self, node_id: NodeId, name: &str, force: Option<bool>, ) -> Result<bool, String>
pub fn set_text_content( &mut self, node_id: NodeId, value: &str, ) -> Result<(), String>
pub fn create_element( &mut self, tag_name: impl Into<String>, ) -> Result<NodeId, String>
pub fn create_element_ns( &mut self, namespace_uri: impl Into<String>, tag_name: impl Into<String>, ) -> Result<NodeId, String>
pub fn create_text_node( &mut self, value: impl Into<String>, ) -> Result<NodeId, String>
pub fn create_comment( &mut self, value: impl Into<String>, ) -> Result<NodeId, String>
pub fn clone_node( &mut self, node_id: NodeId, deep: bool, ) -> Result<NodeId, String>
pub fn text_content_for_node(&self, node_id: NodeId) -> String
pub fn value_for_node(&self, node_id: NodeId) -> String
pub fn checked_for_node(&self, node_id: NodeId) -> Option<bool>
pub fn indeterminate_for_node(&self, node_id: NodeId) -> Option<bool>
pub fn is_content_editable(&self, node_id: NodeId) -> bool
pub fn set_form_control_value( &mut self, node_id: NodeId, value: impl Into<String>, ) -> Result<(), String>
pub fn set_select_value( &mut self, node_id: NodeId, value: impl Into<String>, ) -> Result<(), String>
pub fn set_form_control_checked( &mut self, node_id: NodeId, checked: bool, ) -> Result<(), String>
pub fn set_form_control_indeterminate( &mut self, node_id: NodeId, indeterminate: bool, ) -> Result<(), String>
pub fn set_file_input_files( &mut self, node_id: NodeId, files: impl IntoIterator<Item = impl Into<String>>, ) -> Result<(), String>
pub fn inner_html_for_node(&self, node_id: NodeId) -> Result<String, String>
pub fn outer_html_for_node(&self, node_id: NodeId) -> Result<String, String>
pub fn set_inner_html( &mut self, node_id: NodeId, html: &str, ) -> Result<(), String>
pub fn set_outer_html( &mut self, node_id: NodeId, html: &str, ) -> Result<(), String>
pub fn append_html_to_document(&mut self, html: &str) -> Result<(), String>
pub fn document_open(&mut self) -> Result<(), String>
pub fn insert_adjacent_html( &mut self, node_id: NodeId, position: &str, html: &str, ) -> Result<(), String>
pub fn append_child( &mut self, parent: NodeId, child: NodeId, ) -> Result<(), String>
pub fn append_children<I>(
&mut self,
parent: NodeId,
children: I,
) -> Result<(), String>where
I: IntoIterator<Item = NodeId>,
pub fn prepend_children<I>(
&mut self,
parent: NodeId,
children: I,
) -> Result<(), String>where
I: IntoIterator<Item = NodeId>,
pub fn insert_before( &mut self, parent: NodeId, child: NodeId, reference: NodeId, ) -> Result<(), String>
pub fn insert_children_before<I>(
&mut self,
parent: NodeId,
reference: NodeId,
children: I,
) -> Result<(), String>where
I: IntoIterator<Item = NodeId>,
pub fn insert_children_after<I>(
&mut self,
parent: NodeId,
reference: NodeId,
children: I,
) -> Result<(), String>where
I: IntoIterator<Item = NodeId>,
pub fn replace_child( &mut self, parent: NodeId, new_child: NodeId, old_child: NodeId, ) -> Result<(), String>
pub fn replace_children<I>(
&mut self,
parent: NodeId,
children: I,
) -> Result<(), String>where
I: IntoIterator<Item = NodeId>,
pub fn remove_node(&mut self, node_id: NodeId) -> Result<(), String>
pub fn normalize_node(&mut self, node_id: NodeId) -> Result<(), String>
pub fn root_element_id(&self) -> Option<NodeId>
pub fn document_element_id(&self) -> Option<NodeId>
pub fn head_element_id(&self) -> Option<NodeId>
pub fn body_element_id(&self) -> Option<NodeId>
Source§impl DomStore
impl DomStore
pub fn new_empty() -> Self
pub fn source_html(&self) -> Option<&str>
pub fn document_id(&self) -> NodeId
pub fn node_count(&self) -> usize
pub fn nodes(&self) -> &[NodeRecord]
pub fn indexes(&self) -> &DomIndexes
pub fn side_tables(&self) -> &DomSideTables
pub fn focused_node(&self) -> Option<NodeId>
pub fn set_focused_node(&mut self, focused_node: Option<NodeId>)
pub fn target_fragment(&self) -> Option<&str>
pub fn set_target_fragment(&mut self, target_fragment: Option<String>)
pub fn document_state(&self) -> &DocumentState
Trait Implementations§
impl Eq for DomStore
impl StructuralPartialEq for DomStore
Auto Trait Implementations§
impl Freeze for DomStore
impl RefUnwindSafe for DomStore
impl Send for DomStore
impl Sync for DomStore
impl Unpin for DomStore
impl UnsafeUnpin for DomStore
impl UnwindSafe for DomStore
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