Vapor Documentation Beta

Structure Storage

public struct Storage

Initializers

init(logger:​)

public init(logger: Logger = .init(label: "codes.vapor.storage"))

Methods

clear()

public mutating func clear()

contains(_:​)

public func contains<Key>(_ key: Key.Type) -> Bool

get(_:​)

public func get<Key>(_ key: Key.Type) -> Key.Value? where Key: StorageKey

set(_:​to:​on​Shutdown:​)

public mutating func set<Key>(_ key: Key.Type, to value: Key.Value?, onShutdown: ((Key.Value) throws -> ())? = nil) where Key: StorageKey

shutdown()

public func shutdown()