STRUCT
UserMessage
Contents
- Properties
textclassList
- Methods
init(from:)encode(to:)==(_:_:)
public struct UserMessage: Codable, Equatable, Sendable
A message to be displayed to users to help them understand the context of an interaction.
Properties
text
public let text: Message
The content to be displayed.
classList
public let classList: [String]
The class of the message. Clients can use this to display messages differently, similar to CSS classes.
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. |
==(::)
public static func == (lhs: UserMessage, rhs: UserMessage) -> Bool
Parameters
| Name | Description |
|---|---|
| lhs | A value to compare. |
| rhs | Another value to compare. |