CommentRef

Struct CommentRef 

Source
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

Source§

fn data(&self) -> String

Implementation of data attribute. Read more
Source§

fn set_data(&mut self, data: impl Into<String>) -> Result<(), DOMException>

Implementation of data attribute. Read more
Source§

fn length(&self) -> usize

Implementation of length attribute. Read more
Source§

fn substring_data( &self, offset: usize, count: usize, ) -> Result<String, DOMException>

Implementation of substringData. Read more
Source§

fn append_data(&mut self, arg: &str) -> Result<(), DOMException>

Implementation of appendData method. Read more
Source§

fn insert_data(&mut self, offset: usize, arg: &str) -> Result<(), DOMException>

Implementation of insertData method. Read more
Source§

fn delete_data( &mut self, offset: usize, count: usize, ) -> Result<(), DOMException>

Implementation of deleteData method. Read more
Source§

fn replace_data( &mut self, offset: usize, count: usize, arg: &str, ) -> Result<(), DOMException>

Implementation of replaceData method. Read more
Source§

impl Clone for CommentRef

Source§

fn clone(&self) -> CommentRef

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl From<CommentRef> for NodeRef

Source§

fn from(value: CommentRef) -> Self

Converts to this type from the input type.
Source§

impl From<Rc<RefCell<Comment>>> for CommentRef

Source§

fn from(value: Rc<RefCell<Comment>>) -> Self

Converts to this type from the input type.
Source§

impl Node for CommentRef

Source§

fn node_name(&self) -> Rc<str>

Implementation of nodeName attribute. Read more
Source§

fn node_value(&self) -> Option<Rc<str>>

Implementation of nodeValue attribute. Read more
Source§

fn set_node_value( &mut self, value: impl Into<String>, ) -> Result<(), DOMException>

Implementation of nodeValue attribute. Read more
Source§

fn node_type(&self) -> NodeType

Implementation of nodeType attribute. Read more
Source§

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

Implementation of parentNode attribute. Read more
Source§

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

Implementation of previousSibling attribute. Read more
Source§

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

Implementation of nextSibling attribute. Read more
Source§

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

Implementation of ownerDocument attribute. Read more
Source§

fn clone_node(&self, _deep: bool) -> NodeRef

Implementation of cloneNode method. Read more
Source§

fn text_content(&self) -> Option<String>

Implementation of textContent attribute. Read more
Source§

fn set_text_content( &mut self, text: impl Into<String>, ) -> Result<(), DOMException>

Implementation of textContent attribute. Read more
Source§

fn is_same_node(&self, other: &NodeRef) -> bool

Implementation of isSameNode method. Read more
Source§

fn set_user_data( &mut self, key: impl Into<String>, data: DOMUserData, handler: Option<Arc<dyn UserDataHandler>>, ) -> Option<DOMUserData>

Implementation of setUserData method. Read more
Source§

fn get_user_data(&self, key: &str) -> Option<DOMUserData>

Implementation of getUserData method. Read more
Source§

fn is_read_only(&self) -> bool

Check if this node is a read-only node. Read more
Source§

fn child_nodes(&self) -> ChildNodesList<NodeRef>

Implementation of childNodes attribute. Read more
Source§

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

Implementation of firstChild attribute. Read more
Source§

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

Implementation of lastChild attribute. Read more
Source§

fn attributes(&self) -> Option<AttributeMap>

Implementation of attributes attribute. Read more
Source§

fn insert_before( &mut self, new_child: NodeRef, ref_child: Option<NodeRef>, ) -> Result<NodeRef, DOMException>

Implementation of insertBefore method. Read more
Source§

fn replace_child( &mut self, new_child: NodeRef, old_child: NodeRef, ) -> Result<NodeRef, DOMException>

Implementation of replaceChild method. Read more
Source§

fn remove_child(&mut self, old_child: NodeRef) -> Result<NodeRef, DOMException>

Implementation of removeChild method. Read more
Source§

fn append_child(&mut self, new_child: NodeRef) -> Result<NodeRef, DOMException>

Implementation of appendChild method. Read more
Source§

fn has_child_nodes(&self) -> bool

Implementation of hasChildNodes method. Read more
Source§

fn normalize(&mut self)

Implementation of normalize method. Read more
Source§

fn is_supported(&self, feature: &str, version: Option<&str>) -> bool

Implementation of isSupported attribute. Read more
Source§

fn namespace_uri(&self) -> Option<Rc<str>>

Implementation of namespaceURI attribute. Read more
Source§

fn prefix(&self) -> Option<Rc<str>>

Implementation of prefix attribute. Read more
Source§

fn set_prefix( &mut self, _prefix: Option<impl Into<Rc<str>>>, ) -> Result<(), DOMException>

Implementation of prefix attribute. Read more
Source§

fn local_name(&self) -> Option<Rc<str>>

Implementation of localName attribute. Read more
Source§

fn has_attributes(&self) -> bool

Implementation of hasAttributes method. Read more
Source§

fn base_uri(&self) -> Option<String>

Implementation of baseURI attribute. Read more
Source§

fn compare_document_position(&self, other: &NodeRef) -> DocumentPosition

Implementation of compareDocumentPosition method. Read more
Source§

fn lookup_prefix(&self, namespace_uri: &str) -> Option<Rc<str>>

Implementation of lookupPrefix method. Read more
Source§

fn is_default_namespace(&self, namespace_uri: &str) -> bool

Implementation of isDefaultNamespace method. Read more
Source§

fn lookup_namespace_uri(&self, prefix: Option<&str>) -> Option<Rc<str>>

Implementation of lookupNamespaceURI method. Read more
Source§

fn is_equal_node(&self, arg: &NodeRef) -> bool

Implementation of isEqualNode method. Read more
Source§

fn get_feature(&self, feature: &str, version: Option<&str>) -> Option<Self>

Implementation of getFeature method. Read more

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V