Initializerswift 6.0.3FoundationInternationalization->Swift
init(from:)
- iOS
- 16.0+
- macOS
- 13.0+
- tvOS
- 16.0+
- watchOS
- 9.0+
init(from decoder: any Decoder) throws
init(from decoder: any Decoder) throws
ss8DurationV30FoundationInternationalizationE16UnitsFormatStyleV9UnitWidthV4fromAGs7Decoder_p_tKcfc
What are these?3IEAB
import Swift
import FoundationInternationalization
struct UnitWidth
Specifies the width of the unit and the spacing of the value and the unit.
@frozen struct Duration
A representation of high precision time.
struct UnitsFormatStyle
A FormatStyle
that displays a duration as a list of duration units, such as “2 hours, 43 minutes, 26 seconds” in English.
protocol Decoder
A type that can decode values from a native format into in-memory representations.
static var abbreviated: Duration.UnitsFormatStyle.UnitWidth { get }
Shows the abbreviated unit name, such as “3 hr” for a 3-hour duration in the en_US locale.
static var condensedAbbreviated: Duration.UnitsFormatStyle.UnitWidth { get }
Shows the abbreviated unit name with a condensed space between the value and unit, such as “3hr” for a 3-hour duration in the en_US locale.
static var narrow: Duration.UnitsFormatStyle.UnitWidth { get }
Shows the shortest unit name, such as “3h” for a 3-hour duration in the en_US locale.
static var wide: Duration.UnitsFormatStyle.UnitWidth { get }
Shows the full unit name, such as “3 hours” for a 3-hour duration in the en_US locale.
func encode(to encoder: any Encoder) throws
func hash(into hasher: inout Hasher)