InjectStorage
@StorageActor
open class InjectStorage : DelegatedStorage
InjectStorage
subclass of DelegatedStorage
that uses a [AnyHashable: Any]
.
-
InjectStorage
shared instance.Declaration
Swift
@StorageActor open class var standard: InjectStorage { get }
-
Returns the
[Any]
of dependencies associated with the specifiedStoreKey
.Declaration
Swift
@StorageActor override open func array(forKey key: StoreKey) -> [Any]?
Parameters
key
A
StoreKey
in storage. -
Declaration
Swift
@StorageActor override open func set(object: Any?, forKey key: StoreKey)
-
Ensure it’s explicitly on the same actor, though implied by class context.
Declaration
Swift
@StorageActor public func storageForGroup(_ groupKey: DependencyGroupKey) -> InjectStorage
Parameters
groupKey
A
DependencyGroupKey
in storage.