(status: TransferStatus)
| 4 | |
| 5 | impl From<TransferStatus> for TransferStatusDTO { |
| 6 | fn from(status: TransferStatus) -> Self { |
| 7 | match status { |
| 8 | TransferStatus::Processing { started_at } => TransferStatusDTO::Processing { |
| 9 | started_at: timestamp_to_rfc3339(&started_at), |
| 10 | }, |
| 11 | TransferStatus::Created => TransferStatusDTO::Created, |
| 12 | TransferStatus::Completed { |
| 13 | signature, |
| 14 | hash, |
| 15 | completed_at, |
| 16 | } => TransferStatusDTO::Completed { |
| 17 | signature: signature.map(|s| s.to_owned()), |
| 18 | hash: hash.map(|h| h.to_owned()), |
| 19 | completed_at: timestamp_to_rfc3339(&completed_at), |
| 20 | }, |
| 21 | TransferStatus::Failed { reason } => TransferStatusDTO::Failed { |
| 22 | reason: reason.to_owned(), |
| 23 | }, |
| 24 | } |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | impl From<TransferStatus> for TransferStatusTypeDTO { |
nothing calls this directly
no test coverage detected