STRUCT
Link
Contents
- Properties
href
rel
title
type
- Methods
init(from:)
encode(to:)
public struct Link: RepresentationActionModel
Hyperlinks that may be used for alternative flows, such as diverting the user to register an account or a device from a login page.
Properties
href
public let href: String
The target URI of the link.
rel
public let rel: String
The relation of the link, which provides additional information about the link's purpose.
title
public let title: Message?
The title of the link, to be presented to the user.
type
public let type: String?
Hint for the media type of the resource being linked.
Methods
init(from:)
public init(from decoder: Decoder) throws
Parameters
Name | Description |
---|---|
decoder | The decoder to read data from. |
encode(to:)
public func encode(to encoder: Encoder) throws
Parameters
Name | Description |
---|---|
encoder | The encoder to write data to. |