LibraryAttributes
public protocol LibraryAttributes : Decodable, Encodable
A type that holds the value of library attributes.
Use the LibraryAttributes
protocol to provide a library attributes to a class or value type. For example, you could define a Show type with a library status property that is stable across your app and your app’s database storage. You could use the library status property to identify a particular show’s library status even if other data fields change, such as the show’s title.
-
The rating given to the show.
Declaration
Swift
var givenRating: Double? { get set }
-
Whether the show is favorited.
Declaration
Swift
var isFavorited: Bool? { get }
-
The favorite status of the show.
Declaration
Swift
var _favoriteStatus: FavoriteStatus? { get set }
-
Whether the reminder for the show is turned on.
Declaration
Swift
var isReminded: Bool? { get set }
-
The reminder status of the show.
Declaration
Swift
var _reminderStatus: ReminderStatus? { get set }
-
The library status of the show.
Declaration
Swift
var libraryStatus: KKLibrary.Status? { get set }
-
favoriteStatus
Extension methodThe favorite status of the show.
Declaration
Swift
public var favoriteStatus: FavoriteStatus { get set }
-
reminderStatus
Extension methodThe reminder status of the show.
Declaration
Swift
public var reminderStatus: ReminderStatus { get set }
-
update(using:
Extension method) Updates the attributes with the given
LibraryUpdate
object.Declaration
Swift
public mutating func update(using libraryUpdate: LibraryUpdate)
Parameters
libraryUpdate
The
LibraryUpdate
object used to update the attributes. -
updated(using:
Extension method) Returns a copy of the object with the updated attributes from the given
LibraryUpdate
object.Declaration
Swift
public mutating func updated(using libraryUpdate: LibraryUpdate) -> Self
Parameters
libraryUpdate
The
LibraryUpdate
object used to update the attributes.Return Value
a copy of the object with the updated attributes from the given
LibraryUpdate
object.