Struct tl::VDom[][src]

pub struct VDom<'a> { /* fields omitted */ }

VDom represents a Document Object Model

Implementations

impl<'a> VDom<'a>[src]

pub fn get_element_by_id<'b, S: ?Sized>(
    &'b self,
    id: &'b S
) -> Option<&'b Rc<Node<'a>>> where
    S: AsBytes
[src]

Finds an element by its id attribute. This operation is O(1), as it’s only a HashMap lookup

pub fn get_elements_by_class_name<'b, S: ?Sized>(
    &'b self,
    id: &'b S
) -> Option<&'b Vec<Rc<Node<'a>>>> where
    S: AsBytes
[src]

Returns a list of elements that match a given class name. This operation is O(1), as it’s only a HashMap lookup

pub fn children(&self) -> &Tree<'a>[src]

Returns all subnodes (“children”) of this DOM

pub fn version(&self) -> Option<HTMLVersion>[src]

Returns the HTML version. This is determined by the <!DOCTYPE> tag

Trait Implementations

impl<'a> Debug for VDom<'a>[src]

Auto Trait Implementations

impl<'a> !RefUnwindSafe for VDom<'a>

impl<'a> !Send for VDom<'a>

impl<'a> !Sync for VDom<'a>

impl<'a> Unpin for VDom<'a>

impl<'a> !UnwindSafe for VDom<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.