feat: impl From<i64> for TrelloCardPosition
This commit is contained in:
parent
756abd61c7
commit
c2b458323f
1 changed files with 6 additions and 0 deletions
|
@ -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<i64> for TrelloCardPosition {
|
||||
fn from(value: i64) -> Self {
|
||||
Self(value)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'de> Deserialize<'de> for TrelloCardPosition {
|
||||
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
|
||||
|
|
Loading…
Reference in a new issue