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]

[src]

Creates a new computable binding

[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]

[src]

Returns a copy of the value. Read more

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]

[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]

[src]

Retrieves the value stored by this binding Read more

impl<Value: 'static + Clone + PartialEq + Send, TFn> From<ComputedBinding<Value, TFn>> for BindRef<Value> where
    TFn: 'static + Send + Sync + Fn() -> Value, 
[src]

[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]

[src]

Performs the conversion.

Auto Trait Implementations

impl<Value, TFn> Send for ComputedBinding<Value, TFn> where
    TFn: Send,
    Value: Send

impl<Value, TFn> Sync for ComputedBinding<Value, TFn> where
    TFn: Send,
    Value: Send