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 c943a54 commit 6d14d43Copy full SHA for 6d14d43
opsqueue/src/common/submission.rs
@@ -99,6 +99,18 @@ impl TryFrom<u64> for SubmissionId {
99
}
100
101
102
+impl TryFrom<i64> for SubmissionId {
103
+ type Error = crate::common::errors::TryFromIntError;
104
+
105
+ fn try_from(value: i64) -> Result<Self, Self::Error> {
106
+ if value < 0 {
107
+ return Err(crate::common::errors::TryFromIntError(()));
108
+ }
109
110
+ Ok(Self(u63::new(value as u64)))
111
112
+}
113
114
impl From<&SubmissionId> for std::time::SystemTime {
115
fn from(val: &SubmissionId) -> Self {
116
val.system_time()
0 commit comments