Struct table_extract::Table
source · pub struct Table { /* private fields */ }
Expand description
A parsed HTML table.
See the module level documentation for more.
Implementations§
source§impl Table
impl Table
sourcepub fn find_first(html: &str) -> Option<Table>
pub fn find_first(html: &str) -> Option<Table>
Finds the first table in html
.
sourcepub fn find_by_id(html: &str, id: &str) -> Option<Table>
pub fn find_by_id(html: &str, id: &str) -> Option<Table>
Finds the table in html
with an id of id
.
sourcepub fn find_by_headers<T>(html: &str, headers: &[T]) -> Option<Table>where
T: AsRef<str>,
pub fn find_by_headers<T>(html: &str, headers: &[T]) -> Option<Table>where T: AsRef<str>,
Finds the table in html
whose first row contains all of the headers
specified in headers
. The order does not matter.
If headers
is empty, this is the same as
find_first
.
sourcepub fn headers(&self) -> &Headers
pub fn headers(&self) -> &Headers
Returns the headers of the table.
This will be empty if the table had no <th>
tags in its first row. See
Headers
for more.
Trait Implementations§
source§impl<'a> IntoIterator for &'a Table
impl<'a> IntoIterator for &'a Table
source§impl PartialEq<Table> for Table
impl PartialEq<Table> for Table
impl Eq for Table
impl StructuralEq for Table
impl StructuralPartialEq for Table
Auto Trait Implementations§
impl RefUnwindSafe for Table
impl Send for Table
impl Sync for Table
impl Unpin for Table
impl UnwindSafe for Table
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