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