pub struct BindRef<Target> { /* private fields */ }Expand description
A BindRef references another binding without needing to know precisely
what kind of binding it is. It is read-only, so mostly useful for passing
a binding around, particularly for computed bindings. Create one with
BindRef::from(binding).
Cloning a BindRef will create another reference to the same binding.
Implementations§
Trait Implementations§
Source§impl<Value> Changeable for BindRef<Value>
impl<Value> Changeable for BindRef<Value>
Source§fn when_changed(&self, what: Arc<dyn Notifiable>) -> Box<dyn Releasable>
fn when_changed(&self, what: Arc<dyn Notifiable>) -> Box<dyn Releasable>
Supplies a function to be notified when this item is changed Read more
Source§impl<'a, Value: 'static + Clone + PartialEq + Send> From<&'a Binding<Value>> for BindRef<Value>
impl<'a, Value: 'static + Clone + PartialEq + Send> From<&'a Binding<Value>> for BindRef<Value>
Source§impl<'a, Value: 'static + Clone + PartialEq + Send, TFn> From<&'a ComputedBinding<Value, TFn>> for BindRef<Value>
impl<'a, Value: 'static + Clone + PartialEq + Send, TFn> From<&'a ComputedBinding<Value, TFn>> for BindRef<Value>
Source§fn from(val: &'a ComputedBinding<Value, TFn>) -> Self
fn from(val: &'a ComputedBinding<Value, TFn>) -> Self
Converts to this type from the input type.
Source§impl<'a, Value: 'static + Clone + PartialEq + Send + Into<Binding<Value>>> From<&'a Value> for BindRef<Value>
impl<'a, Value: 'static + Clone + PartialEq + Send + Into<Binding<Value>>> From<&'a Value> for BindRef<Value>
Auto Trait Implementations§
impl<Target> Freeze for BindRef<Target>
impl<Target> !RefUnwindSafe for BindRef<Target>
impl<Target> Send for BindRef<Target>
impl<Target> Sync for BindRef<Target>
impl<Target> Unpin for BindRef<Target>
impl<Target> !UnwindSafe for BindRef<Target>
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<TBinding> BoundValueComputeExt for TBinding
impl<TBinding> BoundValueComputeExt for TBinding
Source§impl<TBinding> BoundValueMapExt for TBinding
impl<TBinding> BoundValueMapExt for TBinding
type Value = <TBinding as Bound>::Value
Source§fn map_binding<TMapValue, TMapFn>(
&self,
map_fn: TMapFn,
) -> MapBinding<TBinding, TMapValue, TMapFn>
fn map_binding<TMapValue, TMapFn>( &self, map_fn: TMapFn, ) -> MapBinding<TBinding, TMapValue, TMapFn>
Transforms the value of this binding using a mapping function Read more