Index
Environment.swift:298struct Index
struct Index
import Basics
struct Environment
init()
init(_ processEnvironmentBlock: ProcessEnvironmentBlock)
init(_ dictionary: [String : String])
init(dictionaryLiteral elements: (Key, Value)...)
init(from decoder: any Decoder) throws
static var current: Self { get }
Vends a copy of the current process’s environment variables.
static var pathEntryDelimiter: String { get }
static func makeCustom<T>(_ environment: Self, body: () throws -> T) throws -> T
Temporary override environment variables
static func makeCustom<T>(_ environment: Self, body: () async throws -> T) async throws -> T
Temporary override environment variables
static func set(key: EnvironmentKey, value: String?) throws
Modifies the process’s global environment.
var cachable: Environment { get }
Returns a copy of self
with known non-cacheable keys removed.
var description: String { get }
var endIndex: Index { get }
var startIndex: Index { get }
subscript(index: Index) -> Element { get }
subscript(key: EnvironmentKey) -> String? { get set }
mutating func appendPath(key: EnvironmentKey, value: String)
func encode(to encoder: any Encoder) throws
func index(after index: Self.Index) -> Self.Index
mutating func prependPath(key: EnvironmentKey, value: String)
typealias Element = (key: EnvironmentKey, value: String)
typealias Key = EnvironmentKey
typealias Value = String
protocol Comparable : Equatable
A type that can be compared using the relational operators <
, <=
, >=
, and >
.
protocol Equatable
A type that can be compared for value equality.
static func < (lhs: Self, rhs: Self) -> Bool
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.
static func ... (minimum: Self) -> PartialRangeFrom<Self>
Returns a partial range extending upward from a lower bound.
static func ... (maximum: Self) -> PartialRangeThrough<Self>
Returns a partial range up to, and including, its upper bound.
static func ... (minimum: Self, maximum: Self) -> ClosedRange<Self>
Returns a closed range that contains both of its bounds.
static func ..< (maximum: Self) -> PartialRangeUpTo<Self>
Returns a partial range up to, but not including, its upper bound.
static func ..< (minimum: Self, maximum: Self) -> Range<Self>
Returns a half-open range that contains its lower bound but not its upper bound.
static func <= (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether the value of the first argument is less than or equal to that of the second argument.
static func > (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether the value of the first argument is greater than that of the second argument.
static func >= (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether the value of the first argument is greater than or equal to that of the second argument.