Struct anchors::expert::Anchor [−][src]
The main struct of the Anchors library. Represents a single value on the recomputation graph.
This doesn’t contain the particular Anchor implementation directly, but instead contains an
engine-specific AnchorHandle
which allows the recalculation engine to identify which
internal recomputation graph node this corresponds to. You should rarely create Anchors yourself;
instead use one of the built-in functions like Var::new
to create one, or create derivative Anchors
with one of the AnchorExt
methods.
Implementations
impl<E: Engine, K: Ord + Clone + PartialEq + 'static, V: Clone + PartialEq + 'static> Anchor<Dict<K, V>, E>
[src]
pub fn filter<F: FnMut(&K, &V) -> bool + 'static>(
&self,
f: F
) -> Anchor<Dict<K, V>, E>
[src]
&self,
f: F
) -> Anchor<Dict<K, V>, E>
pub fn map<F: FnMut(&K, &V) -> T + 'static, T: Clone + PartialEq + 'static>(
&self,
f: F
) -> Anchor<Dict<K, T>, E>
[src]
&self,
f: F
) -> Anchor<Dict<K, T>, E>
pub fn filter_map<F: FnMut(&K, &V) -> Option<T> + 'static, T: Clone + PartialEq + 'static>(
&self,
f: F
) -> Anchor<Dict<K, T>, E>
[src]
&self,
f: F
) -> Anchor<Dict<K, T>, E>
pub fn unordered_fold<T: PartialEq + Clone + 'static, F: for<'a> FnMut(&mut T, DiffItem<'a, K, V>) -> bool + 'static>(
&self,
initial_state: T,
f: F
) -> Anchor<T, E>
[src]
&self,
initial_state: T,
f: F
) -> Anchor<T, E>
impl<O, E: Engine> Anchor<O, E>
[src]
pub fn new(data: E::AnchorHandle) -> Self
[src]
pub fn token(&self) -> <E::AnchorHandle as AnchorHandle>::Token
[src]
Returns the immutable, copyable, hashable, comparable engine-specific ID for this Anchor.
Trait Implementations
impl<O1, E> AnchorExt<E> for &Anchor<O1, E> where
O1: 'static,
E: Engine,
[src]
O1: 'static,
E: Engine,
type Target = (Anchor<O1, E>,)
fn map<F, Out>(self, f: F) -> Anchor<Out, E> where
Out: 'static,
F: 'static,
Map<Self::Target, F, Out>: AnchorInner<E, Output = Out>,
[src]
Out: 'static,
F: 'static,
Map<Self::Target, F, Out>: AnchorInner<E, Output = Out>,
fn map_mut<F, Out>(self, initial: Out, f: F) -> Anchor<Out, E> where
Out: 'static,
F: 'static,
MapMut<Self::Target, F, Out>: AnchorInner<E, Output = Out>,
[src]
Out: 'static,
F: 'static,
MapMut<Self::Target, F, Out>: AnchorInner<E, Output = Out>,
fn then<F, Out>(self, f: F) -> Anchor<Out, E> where
F: 'static,
Out: 'static,
Then<Self::Target, Out, F, E>: AnchorInner<E, Output = Out>,
[src]
F: 'static,
Out: 'static,
Then<Self::Target, Out, F, E>: AnchorInner<E, Output = Out>,
fn refmap<F, Out>(self, f: F) -> Anchor<Out, E> where
Out: 'static,
F: 'static,
RefMap<Self::Target, F>: AnchorInner<E, Output = Out>,
[src]
Out: 'static,
F: 'static,
RefMap<Self::Target, F>: AnchorInner<E, Output = Out>,
fn cutoff<F, Out>(self, f: F) -> Anchor<Out, E> where
Out: 'static,
F: 'static,
Cutoff<Self::Target, F>: AnchorInner<E, Output = Out>,
[src]
Out: 'static,
F: 'static,
Cutoff<Self::Target, F>: AnchorInner<E, Output = Out>,
impl<O0, E> AnchorSplit<E> for Anchor<(O0,), E> where
O0: Clone + PartialEq + 'static,
E: Engine,
[src]
O0: Clone + PartialEq + 'static,
E: Engine,
impl<O0, O1, E> AnchorSplit<E> for Anchor<(O0, O1), E> where
O0: Clone + PartialEq + 'static,
O1: Clone + PartialEq + 'static,
E: Engine,
[src]
O0: Clone + PartialEq + 'static,
O1: Clone + PartialEq + 'static,
E: Engine,
impl<O0, O1, O2, E> AnchorSplit<E> for Anchor<(O0, O1, O2), E> where
O0: Clone + PartialEq + 'static,
O1: Clone + PartialEq + 'static,
O2: Clone + PartialEq + 'static,
E: Engine,
[src]
O0: Clone + PartialEq + 'static,
O1: Clone + PartialEq + 'static,
O2: Clone + PartialEq + 'static,
E: Engine,
impl<O0, O1, O2, O3, E> AnchorSplit<E> for Anchor<(O0, O1, O2, O3), E> where
O0: Clone + PartialEq + 'static,
O1: Clone + PartialEq + 'static,
O2: Clone + PartialEq + 'static,
O3: Clone + PartialEq + 'static,
E: Engine,
[src]
O0: Clone + PartialEq + 'static,
O1: Clone + PartialEq + 'static,
O2: Clone + PartialEq + 'static,
O3: Clone + PartialEq + 'static,
E: Engine,
type Target = (Anchor<O0, E>, Anchor<O1, E>, Anchor<O2, E>, Anchor<O3, E>)
fn split(&self) -> Self::Target
[src]
impl<O0, O1, O2, O3, O4, E> AnchorSplit<E> for Anchor<(O0, O1, O2, O3, O4), E> where
O0: Clone + PartialEq + 'static,
O1: Clone + PartialEq + 'static,
O2: Clone + PartialEq + 'static,
O3: Clone + PartialEq + 'static,
O4: Clone + PartialEq + 'static,
E: Engine,
[src]
O0: Clone + PartialEq + 'static,
O1: Clone + PartialEq + 'static,
O2: Clone + PartialEq + 'static,
O3: Clone + PartialEq + 'static,
O4: Clone + PartialEq + 'static,
E: Engine,
type Target = (Anchor<O0, E>, Anchor<O1, E>, Anchor<O2, E>, Anchor<O3, E>, Anchor<O4, E>)
fn split(&self) -> Self::Target
[src]
impl<O0, O1, O2, O3, O4, O5, E> AnchorSplit<E> for Anchor<(O0, O1, O2, O3, O4, O5), E> where
O0: Clone + PartialEq + 'static,
O1: Clone + PartialEq + 'static,
O2: Clone + PartialEq + 'static,
O3: Clone + PartialEq + 'static,
O4: Clone + PartialEq + 'static,
O5: Clone + PartialEq + 'static,
E: Engine,
[src]
O0: Clone + PartialEq + 'static,
O1: Clone + PartialEq + 'static,
O2: Clone + PartialEq + 'static,
O3: Clone + PartialEq + 'static,
O4: Clone + PartialEq + 'static,
O5: Clone + PartialEq + 'static,
E: Engine,
type Target = (Anchor<O0, E>, Anchor<O1, E>, Anchor<O2, E>, Anchor<O3, E>, Anchor<O4, E>, Anchor<O5, E>)
fn split(&self) -> Self::Target
[src]
impl<O0, O1, O2, O3, O4, O5, O6, E> AnchorSplit<E> for Anchor<(O0, O1, O2, O3, O4, O5, O6), E> where
O0: Clone + PartialEq + 'static,
O1: Clone + PartialEq + 'static,
O2: Clone + PartialEq + 'static,
O3: Clone + PartialEq + 'static,
O4: Clone + PartialEq + 'static,
O5: Clone + PartialEq + 'static,
O6: Clone + PartialEq + 'static,
E: Engine,
[src]
O0: Clone + PartialEq + 'static,
O1: Clone + PartialEq + 'static,
O2: Clone + PartialEq + 'static,
O3: Clone + PartialEq + 'static,
O4: Clone + PartialEq + 'static,
O5: Clone + PartialEq + 'static,
O6: Clone + PartialEq + 'static,
E: Engine,
type Target = (Anchor<O0, E>, Anchor<O1, E>, Anchor<O2, E>, Anchor<O3, E>, Anchor<O4, E>, Anchor<O5, E>, Anchor<O6, E>)
fn split(&self) -> Self::Target
[src]
impl<O0, O1, O2, O3, O4, O5, O6, O7, E> AnchorSplit<E> for Anchor<(O0, O1, O2, O3, O4, O5, O6, O7), E> where
O0: Clone + PartialEq + 'static,
O1: Clone + PartialEq + 'static,
O2: Clone + PartialEq + 'static,
O3: Clone + PartialEq + 'static,
O4: Clone + PartialEq + 'static,
O5: Clone + PartialEq + 'static,
O6: Clone + PartialEq + 'static,
O7: Clone + PartialEq + 'static,
E: Engine,
[src]
O0: Clone + PartialEq + 'static,
O1: Clone + PartialEq + 'static,
O2: Clone + PartialEq + 'static,
O3: Clone + PartialEq + 'static,
O4: Clone + PartialEq + 'static,
O5: Clone + PartialEq + 'static,
O6: Clone + PartialEq + 'static,
O7: Clone + PartialEq + 'static,
E: Engine,
type Target = (Anchor<O0, E>, Anchor<O1, E>, Anchor<O2, E>, Anchor<O3, E>, Anchor<O4, E>, Anchor<O5, E>, Anchor<O6, E>, Anchor<O7, E>)
fn split(&self) -> Self::Target
[src]
impl<O0, O1, O2, O3, O4, O5, O6, O7, O8, E> AnchorSplit<E> for Anchor<(O0, O1, O2, O3, O4, O5, O6, O7, O8), E> where
O0: Clone + PartialEq + 'static,
O1: Clone + PartialEq + 'static,
O2: Clone + PartialEq + 'static,
O3: Clone + PartialEq + 'static,
O4: Clone + PartialEq + 'static,
O5: Clone + PartialEq + 'static,
O6: Clone + PartialEq + 'static,
O7: Clone + PartialEq + 'static,
O8: Clone + PartialEq + 'static,
E: Engine,
[src]
O0: Clone + PartialEq + 'static,
O1: Clone + PartialEq + 'static,
O2: Clone + PartialEq + 'static,
O3: Clone + PartialEq + 'static,
O4: Clone + PartialEq + 'static,
O5: Clone + PartialEq + 'static,
O6: Clone + PartialEq + 'static,
O7: Clone + PartialEq + 'static,
O8: Clone + PartialEq + 'static,
E: Engine,
type Target = (Anchor<O0, E>, Anchor<O1, E>, Anchor<O2, E>, Anchor<O3, E>, Anchor<O4, E>, Anchor<O5, E>, Anchor<O6, E>, Anchor<O7, E>, Anchor<O8, E>)
fn split(&self) -> Self::Target
[src]
impl<O, E: Engine> Clone for Anchor<O, E>
[src]
fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<O, E: Engine> Eq for Anchor<O, E>
[src]
impl<O, E: Engine> PartialEq<Anchor<O, E>> for Anchor<O, E>
[src]
Auto Trait Implementations
impl<O, E: ?Sized> RefUnwindSafe for Anchor<O, E> where
O: RefUnwindSafe,
<E as Engine>::AnchorHandle: RefUnwindSafe,
O: RefUnwindSafe,
<E as Engine>::AnchorHandle: RefUnwindSafe,
impl<O, E: ?Sized> Send for Anchor<O, E> where
O: Send,
<E as Engine>::AnchorHandle: Send,
O: Send,
<E as Engine>::AnchorHandle: Send,
impl<O, E: ?Sized> Sync for Anchor<O, E> where
O: Sync,
<E as Engine>::AnchorHandle: Sync,
O: Sync,
<E as Engine>::AnchorHandle: Sync,
impl<O, E: ?Sized> Unpin for Anchor<O, E> where
O: Unpin,
<E as Engine>::AnchorHandle: Unpin,
O: Unpin,
<E as Engine>::AnchorHandle: Unpin,
impl<O, E: ?Sized> UnwindSafe for Anchor<O, E> where
O: UnwindSafe,
<E as Engine>::AnchorHandle: UnwindSafe,
O: UnwindSafe,
<E as Engine>::AnchorHandle: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,