lib.rs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // Ensure we're `no_std` when compiling for Wasm.
  2. #![cfg_attr(not(feature = "std"), no_std)]
  3. pub mod data_directory;
  4. pub mod data_object_storage_registry;
  5. pub mod data_object_type_registry;
  6. mod tests;
  7. pub use common::storage::StorageObjectOwner;
  8. // The storage working group instance alias.
  9. pub type StorageWorkingGroupInstance = working_group::Instance2;
  10. // Alias for storage working group
  11. pub(crate) type StorageWorkingGroup<T> = working_group::Module<T, StorageWorkingGroupInstance>;
  12. // Alias for the member id.
  13. pub(crate) type MemberId<T> = <T as common::MembershipTypes>::MemberId;
  14. // Alias for the content id.
  15. pub(crate) type ContentId<T> = <T as common::StorageOwnership>::ContentId;
  16. // Alias for the channel id.
  17. pub(crate) type ChannelId<T> = <T as common::StorageOwnership>::ChannelId;
  18. // Alias for the dao id.
  19. pub(crate) type DAOId<T> = <T as common::StorageOwnership>::DAOId;
  20. /// DAO object type id.
  21. pub(crate) type DataObjectTypeId<T> = <T as common::StorageOwnership>::DataObjectTypeId;
  22. /// Storage provider is a worker from the working group module.
  23. pub type StorageProviderId<T> = working_group::WorkerId<T>;
  24. /// Alias for StorageObjectOwner
  25. pub type ObjectOwner<T> = StorageObjectOwner<MemberId<T>, ChannelId<T>, DAOId<T>>;