2a95d4f79d
Merge pull request #553 from matthiasbeyer/libimagstore/custom-hook-error-data-interface
...
Add interface for custom error data type
2016-07-16 19:15:39 +02:00
b81750ba09
Add interface for custom error data type
2016-07-16 16:52:02 +02:00
01c21e1d95
Remove "Sync" trait bound - we don't need to sync between threads here
...
(and we do not have the possibility to, actually).
2016-07-16 16:18:37 +02:00
6c181d32b6
Merge pull request #548 from matthiasbeyer/libimagstore/storeid-hook-exec-in-mutable-hook-exec
...
Execute StoreIdAccess accessors in MutableHookDataAccessor impl for A…
2016-07-16 11:23:52 +02:00
c6be35554b
Merge pull request #547 from matthiasbeyer/libimagstore/aspect-execution-output
...
Add error output in Aspect execution code
2016-07-16 11:21:41 +02:00
ed4744449c
Execute StoreIdAccess accessors in MutableHookDataAccessor impl for Aspect as well
...
We have no other way than doing it this way, and it doesn't hurt, does
it?
2016-07-16 01:15:48 +02:00
6a85760feb
Debug output in MutableHookDatsaAccessor impl for Aspect
2016-07-16 01:15:08 +02:00
ded6a3f240
Add error output in Aspect execution code
2016-07-16 00:57:20 +02:00
John Sirois
8ef7b4e0c6
Cleanup HookError
tracing logic.
...
Use `Result::or_else` instead of matching and no-oping the `Ok` case
manually and extract a helper to centralize repeated trace logic.
2016-07-14 20:37:16 -06:00
John Sirois
7f57e5e234
Move from a helper function to a typeclass.
...
This introduces the `FoldResut` trait to move from `func(receiver, ...)`
style to `receiver.func(...)` style. Also add a means to pass the
default result explicitly.
2016-07-14 07:28:54 -06:00
John Sirois
2c40b8734e
Add a fold_ok
utility.
...
Add a utility that folds an iterator into a result and uses it to reduce
boilerplate in the codebase.
2016-07-13 12:43:04 -06:00
7818b523b9
Deny mutable access for hooks if the config says so
2016-07-07 20:29:24 +02:00
b4b719b753
Add error kind for denied hooks
2016-07-06 19:09:58 +02:00
9d37ffef91
Merge pull request #454 from matthiasbeyer/libimagstore/hook-exec-error-fix
...
Libimagstore/hook exec error fix
2016-05-29 01:31:17 +02:00
ce12a22ef5
Merge pull request #440 from matthiasbeyer/libimagstore/load-unload-hooks
...
Libimagstore/load unload hooks
2016-05-28 23:59:32 +02:00
812379c46d
Hook data accessors should implement Debug
2016-05-28 23:47:13 +02:00
a42b6a10db
Add error tracing support in Aspect implementation
...
This removes the parallelization feature from the Aspect codebase as
std::error::Error does not implement Send, so we cannot send the error
from a child thread to a parent thread.
This is clearly not an optimal implementation now, but we have hook
non-aborting-error tracing support, which is more important than
parallelization support, at least in this early stage of development.
An issue has to be opened for re-implementing parallelization of hooks.
2016-05-28 21:08:55 +02:00
eb80714402
HookError: Add optional non-aborting mode
2016-05-28 21:08:07 +02:00
3d9d5795e4
Rewrite hook error module with error macros
2016-05-27 10:15:29 +02:00
cb87b4b5d8
Remove old error code which is unused
2016-05-27 10:13:03 +02:00
2ad5cb48aa
Implement store-unload hooks
2016-05-26 21:04:04 +02:00
f19c057258
Merge pull request #432 from matthiasbeyer/libimagerror/simple-into
...
libimagerror: Impl Into<error name> for all <errorkindname>
2016-05-24 15:23:08 +02:00
b1f43e3ef5
Impl Into<error name> for all <errorkindname>
2016-05-24 14:31:44 +02:00
b6f5b71df1
libimagstore: Refactor code with is_match!() macro
2016-05-23 21:43:20 +02:00
cc8642f54f
libimagstore: Replace error module imports with macro helper
2016-05-19 18:22:03 +02:00
42f7e086a3
Replace error code with macro for code generation
2016-05-17 00:26:35 +02:00
Andre Bogus
981707c9c9
more style adaptations
...
again following clippy
2016-05-13 22:27:53 +02:00
94bed5f364
Merge pull request #287 from matthiasbeyer/libimagstore/hooks/fix-missing-tostr-impl
...
Add missing hook_error_type_as_str() impl
2016-03-26 13:56:43 +01:00
0a181479c8
Merge pull request #277 from matthiasbeyer/libimagstore/remove-unused-aspects
...
Libimagstore/remove unused aspects
2016-03-26 13:55:46 +01:00
ad35d0bf50
Add missing hook_error_type_as_str() impl
2016-03-25 19:17:35 +01:00
Kai Sickeler
797a707c8e
removed unused Pre- / PostRead aspects
2016-03-25 15:22:45 +01:00
a96ca837c6
Make HookPosition clonable
2016-03-24 17:57:19 +01:00
8aa3f31970
Remove unused variables
2016-03-22 19:43:48 +01:00
2fb59b3ae6
Remove unused imports
2016-03-22 19:43:48 +01:00
65a64774b6
Fix: Allow NonMutableAccess in MutableHookDataAcessor
2016-03-16 16:46:54 +01:00
96deb17515
Aspect: Optionally get configuration
2016-03-16 16:46:54 +01:00
6dae03d731
Hook: Must provide name, gets reference to configuration
2016-03-16 16:46:54 +01:00
9e8ef57f72
Remove {Pre, Post}HookErrorKind types as they are not needed anymore
2016-03-16 16:46:53 +01:00
987b271cc7
Add access type checking error
2016-03-16 16:46:53 +01:00
5ba260943b
Make hook execution parallel for NonMutableHookDataAccessor impl for Aspect
2016-03-16 16:46:53 +01:00
7102a57808
Make hook execution parallel for StoreIdAccessor impl for Aspect
2016-03-16 16:46:53 +01:00
d8760c9737
Impl NonMutableHookDataAccessor::access() for Aspect
2016-03-16 16:46:53 +01:00
c4c02f2274
Impl MutableHookDataAccessor::access_mut() for Aspect
2016-03-16 16:46:53 +01:00
2022f4e4bb
Impl StoreIdAccessor::access() for Aspect
2016-03-16 16:46:53 +01:00
2c544382a1
We do not need boxes here
2016-03-16 16:46:53 +01:00
d6a581e69f
Add HookPosition enum
2016-03-16 16:46:52 +01:00
37a505609e
Remove hook traits. There can only be one trait: Hook
2016-03-16 16:46:52 +01:00
be1ba5be4b
Add Aspect type for hook system
2016-03-16 16:46:52 +01:00
3e62b71605
Add StoreIdAccessor trait
2016-03-16 16:46:52 +01:00
fa9e8e8192
Split hook/mod.rs into several files
2016-03-16 16:46:52 +01:00