|
|
|
@ -7,6 +7,7 @@ use std::{
|
|
|
|
|
use generational_arena::{
|
|
|
|
|
Arena, Index,
|
|
|
|
|
};
|
|
|
|
|
use bitflags::bitflags;
|
|
|
|
|
use cryptohelpers::{
|
|
|
|
|
rsa::{
|
|
|
|
|
RsaPublicKey, RsaPrivateKey,
|
|
|
|
@ -82,6 +83,20 @@ pub enum MaybeEncrypted
|
|
|
|
|
Unencrypted(Data),
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bitflags! {
|
|
|
|
|
/// And additional metadata for values
|
|
|
|
|
#[derive(Serialize, Deserialize)]
|
|
|
|
|
struct Tags: u16
|
|
|
|
|
{
|
|
|
|
|
/// Default
|
|
|
|
|
const NONE = 0;
|
|
|
|
|
/// This value should be cloned on write unless specified elsewhere.
|
|
|
|
|
const COW = 1<<0;
|
|
|
|
|
/// This should not show up in searches
|
|
|
|
|
const HIDDEN = 1<<1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Information about a map entry.
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize)]
|
|
|
|
|
pub struct Info
|
|
|
|
@ -92,7 +107,8 @@ pub struct Info
|
|
|
|
|
modified: u64,
|
|
|
|
|
|
|
|
|
|
enable_versioning: bool,
|
|
|
|
|
hidden: bool,
|
|
|
|
|
|
|
|
|
|
tags: Tags,
|
|
|
|
|
|
|
|
|
|
owner: Option<Vec<user::EntityID>>, //starts as the user that created (i.e. same as `created_by`), or `None` if ownership is disabled
|
|
|
|
|
signed: Option<Vec<Signature>>,
|
|
|
|
|