|
4 | 4 | use crate::{serialize::serialize_report, SerializeError};
|
5 | 5 | use chrono::{DateTime, FixedOffset};
|
6 | 6 | use indexmap::map::IndexMap;
|
7 |
| -use newtype_uuid::{TypedUuid, TypedUuidKind, TypedUuidTag}; |
| 7 | +use newtype_uuid::{GenericUuid, TypedUuid, TypedUuidKind, TypedUuidTag}; |
8 | 8 | use std::{io, iter, time::Duration};
|
| 9 | +use uuid::Uuid; |
9 | 10 |
|
10 | 11 | /// A tag indicating the kind of report.
|
11 | 12 | pub enum ReportKind {}
|
@@ -72,11 +73,19 @@ impl Report {
|
72 | 73 | /// Sets a unique ID for this `Report`.
|
73 | 74 | ///
|
74 | 75 | /// This is an extension that's used by nextest.
|
75 |
| - pub fn set_uuid(&mut self, uuid: ReportUuid) -> &mut Self { |
| 76 | + pub fn set_report_uuid(&mut self, uuid: ReportUuid) -> &mut Self { |
76 | 77 | self.uuid = Some(uuid);
|
77 | 78 | self
|
78 | 79 | }
|
79 | 80 |
|
| 81 | + /// Sets a unique ID for this `Report` from an untyped [`Uuid`]. |
| 82 | + /// |
| 83 | + /// This is an extension that's used by nextest. |
| 84 | + pub fn set_uuid(&mut self, uuid: Uuid) -> &mut Self { |
| 85 | + self.uuid = Some(ReportUuid::from_untyped_uuid(uuid)); |
| 86 | + self |
| 87 | + } |
| 88 | + |
80 | 89 | /// Sets the start timestamp for the report.
|
81 | 90 | pub fn set_timestamp(&mut self, timestamp: impl Into<DateTime<FixedOffset>>) -> &mut Self {
|
82 | 91 | self.timestamp = Some(timestamp.into());
|
|
0 commit comments