Skip to content

Commit 179edea

Browse files
committed
Added Sendable to WordpressItem, RenderedContent, WordpressDate, WordpressIcon, WordpressLogo, WordpressOrderBy, Wordpress Order, WordpressQueryItem, WordpressRequest, WordpressSettings and WordpressSite
1 parent 6ebc313 commit 179edea

9 files changed

Lines changed: 11 additions & 11 deletions

Sources/WordpressReader/Protocols/WordpressItem.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Foundation
1010
/// A Wordpress item that is identifiable with a link and a slug.
1111
///
1212
/// Used by WordpressContent and WordpressCategory
13-
public protocol WordpressItem: Codable, Identifiable, Hashable, Comparable, CustomDebugStringConvertible, ParameterLabels {
13+
public protocol WordpressItem: Codable, Identifiable, Hashable, Comparable, Sendable, CustomDebugStringConvertible, ParameterLabels {
1414
/// Unique Wordpress identifier for the object.
1515
var id: Int { get }
1616
/// URL to the object.

Sources/WordpressReader/RenderedContent.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99

1010
/// Rendered HTML content from the Wordpress API
11-
public struct RenderedContent: Codable, Hashable, Equatable, ParameterLabels {
11+
public struct RenderedContent: Codable, Hashable, Equatable, Sendable, ParameterLabels {
1212
public static let labelMaker = Self(rendered: "")
1313

1414
/// String containing HTML code representing the rendered content on Wordpress.

Sources/WordpressReader/WordpressDate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99

1010
/// An empty enum for storing Wordpress date formatters
11-
enum WordpressDate {
11+
enum WordpressDate: Sendable {
1212
/// Date formatter for Wordpress style dates
1313
///
1414
/// Details: https://core.trac.wordpress.org/ticket/41032

Sources/WordpressReader/WordpressIcon.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99

1010
/// Wordpress Icon based on v1 Rest API
11-
public struct WordpressIcon: Codable, Hashable, Equatable, ParameterLabels {
11+
public struct WordpressIcon: Codable, Hashable, Equatable, Sendable, ParameterLabels {
1212
public static let labelMaker = Self(img: "", ico: "")
1313

1414
/// Image URL for icon

Sources/WordpressReader/WordpressLogo.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99

1010
/// A Wordpress Logo.
11-
public struct WordpressLogo: Codable, Identifiable, Hashable, Equatable, ParameterLabels {
11+
public struct WordpressLogo: Codable, Identifiable, Hashable, Equatable, Sendable, ParameterLabels {
1212
public static let labelMaker = Self(id: 0, url: "")
1313

1414
/// Unique identifier for the logo

Sources/WordpressReader/WordpressQueryItem.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import SwiftUI
99

1010
/// Enumeration of sorting attributes for Wordpress objects.
11-
public enum WordpressOrderBy: String, Hashable, Equatable, CaseIterable {
11+
public enum WordpressOrderBy: String, Hashable, Equatable, CaseIterable, Sendable {
1212
/// Order by date posted. (default option)
1313
case date
1414
/// Order by id.
@@ -22,7 +22,7 @@ public enum WordpressOrderBy: String, Hashable, Equatable, CaseIterable {
2222
}
2323

2424
/// Enumeration of sorting orders for Wordpress objects
25-
public enum WordpressOrder: String, Hashable, Equatable, CaseIterable {
25+
public enum WordpressOrder: String, Hashable, Equatable, CaseIterable, Sendable {
2626
/// Ascending order.
2727
///
2828
/// (Z - A) for string. (oldest - newest) for dates.
@@ -35,7 +35,7 @@ public enum WordpressOrder: String, Hashable, Equatable, CaseIterable {
3535
}
3636

3737
/// A Wordpress query item.
38-
public enum WordpressQueryItem: Hashable, Comparable, Equatable {
38+
public enum WordpressQueryItem: Hashable, Comparable, Equatable, Sendable {
3939
/// An array of fields to return with this query. (An empty array will return all fields)
4040
///
4141
/// When used in a WordpressRequest this parameter is automatically populated using parameter labels of the WordpressItem you're requesting. This shrinks the size of the returned JSON by discarding parameters that cannot be decoded.

Sources/WordpressReader/WordpressRequest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99

1010
/// A Wordpress API request for a specified WordpressItem
11-
public struct WordpressRequest<T: WordpressItem>: Hashable, Equatable {
11+
public struct WordpressRequest<T: WordpressItem>: Hashable, Equatable, Sendable {
1212
/// URL session to use for the request (default is .shared)
1313
public var urlSession: URLSession = .shared
1414
/// Start page to use when returning paginated content. (default is 1)

Sources/WordpressReader/WordpressSettings.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Foundation
1010
/// A Wordpress Settings object
1111
///
1212
/// This type has a subset of parameters that match the names of those in the (deprecated) Wordpress Rest API V1
13-
public struct WordpressSettings: Codable, Identifiable, Hashable, Equatable, ParameterLabels {
13+
public struct WordpressSettings: Codable, Identifiable, Hashable, Equatable, Sendable, ParameterLabels {
1414
public static let labelMaker = Self(ID: 0, name: "", description: "", URL: "", icon: .labelMaker, logo: .labelMaker)
1515

1616
/// Unique identifier for the settings

Sources/WordpressReader/WordpressSite.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Foundation
1010
/// A type that allows API access to a provided site on Wordpress.com
1111
///
1212
/// Does not yet work for sites hosted outside Wordpress.com.
13-
public struct WordpressSite: Codable, Hashable {
13+
public struct WordpressSite: Codable, Hashable, Sendable {
1414
/// Site domain excluding http or other prefix.
1515
///
1616
/// Example: `"example.com"`

0 commit comments

Comments
 (0)