[−][src]Struct flo_binding::ComputedBinding
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, 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<dyn Notifiable>) -> Box<dyn Releasable>
[src]
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]
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]
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,
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,
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,