pub enum FullValue {
Array(Vec<Self>),
Instance(String, HashMap<String, Self>),
Data(DataId),
IntermediateResult(ResultId),
Boolean(bool),
Integer(i64),
Real(f64),
String(String),
Void,
}
Expand description
Defines a so-called ‘FullValue’, which is like a normal value but with direct definitions instead of references to them (which makes them ideal to share over the wire).
Note that the order of the enums is not the same as that of Value. This is done to proper disambiguate between Data and String when deserializing.
Variants§
Array(Vec<Self>)
It’s an Array of values
Instance(String, HashMap<String, Self>)
It’s an instance object, that maps field names to values.
Data(DataId)
It’s a data object that contains the identifier of the dataset referenced.
IntermediateResult(ResultId)
It’s an intermediate result object that contains the identifier of the dataset or result referenced.
Boolean(bool)
It’s a boolean value (true/false)
Integer(i64)
It’s an integer value (non-fractional numbers)
Real(f64)
It’s a real value (fractional numbers)
String(String)
It’s a string value (UTF-8 characters)
Void
No value
Implementations§
source§impl FullValue
impl FullValue
sourcepub fn data_type(&self) -> DataType
pub fn data_type(&self) -> DataType
Returns the DataType of this Value. Note that the following properties may be assumed:
- The datatype is never Void (since it is a value)
- Because it is runtime, it always has a non-Any type (i.e., it’s always resolved).
sourcepub fn into_value(self, table: &SymTable) -> Value
pub fn into_value(self, table: &SymTable) -> Value
Converts the FullValue into its lighter self by resolving its own internals to definition references.
This operator consumes self, which allows for a more efficient conversion in the case of objects.
§Arguments
table
: The VirtualTable where will reference to.
§Returns
A new Value with references instead of duplicate types and such.
Trait Implementations§
source§impl<'de> Deserialize<'de> for FullValue
impl<'de> Deserialize<'de> for FullValue
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>,
impl StructuralPartialEq for FullValue
Auto Trait Implementations§
impl Freeze for FullValue
impl RefUnwindSafe for FullValue
impl Send for FullValue
impl Sync for FullValue
impl Unpin for FullValue
impl UnwindSafe for FullValue
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request