pub struct TreeMove {
pub key: String,
pub parent: Option<String>,
pub from: usize,
pub to: usize,
}Expand description
A move of one node among its siblings that a reorderable tree asks for.
The tree never changes the application’s nodes; apply does the bookkeeping on
the application’s own list of siblings.
Fields§
§key: StringThe key of the node that moves.
parent: Option<String>The key of its parent, None for a top-level node. The node keeps this parent.
from: usizeThe node’s position among its siblings before the move, counted from 0.
to: usizeIts position after the move.
Implementations§
Trait Implementations§
impl Eq for TreeMove
impl StructuralPartialEq for TreeMove
Auto Trait Implementations§
impl Freeze for TreeMove
impl RefUnwindSafe for TreeMove
impl Send for TreeMove
impl Sync for TreeMove
impl Unpin for TreeMove
impl UnsafeUnpin for TreeMove
impl UnwindSafe for TreeMove
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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