use crate::{ArtworkId, CalendarDate, LibraryId, Marker, Markers, MediaId, PersonId};
uniffi::custom_type!(MediaId, String, {
lower: |id| id.to_string(),
try_lift: |text| Ok(text.parse()?),
});
uniffi::custom_type!(LibraryId, String, {
lower: |id| id.to_string(),
try_lift: |text| Ok(text.parse()?),
});
uniffi::custom_type!(ArtworkId, String, {
lower: |id| id.to_string(),
try_lift: |text| Ok(text.parse()?),
});
uniffi::custom_type!(PersonId, String, {
lower: |id| id.to_string(),
try_lift: |text| Ok(text.parse()?),
});
uniffi::custom_type!(Markers, Vec<Marker>, {
lower: |markers| markers.into_vec(),
try_lift: |markers| Ok(Markers::from(markers)),
});
uniffi::custom_type!(CalendarDate, String, {
lower: |date| date.to_string(),
try_lift: |text| Ok(text.parse()?),
});