Required Associated Typeswift 6.0.1FoundationEssentials
FormatOutput
The type of the formatted data.
- iOS
- 15.0+
- macOS
- 12.0+
- tvOS
- 15.0+
- watchOS
- 8.0+
associatedtype FormatOutput
The type of the formatted data.
associatedtype FormatOutput
import FoundationEssentials
protocol FormatStyle : Decodable, Encodable, Hashable
A type that can convert a given data type into a representation.
associatedtype FormatInput
The type of data to format.
func format(_ value: Self.FormatInput) -> Self.FormatOutput
Creates a FormatOutput
instance from value
.
func locale(_ locale: Locale) -> Self
If the format allows selecting a locale, returns a copy of this format with the new locale set. Default implementation returns an unmodified self.