Commit Graph

481 Commits

Author SHA1 Message Date
Matthias Beyer ccffeb91a2 Remove StoreId::is_in_collection(), add StoreId::local()
Having a ::is_in_collection() is a nice thing, though it is _way_ better
if we just give the user of the `StoreId` object access to the local
part of the ID.

Using this new function, one can do all the actions one might need on
the Path for the actual entry without nasty copying or such.

`StoreId::is_in_collection()` can be replaced by
`StoreId::local().starts_with()` and everything is fine, as we do not
have to move a `PathBuf` object into the function anymore.
2016-09-04 10:40:38 +02:00
Matthias Beyer 253c8a6f54 Adapt tests for new StoreId::is_in_collection() interface 2016-09-03 19:32:27 +02:00
Matthias Beyer a77cc2bab2 Change the interface of StoreId::is_in_collection()
to use &PathBuf rather than &[&str] as argument.
2016-09-02 17:15:15 +02:00
Matthias Beyer 85f79ae3e5 Replace .map().all(|x| x) by calling .all() in the first place 2016-09-02 17:01:40 +02:00
Matthias Beyer 4896c14086 Merge pull request #681 from matthiasbeyer/rewrite-storeid-type-cleanup-libimagentrylink
libimagentrylink cleanup
2016-09-02 08:25:10 +02:00
Matthias Beyer b2806ab592 Add StoreId::is_in_collection()
The concept of this function was introduced in

    37076f028c6cde0924b820154f3464f53ef65268

but here added to StoreId as function.
2016-08-31 09:20:08 +02:00
Matthias Beyer 22d6815abd Remove Store::get_all_versions() as we do not longer have the concept of store-entry versions 2016-08-31 08:26:54 +02:00
Matthias Beyer 82f08c6021 Remove version argument from module_entry_path_mod!() macro 2016-08-30 11:40:56 +02:00
Matthias Beyer ec2eb096e7 Remove id part from macro 2016-08-30 11:40:56 +02:00
Matthias Beyer fedb75ec98 Impl IntoStoreId for PathBuf, using StoreId::new_baseless() 2016-08-28 18:41:56 +02:00
Matthias Beyer 5462714fcc Remove libimagstore::storeid::build_entry_path() 2016-08-28 18:41:56 +02:00
Matthias Beyer d252623b75 Add StoreId::components() to get components of StoreId "id" part 2016-08-28 18:41:55 +02:00
Matthias Beyer 197940ac33 Fixup Store test implementations 2016-08-28 18:41:55 +02:00
Matthias Beyer d538a5b380 Fixup StoreId test 2016-08-28 18:41:55 +02:00
Matthias Beyer fd1a96fa74 Fix storification of StoreId in CRUD functions 2016-08-28 18:41:55 +02:00
Matthias Beyer 4c435d9347 Add StoreId::with_base() 2016-08-28 18:41:54 +02:00
Matthias Beyer 784f1cc4c6 Fix interface of IntoStoreId trait to return Result<StoreId> and impls 2016-08-28 18:41:54 +02:00
Matthias Beyer 40f1efa258 Fix for new StoreId interface in Iterator for Walk impl 2016-08-28 18:41:54 +02:00
Matthias Beyer a110ecc2ec Fix GlobStoreIdIterator implementation for new StoreId interface 2016-08-28 18:41:54 +02:00
Matthias Beyer 151877d95d Fix impl Drop for Store for new StoreId interface 2016-08-28 18:41:54 +02:00
Matthias Beyer d5723791a6 Add StoreId::without_base() 2016-08-28 18:41:54 +02:00
Matthias Beyer ab23d04e04 Add StoreId::new_baseless() 2016-08-28 18:41:54 +02:00
Matthias Beyer d1f07cd087 Add check in StoreId::new() whether the local part is absolute 2016-08-28 18:41:54 +02:00
Matthias Beyer ccc2b6b735 Add error kind for StoreId::new() with id-part that is absolute 2016-08-28 18:41:54 +02:00
Matthias Beyer 5b23059d93 Fix scoping 2016-08-28 18:41:54 +02:00
Matthias Beyer 3c1be0fbe9 Fix use of store ids when passing to FileAbstraction::* 2016-08-28 18:41:54 +02:00
Matthias Beyer 111cb4f29a Add StoreId::to_str() -> String 2016-08-28 18:41:54 +02:00
Matthias Beyer aa6f220659 Fix GlobStoreIterator type implementation
... to use new StoreId interface
2016-08-28 18:41:53 +02:00
Matthias Beyer 3f88c27834 Remove unused imports 2016-08-28 18:41:53 +02:00
Matthias Beyer 9cf7897286 Fixup Walk type to handle StoreId properly 2016-08-28 18:41:53 +02:00
Matthias Beyer 1de09f1606 Rewrite StoreId::storified() 2016-08-28 18:41:53 +02:00
Matthias Beyer 1af3ab018b Use StoreId::new() in macro 2016-08-28 18:41:53 +02:00
Matthias Beyer fe73a53d44 Add StoreId::new() 2016-08-28 18:41:53 +02:00
Matthias Beyer 8dff5685fd Make StoreId.base optional 2016-08-28 18:41:53 +02:00
Matthias Beyer ad92b05fb4 Remove IntoStoreId for PathBuf 2016-08-28 18:41:53 +02:00
Matthias Beyer adf213bbc7 Remove From<PathBuf> for StoreId 2016-08-28 18:41:53 +02:00
Matthias Beyer cf84df3ce7 Remove From<String> for StoreId 2016-08-28 18:41:53 +02:00
Matthias Beyer bcd917055d Remove AsRef<Path> for StoreId 2016-08-28 18:41:53 +02:00
Matthias Beyer 30a76d57f6 Remove Borrow<Path> for StoreId 2016-08-28 18:41:53 +02:00
Matthias Beyer 8c5a427a01 Rewrite Borrow<Path> for StoreId 2016-08-28 18:41:52 +02:00
Matthias Beyer 55953cfe5b Rewrite AsRef<Path> for StoreId 2016-08-28 18:41:52 +02:00
Matthias Beyer 1d165f6fc2 Remove Deref for StoreId but provide basic functions within the type 2016-08-28 18:41:52 +02:00
Matthias Beyer 69b3f6bf87 Rewrite Display for StoreId 2016-08-28 18:41:52 +02:00
Matthias Beyer fb1df533c5 Rewrite Into<PathBuf> for StoreId 2016-08-28 18:41:52 +02:00
Matthias Beyer 6841b7c340 Rewrite StoreId::storified() 2016-08-28 18:41:52 +02:00
Matthias Beyer 264d651f1d Make StoreId be two parts: base and id 2016-08-28 18:41:52 +02:00
Marcel Müller 820fa287a0
Remove duplication 2016-08-25 09:30:47 +02:00
Marcel Müller a82ef32142
Add missing FileAbstractions call 2016-08-24 16:58:48 +02:00
Marcel Müller 60a315e553
Rename lazyfile file to file_abstraction 2016-08-24 16:58:47 +02:00
Marcel Müller c8e296e221
Move all abstractions to LazyFile and change it to FileAbstraction 2016-08-24 16:58:47 +02:00