pub enum StructRole2Compat {
Compatible(StructRole),
RoleMapping(StructRole),
}Expand description
How a particular PDF 2.0 StructRole2 can be represented in PDF 1.7.
Variants§
Compatible(StructRole)
The role is a direct match with this PDF 1.7 role.
RoleMapping(StructRole)
The has no direct match with a PDF 1.7 role, but can be mapped to a PDF 1.7 role with a similar meaning.
Implementations§
Source§impl StructRole2Compat
impl StructRole2Compat
Sourcepub fn into_pdf_1_7(self) -> Option<StructRole>
pub fn into_pdf_1_7(self) -> Option<StructRole>
Return the corresponding PDF 1.7 StructRole for this role or None
if there is no exact match.
Sourcepub fn role_mapped_1_7(self) -> Option<StructRole>
pub fn role_mapped_1_7(self) -> Option<StructRole>
Return the closest equivalent role in the PDF 1.7 namespace.
Returns None if the role exactly matches a PDF 1.7 role (see
Self::into_pdf_1_7).
Sourcepub fn role(self) -> StructRole
pub fn role(self) -> StructRole
Return the inner role.
Trait Implementations§
Source§impl Clone for StructRole2Compat
impl Clone for StructRole2Compat
Source§fn clone(&self) -> StructRole2Compat
fn clone(&self) -> StructRole2Compat
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 moreSource§impl Debug for StructRole2Compat
impl Debug for StructRole2Compat
Source§impl Hash for StructRole2Compat
impl Hash for StructRole2Compat
Source§impl PartialEq for StructRole2Compat
impl PartialEq for StructRole2Compat
impl Copy for StructRole2Compat
impl Eq for StructRole2Compat
impl StructuralPartialEq for StructRole2Compat
Auto Trait Implementations§
impl Freeze for StructRole2Compat
impl RefUnwindSafe for StructRole2Compat
impl Send for StructRole2Compat
impl Sync for StructRole2Compat
impl Unpin for StructRole2Compat
impl UnwindSafe for StructRole2Compat
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