pub enum AddPosition<'a> {
First,
Last,
After(&'a str),
Before(&'a str),
}Expand description
Insert a new item at the beginning of the body. Binary assigns hash and [ ]
(or [/] if gated).
Returns (new_body, assigned_id).
#ah0s: explicit insertion position for a newly added pending item. The
backlog is a priority-ordered pool with id-based consumption (not a stack or
queue), so position encodes author intent and is set explicitly when it
matters. First is the cheap default used by --pending-add.
Variants§
First
Insert at the front of the active list (default).
Last
Append at the tail of the active list (before any trailing text).
After(&'a str)
Insert immediately after the existing item with this id.
Before(&'a str)
Insert immediately before the existing item with this id.
Trait Implementations§
Source§impl<'a> Clone for AddPosition<'a>
impl<'a> Clone for AddPosition<'a>
Source§fn clone(&self) -> AddPosition<'a>
fn clone(&self) -> AddPosition<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for AddPosition<'a>
Source§impl<'a> Debug for AddPosition<'a>
impl<'a> Debug for AddPosition<'a>
impl<'a> Eq for AddPosition<'a>
Source§impl<'a> PartialEq for AddPosition<'a>
impl<'a> PartialEq for AddPosition<'a>
impl<'a> StructuralPartialEq for AddPosition<'a>
Auto Trait Implementations§
impl<'a> Freeze for AddPosition<'a>
impl<'a> RefUnwindSafe for AddPosition<'a>
impl<'a> Send for AddPosition<'a>
impl<'a> Sync for AddPosition<'a>
impl<'a> Unpin for AddPosition<'a>
impl<'a> UnsafeUnpin for AddPosition<'a>
impl<'a> UnwindSafe for AddPosition<'a>
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§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.