pub struct PdfVersion {
pub major: u8,
pub minor: u8,
}Expand description
A PDF version number as declared in the file header (%PDF-M.N).
This is the declared version from the header, not a judgement about
which features the file actually uses (a file can declare 1.4 yet be
upgraded in a later incremental update via the catalog’s /Version
entry — that reconciliation is Pass 1+ work, out of scope for the Pass
0 header probe).
§Examples
use pdfcer_model::PdfVersion;
let v = PdfVersion { major: 1, minor: 7 };
assert_eq!(v.to_string(), "1.7");Fields§
§major: u8Major version digit (1 for PDF 1.x, 2 for PDF 2.0).
minor: u8Minor version digit (0–7 for PDF 1.x, 0 for PDF 2.0).
Trait Implementations§
Source§impl Clone for PdfVersion
impl Clone for PdfVersion
impl Copy for PdfVersion
Source§impl Debug for PdfVersion
impl Debug for PdfVersion
Source§impl Display for PdfVersion
impl Display for PdfVersion
impl Eq for PdfVersion
Source§impl Hash for PdfVersion
impl Hash for PdfVersion
Source§impl Ord for PdfVersion
impl Ord for PdfVersion
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for PdfVersion
impl PartialEq for PdfVersion
Source§impl PartialOrd for PdfVersion
impl PartialOrd for PdfVersion
impl StructuralPartialEq for PdfVersion
Auto Trait Implementations§
impl Freeze for PdfVersion
impl RefUnwindSafe for PdfVersion
impl Send for PdfVersion
impl Sync for PdfVersion
impl Unpin for PdfVersion
impl UnsafeUnpin for PdfVersion
impl UnwindSafe for PdfVersion
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