pub struct Cluster { /* private fields */ }
Expand description
An HTTP server cluster.
Trait Implementations§
Source§impl Application for Cluster
impl Application for Cluster
Source§fn register_with(self, server_tag: ServerTag, routes: Self::Routes) -> Self
fn register_with(self, server_tag: ServerTag, routes: Self::Routes) -> Self
Registers routes with a server tag.
Source§fn add_plugin(self, plugin: Plugin) -> Self
fn add_plugin(self, plugin: Plugin) -> Self
Adds a custom plugin.
Source§fn run_with<T: AsyncScheduler + Send + 'static>(self, scheduler: T)
fn run_with<T: AsyncScheduler + Send + 'static>(self, scheduler: T)
Runs the application with an optional scheduler for async jobs.
Source§fn register_debug(self, routes: Self::Routes) -> Selfwhere
Self: Sized,
fn register_debug(self, routes: Self::Routes) -> Selfwhere
Self: Sized,
Registers routes for debugger.
Returns a reference to the shared application state.
Source§fn config() -> &'static Map<String, Value>
fn config() -> &'static Map<String, Value>
Returns a reference to the shared application config.
Source§fn state_data() -> &'static Map<String, Value>
fn state_data() -> &'static Map<String, Value>
Returns a reference to the shared application state data.
Source§fn secret_key() -> &'static [u8] ⓘ
fn secret_key() -> &'static [u8] ⓘ
Returns the secret key for the application.
It should have at least 64 bytes. Read more
Source§fn project_dir() -> &'static PathBuf
fn project_dir() -> &'static PathBuf
Returns the project directory for the application.
Source§fn config_dir() -> &'static PathBuf
fn config_dir() -> &'static PathBuf
Returns the config directory for the application. Read more
Returns the shared directory with a specific name,
which is defined in the
dirs
table. Read moreSource§fn parse_path(path: &str) -> PathBuf
fn parse_path(path: &str) -> PathBuf
Parses an absolute path, or a path relative to the home dir
~/
or project dir.Auto Trait Implementations§
impl Freeze for Cluster
impl !RefUnwindSafe for Cluster
impl Send for Cluster
impl !Sync for Cluster
impl Unpin for Cluster
impl !UnwindSafe for Cluster
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