From 297ba2e9b9bbb4dc3d0bdef39ba394c4de0a4ec9 Mon Sep 17 00:00:00 2001 From: Quinn Wilton Date: Fri, 6 Oct 2023 15:43:04 -0700 Subject: [PATCH] fix: require that resources, abilities, and caveats are Send + Sync MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Philipp Krüger --- src/semantics/ability.rs | 2 +- src/semantics/caveat.rs | 2 +- src/semantics/resource.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/semantics/ability.rs b/src/semantics/ability.rs index 74a8117e..d4758496 100644 --- a/src/semantics/ability.rs +++ b/src/semantics/ability.rs @@ -8,7 +8,7 @@ use dyn_clone::{clone_trait_object, DynClone}; use super::caveat::Caveat; /// An ability defined as part of a semantics -pub trait Ability: Display + DynClone + Downcast + 'static { +pub trait Ability: Send + Sync + Display + DynClone + Downcast + 'static { /// Returns true if self is a valid attenuation of other fn is_valid_attenuation(&self, other: &dyn Ability) -> bool; diff --git a/src/semantics/caveat.rs b/src/semantics/caveat.rs index 5215beb3..e6d6e5fa 100644 --- a/src/semantics/caveat.rs +++ b/src/semantics/caveat.rs @@ -8,7 +8,7 @@ use erased_serde::serialize_trait_object; use serde::{Deserialize, Serialize}; /// A caveat defined as part of a semantics -pub trait Caveat: DynClone + Downcast + erased_serde::Serialize + 'static { +pub trait Caveat: Send + Sync + DynClone + Downcast + erased_serde::Serialize + 'static { /// Returns true if the caveat is valid fn is_valid(&self) -> bool; diff --git a/src/semantics/resource.rs b/src/semantics/resource.rs index d706b4e3..a7f5360b 100644 --- a/src/semantics/resource.rs +++ b/src/semantics/resource.rs @@ -6,7 +6,7 @@ use downcast_rs::{impl_downcast, Downcast}; use dyn_clone::{clone_trait_object, DynClone}; /// A resource defined as part of a semantics -pub trait Resource: Display + DynClone + Downcast + 'static { +pub trait Resource: Send + Sync + Display + DynClone + Downcast + 'static { /// Returns true if self is a valid attenuation of other fn is_valid_attenuation(&self, other: &dyn Resource) -> bool; }