pub struct PdfReader<'a> { /* private fields */ }Expand description
A byte-level reader over a PDF byte slice, with position tracking.
Implementations§
Source§impl<'a> PdfReader<'a>
impl<'a> PdfReader<'a>
pub fn new(data: &'a [u8]) -> Self
Sourcepub fn new_at(data: &'a [u8], pos: usize) -> Self
pub fn new_at(data: &'a [u8], pos: usize) -> Self
Create a reader starting at a specific offset.
Sourcepub fn slice(&self, start: usize, end: usize) -> &'a [u8] ⓘ
pub fn slice(&self, start: usize, end: usize) -> &'a [u8] ⓘ
Return a slice from the underlying data.
Sourcepub fn skip_whitespace(&mut self)
pub fn skip_whitespace(&mut self)
Skip PDF whitespace characters: \0, \t, \n, \x0C, \r, \x20.
Sourcepub fn skip_whitespace_and_comments(&mut self)
pub fn skip_whitespace_and_comments(&mut self)
Skip whitespace and comments (% to end of line).
Auto Trait Implementations§
impl<'a> Freeze for PdfReader<'a>
impl<'a> RefUnwindSafe for PdfReader<'a>
impl<'a> Send for PdfReader<'a>
impl<'a> Sync for PdfReader<'a>
impl<'a> Unpin for PdfReader<'a>
impl<'a> UnsafeUnpin for PdfReader<'a>
impl<'a> UnwindSafe for PdfReader<'a>
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> 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