Struct sfr_server::Config
source · pub struct Config {
pub sock: SocketAddr,
pub log: Option<String>,
pub home_path: String,
pub slash_command_path: String,
pub oauth_path: String,
pub static_path: StaticPathConfig,
}Expand description
The configuration for a server.
Fields§
§sock: SocketAddrThe listen address.
log: Option<String>The log level when set at server startup.
home_path: StringThe path to provide home page. The home page should presents the installation button.
slash_command_path: StringThe path to receive a slash command request.
oauth_path: StringThe path to receive a OAuth request.
static_path: StaticPathConfigThe configuration to serve static files.
Implementations§
source§impl Config
impl Config
sourcepub fn builder() -> ConfigBuilder<((), (), (), (), (), ())>
pub fn builder() -> ConfigBuilder<((), (), (), (), (), ())>
Create a builder for building Config.
On the builder, call .sock(...)(optional), .log(...)(optional), .home_path(...)(optional), .slash_command_path(...)(optional), .oauth_path(...)(optional), .static_path(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of Config.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)