pub struct PsObject {
pub value: PsValue,
pub flags: ObjFlags,
}Expand description
A PostScript object: a tagged value with metadata flags.
PsObject is Clone + Copy — it’s a value type containing indices
into arena stores, not heap references.
Fields§
§value: PsValue§flags: ObjFlagsImplementations§
Source§impl PsObject
impl PsObject
pub fn int(v: i32) -> Self
pub fn real(v: f64) -> Self
pub fn bool(v: bool) -> Self
pub fn null() -> Self
pub fn mark() -> Self
pub fn operator(op: OpCode) -> Self
Sourcepub fn stopped_mark() -> Self
pub fn stopped_mark() -> Self
Stopped marker (internal).
Sourcepub fn hard_return() -> Self
pub fn hard_return() -> Self
HardReturn marker (internal).
Sourcepub fn dict_end(entity: EntityId) -> Self
pub fn dict_end(entity: EntityId) -> Self
DictEnd marker (internal) — conditionally pops the dict stack when reached.
pub fn is_numeric(&self) -> bool
pub fn is_int(&self) -> bool
pub fn is_real(&self) -> bool
pub fn is_bool(&self) -> bool
pub fn is_array_type(&self) -> bool
pub fn is_composite(&self) -> bool
Sourcepub fn is_global_vm(&self) -> bool
pub fn is_global_vm(&self) -> bool
Check if this object is in global VM using authoritative entity tag bits for composite types, falling back to ObjFlags for simple types.
Trait Implementations§
impl Copy for PsObject
impl StructuralPartialEq for PsObject
Auto Trait Implementations§
impl Freeze for PsObject
impl RefUnwindSafe for PsObject
impl Send for PsObject
impl Sync for PsObject
impl Unpin for PsObject
impl UnsafeUnpin for PsObject
impl UnwindSafe for PsObject
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