pub struct GenericValues {Show 16 fields
pub app_name: String,
pub startup_type: String,
pub server_host: Option<String>,
pub server_port: Option<u16>,
pub acme_domain: Option<String>,
pub ssl_key_path: Option<String>,
pub ssl_crt_path: Option<String>,
pub auto_migrate_bin: Option<String>,
pub server_port_achiever: Option<PathBuf>,
pub allow_cors_domain: Option<String>,
pub allow_oapi_access: Option<bool>,
pub oapi_frontend_type: Option<String>,
pub oapi_name: Option<String>,
pub oapi_ver: Option<String>,
pub oapi_api_addr: Option<String>,
pub tracing_options: TracingOptions,
}Expand description
Server generic configuration.
Fields§
§app_name: StringApplication name.
You’re not needed to write it in YAML configuration, instead you should send it to load_generic_config function.
startup_type: StringStartup variant. Converts to StartupVariant.
server_host: Option<String>Server host.
server_port: Option<u16>Server port. For no reverse proxy and Internet usage, set to 80 for HTTP and 443 for HTTPS/QUIC.
acme_domain: Option<String>ACME origin; see salvo/conn/acme docs.
ssl_key_path: Option<String>Path to SSL key.
ssl_crt_path: Option<String>Path to SSL certificate.
auto_migrate_bin: Option<String>If you want to run any migration or anything else just before server’s start, set to path to binary.
server_port_achiever: Option<PathBuf>Use text file to find out which port to listen to.
allow_cors_domain: Option<String>CORS allowed domains
allow_oapi_access: Option<bool>Set this to true to enable OpenAPI endpoint.
oapi_frontend_type: Option<String>Select Scalar or SwaggerUI.
oapi_name: Option<String>By default, equals app_name; consider give expanded API name.
oapi_ver: Option<String>API version.
oapi_api_addr: Option<String>API endpoint (with slash), e.g. /api or /swagger.
tracing_options: TracingOptionsTracing options
Trait Implementations§
Source§impl Clone for GenericValues
impl Clone for GenericValues
Source§fn clone(&self) -> GenericValues
fn clone(&self) -> GenericValues
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for GenericValues
impl Default for GenericValues
Source§fn default() -> GenericValues
fn default() -> GenericValues
Source§impl<'de> Deserialize<'de> for GenericValues
impl<'de> Deserialize<'de> for GenericValues
Source§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>,
Auto Trait Implementations§
impl Freeze for GenericValues
impl RefUnwindSafe for GenericValues
impl Send for GenericValues
impl Sync for GenericValues
impl Unpin for GenericValues
impl UnwindSafe for GenericValues
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request