pub struct Variable { /* private fields */ }Expand description
Runtime property adapter used by expression scopes.
Implementations§
Source§impl Variable
impl Variable
Sourcepub fn new<T>(untyped_property: UntypedProperty) -> Variablewhere
T: PropertyValue + ToPaxValue,
pub fn new<T>(untyped_property: UntypedProperty) -> Variablewhere
T: PropertyValue + ToPaxValue,
Wraps an untyped property and exposes it as a PaxValue.
Sourcepub fn new_from_typed_property<T>(property: impl PropertyBinding<T>) -> Variablewhere
T: PropertyValue + ToPaxValue,
pub fn new_from_typed_property<T>(property: impl PropertyBinding<T>) -> Variablewhere
T: PropertyValue + ToPaxValue,
Wraps a typed property and exposes it as a PaxValue.
Sourcepub fn try_typed_binding<T>(&self, name: &str) -> Option<LocalProperty<T>>where
T: PropertyValue + CoercionRules,
pub fn try_typed_binding<T>(&self, name: &str) -> Option<LocalProperty<T>>where
T: PropertyValue + CoercionRules,
Creates an independent one-way binding when exact typed forwarding is
safe. Unlike a double binding, writes/easing on the result never mutate
the source. Mismatched types and custom conversions return None.
pub fn get_untyped_property(&self) -> &UntypedProperty
Sourcepub fn get_as_pax_value(&self) -> PaxValue
pub fn get_as_pax_value(&self) -> PaxValue
Reads the current value as a PaxValue.
Sourcepub fn read_pax_value_ref<V>(&self, f: impl FnOnce(&PaxValue) -> V) -> V
pub fn read_pax_value_ref<V>(&self, f: impl FnOnce(&PaxValue) -> V) -> V
Reads the current PaxValue by reference.
Trait Implementations§
Auto Trait Implementations§
impl !Send for Variable
impl !Sync for Variable
impl Freeze for Variable
impl RefUnwindSafe for Variable
impl Unpin for Variable
impl UnsafeUnpin for Variable
impl UnwindSafe for Variable
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
Source§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.