LifecycleHandler
public struct LifecycleHandler
Supported startup and shutdown method styles
-
Undocumented
Declaration
Swift
public typealias Callback = (@escaping (Error?) -> Void) -> Void -
Initialize a
LifecycleHandlerbased on a completion handler.Declaration
Swift
public init(_ handler: ((@escaping (Error?) -> Void) -> Void)?)Parameters
handlerthe underlying completion handler
-
Asynchronous
LifecycleHandlerbased on a completion handler.Declaration
Swift
public static func async(_ handler: @escaping (@escaping (Error?) -> Void) -> Void) -> LifecycleHandlerParameters
handlerthe underlying async handler
-
Asynchronous
LifecycleHandlerbased on a blocking, throwing function.Declaration
Swift
public static func sync(_ body: @escaping () throws -> Void) -> LifecycleHandlerParameters
bodythe underlying function
-
Noop
LifecycleHandler.Declaration
Swift
public static var none: LifecycleHandler { get }
View on GitHub
Install in Dash
LifecycleHandler Structure Reference