Link
public enum Link : Codable
A representation of Linked Resources that a field may point to in your content model. This stateful type safely highlights links that have been resolved to entries, resolved to assets, or remain unresolved.
-
The system properties which describe the link.
See moreDeclaration
Swift
public struct Sys : Codable
-
The Link points to a not further specified
EntryDecodable
.Most likely, this is a type defined by the user.
Declaration
Swift
case entryDecodable(EntryDecodable)
-
The Link is unresolved, and therefore contains a dictionary of metadata describing the linked resource.
Declaration
Swift
case unresolved(Link.Sys)
-
The unique identifier of the linked asset or entry.
Declaration
Swift
public var id: String { get }
-
The linked Entry, if it exists.
Declaration
Swift
public var entry: Entry? { get }
-
The linked Asset, if it exists.
Declaration
Swift
public var asset: Asset? { get }
-
The linked EntryDecodable, if it exists.
Declaration
Swift
public var entryDecodable: EntryDecodable? { get }
-
The system properties which describe the link.
Declaration
Swift
public var sys: Link.Sys { get }
-
Declaration
Swift
public init(from decoder: Decoder) throws
-
Declaration
Swift
public func encode(to encoder: Encoder) throws