pub enum Position {
Last,
First,
Index {
index: usize,
},
Before {
id: String,
},
After {
id: String,
},
}Expand description
Insertion position for Op::AddNode within a container’s children.
JSON shapes: {"at":"last"}, {"at":"first"}, {"at":"index","index":2},
{"at":"before","id":"sibling"}, {"at":"after","id":"sibling"}.
Variants§
Last
Insert as the last child (topmost in z-order). Default.
First
Insert as the first child (bottommost in z-order).
Index
Insert at an explicit index (clamped to the children length).
Before
Insert immediately before the sibling with this id.
After
Insert immediately after the sibling with this id.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Position
impl<'de> Deserialize<'de> for Position
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Position
Auto Trait Implementations§
impl Freeze for Position
impl RefUnwindSafe for Position
impl Send for Position
impl Sync for Position
impl Unpin for Position
impl UnsafeUnpin for Position
impl UnwindSafe for Position
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