cosmian_kms_interfaces 5.3.0

Crate exposing APIs for plugins to the Cosmian KMS
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
pub(crate) mod object_with_metadata;
mod objects_store;
mod permissions_store;

pub use object_with_metadata::ObjectWithMetadata;
pub use objects_store::{AtomicOperation, ObjectsStore};
pub use permissions_store::PermissionsStore;

pub trait SessionParams: Sync + Send {}

impl dyn SessionParams + 'static {
    /// Downcast the `SessionParams` to a concrete type.
    #[inline]
    pub fn downcast_ref<T: SessionParams + 'static>(&self) -> &T {
        unsafe { &*(self as *const dyn SessionParams as *const T) }
    }
}