pub enum Key {
None,
Int(i64),
Float(u64),
Str(String),
Bytes(Vec<u8>),
File(u64),
}Expand description
A dictionary key: the hashable Python values that PostScript objects carry.
Numbers that compare equal in Python are the same key (1 == 1.0 == True).
Variants§
None
None (the value of operators and null).
Int(i64)
An integer, a boolean, or a float with an integral value.
Float(u64)
A float without an integral value, by its bits.
Str(String)
A string: names, literals and text strings.
Bytes(Vec<u8>)
A byte string, as readstring makes them.
File(u64)
The file object of a tokenizer, by identity.
Implementations§
Trait Implementations§
impl Eq for Key
Source§impl Ord for Key
impl Ord for Key
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 PartialOrd for Key
impl PartialOrd for Key
impl StructuralPartialEq for Key
Auto Trait Implementations§
impl Forget for Key
impl Freeze for Key
impl Move for Key
impl RefUnwindSafe for Key
impl Send for Keywhere
RawVecInner: Send,
impl Sync for Keywhere
RawVecInner: Sync,
impl Unpin for Key
impl UnsafeUnpin for Key
impl UnwindSafe for Keywhere
RawVecInner: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.