pub enum DocSeg {
Main,
Card {
kind: Option<String>,
index: usize,
},
Field {
name: String,
},
Index {
index: usize,
},
Body,
}Expand description
One segment of a DocPath.
Serde-tagged ({ "seg": "field", "name": "x" }) so the WASM parser hands
the editor a structured array it routes on, never a string it splits.
Variants§
Main
The main-card root — heads every main-card address (main.title,
main.body).
Card
A composable card by document-array index. kind: None is the
unknown-kind whole-card form (cards[<i>]), the only bare-index root.
Field
An object field or map key.
Index
An array index.
Body
A card or main body (.body), always terminal.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DocSeg
impl<'de> Deserialize<'de> for DocSeg
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 Eq for DocSeg
impl StructuralPartialEq for DocSeg
Auto Trait Implementations§
impl Freeze for DocSeg
impl RefUnwindSafe for DocSeg
impl Send for DocSeg
impl Sync for DocSeg
impl Unpin for DocSeg
impl UnsafeUnpin for DocSeg
impl UnwindSafe for DocSeg
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.