pub struct PsInterpreter {
pub dictstack: Vec<DictRef>,
pub stack: Vec<ObjRef>,
/* private fields */
}Expand description
The interpreter (PSInterpreter), with the operators of PSOperators.
Fields§
§dictstack: Vec<DictRef>The dictionary stack (dictstack): systemdict, userdict, then the
dictionaries of begin.
stack: Vec<ObjRef>The operand stack (stack).
Implementations§
Source§impl PsInterpreter
impl PsInterpreter
Sourcepub fn new(encoding: &str) -> Self
pub fn new(encoding: &str) -> Self
A new interpreter whose tokens are decoded with encoding
(PSInterpreter(encoding)).
Sourcepub fn interpret(&mut self, data: &[u8]) -> Result<(), PsError>
pub fn interpret(&mut self, data: &[u8]) -> Result<(), PsError>
Interprets PostScript code (interpret).
Sourcepub fn resolve_name(&self, name: &Key) -> Result<ObjRef, PsError>
pub fn resolve_name(&self, name: &Key) -> Result<ObjRef, PsError>
resolve_name: looks a name up in the dictionary stack, from the top.
Trait Implementations§
Source§impl Debug for PsInterpreter
impl Debug for PsInterpreter
Auto Trait Implementations§
impl !RefUnwindSafe for PsInterpreter
impl !Send for PsInterpreter
impl !Sync for PsInterpreter
impl !UnwindSafe for PsInterpreter
impl Forget for PsInterpreter
impl Freeze for PsInterpreter
impl Move for PsInterpreter
impl Unpin for PsInterpreter
impl UnsafeUnpin for PsInterpreterwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Rc<RefCell<IndexMap<Key, Rc<RefCell<PsObject>>>>>>: UnsafeUnpin,
PhantomData<Rc<RefCell<PsObject>>>: UnsafeUnpin,
*const RcInner<RefCell<PsObject>> is !null: UnsafeUnpin,
PhantomData<RcInner<RefCell<PsObject>>>: UnsafeUnpin,
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