pub struct VecComputation<T, C = T>{ /* private fields */ }Expand description
A computation with a dynamic set of variables
Implementations§
Source§impl<T, C> VecComputation<T, C>
impl<T, C> VecComputation<T, C>
Sourcepub fn new<TVars>(
formula: impl for<'a> Fn(Vec<&'a C>) -> T + 'static + Send + Sync,
tvars: TVars,
) -> Selfwhere
TVars: ComputationVecBuilder<C>,
pub fn new<TVars>(
formula: impl for<'a> Fn(Vec<&'a C>) -> T + 'static + Send + Sync,
tvars: TVars,
) -> Selfwhere
TVars: ComputationVecBuilder<C>,
Create a new computation with the given formula and an initial vector of variables.
Sourcepub fn value_ref<'a>(&'a self) -> impl Deref<Target = T> + 'a
pub fn value_ref<'a>(&'a self) -> impl Deref<Target = T> + 'a
Get the result of the computation. Re-compute it if outdated.
Source§impl<T, C> VecComputation<T, C>
impl<T, C> VecComputation<T, C>
Source§impl<T, C> VecComputation<T, C>
impl<T, C> VecComputation<T, C>
Source§impl<T, C> VecComputation<T, C>
impl<T, C> VecComputation<T, C>
Trait Implementations§
Source§impl<T, C> ComputationValueType for VecComputation<T, C>
impl<T, C> ComputationValueType for VecComputation<T, C>
Source§impl<T, C> Debug for VecComputation<T, C>
impl<T, C> Debug for VecComputation<T, C>
Source§impl<T> PartialEq for VecComputation<T>
impl<T> PartialEq for VecComputation<T>
Auto Trait Implementations§
impl<T, C> Freeze for VecComputation<T, C>
impl<T, C> RefUnwindSafe for VecComputation<T, C>
impl<T, C> Send for VecComputation<T, C>
impl<T, C> Sync for VecComputation<T, C>
impl<T, C> Unpin for VecComputation<T, C>
impl<T, C> UnwindSafe for VecComputation<T, C>
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