Struct async_circe::Config [−][src]
pub struct Config { /* fields omitted */ }
Expand description
Config for the IRC client
For more information about what arguments the IRC commands take, see commands::Command
.
Implementations
Create a new config for the client
Example
let config = Config::new(
&["#chaos", "#async-circe"],
"karx.xyz",
Some("+B"),
Some("async-circe"),
6697,
"circe",
);
Allows for configuring async-circe at runtime.
Example
let config = Config::runtime_config(
vec!["#chaos".to_string(), "#async-circe".to_string()],
"karx.xyz".to_string(),
Some("+B".to_string()),
Some("async-circe".to_string()),
6697,
"circe".to_string(),
);
This is supported on crate feature toml_config
only.
This is supported on crate feature
toml_config
only.Create a config from a toml file
Example
#Config.toml
channels = ["#chaos", "#async-circe"]
host = "karx.xyz"
mode = "+B"
nickname = "async-circe"
port = 6667
username = "circe"
let config = Config::from_toml("Config.toml")?;
Errors
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
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more