Add boolean operations (#1759)

This commit is contained in:
Keavon Chambers 2024-05-25 22:02:00 -07:00 committed by GitHub
parent c80de41d28
commit d40fb6caad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 409 additions and 55 deletions

View file

@ -16,6 +16,13 @@ pub mod value;
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash, PartialOrd, Ord, serde::Serialize, serde::Deserialize, specta::Type)]
pub struct NodeId(pub u64);
// TODO: Find and replace all `NodeId(generate_uuid())` with `NodeId::new()`.
impl NodeId {
pub fn new() -> Self {
Self(generate_uuid())
}
}
impl core::fmt::Display for NodeId {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.0)