forge
Explore
Log in

Don't you dare go Hollow

Pub fn uuid(&self) accessor on all 34 Uuid id newtypes

Browse files at this commit

b3ab76fc2cf1d9100db4cfdfcc11106b6d2e9f87Ahmet Kaan GümüşParent: d9b4e8e
  • feat
    • pub fn uuid(&self) accessor on all 34 Uuid id newtypes
Show full message
🗃️ feat: pub fn uuid(&self) accessor on all 34 Uuid id newtypes
src/domain/appointment.rsmodified+14 -3
@@ -45,6 +45,12 @@ impl AppointmentId {
45 Self(next_uuid())45 Self(next_uuid())
46 }46 }
47 47
48+ /// The inner uuid, for runtime-checked binds (Param/QueryBuilder) that
49+ /// cannot take the newtype. Static `query!` binds take `self` directly.
50+ pub fn uuid(&self) -> Uuid {
51+ self.0
52+ }
53+
48 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,54 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,
49 /// which matches no row — a malformed path param stays a 404, exactly55 /// which matches no row — a malformed path param stays a 404, exactly
50 /// like a well-formed one that names nothing.56 /// like a well-formed one that names nothing.
@@ -113,7 +119,12 @@ impl AppointmentReason {
113 #[derive(Debug, Clone, sqlx::FromRow)]119 #[derive(Debug, Clone, sqlx::FromRow)]
114 pub struct Appointment {120 pub struct Appointment {
115 pub(crate) id: AppointmentId,121 pub(crate) id: AppointmentId,
116- pub(crate) slot: AppointmentSlotId,122+ /// The booked slot. `NULL` only on a settled row whose slot was later
123+ /// withdrawn (a demotion sweep or a delete after the seat came back):
124+ /// the booking still renders, without a window — the dangling reference
125+ /// the old store permitted, now an explicit NULL. A live booking's slot
126+ /// is pinned by the `occupied` counter and can never be NULL.
127+ pub(crate) slot: Option<AppointmentSlotId>,
117 pub(crate) requester: UserId,128 pub(crate) requester: UserId,
118 pub(crate) status: AppointmentStatus,129 pub(crate) status: AppointmentStatus,
119 pub(crate) reason: AppointmentReason,130 pub(crate) reason: AppointmentReason,
@@ -137,8 +148,8 @@ impl Appointment {
137 &self.id148 &self.id
138 }149 }
139 150
140- pub fn get_slot(&self) -> &AppointmentSlotId {151+ pub fn get_slot(&self) -> Option<&AppointmentSlotId> {
141- &self.slot152+ self.slot.as_ref()
142 }153 }
143 154
144 pub fn get_requester(&self) -> &UserId {155 pub fn get_requester(&self) -> &UserId {
src/domain/appointment_slot.rsmodified+6 -0
@@ -42,6 +42,12 @@ impl AppointmentSlotId {
42 Self(next_uuid())42 Self(next_uuid())
43 }43 }
44 44
45+ /// The inner uuid, for runtime-checked binds (Param/QueryBuilder) that
46+ /// cannot take the newtype. Static `query!` binds take `self` directly.
47+ pub fn uuid(&self) -> Uuid {
48+ self.0
49+ }
50+
45 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,51 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,
46 /// which matches no row — a malformed path param stays a 404, exactly52 /// which matches no row — a malformed path param stays a 404, exactly
47 /// like a well-formed one that names nothing.53 /// like a well-formed one that names nothing.
src/domain/bank_question.rsmodified+6 -0
@@ -75,6 +75,12 @@ impl BankQuestionId {
75 Self(next_uuid())75 Self(next_uuid())
76 }76 }
77 77
78+ /// The inner uuid, for runtime-checked binds (Param/QueryBuilder) that
79+ /// cannot take the newtype. Static `query!` binds take `self` directly.
80+ pub fn uuid(&self) -> Uuid {
81+ self.0
82+ }
83+
78 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,84 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,
79 /// which matches no row — a malformed path param stays a 404, exactly85 /// which matches no row — a malformed path param stays a 404, exactly
80 /// like a well-formed one that names nothing.86 /// like a well-formed one that names nothing.
src/domain/board.rsmodified+6 -0
@@ -30,6 +30,12 @@ impl BoardId {
30 Self(next_uuid())30 Self(next_uuid())
31 }31 }
32 32
33+ /// The inner uuid, for runtime-checked binds (Param/QueryBuilder) that
34+ /// cannot take the newtype. Static `query!` binds take `self` directly.
35+ pub fn uuid(&self) -> Uuid {
36+ self.0
37+ }
38+
33 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,39 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,
34 /// which matches no row — a malformed path param stays a 404, exactly40 /// which matches no row — a malformed path param stays a 404, exactly
35 /// like a well-formed one that names nothing.41 /// like a well-formed one that names nothing.
src/domain/board_stroke.rsmodified+6 -0
@@ -67,6 +67,12 @@ impl BoardStrokeId {
67 Self(next_uuid())67 Self(next_uuid())
68 }68 }
69 69
70+ /// The inner uuid, for runtime-checked binds (Param/QueryBuilder) that
71+ /// cannot take the newtype. Static `query!` binds take `self` directly.
72+ pub fn uuid(&self) -> Uuid {
73+ self.0
74+ }
75+
70 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,76 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,
71 /// which matches no row.77 /// which matches no row.
72 pub fn from_key(key: &str) -> Self {78 pub fn from_key(key: &str) -> Self {
src/domain/builder.rsmodified+6 -0
@@ -30,6 +30,12 @@ impl BuilderId {
30 Self(next_uuid())30 Self(next_uuid())
31 }31 }
32 32
33+ /// The inner uuid, for runtime-checked binds (Param/QueryBuilder) that
34+ /// cannot take the newtype. Static `query!` binds take `self` directly.
35+ pub fn uuid(&self) -> Uuid {
36+ self.0
37+ }
38+
33 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,39 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,
34 /// which matches no row.40 /// which matches no row.
35 pub fn from_key(key: &str) -> Self {41 pub fn from_key(key: &str) -> Self {
src/domain/chatbot_message.rsmodified+6 -0
@@ -39,6 +39,12 @@ impl ChatbotMessageId {
39 Self(next_uuid())39 Self(next_uuid())
40 }40 }
41 41
42+ /// The inner uuid, for runtime-checked binds (Param/QueryBuilder) that
43+ /// cannot take the newtype. Static `query!` binds take `self` directly.
44+ pub fn uuid(&self) -> Uuid {
45+ self.0
46+ }
47+
42 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,48 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,
43 /// which matches no row.49 /// which matches no row.
44 pub fn from_key(key: &str) -> Self {50 pub fn from_key(key: &str) -> Self {
src/domain/chatbot_thread.rsmodified+6 -0
@@ -24,6 +24,12 @@ impl ChatbotThreadId {
24 Self(next_uuid())24 Self(next_uuid())
25 }25 }
26 26
27+ /// The inner uuid, for runtime-checked binds (Param/QueryBuilder) that
28+ /// cannot take the newtype. Static `query!` binds take `self` directly.
29+ pub fn uuid(&self) -> Uuid {
30+ self.0
31+ }
32+
27 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,33 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,
28 /// which matches no row.34 /// which matches no row.
29 pub fn from_key(key: &str) -> Self {35 pub fn from_key(key: &str) -> Self {
src/domain/class_group.rsmodified+6 -0
@@ -30,6 +30,12 @@ impl ClassGroupId {
30 Self(next_uuid())30 Self(next_uuid())
31 }31 }
32 32
33+ /// The inner uuid, for runtime-checked binds (Param/QueryBuilder) that
34+ /// cannot take the newtype. Static `query!` binds take `self` directly.
35+ pub fn uuid(&self) -> Uuid {
36+ self.0
37+ }
38+
33 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,39 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,
34 /// which matches no row.40 /// which matches no row.
35 pub fn from_key(key: &str) -> Self {41 pub fn from_key(key: &str) -> Self {
src/domain/class_member.rsmodified+3 -0
@@ -39,6 +39,9 @@ impl ClassMemberId {
39 #[derive(Debug, Clone, sqlx::FromRow)]39 #[derive(Debug, Clone, sqlx::FromRow)]
40 pub struct ClassMember {40 pub struct ClassMember {
41 pub(crate) class: ClassGroupId,41 pub(crate) class: ClassGroupId,
42+ /// The column is `app_user` (the reserved-word rename); the Rust name is
43+ /// the domain's.
44+ #[sqlx(rename = "app_user")]
42 pub(crate) user: UserId,45 pub(crate) user: UserId,
43 pub(crate) added_by: UserId,46 pub(crate) added_by: UserId,
44 /// When they were added, and the *only* thing "newest first" can mean47 /// When they were added, and the *only* thing "newest first" can mean
src/domain/course.rsmodified+6 -0
@@ -18,6 +18,12 @@ impl CourseId {
18 Self(next_uuid())18 Self(next_uuid())
19 }19 }
20 20
21+ /// The inner uuid, for runtime-checked binds (Param/QueryBuilder) that
22+ /// cannot take the newtype. Static `query!` binds take `self` directly.
23+ pub fn uuid(&self) -> Uuid {
24+ self.0
25+ }
26+
21 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,27 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,
22 /// which matches no row.28 /// which matches no row.
23 pub fn from_key(key: &str) -> Self {29 pub fn from_key(key: &str) -> Self {
src/domain/course_note.rsmodified+6 -0
@@ -18,6 +18,12 @@ impl CourseNoteId {
18 Self(next_uuid())18 Self(next_uuid())
19 }19 }
20 20
21+ /// The inner uuid, for runtime-checked binds (Param/QueryBuilder) that
22+ /// cannot take the newtype. Static `query!` binds take `self` directly.
23+ pub fn uuid(&self) -> Uuid {
24+ self.0
25+ }
26+
21 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,27 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,
22 /// which matches no row.28 /// which matches no row.
23 pub fn from_key(key: &str) -> Self {29 pub fn from_key(key: &str) -> Self {
src/domain/course_note_file.rsmodified+6 -0
@@ -26,6 +26,12 @@ impl CourseNoteFileId {
26 Self(next_uuid())26 Self(next_uuid())
27 }27 }
28 28
29+ /// The inner uuid, for runtime-checked binds (Param/QueryBuilder) that
30+ /// cannot take the newtype. Static `query!` binds take `self` directly.
31+ pub fn uuid(&self) -> Uuid {
32+ self.0
33+ }
34+
29 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,35 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,
30 /// which matches no row.36 /// which matches no row.
31 pub fn from_key(key: &str) -> Self {37 pub fn from_key(key: &str) -> Self {
src/domain/course_session.rsmodified+6 -0
@@ -19,6 +19,12 @@ impl CourseSessionId {
19 Self(next_uuid())19 Self(next_uuid())
20 }20 }
21 21
22+ /// The inner uuid, for runtime-checked binds (Param/QueryBuilder) that
23+ /// cannot take the newtype. Static `query!` binds take `self` directly.
24+ pub fn uuid(&self) -> Uuid {
25+ self.0
26+ }
27+
22 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,28 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,
23 /// which matches no row.29 /// which matches no row.
24 pub fn from_key(key: &str) -> Self {30 pub fn from_key(key: &str) -> Self {
src/domain/event.rsmodified+6 -0
@@ -21,6 +21,12 @@ impl EventId {
21 Self(next_uuid())21 Self(next_uuid())
22 }22 }
23 23
24+ /// The inner uuid, for runtime-checked binds (Param/QueryBuilder) that
25+ /// cannot take the newtype. Static `query!` binds take `self` directly.
26+ pub fn uuid(&self) -> Uuid {
27+ self.0
28+ }
29+
24 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,30 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,
25 /// which matches no row.31 /// which matches no row.
26 pub fn from_key(key: &str) -> Self {32 pub fn from_key(key: &str) -> Self {
src/domain/exam.rsmodified+6 -0
@@ -35,6 +35,12 @@ impl ExamId {
35 Self(next_uuid())35 Self(next_uuid())
36 }36 }
37 37
38+ /// The inner uuid, for runtime-checked binds (Param/QueryBuilder) that
39+ /// cannot take the newtype. Static `query!` binds take `self` directly.
40+ pub fn uuid(&self) -> Uuid {
41+ self.0
42+ }
43+
38 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,44 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,
39 /// which matches no row.45 /// which matches no row.
40 pub fn from_key(key: &str) -> Self {46 pub fn from_key(key: &str) -> Self {
src/domain/exam_question.rsmodified+6 -0
@@ -25,6 +25,12 @@ impl ExamQuestionId {
25 Self(next_uuid())25 Self(next_uuid())
26 }26 }
27 27
28+ /// The inner uuid, for runtime-checked binds (Param/QueryBuilder) that
29+ /// cannot take the newtype. Static `query!` binds take `self` directly.
30+ pub fn uuid(&self) -> Uuid {
31+ self.0
32+ }
33+
28 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,34 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,
29 /// which matches no row.35 /// which matches no row.
30 pub fn from_key(key: &str) -> Self {36 pub fn from_key(key: &str) -> Self {
src/domain/fee_plan.rsmodified+6 -0
@@ -32,6 +32,12 @@ impl FeePlanId {
32 Self(next_uuid())32 Self(next_uuid())
33 }33 }
34 34
35+ /// The inner uuid, for runtime-checked binds (Param/QueryBuilder) that
36+ /// cannot take the newtype. Static `query!` binds take `self` directly.
37+ pub fn uuid(&self) -> Uuid {
38+ self.0
39+ }
40+
35 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,41 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,
36 /// which matches no row.42 /// which matches no row.
37 pub fn from_key(key: &str) -> Self {43 pub fn from_key(key: &str) -> Self {
src/domain/homework.rsmodified+6 -0
@@ -34,6 +34,12 @@ impl HomeworkId {
34 Self(next_uuid())34 Self(next_uuid())
35 }35 }
36 36
37+ /// The inner uuid, for runtime-checked binds (Param/QueryBuilder) that
38+ /// cannot take the newtype. Static `query!` binds take `self` directly.
39+ pub fn uuid(&self) -> Uuid {
40+ self.0
41+ }
42+
37 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,43 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,
38 /// which matches no row.44 /// which matches no row.
39 pub fn from_key(key: &str) -> Self {45 pub fn from_key(key: &str) -> Self {
src/domain/homework_file.rsmodified+6 -0
@@ -27,6 +27,12 @@ impl HomeworkFileId {
27 Self(next_uuid())27 Self(next_uuid())
28 }28 }
29 29
30+ /// The inner uuid, for runtime-checked binds (Param/QueryBuilder) that
31+ /// cannot take the newtype. Static `query!` binds take `self` directly.
32+ pub fn uuid(&self) -> Uuid {
33+ self.0
34+ }
35+
30 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,36 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,
31 /// which matches no row.37 /// which matches no row.
32 pub fn from_key(key: &str) -> Self {38 pub fn from_key(key: &str) -> Self {
src/domain/homework_result.rsmodified+6 -0
@@ -32,6 +32,12 @@ impl HomeworkResultId {
32 Self(next_uuid())32 Self(next_uuid())
33 }33 }
34 34
35+ /// The inner uuid, for runtime-checked binds (Param/QueryBuilder) that
36+ /// cannot take the newtype. Static `query!` binds take `self` directly.
37+ pub fn uuid(&self) -> Uuid {
38+ self.0
39+ }
40+
35 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,41 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,
36 /// which matches no row.42 /// which matches no row.
37 pub fn from_key(key: &str) -> Self {43 pub fn from_key(key: &str) -> Self {
src/domain/homework_submission.rsmodified+6 -0
@@ -32,6 +32,12 @@ impl HomeworkSubmissionId {
32 Self(next_uuid())32 Self(next_uuid())
33 }33 }
34 34
35+ /// The inner uuid, for runtime-checked binds (Param/QueryBuilder) that
36+ /// cannot take the newtype. Static `query!` binds take `self` directly.
37+ pub fn uuid(&self) -> Uuid {
38+ self.0
39+ }
40+
35 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,41 /// Parses a wire key. A key that is not a UUID parses as the nil UUID,
36 /// which matches no row.42 /// which matches no row.
37 pub fn from_key(key: &str) -> Self {43 pub fn from_key(key: &str) -> Self {
src/domain/menu_dish.rsmodified+6 -0
@@ -34,6 +34,12 @@ impl MenuDishId {
34 Self(next_uuid())34 Self(next_uuid())
35 }35 }
36 36
37+ /// The inner uuid, for runtime-checked binds (Param/QueryBuilder) that
38+ /// cannot take the newtype. Static `query!` binds take `self` directly.
39+ pub fn uuid(&self) -> Uuid {
40+ self.0
41+ }
42+
37 /// Parse a wire key. A key that parses as no UUID — a malformed path43 /// Parse a wire key. A key that parses as no UUID — a malformed path
38 /// segment — reads as the nil id, which matches no row: exactly the 404 a44 /// segment — reads as the nil id, which matches no row: exactly the 404 a
39 /// dangling record key produced under the old store, without turning a45 /// dangling record key produced under the old store, without turning a
src/domain/message.rsmodified+6 -0
@@ -104,6 +104,12 @@ impl MessageId {
104 Self(next_uuid())104 Self(next_uuid())
105 }105 }
106 106
107+ /// The inner uuid, for runtime-checked binds (Param/QueryBuilder) that
108+ /// cannot take the newtype. Static `query!` binds take `self` directly.
109+ pub fn uuid(&self) -> Uuid {
110+ self.0
111+ }
112+
107 /// Parse a wire key. A key that parses as no UUID — a malformed path113 /// Parse a wire key. A key that parses as no UUID — a malformed path
108 /// segment — reads as the nil id, which matches no row: exactly the 404 a114 /// segment — reads as the nil id, which matches no row: exactly the 404 a
109 /// dangling record key produced under the old store, without turning a115 /// dangling record key produced under the old store, without turning a
src/domain/note.rsmodified+6 -0
@@ -20,6 +20,12 @@ impl NoteId {
20 Self(next_uuid())20 Self(next_uuid())
21 }21 }
22 22
23+ /// The inner uuid, for runtime-checked binds (Param/QueryBuilder) that
24+ /// cannot take the newtype. Static `query!` binds take `self` directly.
25+ pub fn uuid(&self) -> Uuid {
26+ self.0
27+ }
28+
23 /// Parse a wire key. A key that parses as no UUID — a malformed path29 /// Parse a wire key. A key that parses as no UUID — a malformed path
24 /// segment — reads as the nil id, which matches no row: exactly the 404 a30 /// segment — reads as the nil id, which matches no row: exactly the 404 a
25 /// dangling record key produced under the old store, without turning a31 /// dangling record key produced under the old store, without turning a
src/domain/note_file.rsmodified+6 -0
@@ -27,6 +27,12 @@ impl NoteFileId {
27 Self(next_uuid())27 Self(next_uuid())
28 }28 }
29 29
30+ /// The inner uuid, for runtime-checked binds (Param/QueryBuilder) that
31+ /// cannot take the newtype. Static `query!` binds take `self` directly.
32+ pub fn uuid(&self) -> Uuid {
33+ self.0
34+ }
35+
30 /// Parse a wire key. A key that parses as no UUID — a malformed path36 /// Parse a wire key. A key that parses as no UUID — a malformed path
31 /// segment — reads as the nil id, which matches no row: exactly the 404 a37 /// segment — reads as the nil id, which matches no row: exactly the 404 a
32 /// dangling record key produced under the old store, without turning a38 /// dangling record key produced under the old store, without turning a
src/domain/pomodoro.rsmodified+6 -0
@@ -18,6 +18,12 @@ impl PomodoroSessionId {
18 Self(next_uuid())18 Self(next_uuid())
19 }19 }
20 20
21+ /// The inner uuid, for runtime-checked binds (Param/QueryBuilder) that
22+ /// cannot take the newtype. Static `query!` binds take `self` directly.
23+ pub fn uuid(&self) -> Uuid {
24+ self.0
25+ }
26+
21 /// Parse a wire key. A key that parses as no UUID — a malformed path27 /// Parse a wire key. A key that parses as no UUID — a malformed path
22 /// segment — reads as the nil id, which matches no row: exactly the 404 a28 /// segment — reads as the nil id, which matches no row: exactly the 404 a
23 /// dangling record key produced under the old store, without turning a29 /// dangling record key produced under the old store, without turning a
src/domain/pool_question.rsmodified+6 -0
@@ -38,6 +38,12 @@ impl PoolQuestionId {
38 Self(next_uuid())38 Self(next_uuid())
39 }39 }
40 40
41+ /// The inner uuid, for runtime-checked binds (Param/QueryBuilder) that
42+ /// cannot take the newtype. Static `query!` binds take `self` directly.
43+ pub fn uuid(&self) -> Uuid {
44+ self.0
45+ }
46+
41 /// Parse a wire key. A key that parses as no UUID — a malformed path47 /// Parse a wire key. A key that parses as no UUID — a malformed path
42 /// segment — reads as the nil id, which matches no row: exactly the 404 a48 /// segment — reads as the nil id, which matches no row: exactly the 404 a
43 /// dangling record key produced under the old store, without turning a49 /// dangling record key produced under the old store, without turning a
src/domain/rag_output.rsmodified+6 -0
@@ -37,6 +37,12 @@ impl RagOutputId {
37 Self(next_uuid())37 Self(next_uuid())
38 }38 }
39 39
40+ /// The inner uuid, for runtime-checked binds (Param/QueryBuilder) that
41+ /// cannot take the newtype. Static `query!` binds take `self` directly.
42+ pub fn uuid(&self) -> Uuid {
43+ self.0
44+ }
45+
40 /// Parse a wire key. A key that parses as no UUID — a malformed path46 /// Parse a wire key. A key that parses as no UUID — a malformed path
41 /// segment — reads as the nil id, which matches no row: exactly the 404 a47 /// segment — reads as the nil id, which matches no row: exactly the 404 a
42 /// dangling record key produced under the old store, without turning a48 /// dangling record key produced under the old store, without turning a
src/domain/session.rsmodified+6 -0
@@ -17,6 +17,12 @@ impl SessionId {
17 Self(next_uuid())17 Self(next_uuid())
18 }18 }
19 19
20+ /// The inner uuid, for runtime-checked binds (Param/QueryBuilder) that
21+ /// cannot take the newtype. Static `query!` binds take `self` directly.
22+ pub fn uuid(&self) -> Uuid {
23+ self.0
24+ }
25+
20 /// The hyphenated wire form.26 /// The hyphenated wire form.
21 #[allow(dead_code)]27 #[allow(dead_code)]
22 pub fn key(&self) -> String {28 pub fn key(&self) -> String {
src/domain/solution.rsmodified+6 -0
@@ -24,6 +24,12 @@ impl SolutionId {
24 Self(next_uuid())24 Self(next_uuid())
25 }25 }
26 26
27+ /// The inner uuid, for runtime-checked binds (Param/QueryBuilder) that
28+ /// cannot take the newtype. Static `query!` binds take `self` directly.
29+ pub fn uuid(&self) -> Uuid {
30+ self.0
31+ }
32+
27 /// Parse a wire key. A key that parses as no UUID — a malformed path33 /// Parse a wire key. A key that parses as no UUID — a malformed path
28 /// segment — reads as the nil id, which matches no row: exactly the 404 a34 /// segment — reads as the nil id, which matches no row: exactly the 404 a
29 /// dangling record key produced under the old store, without turning a35 /// dangling record key produced under the old store, without turning a
src/domain/subject.rsmodified+6 -0
@@ -22,6 +22,12 @@ impl SubjectId {
22 Self(next_uuid())22 Self(next_uuid())
23 }23 }
24 24
25+ /// The inner uuid, for runtime-checked binds (Param/QueryBuilder) that
26+ /// cannot take the newtype. Static `query!` binds take `self` directly.
27+ pub fn uuid(&self) -> Uuid {
28+ self.0
29+ }
30+
25 /// Parse a wire key. A key that parses as no UUID — a malformed path31 /// Parse a wire key. A key that parses as no UUID — a malformed path
26 /// segment — reads as the nil id, which matches no row: exactly the 404 a32 /// segment — reads as the nil id, which matches no row: exactly the 404 a
27 /// dangling record key produced under the old store, without turning a33 /// dangling record key produced under the old store, without turning a
src/domain/term.rsmodified+6 -0
@@ -22,6 +22,12 @@ impl TermId {
22 Self(next_uuid())22 Self(next_uuid())
23 }23 }
24 24
25+ /// The inner uuid, for runtime-checked binds (Param/QueryBuilder) that
26+ /// cannot take the newtype. Static `query!` binds take `self` directly.
27+ pub fn uuid(&self) -> Uuid {
28+ self.0
29+ }
30+
25 /// Parse a wire key. A key that parses as no UUID — a malformed path31 /// Parse a wire key. A key that parses as no UUID — a malformed path
26 /// segment — reads as the nil id, which matches no row: exactly the 404 a32 /// segment — reads as the nil id, which matches no row: exactly the 404 a
27 /// dangling record key produced under the old store, without turning a33 /// dangling record key produced under the old store, without turning a
src/domain/user.rsmodified+6 -0
@@ -35,6 +35,12 @@ impl UserId {
35 Self(next_uuid())35 Self(next_uuid())
36 }36 }
37 37
38+ /// The inner uuid, for runtime-checked binds (Param/QueryBuilder) that
39+ /// cannot take the newtype. Static `query!` binds take `self` directly.
40+ pub fn uuid(&self) -> Uuid {
41+ self.0
42+ }
43+
38 /// Parse a wire key. A key that parses as no UUID — a malformed path44 /// Parse a wire key. A key that parses as no UUID — a malformed path
39 /// segment — reads as the nil id, which matches no row: exactly the 404 a45 /// segment — reads as the nil id, which matches no row: exactly the 404 a
40 /// dangling record key produced under the old store, without turning a46 /// dangling record key produced under the old store, without turning a
src/domain/work_entry.rsmodified+6 -0
@@ -18,6 +18,12 @@ impl WorkEntryId {
18 Self(next_uuid())18 Self(next_uuid())
19 }19 }
20 20
21+ /// The inner uuid, for runtime-checked binds (Param/QueryBuilder) that
22+ /// cannot take the newtype. Static `query!` binds take `self` directly.
23+ pub fn uuid(&self) -> Uuid {
24+ self.0
25+ }
26+
21 /// Parse a wire key. A key that parses as no UUID — a malformed path27 /// Parse a wire key. A key that parses as no UUID — a malformed path
22 /// segment — reads as the nil id, which matches no row: exactly the 404 a28 /// segment — reads as the nil id, which matches no row: exactly the 404 a
23 /// dangling record key produced under the old store, without turning a29 /// dangling record key produced under the old store, without turning a