pub struct Scanner<'a> { /* private fields */ }Expand description
A PostScript scanner that parses Objects from a byte stream.
Implementations§
Source§impl<'a> Scanner<'a>
impl<'a> Scanner<'a>
Sourcepub fn new(data: &'a [u8]) -> Self
pub fn new(data: &'a [u8]) -> Self
Create a new scanner over the given bytes of a PostScript program.
Sourcepub fn parse_object(&mut self) -> Result<Object<'a>>
pub fn parse_object(&mut self) -> Result<Object<'a>>
Parse the next object.
Sourcepub fn parse_number(&mut self) -> Result<Number>
pub fn parse_number(&mut self) -> Result<Number>
Parse the next object as a Number.
Sourcepub fn parse_name(&mut self) -> Result<Name<'a>>
pub fn parse_name(&mut self) -> Result<Name<'a>>
Parse the next object as a Name.
Sourcepub fn parse_string(&mut self) -> Result<String<'a>>
pub fn parse_string(&mut self) -> Result<String<'a>>
Parse the next object as a String.
Sourcepub fn parse_array(&mut self) -> Result<Array<'a>>
pub fn parse_array(&mut self) -> Result<Array<'a>>
Parse the next object as an Array.
Auto Trait Implementations§
impl<'a> Freeze for Scanner<'a>
impl<'a> RefUnwindSafe for Scanner<'a>
impl<'a> Send for Scanner<'a>
impl<'a> Sync for Scanner<'a>
impl<'a> Unpin for Scanner<'a>
impl<'a> UnsafeUnpin for Scanner<'a>
impl<'a> UnwindSafe for Scanner<'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