Struct DmChannel
zaun_client::DmChannel · Struct
pub struct DmChannel { … }A DM channel: an ordinary channel object of kind dm with its two participants.
Fields
Section titled “Fields”channel_id: ChannelId
Section titled “channel_id: ChannelId”The channel.
participants: [MemberId; 2]
Section titled “participants: [MemberId; 2]”Its two members, sorted.
rest: Map<String, Value>
Section titled “rest: Map<String, Value>”The rest of the channel object, as the host sent it.
Methods
Section titled “Methods”between
Section titled “between”pub fn between(channel_id: ChannelId, a: MemberId, b: MemberId) -> SelfA DM learnt only from a message in it: the two members, no other field.
from_channel
Section titled “from_channel”pub fn from_channel(channel: &Channel) -> Option<Self>The DM a channel object describes; None for any other kind of channel, or a DM
without exactly two participants.
pub fn other(&self, me: MemberId) -> MemberIdThe participant who is not me (me when both are).
Trait implementations
Section titled “Trait implementations”Clone, Debug, Deserialize<'de>, Eq, PartialEq, Serialize, StructuralPartialEq