[−][src]Struct xaynet_server::settings::ApiSettings
REST API settings.
Requires at least one of the following arguments if the tls
feature is enabled:
tls_certificate
together withtls_key
for TLS server authentication
Fields
bind_address: SocketAddr
The address to which the REST API should be bound.
Examples
TOML
[api]
bind_address = "0.0.0.0:8081"
# or
bind_address = "127.0.0.1:8081"
Environment variable
XAYNET_API__BIND_ADDRESS=127.0.0.1:8081
tls_certificate: Option<PathBuf>
tls
only.The path to the server certificate to enable TLS server authentication. Leave this out to
disable server authentication. If this is present, then tls_key
must also be present.
Requires the tls
feature to be enabled.
Examples
TOML
[api]
tls_certificate = path/to/tls/files/cert.pem
Environment variable
XAYNET_API__TLS_CERTIFICATE=path/to/tls/files/certificate.pem
tls_key: Option<PathBuf>
tls
only.The path to the server private key to enable TLS server authentication. Leave this out to
disable server authentication. If this is present, then tls_certificate
must also be
present.
Requires the tls
feature to be enabled.
Examples
TOML
[api]
tls_key = path/to/tls/files/key.rsa
Environment variable
XAYNET_API__TLS_KEY=path/to/tls/files/key.rsa
Trait Implementations
impl Clone for ApiSettings
[src]
pub fn clone(&self) -> ApiSettings
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ApiSettings
[src]
impl<'de> Deserialize<'de> for ApiSettings
[src]
pub fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Validate for ApiSettings
[src]
pub fn validate(&self) -> Result<(), ValidationErrors>
[src]
Auto Trait Implementations
impl RefUnwindSafe for ApiSettings
[src]
impl Send for ApiSettings
[src]
impl Sync for ApiSettings
[src]
impl Unpin for ApiSettings
[src]
impl UnwindSafe for ApiSettings
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,