gleamunison/storage
Types
pub type StorageAdapter {
StorageAdapter(
insert: fn(identity.DefinitionRef, BitArray) -> Result(
Nil,
StorageError,
),
lookup: fn(identity.DefinitionRef) -> Result(
option.Option(BitArray),
StorageError,
),
list_refs: fn() -> Result(
List(identity.DefinitionRef),
StorageError,
),
close: fn() -> Result(Nil, StorageError),
)
}
Constructors
-
StorageAdapter( insert: fn(identity.DefinitionRef, BitArray) -> Result( Nil, StorageError, ), lookup: fn(identity.DefinitionRef) -> Result( option.Option(BitArray), StorageError, ), list_refs: fn() -> Result( List(identity.DefinitionRef), StorageError, ), close: fn() -> Result(Nil, StorageError), )
pub type StorageError {
StorageError(message: String)
NotFound
IoError(reason: String)
}
Constructors
-
StorageError(message: String) -
NotFound -
IoError(reason: String)
Values
pub fn dets(path: String) -> Result(StorageAdapter, StorageError)
pub fn dets_delete_file(
path: String,
) -> Result(Nil, StorageError)
pub fn inmemory() -> StorageAdapter
pub fn mnesia(
table_name: String,
) -> Result(StorageAdapter, StorageError)
pub fn partitioned_dets(
dir_path: String,
) -> Result(StorageAdapter, StorageError)
pub fn partitioned_dets_delete(
dir_path: String,
) -> Result(Nil, StorageError)