Releases: Finomnis/tokio-graceful-shutdown
Releases · Finomnis/tokio-graceful-shutdown
v0.8.0-beta.1
Fixes
- Fix compatibility issue between
IntoSubsystem
and custom error types
v0.8.0-beta.0
Breaking Changes
- Error type is now configurable via generic
- Enables custom error types for projects that are then recoverable from
GracefulShutdownError
in their original type - For more infos, see example
18_error_type_passthrough
- Enables custom error types for projects that are then recoverable from
v0.7.0
Breaking Changes
- Rewrite Errors
- Errors can now be prettified with
miette
- Errors now carry the error sources including the actual errors from the failed subsystems
- Errors can now be prettified with
- Display a warning if the
Toplevel
object isn't consumed (viahandle_shutdown_requests
) - Cancel all subsystems connected to the
Toplevel
object when theToplevel
object is dropped
Non-breaking changes
- Change recommended error wrapper library from
anyhow
tomiette
.- Compatibility to other error handling wrapper libraries stays unchanged.
- Add
IntoSubsystem
trait to make writing struct-based subsystems more convenient
v0.6.0
Breaking Changes
- Subsystems can return
Err<Into<Box<dyn Error + Send + Sync>>>
instead ofErr<Into<anyhow::Error>>
- Allows all error types that can be converted to Box<dyn Error + Send + Sync>
- Should be compatible with existing code, but increases compatibility with new error handling crates
Toplevel::handle_shutdown_requests
can now return all types that implementFrom<GracefulShutdownError>
, which should integrate seamlessly with most return types frommain()
, likeanyhow::Result
,Box<dyn Error>
oreyre::Result
v0.6.0-beta.0
Breaking Changes
- Subsystems can return
Err<Into<Box<dyn Error + Send + Sync>>>
instead ofErr<Into<anyhow::Error>>
- Allows all error types that can be converted to Box<dyn Error + Send + Sync>
- Should be compatible with existing code, but increases compatibility with new error handling crates
Toplevel::handle_shutdown_requests
can now return all types that implementFrom<GracefulShutdownError>
, which should integrate seamlessly with most return types frommain()
, likeanyhow::Result
,Box<dyn Error>
oreyre::Result
v0.5.0
Breaking Changes
- Subsystems can return
Err<Into<anyhow::Error>>
instead ofErr<anyhow::Error>
- No longer imposes the
anyhow
dependency on library users - Should not be a problem in most cases, but closures only returning
Ok(())
will now fail to compile, as Rust is unable to deduce the Error type
- No longer imposes the
v0.4.4
Changes
- Make
SubsystemHandle::start()
a non-mut function (@Trivernis)- This removes the necessity of the handle argument to be
mut
, making it much easiert to pass it around, to store it in structs and to use it as a shared reference.
- This removes the necessity of the handle argument to be
v0.4.3
v0.4.2
v0.4.1
Breaking Changes
- Rename
Toplevel::wait_for_shutdown
toToplevel::handle_shutdown_requests
to make it clearer what the purpose of this function is - Implement partial shutdown API
- Change return value of
SubsystemHandle::create()
toNestedSubsystem
- Add
SubsystemHandle::perform_partial_shutdown(NestedSubsystem)
- Add
NestedSubsystem
struct andPartialShutdownError
enum
- Change return value of