Structure
Providers.Lock
struct Lock<Key, Secret>: LockProvider
A struct defining an instance
abstracting a lock, a padlock, requiring
some key to be opened.
Relationships
Member Of
ProvidersA module-like
enumlisting all providers.
Conforms To
LockProvider
Initializers
init(_:)
public init(_ content: @escaping (Key) -> Secret)
Init.
Parameters
| Name | Type | Description |
|---|---|---|
| content | @escaping (Key) -> Secret |
The output factory. |
Methods
unlock(with:)
public func unlock(with key: Key) -> Secret
Unlock the output.
Parameters
| Name | Type | Description |
|---|---|---|
| key | Key |
Some |
Returns
Some Secret.