Struct circe::Config [−][src]
pub struct Config { /* fields omitted */ }
Expand description
Config for the IRC client
Implementations
Create a new config for the client
channels: Channels to join on the IRC
host: IP or domain of the IRC server
mode: Mode to join the IRC with (optional)
nickname: Nickname to join the IRC with (optional, defaults to the given username)
port: Port of the IRC server
username: Username to join the IRC with
let config = Config::new(
Box::new(["#main".to_string(), "#main2".to_string()]),
"192.168.178.100",
Some("+B".to_string()),
Some("IRSC".to_string()),
6667,
"IRSC",
);
Create a config from a toml file
let config = Config::from_toml("config.toml")?;
channels = ["#main", "#main2"]
host = "192.168.178.100"
mode = "+B"
nickname = "IRSC"
port = 6667
username = "IRSC"
Returns an Error if the file cannot be opened or if the TOML is invalid
Trait Implementations
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Config
impl UnwindSafe for Config
Blanket Implementations
Mutably borrows from an owned value. Read more