merriam_webster_model/entry/sense/
defining_text.rs1use crate::entry::{
2 biographical_name_wrap::BiographicalNameWrap, called_also_note::CalledAlsoNote, run_in::RunIn,
3 supplemental_information_note::SupplementalInformationNote, usage_notes::UsageNotes,
4 verbal_illustrations::VerbalIllustrations,
5};
6
7pub type DefiningText = Vec<DefiningTextType>;
8
9#[derive(Debug, Clone, Serialize, Deserialize)]
10#[serde(untagged)]
11pub enum DefiningTextType {
12 DefiningTextObject(DefiningTextObject),
13 BiographicalNameWrap(BiographicalNameWrap),
14 CalledAlsoNote(CalledAlsoNote),
15 RunIn(RunIn),
16 SupplementalInformationNote(SupplementalInformationNote),
17 UsageNotes(UsageNotes),
18 VerbalIllustrations(VerbalIllustrations),
19}
20
21pub type DefiningTextObject = (DefiningTextObjectKey, String);
22
23#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
24pub enum DefiningTextObjectKey {
25 #[serde(rename = "text")]
26 Key,
27}