(notification: Notification)
| 16 | impl TryFrom<Notification> for NotificationDTO { |
| 17 | type Error = NotificationMapperError; |
| 18 | fn try_from(notification: Notification) -> Result<NotificationDTO, NotificationMapperError> { |
| 19 | Ok(NotificationDTO { |
| 20 | id: Uuid::from_bytes(notification.id).hyphenated().to_string(), |
| 21 | target_user_id: Uuid::from_bytes(notification.target_user_id) |
| 22 | .hyphenated() |
| 23 | .to_string(), |
| 24 | status: notification.status.into(), |
| 25 | title: notification.title, |
| 26 | message: notification.message, |
| 27 | notification_type: notification.notification_type.try_into()?, |
| 28 | created_at: timestamp_to_rfc3339(¬ification.created_timestamp), |
| 29 | }) |
| 30 | } |
| 31 | } |
nothing calls this directly
no test coverage detected