pub mod contributor;
#[cfg(feature = "legacy-convert")]
pub mod conversion;
pub mod date;
pub mod types;
mod accessors;
mod classes;
mod ctors;
mod input;
mod serde_impl;
#[cfg(all(test, feature = "legacy-convert"))]
#[allow(
clippy::unwrap_used,
clippy::expect_used,
clippy::panic,
clippy::indexing_slicing,
clippy::todo,
clippy::unimplemented,
clippy::unreachable,
clippy::get_unwrap,
reason = "Panicking is acceptable and often desired in tests."
)]
mod tests;
#[cfg(test)]
#[allow(
clippy::unwrap_used,
clippy::expect_used,
clippy::panic,
clippy::indexing_slicing,
clippy::todo,
clippy::unimplemented,
clippy::unreachable,
clippy::get_unwrap,
reason = "Panicking is acceptable and often desired in tests."
)]
mod discriminator_tests;
#[cfg(test)]
#[allow(
clippy::unwrap_used,
clippy::expect_used,
clippy::panic,
clippy::indexing_slicing,
clippy::todo,
clippy::unimplemented,
clippy::unreachable,
clippy::get_unwrap,
reason = "Panicking is acceptable and often desired in tests."
)]
mod normalize_tests;
#[cfg(test)]
#[allow(
clippy::unwrap_used,
clippy::expect_used,
clippy::panic,
clippy::indexing_slicing,
clippy::todo,
clippy::unimplemented,
clippy::unreachable,
clippy::get_unwrap,
reason = "Panicking is acceptable and often desired in tests."
)]
mod numbering_tests;
pub use self::classes::{ClassExtension, ReferenceClass};
pub use self::contributor::{
Contributor, ContributorEntry, ContributorGender, ContributorList, ContributorRole, FlatName,
SimpleName, StructuredName,
};
pub use self::date::EdtfString;
pub(crate) use self::input::EMPTY_FIELD_LANGUAGES;
pub use self::input::{InputReference, UnknownClassData};
pub use self::types::common::{
FieldLanguageMap, LangID, MultilingualString, NumOrStr, Numbering, NumberingType, Place,
Publisher, RefID, RichText, Title,
};
pub use self::types::legal::{Brief, Hearing, LegalCase, Regulation, Statute, Treaty};
pub use self::types::specialized::{
AudioVisualType, AudioVisualWork, Classic, Dataset, Event, Patent, Software, Standard, WorkCore,
};
pub use self::types::structural::{
Collection, CollectionComponent, CollectionType, Monograph, MonographComponentType,
MonographType, Serial, SerialComponent, SerialComponentType, SerialType,
};
#[cfg(feature = "schema")]
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
#[cfg(feature = "bindings")]
use specta::Type;
#[derive(Debug, Deserialize, Serialize, Clone, PartialEq)]
#[cfg_attr(feature = "schema", derive(JsonSchema))]
#[cfg_attr(feature = "bindings", derive(Type))]
#[serde(untagged)]
pub enum WorkRelation {
Id(RefID),
Embedded(Box<InputReference>),
}