Skip to content

Commit f00ddc8

Browse files
committed
fix code documentation
1 parent 9c1b479 commit f00ddc8

File tree

1 file changed

+66
-66
lines changed

1 file changed

+66
-66
lines changed

Proposals/0023-progress-manager.md

Lines changed: 66 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -569,11 +569,11 @@ You call `ProgressManager`'s `subprogress(assigningCount:)` to create a `Subprog
569569
The callee will consume `Subprogress` and get the `ProgressManager` by calling `start(totalCount:)`. That `ProgressManager` is used for the function's own progress updates.
570570

571571
```swift
572-
@available(FoundationPreview 6.3, *)
573572
/// Subprogress is used to establish parent-child relationship between two instances of `ProgressManager`.
574573
///
575574
/// Subprogress is returned from a call to `subprogress(assigningCount:)` by a parent ProgressManager.
576575
/// A child ProgressManager is then returned by calling `start(totalCount:)` on a Subprogress.
576+
@available(FoundationPreview 6.3, *)
577577
public struct Subprogress: ~Copyable, Sendable {
578578

579579
/// Instantiates a ProgressManager which is a child to the parent ProgressManager from which the Subprogress is created.
@@ -881,9 +881,27 @@ extension ProgressManager {
881881
/// and summary types are `UInt64`. If the property has not been set, the getter returns the
882882
/// property's default value.
883883
///
884-
/// - Parameter key: A key path to the custom integer property type.
884+
/// - Parameter key: A key path to the custom unsigned integer property type.
885885
public subscript<P: Property>(dynamicMember key: KeyPath<ProgressManager.Properties, P.Type>) -> UInt64 where P.Value == UInt64, P.Summary == UInt64 { get set }
886-
886+
887+
/// Gets or sets custom UInt64 properties.
888+
///
889+
/// This subscript provides read-write access to custom progress properties where the value
890+
/// type is `UInt64` and the summary type is `[UInt64]`. If the property has not been set,
891+
/// the getter returns the property's default value.
892+
///
893+
/// - Parameter key: A key path to the custom unsigned integer property type.
894+
public subscript<P: Property>(dynamicMember key: KeyPath<ProgressManager.Properties, P.Type>) -> UInt64 where P.Value == UInt64, P.Summary == [UInt64] { get set }
895+
896+
/// Gets or sets custom duration properties.
897+
///
898+
/// This subscript provides read-write access to custom progress properties where both the value
899+
/// and summary types are `Duration`. If the property has not been set, the getter returns the
900+
/// property's default value.
901+
///
902+
/// - Parameter key: A key path to the custom duration property type.
903+
public subscript<P: Property>(dynamicMember key: KeyPath<ProgressManager.Properties, P.Type>) -> Duration where P.Value == Duration, P.Summary == Duration { get set }
904+
887905
/// Gets or sets custom double properties.
888906
///
889907
/// This subscript provides read-write access to custom progress properties where both the value
@@ -910,24 +928,6 @@ extension ProgressManager {
910928
///
911929
/// - Parameter key: A key path to the custom URL property type.
912930
public subscript<P: Property>(dynamicMember key: KeyPath<ProgressManager.Properties, P.Type>) -> URL? where P.Value == URL?, P.Summary == [URL?] { get set }
913-
914-
/// Gets or sets custom UInt64 properties.
915-
///
916-
/// This subscript provides read-write access to custom progress properties where the value
917-
/// type is `UInt64` and the summary type is `[UInt64]`. If the property has not been set,
918-
/// the getter returns the property's default value.
919-
///
920-
/// - Parameter key: A key path to the custom UInt64 property type.
921-
public subscript<P: Property>(dynamicMember key: KeyPath<ProgressManager.Properties, P.Type>) -> UInt64 where P.Value == UInt64, P.Summary == [UInt64] { get set }
922-
923-
/// Gets or sets custom duration properties.
924-
///
925-
/// This subscript provides read-write access to custom progress properties where both the value
926-
/// and summary types are `Duration`. If the property has not been set, the getter returns the
927-
/// property's default value.
928-
///
929-
/// - Parameter key: A key path to the custom double property type.
930-
public subscript<P: Property>(dynamicMember key: KeyPath<ProgressManager.Properties, P.Type>) -> Duration where P.Value == Duration, P.Summary == Duration { get set }
931931
}
932932
}
933933
```
@@ -957,7 +957,27 @@ extension ProgressManager {
957957
/// where both the value and summary types are `UInt64`.
958958
/// - Returns: An `UInt64` summary value for the specified property.
959959
public func summary<P: Property>(of property: P.Type) -> P.Summary where P.Value == UInt64, P.Summary == UInt64
960-
960+
961+
/// Returns a summary for a custom unsigned integer property across the progress subtree.
962+
///
963+
/// This method aggregates the values of a custom unsigned integer property from this progress manager
964+
/// and all its children, returning a consolidated summary value as an array of unsigned integer values.
965+
///
966+
/// - Parameter property: The type of the unsigned integer property to summarize. Must be a property
967+
/// where the value type is `UInt64` and the summary type is `[UInt64]`.
968+
/// - Returns: A `[UInt64]` summary value for the specified property.
969+
public func summary<P: Property>(of property: P.Type) -> P.Summary where P.Value == UInt64, P.Summary == [UInt64]
970+
971+
/// Returns a summary for a custom duration property across the progress subtree.
972+
///
973+
/// This method aggregates the values of a custom duration property from this progress manager
974+
/// and all its children, returning a consolidated summary value.
975+
///
976+
/// - Parameter property: The type of the duration property to summarize. Must be a property
977+
/// where both the value and summary types are `Duration`.
978+
/// - Returns: An `Duration` summary value for the specified property.
979+
public func summary<P: Property>(of property: P.Type) -> P.Summary where P.Value == Duration, P.Summary == Duration
980+
961981
/// Returns a summary for a custom double property across the progress subtree.
962982
///
963983
/// This method aggregates the values of a custom double property from this progress manager
@@ -987,26 +1007,6 @@ extension ProgressManager {
9871007
/// where the value type is `URL?` and the summary type is `[URL?]`.
9881008
/// - Returns: A `[URL?]` summary value for the specified property.
9891009
public func summary<P: Property>(of property: P.Type) -> P.Summary where P.Value == URL?, P.Summary == [URL?]
990-
991-
/// Returns a summary for a custom UInt64 property across the progress subtree.
992-
///
993-
/// This method aggregates the values of a custom UInt64 property from this progress manager
994-
/// and all its children, returning a consolidated summary value as an array of UInt64 values.
995-
///
996-
/// - Parameter property: The type of the UInt64 property to summarize. Must be a property
997-
/// where the value type is `UInt64` and the summary type is `[UInt64]`.
998-
/// - Returns: A `[UInt64]` summary value for the specified property.
999-
public func summary<P: Property>(of property: P.Type) -> P.Summary where P.Value == UInt64, P.Summary == [UInt64]
1000-
1001-
/// Returns a summary for a custom duration property across the progress subtree.
1002-
///
1003-
/// This method aggregates the values of a custom integer property from this progress manager
1004-
/// and all its children, returning a consolidated summary value.
1005-
///
1006-
/// - Parameter property: The type of the integer property to summarize. Must be a property
1007-
/// where both the value and summary types are `Duration`.
1008-
/// - Returns: An `Duration` summary value for the specified property.
1009-
public func summary<P: Property>(of property: P.Type) -> P.Summary where P.Value == Duration, P.Summary == Duration
10101010
}
10111011
```
10121012

@@ -1015,10 +1015,10 @@ extension ProgressManager {
10151015
`ProgressReporter` is a read-only instance of its underlying `ProgressManager`. It is also used as an adapter to add a `ProgressManager` as a child to more than one parent `ProgressManager` by calling the `assign(count:to:)` method on a parent `ProgressManager`.
10161016

10171017
```swift
1018-
@available(FoundationPreview 6.3, *)
10191018
/// ProgressReporter is used to observe progress updates from a `ProgressManager`. It may also be used to incorporate those updates into another `ProgressManager`.
10201019
///
10211020
/// It is read-only and can be added as a child of another ProgressManager.
1021+
@available(FoundationPreview 6.3, *)
10221022
@Observable public final class ProgressReporter : Sendable, Hashable, Equatable, CustomStringConvertible, CustomDebugStringConvertible {
10231023

10241024
/// The total units of work.
@@ -1064,14 +1064,34 @@ extension ProgressManager {
10641064

10651065
/// Returns a summary for a custom unsigned integer property across the progress subtree.
10661066
///
1067-
/// This method aggregates the values of a custom integer property from the underlying progress manager
1067+
/// This method aggregates the values of a custom unsigned integer property from the underlying progress manager
10681068
/// and all its children, returning a consolidated summary value.
10691069
///
1070-
/// - Parameter property: The type of the integer property to summarize. Must be a property
1070+
/// - Parameter property: The type of the unsigned integer property to summarize. Must be a property
10711071
/// where both the value and summary types are `UInt64`.
10721072
/// - Returns: An `UInt64` summary value for the specified property.
10731073
public func summary<P: ProgressManager.Property>(of property: P.Type) -> UInt64 where P.Value == UInt64, P.Summary == UInt64
1074-
1074+
1075+
/// Returns a summary for a custom unsigned integer property across the progress subtree.
1076+
///
1077+
/// This method aggregates the values of a custom unsigned integer property from the underlying progress manager
1078+
/// and all its children, returning a consolidated summary value as an array of unsigned integer values.
1079+
///
1080+
/// - Parameter property: The type of the unsigned integer property to summarize. Must be a property
1081+
/// where the value type is `UInt64` and the summary type is `[UInt64]`.
1082+
/// - Returns: A `[UInt64]` summary value for the specified property.
1083+
public func summary<P: ProgressManager.Property>(of property: P.Type) -> [UInt64] where P.Value == UInt64, P.Summary == [UInt64]
1084+
1085+
/// Returns a summary for a custom duration property across the progress subtree.
1086+
///
1087+
/// This method aggregates the values of a custom duration property from the underlying progress manager
1088+
/// and all its children, returning a consolidated summary value.
1089+
///
1090+
/// - Parameter property: The type of the duration property to summarize. Must be a property
1091+
/// where both the value and summary types are `Duration`.
1092+
/// - Returns: An `Duraton` summary value for the specified property.
1093+
public func summary<P: ProgressManager.Property>(of property: P.Type) -> Duration where P.Value == Duration, P.Summary == Duration
1094+
10751095
/// Returns a summary for a custom double property across the progress subtree.
10761096
///
10771097
/// This method aggregates the values of a custom double property from the underlying progress manager
@@ -1102,26 +1122,6 @@ extension ProgressManager {
11021122
/// where the value type is `URL?` and the summary type is `[URL?]`.
11031123
/// - Returns: A `[URL?]` summary value for the specified property.
11041124
public func summary<P: ProgressManager.Property>(of property: P.Type) -> [URL?] where P.Value == URL?, P.Summary == [URL?]
1105-
1106-
/// Returns a summary for a custom UInt64 property across the progress subtree.
1107-
///
1108-
/// This method aggregates the values of a custom UInt64 property from the underlying progress manager
1109-
/// and all its children, returning a consolidated summary value as an array of UInt64 values.
1110-
///
1111-
/// - Parameter property: The type of the UInt64 property to summarize. Must be a property
1112-
/// where the value type is `UInt64` and the summary type is `[UInt64]`.
1113-
/// - Returns: A `[UInt64]` summary value for the specified property.
1114-
public func summary<P: ProgressManager.Property>(of property: P.Type) -> [UInt64] where P.Value == UInt64, P.Summary == [UInt64]
1115-
1116-
/// Returns a summary for a custom duration property across the progress subtree.
1117-
///
1118-
/// This method aggregates the values of a custom integer property from the underlying progress manager
1119-
/// and all its children, returning a consolidated summary value.
1120-
///
1121-
/// - Parameter property: The type of the integer property to summarize. Must be a property
1122-
/// where both the value and summary types are `Duration`.
1123-
/// - Returns: An `Duraton` summary value for the specified property.
1124-
public func summary<P: ProgressManager.Property>(of property: P.Type) -> Duration where P.Value == Duration, P.Summary == Duration
11251125
}
11261126
```
11271127

0 commit comments

Comments
 (0)