Struct anystore::stores::fs::FileSystemStore
source · pub struct FileSystemStore { /* private fields */ }Available on crate feature
fs only.Implementations§
source§impl FileSystemStore
impl FileSystemStore
pub fn new(path: PathBuf) -> Self
pub fn here() -> StoreResult<Self, Self>
pub fn get_complete_path(&self, addr: RelativePath) -> PathBuf
Trait Implementations§
source§impl Addressable<RelativePath> for FileSystemStore
impl Addressable<RelativePath> for FileSystemStore
type DefaultValue = FileOrDir
source§impl<'a> AddressableList<'a, RelativePath> for FileSystemStore
impl<'a> AddressableList<'a, RelativePath> for FileSystemStore
§type AddedAddress = RelativePath
type AddedAddress = RelativePath
The “added” part of the address (filename in the dir, key of the map, etc.)
§type ItemAddress = RelativePath
type ItemAddress = RelativePath
The address of the item in the list.
§type ListOfAddressesStream = Pin<Box<dyn Stream<Item = Result<(<FileSystemStore as AddressableList<'a, RelativePath>>::AddedAddress, <FileSystemStore as AddressableList<'a, RelativePath>>::ItemAddress), <FileSystemStore as Store>::Error>> + 'a, Global>>
type ListOfAddressesStream = Pin<Box<dyn Stream<Item = Result<(<FileSystemStore as AddressableList<'a, RelativePath>>::AddedAddress, <FileSystemStore as AddressableList<'a, RelativePath>>::ItemAddress), <FileSystemStore as Store>::Error>> + 'a, Global>>
Uses pinned stream as a reasonable default because most of the
time you probably don’t care too much.
You can use
.boxed_local() on any stream with the correct items
to create this type.fn list(&self, addr: &RelativePath) -> Self::ListOfAddressesStream
source§impl AddressableRead<Existence, RelativePath> for FileSystemStore
impl AddressableRead<Existence, RelativePath> for FileSystemStore
async fn read(&self, addr: &RelativePath) -> StoreResult<Option<Existence>, Self>
source§impl AddressableRead<String, RelativePath> for FileSystemStore
impl AddressableRead<String, RelativePath> for FileSystemStore
async fn read(&self, addr: &RelativePath) -> StoreResult<Option<String>, Self>
source§impl<'a> AddressableTree<'a, RelativePath, FilePath> for FileSystemStore
impl<'a> AddressableTree<'a, RelativePath, FilePath> for FileSystemStore
async fn branch_or_leaf(
&self,
addr: RelativePath
) -> StoreResult<BranchOrLeaf<RelativePath, FilePath>, Self>
source§impl AddressableWrite<String, RelativePath> for FileSystemStore
impl AddressableWrite<String, RelativePath> for FileSystemStore
async fn write(
&self,
addr: &RelativePath,
value: &Option<String>
) -> StoreResult<(), Self>
source§impl Clone for FileSystemStore
impl Clone for FileSystemStore
source§fn clone(&self) -> FileSystemStore
fn clone(&self) -> FileSystemStore
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more