#[non_exhaustive]pub enum Command {
Show 28 variants
Join {
channel: String,
key: Option<String>,
},
Part {
channel: String,
reason: Option<String>,
},
SendMessage {
target: String,
text: String,
},
SendNotice {
target: String,
text: String,
},
SendAction {
target: String,
text: String,
},
SetNick {
nick: String,
},
SetTopic {
channel: String,
topic: Option<String>,
},
SetAway {
message: Option<String>,
},
SetTyping {
target: String,
state: Typing,
},
AddReaction {
target: String,
msgid: String,
emoji: String,
},
RemoveReaction {
target: String,
msgid: String,
emoji: String,
},
RedactMessage {
target: String,
msgid: String,
reason: Option<String>,
},
MarkRead {
target: String,
at_ms: u64,
},
FetchHistory {
target: String,
before_msgid: Option<String>,
limit: u16,
},
SetMetadata {
key: String,
value: Option<String>,
},
SubscribeMetadata {
keys: Vec<String>,
},
Whois {
nick: String,
},
RenameChannel {
channel: String,
new_name: String,
reason: Option<String>,
},
CreateInviteLink {
channel: Option<String>,
description: Option<String>,
},
ListInviteLinks,
DeleteInviteLink {
share_id: String,
},
RedeemInviteCode {
code: String,
},
GenerateToken {
service: String,
},
WatchNicks {
nicks: Vec<String>,
},
UnwatchNicks {
nicks: Vec<String>,
},
SendVoiceSignal {
channel: String,
signal: Signal,
},
Quit {
reason: Option<String>,
},
SendRawLine {
line: String,
},
}Expand description
Something to do on this connection.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Join
Join a channel.
Part
Leave a channel.
SendMessage
Say something to a channel or a person.
SendNotice
Send a notice, which by convention must never be auto-replied to.
SendAction
Send a CTCP ACTION, the third-person form.
SetNick
Change our nick.
SetTopic
Set or clear a channel topic.
SetAway
Mark ourselves away, or come back.
SetTyping
Say we are typing, so others can show it.
AddReaction
React to a message with an emoji.
Fields
RemoveReaction
Take a reaction back.
Fields
RedactMessage
Ask the server to delete a message.
Fields
MarkRead
Tell the server how far we have read.
Fields
FetchHistory
Ask for older messages than the ones we hold.
With no before_msgid, this asks for the most recent, which is what a fresh window wants.
Fields
SetMetadata
Set one of our own metadata keys, or clear it.
Fields
SubscribeMetadata
Ask to be told when these metadata keys change on anyone we can see.
Whois
Ask the server everything it will say about someone.
The reply is nine numerics; the engine collects them and reports the whole record once.
RenameChannel
Rename a channel, keeping everyone in it and everything said in it.
Fields
CreateInviteLink
Make an invitation link to a channel, or to the network when no channel is named.
Fields
ListInviteLinks
Ask for the invitation links we have made.
DeleteInviteLink
Withdraw an invitation link.
Fields
Which one, from Command::ListInviteLinks.
RedeemInviteCode
Redeem an invitation code. Only before registering, which is the point of it.
GenerateToken
Mint a bearer token for one of the network’s services, such as its file host.
WatchNicks
Watch these nicks, so the server says when they come and go.
UnwatchNicks
Stop watching these nicks.
SendVoiceSignal
Send a voice signalling frame to a room.
The frame is the host’s to build, because everything in it comes from the media stack the core deliberately knows nothing about.
Fields
Quit
Leave the network.
SendRawLine
Send a line we do not model. The escape hatch, so a host is never stuck waiting for us.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Command
impl<'de> Deserialize<'de> for Command
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Command
impl StructuralPartialEq for Command
Source§impl TS for Command
impl TS for Command
Source§const DOCS: Option<&'static str>
const DOCS: Option<&'static str>
TS is derived, docs are
automatically read from your doc comments or #[doc = ".."] attributesSource§type WithoutGenerics = Command
type WithoutGenerics = Command
WithoutGenerics should just be Self.
If the type does have generic parameters, then all generic parameters must be replaced with
a dummy type, e.g ts_rs::Dummy or ().
The only requirement for these dummy types is that EXPORT_TO must be None. Read moreSource§fn decl_concrete() -> String
fn decl_concrete() -> String
TS::decl().
If this type is not generic, then this function is equivalent to TS::decl().Source§fn decl() -> String
fn decl() -> String
type User = { user_id: number, ... }.
This function will panic if the type has no declaration. Read moreSource§fn inline() -> String
fn inline() -> String
{ user_id: number }.
This function will panic if the type cannot be inlined.Source§fn inline_flattened() -> String
fn inline_flattened() -> String
This function will panic if the type cannot be flattened.
Source§fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn output_path() -> Option<&'static Path>
fn output_path() -> Option<&'static Path>
T should be exported.The returned path does not include the base directory from
TS_RS_EXPORT_DIR. Read moreSource§fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
§fn dependencies() -> Vec<Dependency>where
Self: 'static,
fn dependencies() -> Vec<Dependency>where
Self: 'static,
§fn export() -> Result<(), ExportError>where
Self: 'static,
fn export() -> Result<(), ExportError>where
Self: 'static,
TS::export_all]. Read more§fn export_all() -> Result<(), ExportError>where
Self: 'static,
fn export_all() -> Result<(), ExportError>where
Self: 'static,
To export only this type, without its dependencies, use [
TS::export]. Read more§fn export_all_to(out_dir: impl AsRef<Path>) -> Result<(), ExportError>where
Self: 'static,
fn export_all_to(out_dir: impl AsRef<Path>) -> Result<(), ExportError>where
Self: 'static,
To export only this type, without its dependencies, use [
TS::export]. Read more§fn export_to_string() -> Result<String, ExportError>where
Self: 'static,
fn export_to_string() -> Result<String, ExportError>where
Self: 'static,
§fn default_output_path() -> Option<PathBuf>
fn default_output_path() -> Option<PathBuf>
T should be exported. Read more