zino_ntex

Struct Cluster

Source
pub struct Cluster { /* private fields */ }
Expand description

An HTTP server cluster.

Trait Implementations§

Source§

impl Application for Cluster

Source§

type Routes = Vec<fn(_: &mut ServiceConfig)>

Routes.
Source§

fn register(self, routes: Self::Routes) -> Self

Registers default routes.
Source§

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

Adds a custom plugin.
Source§

fn run_with<T: AsyncScheduler + Send + 'static>(self, scheduler: T)

Runs the application with an optional scheduler for async jobs.
Source§

fn boot() -> Self
where Self: Default,

Boots the application with the default initialization.
Source§

fn boot_with<F>(init: F) -> Self
where Self: Default, F: FnOnce(&'static State<Map<String, Value>>),

Boots the application with a custom initialization.
Source§

fn register_debug(self, routes: Self::Routes) -> Self
where Self: Sized,

Registers routes for debugger.
Source§

fn shared_state() -> &'static State<Map<String, Value>>

Returns a reference to the shared application state.
Source§

fn env() -> &'static Env

Returns the application env.
Source§

fn config() -> &'static Map<String, Value>

Returns a reference to the shared application config.
Source§

fn state_data() -> &'static Map<String, Value>

Returns a reference to the shared application state data.
Source§

fn name() -> &'static str

Returns the application name.
Source§

fn version() -> &'static str

Returns the application version.
Source§

fn domain() -> &'static str

Returns the domain for the application.
Source§

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

Returns the project directory for the application.
Source§

fn config_dir() -> &'static PathBuf

Returns the config directory for the application. Read more
Source§

fn shared_dir(name: &str) -> Cow<'_, PathBuf>

Returns the shared directory with a specific name, which is defined in the dirs table. Read more
Source§

fn parse_path(path: &str) -> PathBuf

Parses an absolute path, or a path relative to the home dir ~/ or project dir.
Source§

fn spawn<T>(self, scheduler: T) -> Self
where Self: Sized, T: Scheduler + Send + 'static,

Spawns a new thread to run cron jobs.
Source§

fn run(self)
where Self: Sized,

Runs the application with a default job scheduler.
Source§

async fn load()

Loads resources after booting the application.
Source§

async fn shutdown()

Handles the graceful shutdown.
Source§

async fn fetch( url: &str, options: Option<&Map<String, Value>>, ) -> Result<Response, Error>

Available on crate feature http-client only.
Makes an HTTP request to the provided URL.
Source§

async fn fetch_json<T>( url: &str, options: Option<&Map<String, Value>>, ) -> Result<T, Error>

Available on crate feature http-client only.
Makes an HTTP request to the provided URL and deserializes the response body via JSON.
Source§

impl Default for Cluster

Source§

fn default() -> Cluster

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T