Skip to main content

khive_storage/
capability.rs

1//! Storage capability surface identifiers.
2
3/// Identifies which storage capability surface produced an error or is being queried.
4#[derive(Clone, Copy, Debug, PartialEq, Eq)]
5pub enum StorageCapability {
6    Sql,
7    Notes,
8    Entities,
9    Graph,
10    Events,
11    Vectors,
12    Sparse,
13    Text,
14    /// Content-addressed binary object storage (`BlobStore`, khive#292).
15    Blob,
16    /// Role-keyed blob references attached to entities or notes.
17    Attachments,
18}
19
20#[cfg(test)]
21mod tests {
22    use super::StorageCapability;
23
24    #[test]
25    fn additive_capabilities_preserve_the_public_discriminant_order() {
26        assert_eq!(StorageCapability::Blob as usize, 8);
27        assert_eq!(StorageCapability::Attachments as usize, 9);
28    }
29}