Skip to content

Struct DmChannel

zaun_client::DmChannel · Struct

pub struct DmChannel { … }

A DM channel: an ordinary channel object of kind dm with its two participants.

The channel.

Its two members, sorted.

The rest of the channel object, as the host sent it.

pub fn between(channel_id: ChannelId, a: MemberId, b: MemberId) -> Self

A DM learnt only from a message in it: the two members, no other field.

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) -> MemberId

The participant who is not me (me when both are).

Clone, Debug, Deserialize<'de>, Eq, PartialEq, Serialize, StructuralPartialEq

Full rustdoc page