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 property(path: impl Into<PropertyPath>) -> Self
pub fn property(path: impl Into<PropertyPath>) -> Self
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 · 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<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
Auto Trait Implementations§
impl Freeze for BindingExpression
impl RefUnwindSafe for BindingExpression
impl Send for BindingExpression
impl Sync for BindingExpression
impl Unpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more