pub enum Object {
Show 16 variants
Real {
value: Real,
},
Integer {
value: Integer,
},
Complex {
re: Real,
im: Real,
},
String {
value: String,
},
Name {
value: String,
},
LocalName {
value: String,
},
Character {
value: String,
},
Binary {
value: u64,
base: Option<Base>,
text: Option<String>,
},
List {
items: Vec<Object>,
},
Tagged {
tag: String,
object: Box<Object>,
},
Unit {
value: Real,
unit: Option<String>,
},
Array {
dims: Vec<usize>,
items: Vec<ArrayItem>,
},
Program {
source: Option<String>,
},
Algebraic {
source: Option<String>,
},
Command {
name: Option<String>,
address: Option<u32>,
library: Option<u16>,
command: Option<u16>,
source: Option<String>,
},
Unknown {
prolog: String,
kind: Option<String>,
nibbles: usize,
hex: String,
truncated: bool,
source: Option<String>,
graphic: Option<Graphic>,
},
}Expand description
A calculator object as the semantic tools return and accept it.
Variants§
Real
A real number, exact to its 12 digits.
Integer
A 49G exact integer.
Complex
A complex number.
String
A string (HP characters as Unicode).
Name
A global name.
LocalName
A local (temporary) name.
Character
A character object.
Binary
A binary integer (# 2Ah).
Fields
List
A list.
Tagged
A tagged object :tag:object.
Unit
A unit object value_unit.
Array
A real or complex array (vector or matrix).
Fields
Program
A program.
Algebraic
An algebraic expression.
Command
A built-in command (a ROM pointer to a program, code or primitive, or an XLIB name).
Fields
Unknown
Any other object: its prolog, type name and nibbles.
Fields
Implementations§
Source§impl Object
impl Object
Sourcepub fn needs_source(&self) -> bool
pub fn needs_source(&self) -> bool
Whether this object or one inside it needs text from the ASCII transfer (the transfer layer fills them in).
Sourcepub fn set_base(&mut self, b: Base)
pub fn set_base(&mut self, b: Base)
Set the base (and display text) of every binary integer inside.
Sourcepub fn has_binary(&self) -> bool
pub fn has_binary(&self) -> bool
Whether a binary integer is inside.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Object
impl<'de> Deserialize<'de> for Object
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Object
Auto Trait Implementations§
impl Freeze for Object
impl RefUnwindSafe for Object
impl Send for Object
impl Sync for Object
impl Unpin for Object
impl UnsafeUnpin for Object
impl UnwindSafe for Object
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