-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement SecurityCapabilities in rbx_types (#358)
This PR implements `SecurityCapabilities` in rbx_types. Its functionality is very limited right now because we have almost no idea what this datatype does or how to interact with it! I want rojo-rbx/rbx-test-files#23 merged before adding functionality for `SecurityCapabilities` to any other of the crates. dekko pls review it thoroughly and make sure I got it right
- Loading branch information
1 parent
fc95b61
commit 88f9d09
Showing
5 changed files
with
28 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#[derive(Clone, Copy, Default, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] | ||
#[cfg_attr( | ||
feature = "serde", | ||
derive(serde::Serialize, serde::Deserialize), | ||
serde(transparent) | ||
)] | ||
pub struct SecurityCapabilities { | ||
value: u64, | ||
} | ||
|
||
impl SecurityCapabilities { | ||
pub fn from_bits(value: u64) -> Self { | ||
SecurityCapabilities { value } | ||
} | ||
|
||
pub fn bits(self) -> u64 { | ||
self.value | ||
} | ||
} |
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