Skip to main content

BranchesConn

Struct BranchesConn 

Source
pub struct BranchesConn<T: 'static, K: 'static> { /* private fields */ }
Expand description

Branches’ connection: the current data snapshot plus its derived shape.

Trait Implementations§

Source§

impl<T: Clone + 'static, K: Clone + Hash + Eq + 'static> TreeConn for BranchesConn<T, K>

Source§

type Slot = ItemSlot<T, K>

Source§

type Key = K

Source§

fn refresh(&self) -> Vec<(u64, Option<u64>)>

Refresh the snapshot and return the tree’s shape: (token, parent) pairs in walk order. A tracked read: the enclosing watch re-runs exactly when something this read depends on changes.
Source§

fn tokens_now(&self) -> Vec<u64>

Every token in the current snapshot, walk order, no refresh and no tracking.
Source§

fn children_len(&self, parent: Option<u64>) -> usize

Source§

fn child_token(&self, parent: Option<u64>, index: usize) -> u64

Source§

fn parent_of(&self, token: u64) -> Option<Option<u64>>

Some(parent) for a known token (Some(None) = a root row), None for an unknown one.
Source§

fn key_of(&self, token: u64) -> Option<K>

Source§

fn token_of(&self, key: &K) -> u64

The token a key maps to (pure: no snapshot lookup).
Source§

fn slot_for(&self, token: u64) -> Option<ItemSlot<T, K>>

A fresh slot for token (None on a stale mid-animation pull). Call inside the row’s scope: plain-data slots allocate their signals here.
Source§

fn rebind(&self, slot: &ItemSlot<T, K>, token: u64)

Point an existing slot at token: the recycle write.
Source§

fn values_flow_by_reload(&self) -> bool

Whether row VALUES reach existing rows only through reload→rebind (see RowConn::values_flow_by_reload).

Auto Trait Implementations§

§

impl<T, K> !Freeze for BranchesConn<T, K>

§

impl<T, K> !RefUnwindSafe for BranchesConn<T, K>

§

impl<T, K> !Send for BranchesConn<T, K>

§

impl<T, K> !Sync for BranchesConn<T, K>

§

impl<T, K> !UnwindSafe for BranchesConn<T, K>

§

impl<T, K> Unpin for BranchesConn<T, K>
where T: Unpin,

§

impl<T, K> UnsafeUnpin for BranchesConn<T, K>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Day API ↩ Guides· daybrite.dev