pub struct BindingExpression {
pub expression: String,
pub dependencies: Vec<PropertyPath>,
}Expand description
A binding expression that can be evaluated against state.
Fields§
§expression: StringExpression string (e.g., “{{ user.name }}” or “{{ count * 2 }}”)
dependencies: Vec<PropertyPath>Parsed dependencies (property paths used)
Implementations§
Source§impl BindingExpression
impl BindingExpression
Sourcepub fn new(expression: impl Into<String>) -> BindingExpression
pub fn new(expression: impl Into<String>) -> BindingExpression
Create a new binding expression.
Sourcepub fn property(path: impl Into<PropertyPath>) -> BindingExpression
pub fn property(path: impl Into<PropertyPath>) -> BindingExpression
Create a simple property binding.
Sourcepub fn is_simple_property(&self) -> bool
pub fn is_simple_property(&self) -> bool
Check if this is a simple property binding (no transforms).
Sourcepub fn as_property(&self) -> Option<&PropertyPath>
pub fn as_property(&self) -> Option<&PropertyPath>
Get the property path if this is a simple binding.
Trait Implementations§
Source§impl Clone for BindingExpression
impl Clone for BindingExpression
Source§fn clone(&self) -> BindingExpression
fn clone(&self) -> BindingExpression
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 BindingExpression
impl Debug for BindingExpression
Source§impl<'de> Deserialize<'de> for BindingExpression
impl<'de> Deserialize<'de> for BindingExpression
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<BindingExpression, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<BindingExpression, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for BindingExpression
impl Serialize for BindingExpression
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for BindingExpression
impl RefUnwindSafe for BindingExpression
impl Send for BindingExpression
impl Sync for BindingExpression
impl Unpin for BindingExpression
impl UnsafeUnpin for BindingExpression
impl UnwindSafe for BindingExpression
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