[−][src]Struct marked::Node
A typed node (e.g. text, element, etc.) within a Document
including
identifiers to parent, siblings and children.
Methods
impl Node
[src]
pub fn new_elem(element: Element) -> Node
[src]
Construct a new element node.
pub fn new_text<T>(text: T) -> Node where
T: Into<StrTendril>,
[src]
T: Into<StrTendril>,
Construct a new text node.
Methods from Deref<Target = NodeData>
pub fn as_element(&self) -> Option<&Element>
[src]
Return Element
is this is an element.
pub fn as_element_mut(&mut self) -> Option<&mut Element>
[src]
Return mutable Element
reference if this is an element.
pub fn as_text(&self) -> Option<&StrTendril>
[src]
Return text (char data) if this is a text node.
pub fn as_text_mut(&mut self) -> Option<&mut StrTendril>
[src]
Return mutable text (char data) reference if this is a text node.
pub fn attr<LN>(&self, lname: LN) -> Option<&StrTendril> where
LN: Into<LocalName>,
[src]
LN: Into<LocalName>,
Return attribute value by given local attribute name, if this is an element with that attribute present.
pub fn is_elem<LN>(&self, lname: LN) -> bool where
LN: Into<LocalName>,
[src]
LN: Into<LocalName>,
Return true if this Node is an element with the given local name.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Node
impl !Send for Node
impl !Sync for Node
impl Unpin for Node
impl UnwindSafe for Node
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,