trello-to-deck/src/conversion.rs
Paul Campbell 4f69fc0a4b
Some checks failed
Release Please / Release-plz (push) Failing after 42s
Test / build (map[name:stable]) (push) Has been cancelled
Test / build (map[name:nightly]) (push) Has been cancelled
feat: make best-effort to maintain order of stacks and cards
2024-12-23 09:42:52 +00:00

39 lines
1 KiB
Rust

//
use crate::nextcloud::model::NextcloudStackTitle;
use crate::{
nextcloud::model::{NextcloudCardDescription, NextcloudCardTitle, NextcloudOrder},
trello::model::{
card::{TrelloCardDescription, TrelloCardName, TrelloCardPosition},
list::{TrelloListName, TrelloListPosition},
},
};
impl From<&TrelloCardName> for NextcloudCardTitle {
fn from(value: &TrelloCardName) -> Self {
Self::new(value.to_string())
}
}
impl From<&TrelloCardDescription> for NextcloudCardDescription {
fn from(value: &TrelloCardDescription) -> Self {
Self::new(value.to_string())
}
}
impl From<&TrelloListName> for NextcloudStackTitle {
fn from(value: &TrelloListName) -> Self {
Self::new(value.to_string())
}
}
impl From<&TrelloListPosition> for NextcloudOrder {
fn from(value: &TrelloListPosition) -> Self {
Self::new(value.0)
}
}
impl From<&TrelloCardPosition> for NextcloudOrder {
fn from(value: &TrelloCardPosition) -> Self {
Self::new(value.0)
}
}