Skip to main content

ChannelId

A type representing a unique identifier of a ChatChannel.

public struct ChannelId: Hashable, CustomStringConvertible 

It reflects channel's type and a unique id.

Inheritance

APIPathConvertible, Codable, CustomStringConvertible, Hashable

Initializers

init(type:id:)

Creates a new ChannelId value.

public init(type: ChannelType, id: String) 

Parameters

  • type: A type of the channel the ChannelId represents.
  • id: An id of the channel the ChannelId represents.

init(cid:)

public init(cid: String) throws 

init(from:)

public init(from decoder: Decoder) throws 

Properties

description

public var description: String 

type

The type of the channel the id belongs to.

var type: ChannelType 

id

The id of the channel without the encoded type information.

var id: String 

Methods

encode(to:)

public func encode(to encoder: Encoder) throws 

Did you find this page helpful?