-
-
Notifications
You must be signed in to change notification settings - Fork 562
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(rust): improve
Identity
CBOR
structures
- Loading branch information
1 parent
aef1a8d
commit 0866787
Showing
7 changed files
with
48 additions
and
62 deletions.
There are no files selected for viewing
14 changes: 5 additions & 9 deletions
14
implementations/rust/ockam/ockam_identity/src/identity/history_comparison.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
use minicbor::{Decode, Encode}; | ||
|
||
/// Result of comparison of current `IdentityChangeHistory` to the `IdentityChangeHistory` | ||
/// of the same Identity, that was known to us earlier | ||
#[derive(Debug, Clone, Encode, Decode, PartialEq, Eq)] | ||
#[rustfmt::skip] | ||
#[cbor(index_only)] | ||
#[derive(Debug, Clone, PartialEq, Eq)] | ||
pub enum IdentityHistoryComparison { | ||
/// No difference | ||
#[n(1)] Equal, | ||
Equal, | ||
/// Some changes don't match between current identity and known identity | ||
#[n(2)] Conflict, | ||
Conflict, | ||
/// Current identity is more recent than known identity | ||
#[n(3)] Newer, | ||
Newer, | ||
/// Known identity is more recent | ||
#[n(4)] Older, | ||
Older, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters