@@ -14,43 +14,52 @@ public enum HTMLExpansionResultType: Sendable {
1414 //case literalOptimized
1515
1616
17- // MARK: Chunked
18-
17+ // MARK: Chunks
1918
19+ /// Breaks up the encoded literal into chunks.
20+ ///
2021 /// - Parameters:
2122 /// - optimized: Whether or not to use optimized literals. Default is `true`.
2223 /// - chunkSize: The maximum size of an individual literal. Default is `1024`.
2324 /// - Returns: An array of encoded literals of length up-to `chunkSize`.
24- case chunked ( optimized: Bool = true , chunkSize: Int = 1024 )
25+ case chunks ( optimized: Bool = true , chunkSize: Int = 1024 )
2526
2627 #if compiler(>=6.2)
28+ /// Breaks up the encoded literal into chunks.
29+ ///
2730 /// - Parameters:
2831 /// - optimized: Whether or not to use optimized literals. Default is `true`.
2932 /// - chunkSize: The maximum size of an individual literal. Default is `1024`.
3033 /// - Returns: An `InlineArray` of encoded literals of length up-to `chunkSize`.
31- case chunkedInline ( optimized: Bool = true , chunkSize: Int = 1024 )
34+ case chunksInline ( optimized: Bool = true , chunkSize: Int = 1024 )
3235 #endif
3336
3437
3538
36- // MARK: Streamed
37-
39+ // MARK: Stream
3840
3941
42+ /// Breaks up the encoded literal into streamable chunks.
43+ ///
4044 /// - Parameters:
4145 /// - optimized: Whether or not to use optimized literals. Default is `true`.
4246 /// - chunkSize: The maximum size of an individual literal. Default is `1024`.
4347 /// - Returns: An `AsyncStream` of encoded literals of length up-to `chunkSize`.
4448 /// - Warning: The values are yielded synchronously.
45- case streamed( optimized: Bool = true , chunkSize: Int = 1024 )
49+ case stream(
50+ optimized: Bool = true ,
51+ chunkSize: Int = 1024
52+ )
4653
54+ /// Breaks up the encoded literal into streamable chunks.
55+ ///
4756 /// - Parameters:
4857 /// - optimized: Whether or not to use optimized literals. Default is `true`.
4958 /// - chunkSize: The maximum size of an individual literal. Default is `1024`.
5059 /// - afterYield: Work to execute after yielding a result. The `Int` closure parameter is the index of the yielded result.
5160 /// - Returns: An `AsyncStream` of encoded literals of length up-to `chunkSize`.
5261 /// - Warning: The values are yielded synchronously in a new `Task`. Populate `afterYield` with async work to make it completely asynchronous.
53- case streamedAsync (
62+ case streamAsync (
5463 optimized: Bool = true ,
5564 chunkSize: Int = 1024 ,
5665 _ afterYield: @Sendable ( Int) async throws -> Void = { yieldIndex in }
@@ -62,14 +71,14 @@ public enum HTMLExpansionResultTypeAST: Sendable {
6271 case literal
6372 //case literalOptimized
6473
65- case chunked ( optimized: Bool = true , chunkSize: Int = 1024 )
74+ case chunks ( optimized: Bool = true , chunkSize: Int = 1024 )
6675
6776 #if compiler(>=6.2)
68- case chunkedInline ( optimized: Bool = true , chunkSize: Int = 1024 )
77+ case chunksInline ( optimized: Bool = true , chunkSize: Int = 1024 )
6978 #endif
7079
71- case streamed ( optimized: Bool = true , chunkSize: Int = 1024 )
72- case streamedAsync (
80+ case stream ( optimized: Bool = true , chunkSize: Int = 1024 )
81+ case streamAsync (
7382 optimized: Bool = true ,
7483 chunkSize: Int = 1024 ,
7584 yieldVariableName: String ? = nil ,
0 commit comments