pub struct CommentRef(/* private fields */);Expand description
Wrapper of Rc<RefCell<Comment>>.
Strings are encoded in UTF-8. Unlike the specification, methods that specify string boundaries are constrained to be UTF-8 character boundaries.
Trait Implementations§
Source§impl CharacterData for CommentRef
impl CharacterData for CommentRef
Source§fn substring_data(
&self,
offset: usize,
count: usize,
) -> Result<String, DOMException>
fn substring_data( &self, offset: usize, count: usize, ) -> Result<String, DOMException>
Implementation of
substringData. Read moreSource§fn append_data(&mut self, arg: &str) -> Result<(), DOMException>
fn append_data(&mut self, arg: &str) -> Result<(), DOMException>
Implementation of
appendData method. Read moreSource§fn insert_data(&mut self, offset: usize, arg: &str) -> Result<(), DOMException>
fn insert_data(&mut self, offset: usize, arg: &str) -> Result<(), DOMException>
Implementation of
insertData method. Read moreSource§fn delete_data(
&mut self,
offset: usize,
count: usize,
) -> Result<(), DOMException>
fn delete_data( &mut self, offset: usize, count: usize, ) -> Result<(), DOMException>
Implementation of
deleteData method. Read moreSource§fn replace_data(
&mut self,
offset: usize,
count: usize,
arg: &str,
) -> Result<(), DOMException>
fn replace_data( &mut self, offset: usize, count: usize, arg: &str, ) -> Result<(), DOMException>
Implementation of
replaceData method. Read moreSource§impl Clone for CommentRef
impl Clone for CommentRef
Source§fn clone(&self) -> CommentRef
fn clone(&self) -> CommentRef
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl From<CommentRef> for NodeRef
impl From<CommentRef> for NodeRef
Source§fn from(value: CommentRef) -> Self
fn from(value: CommentRef) -> Self
Converts to this type from the input type.
Source§impl Node for CommentRef
impl Node for CommentRef
Source§fn set_node_value(
&mut self,
value: impl Into<String>,
) -> Result<(), DOMException>
fn set_node_value( &mut self, value: impl Into<String>, ) -> Result<(), DOMException>
Source§fn parent_node(&self) -> Option<NodeRef>
fn parent_node(&self) -> Option<NodeRef>
Implementation of
parentNode attribute. Read moreSource§fn previous_sibling(&self) -> Option<NodeRef>
fn previous_sibling(&self) -> Option<NodeRef>
Implementation of
previousSibling attribute. Read moreSource§fn next_sibling(&self) -> Option<NodeRef>
fn next_sibling(&self) -> Option<NodeRef>
Implementation of
nextSibling attribute. Read moreSource§fn owner_document(&self) -> Option<DocumentRef>
fn owner_document(&self) -> Option<DocumentRef>
Implementation of
ownerDocument attribute. Read moreSource§fn text_content(&self) -> Option<String>
fn text_content(&self) -> Option<String>
Implementation of
textContent attribute. Read moreSource§fn set_text_content(
&mut self,
text: impl Into<String>,
) -> Result<(), DOMException>
fn set_text_content( &mut self, text: impl Into<String>, ) -> Result<(), DOMException>
Implementation of
textContent attribute. Read moreSource§fn is_same_node(&self, other: &NodeRef) -> bool
fn is_same_node(&self, other: &NodeRef) -> bool
Implementation of
isSameNode method. Read moreSource§fn set_user_data(
&mut self,
key: impl Into<String>,
data: DOMUserData,
handler: Option<Arc<dyn UserDataHandler>>,
) -> Option<DOMUserData>
fn set_user_data( &mut self, key: impl Into<String>, data: DOMUserData, handler: Option<Arc<dyn UserDataHandler>>, ) -> Option<DOMUserData>
Implementation of
setUserData method. Read moreSource§fn get_user_data(&self, key: &str) -> Option<DOMUserData>
fn get_user_data(&self, key: &str) -> Option<DOMUserData>
Implementation of
getUserData method. Read moreSource§fn is_read_only(&self) -> bool
fn is_read_only(&self) -> bool
Check if this node is a read-only node. Read more
Source§fn child_nodes(&self) -> ChildNodesList<NodeRef>
fn child_nodes(&self) -> ChildNodesList<NodeRef>
Implementation of
childNodes attribute. Read moreSource§fn first_child(&self) -> Option<NodeRef>
fn first_child(&self) -> Option<NodeRef>
Implementation of
firstChild attribute. Read moreSource§fn attributes(&self) -> Option<AttributeMap>
fn attributes(&self) -> Option<AttributeMap>
Implementation of
attributes attribute. Read moreSource§fn insert_before(
&mut self,
new_child: NodeRef,
ref_child: Option<NodeRef>,
) -> Result<NodeRef, DOMException>
fn insert_before( &mut self, new_child: NodeRef, ref_child: Option<NodeRef>, ) -> Result<NodeRef, DOMException>
Implementation of
insertBefore method. Read moreSource§fn replace_child(
&mut self,
new_child: NodeRef,
old_child: NodeRef,
) -> Result<NodeRef, DOMException>
fn replace_child( &mut self, new_child: NodeRef, old_child: NodeRef, ) -> Result<NodeRef, DOMException>
Implementation of
replaceChild method. Read moreSource§fn remove_child(&mut self, old_child: NodeRef) -> Result<NodeRef, DOMException>
fn remove_child(&mut self, old_child: NodeRef) -> Result<NodeRef, DOMException>
Implementation of
removeChild method. Read moreSource§fn append_child(&mut self, new_child: NodeRef) -> Result<NodeRef, DOMException>
fn append_child(&mut self, new_child: NodeRef) -> Result<NodeRef, DOMException>
Implementation of
appendChild method. Read moreSource§fn has_child_nodes(&self) -> bool
fn has_child_nodes(&self) -> bool
Implementation of
hasChildNodes method. Read moreSource§fn is_supported(&self, feature: &str, version: Option<&str>) -> bool
fn is_supported(&self, feature: &str, version: Option<&str>) -> bool
Implementation of
isSupported attribute. Read moreSource§fn namespace_uri(&self) -> Option<Rc<str>>
fn namespace_uri(&self) -> Option<Rc<str>>
Implementation of
namespaceURI attribute. Read moreSource§fn set_prefix(
&mut self,
_prefix: Option<impl Into<Rc<str>>>,
) -> Result<(), DOMException>
fn set_prefix( &mut self, _prefix: Option<impl Into<Rc<str>>>, ) -> Result<(), DOMException>
Source§fn has_attributes(&self) -> bool
fn has_attributes(&self) -> bool
Implementation of
hasAttributes method. Read moreSource§fn compare_document_position(&self, other: &NodeRef) -> DocumentPosition
fn compare_document_position(&self, other: &NodeRef) -> DocumentPosition
Implementation of
compareDocumentPosition method. Read moreSource§fn lookup_prefix(&self, namespace_uri: &str) -> Option<Rc<str>>
fn lookup_prefix(&self, namespace_uri: &str) -> Option<Rc<str>>
Implementation of
lookupPrefix method. Read moreSource§fn is_default_namespace(&self, namespace_uri: &str) -> bool
fn is_default_namespace(&self, namespace_uri: &str) -> bool
Implementation of
isDefaultNamespace method. Read moreSource§fn lookup_namespace_uri(&self, prefix: Option<&str>) -> Option<Rc<str>>
fn lookup_namespace_uri(&self, prefix: Option<&str>) -> Option<Rc<str>>
Implementation of
lookupNamespaceURI method. Read moreSource§fn is_equal_node(&self, arg: &NodeRef) -> bool
fn is_equal_node(&self, arg: &NodeRef) -> bool
Implementation of
isEqualNode method. Read moreSource§fn get_feature(&self, feature: &str, version: Option<&str>) -> Option<Self>
fn get_feature(&self, feature: &str, version: Option<&str>) -> Option<Self>
Implementation of
getFeature method. Read moreAuto Trait Implementations§
impl Freeze for CommentRef
impl !RefUnwindSafe for CommentRef
impl !Send for CommentRef
impl !Sync for CommentRef
impl Unpin for CommentRef
impl !UnwindSafe for CommentRef
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