Enum interpreter::object::runtime::RuntimeValue
source · pub enum RuntimeValue {
Object(RefTo<Object>),
Integral(Integral),
Floating(Floating),
}Variants§
Implementations§
source§impl RuntimeValue
impl RuntimeValue
sourcepub fn as_object_mut(&mut self) -> Option<&mut RefTo<Object>>
pub fn as_object_mut(&mut self) -> Option<&mut RefTo<Object>>
Optionally returns mutable references to the inner fields if this is a RuntimeValue::Object, otherwise None
sourcepub fn as_object(&self) -> Option<&RefTo<Object>>
pub fn as_object(&self) -> Option<&RefTo<Object>>
Optionally returns references to the inner fields if this is a RuntimeValue::Object, otherwise None
sourcepub fn into_object(self) -> Result<RefTo<Object>, Self>
pub fn into_object(self) -> Result<RefTo<Object>, Self>
Returns the inner fields if this is a RuntimeValue::Object, otherwise returns back the enum in the Err case of the result
sourcepub fn as_integral_mut(&mut self) -> Option<&mut Integral>
pub fn as_integral_mut(&mut self) -> Option<&mut Integral>
Optionally returns mutable references to the inner fields if this is a RuntimeValue::Integral, otherwise None
sourcepub fn as_integral(&self) -> Option<&Integral>
pub fn as_integral(&self) -> Option<&Integral>
Optionally returns references to the inner fields if this is a RuntimeValue::Integral, otherwise None
sourcepub fn into_integral(self) -> Result<Integral, Self>
pub fn into_integral(self) -> Result<Integral, Self>
Returns the inner fields if this is a RuntimeValue::Integral, otherwise returns back the enum in the Err case of the result
sourcepub fn as_floating_mut(&mut self) -> Option<&mut Floating>
pub fn as_floating_mut(&mut self) -> Option<&mut Floating>
Optionally returns mutable references to the inner fields if this is a RuntimeValue::Floating, otherwise None
sourcepub fn as_floating(&self) -> Option<&Floating>
pub fn as_floating(&self) -> Option<&Floating>
Optionally returns references to the inner fields if this is a RuntimeValue::Floating, otherwise None
sourcepub fn into_floating(self) -> Result<Floating, Self>
pub fn into_floating(self) -> Result<Floating, Self>
Returns the inner fields if this is a RuntimeValue::Floating, otherwise returns back the enum in the Err case of the result
source§impl RuntimeValue
impl RuntimeValue
pub fn null_ref() -> Self
pub fn hash_code(&self) -> i32
pub fn computational_type(&self) -> ComputationalType
pub fn default_for_field(field: &FieldType) -> RuntimeValue
Trait Implementations§
source§impl Clone for RuntimeValue
impl Clone for RuntimeValue
source§fn clone(&self) -> RuntimeValue
fn clone(&self) -> RuntimeValue
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more