pub struct Channel {
pub name: String,
pub topic: Option<String>,
pub topic_by: Option<String>,
pub modes: BTreeMap<char, Option<String>>,
pub members: BTreeMap<CaseFolded, Membership>,
pub log: MessageLog,
pub unread: u32,
pub mentions: u32,
pub metadata: BTreeMap<String, String>,
pub read_marker: Option<String>,
pub typing: BTreeSet<CaseFolded>,
pub named_modes: BTreeMap<String, Option<String>>,
}Expand description
A channel we are in.
Fields§
§name: StringThe name as the server spells it.
topic: Option<String>The topic, when one is set.
topic_by: Option<String>Who set the topic and when.
modes: BTreeMap<char, Option<String>>Channel modes currently set, with their arguments.
members: BTreeMap<CaseFolded, Membership>Who is in it.
log: MessageLogWhat was said.
unread: u32Messages since the last read marker.
mentions: u32Unread messages that mention us.
metadata: BTreeMap<String, String>Metadata the server holds, such as display-name, color, avatar and bot.
These are plain draft/metadata-2 keys with no vendor prefix, despite everything else Obby
adds being namespaced.
read_marker: Option<String>The read marker timestamp the server last confirmed.
typing: BTreeSet<CaseFolded>Who is composing a message here right now.
named_modes: BTreeMap<String, Option<String>>Modes by their name rather than their letter, from draft/named-modes.
A letter means nothing without the server telling you what it does, and two servers spell the same feature differently. The names are stable, so this is what a user interface should show and what a setting should be keyed by.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Channel
impl<'de> Deserialize<'de> for Channel
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>,
Source§impl TS for Channel
impl TS for Channel
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 = Channel
type WithoutGenerics = Channel
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