pub enum StateTreeSkeleton<T: SizedType> {
Delay {
len: u64,
},
Mem(T),
Feed(T),
FnCall(Vec<Box<StateTreeSkeleton<T>>>),
}Expand description
This data represents just a memory layout on a flat array, do not own actual data.
Variants§
Implementations§
Source§impl<T: SizedType> StateTreeSkeleton<T>
impl<T: SizedType> StateTreeSkeleton<T>
pub fn total_size(&self) -> u64
Sourcepub fn path_to_address(&self, path: &[usize]) -> Option<(usize, usize)>
pub fn path_to_address(&self, path: &[usize]) -> Option<(usize, usize)>
Convert a path (position in the tree) to an address (offset) in a flat array.
§Arguments
path- Path in the tree. Empty means root, [0] is the first child, [0, 1] is the second child of the first child.
§Returns
Returns the start address of the node pointed to by the path and the size of that node. Returns None if the path is invalid.
Trait Implementations§
Source§impl<T: Clone + SizedType> Clone for StateTreeSkeleton<T>
impl<T: Clone + SizedType> Clone for StateTreeSkeleton<T>
Source§fn clone(&self) -> StateTreeSkeleton<T>
fn clone(&self) -> StateTreeSkeleton<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: SizedType> From<StateTreeSkeleton<T>> for StateTree
impl<T: SizedType> From<StateTreeSkeleton<T>> for StateTree
Source§fn from(skeleton: StateTreeSkeleton<T>) -> Self
fn from(skeleton: StateTreeSkeleton<T>) -> Self
Converts to this type from the input type.
Source§impl<T: SizedType> PartialEq for StateTreeSkeleton<T>
impl<T: SizedType> PartialEq for StateTreeSkeleton<T>
Auto Trait Implementations§
impl<T> Freeze for StateTreeSkeleton<T>where
T: Freeze,
impl<T> RefUnwindSafe for StateTreeSkeleton<T>where
T: RefUnwindSafe,
impl<T> Send for StateTreeSkeleton<T>where
T: Send,
impl<T> Sync for StateTreeSkeleton<T>where
T: Sync,
impl<T> Unpin for StateTreeSkeleton<T>where
T: Unpin,
impl<T> UnwindSafe for StateTreeSkeleton<T>where
T: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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