pub enum PdfElement {
Text(PdfText),
Image(PdfImage),
Path(PdfPath),
Table(PdfTable),
Structure(PdfStructure),
}Expand description
Enum wrapper for mixed query results that can contain multiple element types.
Variants§
Implementations§
Source§impl PdfElement
impl PdfElement
pub fn as_text(&self) -> Option<&PdfText>
pub fn as_image(&self) -> Option<&PdfImage>
pub fn as_path(&self) -> Option<&PdfPath>
pub fn as_table(&self) -> Option<&PdfTable>
pub fn as_structure(&self) -> Option<&PdfStructure>
pub fn is_text(&self) -> bool
pub fn is_image(&self) -> bool
pub fn is_path(&self) -> bool
pub fn is_table(&self) -> bool
pub fn is_structure(&self) -> bool
pub fn bbox(&self) -> Rect
pub fn id(&self) -> ElementId
Trait Implementations§
Source§impl Clone for PdfElement
impl Clone for PdfElement
Source§fn clone(&self) -> PdfElement
fn clone(&self) -> PdfElement
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PdfElement
impl RefUnwindSafe for PdfElement
impl Send for PdfElement
impl Sync for PdfElement
impl Unpin for PdfElement
impl UnsafeUnpin for PdfElement
impl UnwindSafe for PdfElement
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more