Struct visdom::types::Elements[][src]

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

Implementations

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

pub fn new() -> Elements<'a>[src]

pub fn with_nodes(
    nodes: Vec<Box<dyn IElementTrait + 'a, Global>, Global>
) -> Elements<'a>
[src]

pub fn with_capacity(size: usize) -> Elements<'a>[src]

pub fn get(&self, index: usize) -> Option<&Box<dyn IElementTrait + 'a, Global>>[src]

pub fn get_ref(&self) -> &Vec<Box<dyn IElementTrait + 'a, Global>, Global>[src]

pub fn get_mut_ref(
    &mut self
) -> &mut Vec<Box<dyn IElementTrait + 'a, Global>, Global>
[src]

pub fn for_each<F>(&mut self, handle: F) -> &mut Elements<'a> where
    F: FnMut(usize, &mut Box<dyn IElementTrait, Global>) -> bool
[src]

pub fn each<F>(&mut self, handle: F) -> &mut Elements<'a> where
    F: FnMut(usize, &mut Box<dyn IElementTrait, Global>) -> bool
[src]

pub fn map<F, T>(&self, handle: F) -> Vec<T, Global> where
    F: Fn(usize, &Box<dyn IElementTrait, Global>) -> T, 
[src]

pub fn length(&self) -> usize[src]

pub fn length

pub fn is_empty(&self) -> bool[src]

pub fn is_empty

pub fn document(&self) -> Option<Box<dyn IDocumentTrait + 'static, Global>>[src]

pub fn document, a quick way to get document

pub fn prev(&self, selector: &str) -> Elements<'a>[src]

pub fn prev_all(&self, selector: &str) -> Elements<'a>[src]

pub fn prev_until(
    &self,
    selector: &str,
    filter: &str,
    contains: bool
) -> Elements<'a>
[src]

pub fn next(&self, selector: &str) -> Elements<'a>[src]

pub fn next_all(&self, selector: &str) -> Elements<'a>[src]

pub fn next_until(
    &self,
    selector: &str,
    filter: &str,
    contains: bool
) -> Elements<'a>
[src]

pub fn siblings(&self, selector: &str) -> Elements<'a>[src]

pub fn children(&self, selector: &str) -> Elements<'a>[src]

pub fn parent(&self, selector: &str) -> Elements<'a>[src]

pub fn parents(&self, selector: &str) -> Elements<'a>[src]

pub fn parents_until(
    &self,
    selector: &str,
    filter: &str,
    contains: bool
) -> Elements<'a>
[src]

pub fn closest(&self, selector: &str) -> Elements<'a>[src]

pub fn find(&self, selector: &str) -> Elements<'a>[src]

pub fn find get elements by selector, support most of css selectors

pub fn filter(&self, selector: &str) -> Elements<'a>[src]

pub fn filter_by<F>(&self, handle: F) -> Elements<'a> where
    F: Fn(usize, &Box<dyn IElementTrait, Global>) -> bool
[src]

pub fn filter_in(&self, search: &Elements<'_>) -> Elements<'a>[src]

pub fn is(&self, selector: &str) -> bool[src]

pub fn is_by<F>(&self, handle: F) -> bool where
    F: Fn(usize, &Box<dyn IElementTrait, Global>) -> bool
[src]

pub fn is_in(&self, search: &Elements<'_>) -> bool[src]

pub fn is_all(&self, selector: &str) -> bool[src]

pub fn is_all_by<F>(&self, handle: F) -> bool where
    F: Fn(usize, &Box<dyn IElementTrait, Global>) -> bool
[src]

pub fn is_all_in(&self, search: &Elements<'_>) -> bool[src]

pub fn not(&self, selector: &str) -> Elements<'a>[src]

pub fn not_by<F>(&self, handle: F) -> Elements<'a> where
    F: Fn(usize, &Box<dyn IElementTrait, Global>) -> bool
[src]

pub fn not_in(&self, search: &Elements<'_>) -> Elements<'a>[src]

pub fn not_in remove element from Self which is also in search

pub fn has(&self, selector: &str) -> Elements<'a>[src]

pub fn has_in(&self, search: &Elements<'_>) -> Elements<'a>[src]

pub fn eq(&self, index: usize) -> Elements<'a>[src]

pub fn eq get a element by index

pub fn first(&self) -> Elements<'a>[src]

pub fn first get the first element, alias for ‘eq(0)’

pub fn last(&self) -> Elements<'a>[src]

pub fn last get the last element, alias for ‘eq(len - 1)’

pub fn slice<T>(&self, range: T) -> Elements<'a> where
    T: RangeBounds<usize>, 
[src]

pub fn slice get elements by a range parameter slice(0..1) equal to eq(0), first

pub fn add(&self, eles: Elements<'a>) -> Elements<'a>[src]

pub fn add concat two element set to a new set, it will take the owership of the parameter element set, but no sence to Self

pub fn cloned(&self) -> Elements<'a>[src]

pub fn text(&self) -> &str[src]

pub fn text get the text of each element in the set

pub fn set_text(&mut self, content: &str) -> &mut Elements<'a>[src]

pub fn set_text set each element’s text to content

pub fn html(&self) -> &str[src]

pub fn html get the first element’s html

pub fn set_html(&mut self, content: &str) -> &mut Elements<'a>[src]

pub fn set_html set each element’s html to content

pub fn outer_html(&self) -> &str[src]

pub fn outer_html get the first element’s outer html

pub fn texts(&self, limit_depth: u32) -> Texts<'a>[src]

pub fn texts get the text node of each element

pub fn attr(&self, attr_name: &str) -> Option<IAttrValue>[src]

pub fn attr get the first element’s attribute value

pub fn set_attr(
    &mut self,
    attr_name: &str,
    value: Option<&str>
) -> &mut Elements<'a>
[src]

pub fn set_attr set each element’s attribute to key = attr_name, value = value.

pub fn remove_attr(&mut self, attr_name: &str) -> &mut Elements<'a>[src]

pub fn remove_attr

pub fn has_class(&self, class_name: &str) -> bool[src]

pub fn has_class

pub fn add_class(&mut self, class_name: &str) -> &mut Elements<'a>[src]

pub fn add_class

pub fn remove_class(&mut self, class_name: &str) -> &mut Elements<'a>[src]

pub fn remove_class

pub fn toggle_class(&mut self, class_name: &str) -> &mut Elements<'a>[src]

pub fn toggle_class

pub fn remove(self)[src]

pub fn remove

pub fn empty(&mut self) -> &mut Elements<'a>[src]

pub fn append(&mut self, elements: &mut Elements<'_>) -> &mut Elements<'a>[src]

pub fn append

pub fn append_to(&mut self, elements: &mut Elements<'_>) -> &mut Elements<'a>[src]

pub fn append_to

pub fn prepend(&mut self, elements: &mut Elements<'_>) -> &mut Elements<'a>[src]

pub fn prepend

pub fn prepend_to(&mut self, elements: &mut Elements<'_>) -> &mut Elements<'a>[src]

pub fn prepend_to

pub fn insert_before(
    &mut self,
    elements: &mut Elements<'_>
) -> &mut Elements<'a>
[src]

pub fn insert_before

pub fn before(&mut self, elements: &mut Elements<'_>) -> &mut Elements<'a>[src]

pub fn before

pub fn insert_after(&mut self, elements: &mut Elements<'_>) -> &mut Elements<'a>[src]

pub fn insert_after

pub fn after(&mut self, elements: &mut Elements<'_>) -> &mut Elements<'a>[src]

pub fn after

Trait Implementations

impl<'a> Default for Elements<'a>[src]

impl<'a> From<Vec<Box<dyn IElementTrait + 'a, Global>, Global>> for Elements<'a>[src]

impl<'a> IntoIterator for Elements<'a>[src]

type Item = Box<dyn IElementTrait + 'a, Global>

The type of the elements being iterated over.

type IntoIter = Box<dyn Iterator<Item = <Elements<'a> as IntoIterator>::Item> + 'a, Global>

Which kind of iterator are we turning this into?

Auto Trait Implementations

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

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

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

impl<'a> Unpin for Elements<'a>

impl<'a> !UnwindSafe for Elements<'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.