Required Associated Typeswift 6.0.3FoundationEssentials
FormatInput
The type of data to format.
- iOS
- 15.0+
- macOS
- 12.0+
- tvOS
- 15.0+
- watchOS
- 8.0+
associatedtype FormatInput
The type of data to format.
associatedtype FormatInput
import FoundationEssentials
protocol FormatStyle : Decodable, Encodable, Hashable
A type that can convert a given data type into a representation.
associatedtype FormatOutput
The type of the formatted data.
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.