From 605c2b78562209296bf729a840de0c917a83f803 Mon Sep 17 00:00:00 2001 From: "Philip (a-0)" <@ph:a-0.me> Date: Tue, 13 Feb 2024 17:53:23 +0100 Subject: [PATCH] Exposed `ElementUpdateStrategy`, implemented `Default` for it --- ubisync-lib/src/types/element.rs | 6 ++++++ ubisync-lib/src/types/mod.rs | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ubisync-lib/src/types/element.rs b/ubisync-lib/src/types/element.rs index d0a2147..7291b7b 100644 --- a/ubisync-lib/src/types/element.rs +++ b/ubisync-lib/src/types/element.rs @@ -48,4 +48,10 @@ impl Element { #[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] pub enum ElementUpdateStrategy { Overwrite +} + +impl Default for ElementUpdateStrategy { + fn default() -> Self { + Self::Overwrite + } } \ No newline at end of file diff --git a/ubisync-lib/src/types/mod.rs b/ubisync-lib/src/types/mod.rs index 8475e64..f256046 100644 --- a/ubisync-lib/src/types/mod.rs +++ b/ubisync-lib/src/types/mod.rs @@ -8,7 +8,7 @@ mod element_id; pub use element_id::ElementId; mod element; -pub use element::Element; +pub use element::{Element, ElementUpdateStrategy}; mod family_id; pub use family_id::FamilyId;