pub enum RuntimeValue {
Coordinates(Coordinates),
Number {
value: f64,
provenance: Provenance,
},
Text {
value: String,
provenance: Provenance,
},
}Expand description
A value observed at runtime, tagged with the evidence that produced it. 运行期观测到的取值,并携带产出它的证据。
Variants§
Coordinates(Coordinates)
Geometry carrying both its actual and expected coordinate spaces. 同时携带实际坐标系与预期坐标系的几何取值。
Number
A numeric observation plus its provenance. 数值观测及其来源。
Fields
§
provenance: ProvenanceEvidence explaining where the number came from. 说明该数值由来的证据。
Text
A text observation plus its provenance. 文本观测及其来源。
Fields
§
provenance: ProvenanceEvidence explaining where the text came from. 说明该文本由来的证据。
Implementations§
Source§impl RuntimeValue
impl RuntimeValue
Sourcepub fn number(value: f64, provenance: Provenance) -> RuntimeValue
pub fn number(value: f64, provenance: Provenance) -> RuntimeValue
Build a numeric value carrying its provenance. 构建携带来源证据的数值。
Sourcepub fn text(value: impl Into<String>, provenance: Provenance) -> RuntimeValue
pub fn text(value: impl Into<String>, provenance: Provenance) -> RuntimeValue
Build a text value carrying its provenance. 构建携带来源证据的文本值。
Sourcepub fn provenance(&self) -> &Provenance
pub fn provenance(&self) -> &Provenance
Borrow the evidence chain shared by every variant. 借用各变体共有的证据链。
Trait Implementations§
Source§impl Clone for RuntimeValue
impl Clone for RuntimeValue
Source§fn clone(&self) -> RuntimeValue
fn clone(&self) -> RuntimeValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RuntimeValue
impl RefUnwindSafe for RuntimeValue
impl Send for RuntimeValue
impl Sync for RuntimeValue
impl Unpin for RuntimeValue
impl UnsafeUnpin for RuntimeValue
impl UnwindSafe for RuntimeValue
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