diff --git a/src/trello/model/card.rs b/src/trello/model/card.rs index 41502b9..818c209 100644 --- a/src/trello/model/card.rs +++ b/src/trello/model/card.rs @@ -1,5 +1,6 @@ // use derive_more::derive::Display; +use derive_more::From; use serde::{Deserialize, Deserializer}; use super::attachment::TrelloAttachment; @@ -13,6 +14,11 @@ newtype!(TrelloCardDue, String, Display, "Card Due"); #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Display)] pub(crate) struct TrelloCardPosition(pub i64); +impl From for TrelloCardPosition { + fn from(value: i64) -> Self { + Self(value) + } +} impl<'de> Deserialize<'de> for TrelloCardPosition { fn deserialize(deserializer: D) -> Result