Struct flo_binding::ComputedBinding
[−]
[src]
pub struct ComputedBinding<Value: 'static + Clone, TFn> where
TFn: 'static + Fn() -> Value, { /* fields omitted */ }
Represents a binding to a value that is computed by a function
Methods
impl<Value: 'static + Clone + Send, TFn> ComputedBinding<Value, TFn> where
TFn: 'static + Send + Sync + Fn() -> Value,
[src]
TFn: 'static + Send + Sync + Fn() -> Value,
pub fn new(calculate_value: TFn) -> ComputedBinding<Value, TFn>
[src]
Creates a new computable binding
pub fn new_in_context(calculate_value: TFn) -> ComputedBinding<Value, TFn>
[src]
Creates a new computable binding within another binding
Normally this is considered an error (if the binding is not held anywhere
outside of the context, it will never generate an update). new
panics
if it's called from within a context for this reason.
If the purpose of a computed binding is to return other bindings, this limitation does not apply, so this call is available
Trait Implementations
impl<Value: 'static + Clone + Send, TFn> Clone for ComputedBinding<Value, TFn> where
TFn: 'static + Send + Sync + Fn() -> Value,
[src]
TFn: 'static + Send + Sync + Fn() -> Value,
fn clone(&self) -> Self
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<Value: 'static + Clone, TFn> Changeable for ComputedBinding<Value, TFn> where
TFn: 'static + Send + Sync + Fn() -> Value,
[src]
TFn: 'static + Send + Sync + Fn() -> Value,
fn when_changed(&self, what: Arc<Notifiable>) -> Box<Releasable>
[src]
Supplies a function to be notified when this item is changed Read more
impl<Value: 'static + Clone + Send, TFn> Bound<Value> for ComputedBinding<Value, TFn> where
TFn: 'static + Send + Sync + Fn() -> Value,
[src]
TFn: 'static + Send + Sync + Fn() -> Value,
impl<Value: 'static + Clone + PartialEq + Send, TFn> From<ComputedBinding<Value, TFn>> for BindRef<Value> where
TFn: 'static + Send + Sync + Fn() -> Value,
[src]
TFn: 'static + Send + Sync + Fn() -> Value,
fn from(val: ComputedBinding<Value, TFn>) -> Self
[src]
Performs the conversion.
impl<'a, Value: 'static + Clone + PartialEq + Send, TFn> From<&'a ComputedBinding<Value, TFn>> for BindRef<Value> where
TFn: 'static + Send + Sync + Fn() -> Value,
[src]
TFn: 'static + Send + Sync + Fn() -> Value,
fn from(val: &'a ComputedBinding<Value, TFn>) -> Self
[src]
Performs the conversion.
Auto Trait Implementations
impl<Value, TFn> Send for ComputedBinding<Value, TFn> where
TFn: Send,
Value: Send,
TFn: Send,
Value: Send,
impl<Value, TFn> Sync for ComputedBinding<Value, TFn> where
TFn: Send,
Value: Send,
TFn: Send,
Value: Send,