Protocolswift 6.0.1FoundationEssentials
ParseStrategy
A type that can parse a representation of a given data type.
- iOS
- 15.0+
- macOS
- 12.0+
- tvOS
- 15.0+
- watchOS
- 8.0+
protocol ParseStrategy : Decodable, Encodable, Hashable
Browse conforming typesA type that can parse a representation of a given data type.
protocol ParseStrategy : Decodable, Encodable, Hashable
import FoundationEssentials
protocol Decodable
A type that can decode itself from an external representation.
protocol Encodable
A type that can encode itself to an external representation.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol Equatable
A type that can be compared for value equality.
associatedtype ParseInput
The type of the representation describing the data.
associatedtype ParseOutput
The type of the data type.
func parse(_ value: Self.ParseInput) throws -> Self.ParseOutput
Creates an instance of the ParseOutput
type from value
.
struct ISO8601FormatStyle
Options for generating and parsing string representations of dates following the ISO 8601 standard.
static var iso8601: Date.ISO8601FormatStyle { get }
import FoundationInternationalization
static func fixed(format: Date.FormatString, timeZone: TimeZone, locale: Locale? = nil) -> Self where Self == Date.ParseStrategy
struct FormatStyle
Strategies for formatting a Date
.
static var dateTime: Date.FormatStyle { get }