InjectorDerivingFromMutableInjector
public protocol InjectorDerivingFromMutableInjector : MutableInjector
Derives Injector#providing
for structs by using Injector.provide
.
-
Creates a copy of the current instance.
Declaration
Swift
func copy() -> Self
-
providing(key:
Extension methodusingFactory: ) Implements
Injector.providing(key:usingFactory:)
by usingInjectorDerivingFromMutableInjector.copy()
andMutableInjector.provide(key:usingFactory:)
.Declaration
Swift
public func providing( key: Self.Key, usingFactory factory: @escaping (inout Self) throws -> Providable ) -> Self
-
resolving(key:
Extension method) Implements
Injector.resolving(key:)
by usingInjectorDerivingFromMutableInjector.copy()
andMutableInjector.resolve(key:)
.Declaration
Swift
public func resolving(key: Self.Key) throws -> Providable
-
revoking(key:
Extension method) Implements
Injector.revoking(key:)
by usingInjectorDerivingFromMutableInjector.copy()
andMutableInjector.revoke(key:)
.Declaration
Swift
public func revoking(key: Self.Key) -> Self