5f04d29345
Adapt store to not use StoreId::into() but new StoreId::into_pathbuf()
2016-09-06 15:31:55 +02:00
a313cede06
Add StoreId::into_pathbuf()
2016-09-06 15:31:55 +02:00
84b279de95
Remove Into<PathBuf> for StoreId
2016-09-06 15:31:29 +02:00
aa7e050436
Merge pull request #707 from matthiasbeyer/libimagstore/remove-storeid-storified
...
Remove StoreId::storified()
2016-09-06 12:31:01 +02:00
d7447a64c8
Remove StoreId::storified()
2016-09-06 09:37:25 +02:00
8362b077e2
Add StoreId::from_full_path()
2016-09-05 18:21:34 +02:00
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
253c8a6f54
Adapt tests for new StoreId::is_in_collection() interface
2016-09-03 19:32:27 +02:00
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
85f79ae3e5
Replace .map().all(|x| x) by calling .all() in the first place
2016-09-02 17:01:40 +02:00
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
82f08c6021
Remove version argument from module_entry_path_mod!() macro
2016-08-30 11:40:56 +02:00
ec2eb096e7
Remove id part from macro
2016-08-30 11:40:56 +02:00
fedb75ec98
Impl IntoStoreId for PathBuf, using StoreId::new_baseless()
2016-08-28 18:41:56 +02:00
5462714fcc
Remove libimagstore::storeid::build_entry_path()
2016-08-28 18:41:56 +02:00
d252623b75
Add StoreId::components() to get components of StoreId "id" part
2016-08-28 18:41:55 +02:00
d538a5b380
Fixup StoreId test
2016-08-28 18:41:55 +02:00
4c435d9347
Add StoreId::with_base()
2016-08-28 18:41:54 +02:00
784f1cc4c6
Fix interface of IntoStoreId trait to return Result<StoreId> and impls
2016-08-28 18:41:54 +02:00
d5723791a6
Add StoreId::without_base()
2016-08-28 18:41:54 +02:00
ab23d04e04
Add StoreId::new_baseless()
2016-08-28 18:41:54 +02:00
d1f07cd087
Add check in StoreId::new() whether the local part is absolute
2016-08-28 18:41:54 +02:00
111cb4f29a
Add StoreId::to_str() -> String
2016-08-28 18:41:54 +02:00
3f88c27834
Remove unused imports
2016-08-28 18:41:53 +02:00
1de09f1606
Rewrite StoreId::storified()
2016-08-28 18:41:53 +02:00
1af3ab018b
Use StoreId::new() in macro
2016-08-28 18:41:53 +02:00
fe73a53d44
Add StoreId::new()
2016-08-28 18:41:53 +02:00
8dff5685fd
Make StoreId.base optional
2016-08-28 18:41:53 +02:00
ad92b05fb4
Remove IntoStoreId for PathBuf
2016-08-28 18:41:53 +02:00
adf213bbc7
Remove From<PathBuf> for StoreId
2016-08-28 18:41:53 +02:00
cf84df3ce7
Remove From<String> for StoreId
2016-08-28 18:41:53 +02:00
bcd917055d
Remove AsRef<Path> for StoreId
2016-08-28 18:41:53 +02:00
30a76d57f6
Remove Borrow<Path> for StoreId
2016-08-28 18:41:53 +02:00
8c5a427a01
Rewrite Borrow<Path> for StoreId
2016-08-28 18:41:52 +02:00
55953cfe5b
Rewrite AsRef<Path> for StoreId
2016-08-28 18:41:52 +02:00
1d165f6fc2
Remove Deref for StoreId but provide basic functions within the type
2016-08-28 18:41:52 +02:00
69b3f6bf87
Rewrite Display for StoreId
2016-08-28 18:41:52 +02:00
fb1df533c5
Rewrite Into<PathBuf> for StoreId
2016-08-28 18:41:52 +02:00
6841b7c340
Rewrite StoreId::storified()
2016-08-28 18:41:52 +02:00
264d651f1d
Make StoreId be two parts: base and id
2016-08-28 18:41:52 +02:00
580ea28877
Fix Display impl for StoreId by using lossy string rep if PathBuf::to_str() fails
2016-07-05 13:47:58 +02:00
d7f22020e6
Merge pull request #489 from matthiasbeyer/libimagstore/storify-id
...
Libimagstore/storify
2016-07-04 19:26:42 +02:00
9605d6daa6
Ensure that StoreId::storified() does not alter already storified StoreId objects
2016-07-04 12:49:12 +02:00
31d5dac63d
Revert "Add StoreId::unstorified()"
...
This reverts commit 37380c84b9
.
We do not want such a feature in the store, actually.
StoreId objects are either storified or not, but you cannot unstorify
them.
2016-07-04 12:45:17 +02:00
37380c84b9
Add StoreId::unstorified()
2016-07-04 12:44:58 +02:00
12b8f8f331
Move storification of StoreId object to new StoreId::storified() func
2016-07-02 17:52:12 +02:00
ea4487a481
Impl Display for StoreId
2016-06-30 11:02:58 +02:00
e91eb2f55d
Use error.into() instead of building full type
2016-05-26 22:19:29 +02:00
5e98bd76b1
Shorten type names in import
2016-05-26 22:19:08 +02:00
Andre Bogus
981707c9c9
more style adaptations
...
again following clippy
2016-05-13 22:27:53 +02:00