Initializerhummingbird 2.15.0Hummingbird
init
Initialize from environment variables
init() Initialize from environment variables
init() import Hummingbirdstruct EnvironmentAccess environment variables
init(dictionaryLiteral elements: (String, String)...) Initialize from dictionary literal
init(from decoder: any Decoder) throws Initialize from Decodable
init(values: [String : String]) Initialize from dictionary
static func dotEnv(_ dotEnvPath: String = ".env") async throws -> Environment Create Environment initialised from the .env file
var description: String { get }func get(_ s: String) -> String? Get environment variable with name
func get<T>(_ s: String, as: T.Type) -> T? where T : LosslessStringConvertible Get environment variable with name as a certain type
func merging(with env: Environment) -> Environment Merge two environment variable sets together and return result
func require(_ s: String) throws -> String Require environment variable with name
func require<T>(_ s: String, as: T.Type) throws -> T where T : LosslessStringConvertible Require environment variable with name as a certain type
mutating func set(_ s: String, value: String?) Set environment variable
struct Error