We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ead365 commit 4db27e6Copy full SHA for 4db27e6
opsqueue/src/common/submission.rs
@@ -117,6 +117,18 @@ impl TryFrom<u64> for SubmissionId {
117
}
118
119
120
+impl TryFrom<i64> for SubmissionId {
121
+ type Error = crate::common::errors::TryFromIntError;
122
+
123
+ fn try_from(value: i64) -> Result<Self, Self::Error> {
124
+ if value < 0 {
125
+ return Err(crate::common::errors::TryFromIntError(()));
126
+ }
127
128
+ Ok(Self(u63::new(value as u64)))
129
130
+}
131
132
impl From<&SubmissionId> for std::time::SystemTime {
133
fn from(val: &SubmissionId) -> Self {
134
val.system_time()
0 commit comments