pub struct BoundValueKind {
pub value: ValueKind,
pub unit: Option<Arc<str>>,
}Expand description
Canonical suggestion/fill value plus the written measure unit when one was declared.
unit is the unit from -> suggest 100 inr / -> with 5 eur; Show
display stamps it so the one-liner matches the written unit, not the type’s first unit.
Shared via Arc so value-table clones bump a refcount instead of allocating.
For ranges this stays None; each endpoint carries its own unit on its type.
Fields§
§value: ValueKind§unit: Option<Arc<str>>Implementations§
Source§impl BoundValueKind
impl BoundValueKind
pub fn unbound(value: ValueKind) -> Self
pub fn with_binding(value: ValueKind, unit: Option<Arc<str>>) -> Self
pub fn to_literal(&self) -> LiteralValue
Trait Implementations§
Source§impl Clone for BoundValueKind
impl Clone for BoundValueKind
Source§impl Debug for BoundValueKind
impl Debug for BoundValueKind
impl Eq for BoundValueKind
Source§impl Hash for BoundValueKind
impl Hash for BoundValueKind
Source§impl PartialEq for BoundValueKind
impl PartialEq for BoundValueKind
impl StructuralPartialEq for BoundValueKind
Auto Trait Implementations§
impl Forget for BoundValueKind
impl Freeze for BoundValueKind
impl RefUnwindSafe for BoundValueKind
impl Send for BoundValueKind
impl Sync for BoundValueKind
impl Unpin for BoundValueKind
impl UnsafeUnpin for BoundValueKind
impl UnwindSafe for BoundValueKind
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> 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.