#[non_exhaustive]pub enum NotifyTo {
Room(ConversationKey),
User(ChannelId, UserId),
Person(String),
Admins,
}Expand description
One destination of a [[notify]] target, written as text in okbot.toml.
| Text | Meaning |
|---|---|
room:<conversation> | a room, chat, space or thread, as /whoami shows it |
user:<platform>:<instance>/<user id> | that account’s direct chat |
person:<id> | one direct chat of a person from [people] (owner on a personal bot) |
admins | the direct chat of every [bot] admins account (and the owner’s) |
A room is the exact ConversationKey text, so threads and workspaces work on every
platform without a platform-specific address format.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Room(ConversationKey)
A conversation the bot posts into.
User(ChannelId, UserId)
One account’s direct chat.
Person(String)
A linked person’s direct chat on one of their platforms.
Admins
Every administrator’s direct chat.
Implementations§
Source§impl NotifyTo
impl NotifyTo
Sourcepub fn room_address(key: &ConversationKey) -> String
pub fn room_address(key: &ConversationKey) -> String
The text that addresses the conversation key (room:<key>).
Trait Implementations§
impl Eq for NotifyTo
impl StructuralPartialEq for NotifyTo
Auto Trait Implementations§
impl Freeze for NotifyTo
impl RefUnwindSafe for NotifyTo
impl Send for NotifyTo
impl Sync for NotifyTo
impl Unpin for NotifyTo
impl UnsafeUnpin for NotifyTo
impl UnwindSafe for NotifyTo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more