pub enum Selector {
Name(String),
Id {
id: String,
},
Index {
index: usize,
story: Option<String>,
},
StartsWith {
starts_with: String,
story: Option<String>,
},
Contains {
contains: String,
story: Option<String>,
},
}Expand description
Paragraph selector; every form must match exactly one paragraph. Ids
are the agent view’s (p3, header1, header1.p1, footnotes.p2,
t0.row1.cell2, t0.row1.cell2.p1); the old body:p:3 is refused,
naming its settled spelling, and the report prints the same ids
(crate::ids::paragraph_id). The other forms search
the body unless they carry a story (header1, footnotes, …).
Ids, short ids and indexes name the source’s paragraphs, the ones the
plan’s author read, even when resolve_revisions or existing_revisions
settles changes first; the text forms search the settled text. An edit
anchored on text follows a paragraph into the one it merged with, and so
does a whole-paragraph edit when that paragraph has no other source; a
whole-paragraph edit of a paragraph merged with others, or of a vanished
one, is refused.
Variants§
Name(String)
"p12", the same as {"id": "p12"}.
Id
{"id": "p12"}.
Index
{"index": 12}.
Fields
StartsWith
{"starts_with": "..."}; unique prefix match.
Fields
Contains
{"contains": "..."}; unique substring match.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Selector
impl<'de> Deserialize<'de> for Selector
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Selector, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Selector, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for Selector
Source§impl JsonSchema for Selector
impl JsonSchema for Selector
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl Serialize for Selector
impl Serialize for Selector
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for Selector
Auto Trait Implementations§
impl Forget for Selector
impl Freeze for Selector
impl Move for Selector
impl RefUnwindSafe for Selector
impl Send for Selector
impl Sync for Selector
impl Unpin for Selector
impl UnsafeUnpin for Selector
impl UnwindSafe for Selector
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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
key and return true if they are equal.