pub struct BoundValue {
pub literal_string: Option<String>,
pub literal_number: Option<f64>,
pub literal_boolean: Option<bool>,
pub literal_array: Option<Vec<Value>>,
pub path: Option<String>,
}Expand description
A value that can be either a literal or bound to the data model.
Used in v0.8 for component properties like text, label, etc.
Fields§
§literal_string: Option<String>A static string value.
literal_number: Option<f64>A static number value.
literal_boolean: Option<bool>A static boolean value.
literal_array: Option<Vec<Value>>A static array value.
path: Option<String>A JSON Pointer path to a value in the data model.
Implementations§
Source§impl BoundValue
impl BoundValue
Sourcepub fn from_literal_string(s: impl Into<String>) -> Self
pub fn from_literal_string(s: impl Into<String>) -> Self
Create a BoundValue from a literal string.
Trait Implementations§
Source§impl Clone for BoundValue
impl Clone for BoundValue
Source§fn clone(&self) -> BoundValue
fn clone(&self) -> BoundValue
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 moreSource§impl Debug for BoundValue
impl Debug for BoundValue
Source§impl<'de> Deserialize<'de> for BoundValue
impl<'de> Deserialize<'de> for BoundValue
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
Source§impl PartialEq for BoundValue
impl PartialEq for BoundValue
Source§impl Serialize for BoundValue
impl Serialize for BoundValue
impl StructuralPartialEq for BoundValue
Auto Trait Implementations§
impl Freeze for BoundValue
impl RefUnwindSafe for BoundValue
impl Send for BoundValue
impl Sync for BoundValue
impl Unpin for BoundValue
impl UnsafeUnpin for BoundValue
impl UnwindSafe for BoundValue
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