pub struct Element {
pub element_type: String,
pub properties: Vec<(String, Vec<String>)>,
pub lang: Option<String>,
pub text: Option<String>,
pub children: Vec<Element>,
}
Expand description
Represents an hOCR element.
Fields§
§element_type: String
§properties: Vec<(String, Vec<String>)>
§lang: Option<String>
§text: Option<String>
§children: Vec<Element>
Implementations§
Source§impl Element
impl Element
Sourcepub fn from_element_borrowed(e: &ElementBorrowed<'_>) -> Self
pub fn from_element_borrowed(e: &ElementBorrowed<'_>) -> Self
Create a new Element
instance from an ElementBorrowed
.
Source§impl Element
impl Element
Sourcepub fn descendants(&self) -> ElementsIterator<'_>
pub fn descendants(&self) -> ElementsIterator<'_>
Returns an iterator over all descendants of this hOCR element. Note that the iterator returns elements in a breadth-first order.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Element
impl RefUnwindSafe for Element
impl Send for Element
impl Sync for Element
impl Unpin for Element
impl UnwindSafe for Element
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