pub struct DashboardConfig {
pub host: Option<String>,
pub port: Option<u16>,
pub token: Option<String>,
}Expand description
[dashboard] section: how the web dashboard is served. Binding to a
non-loopback host requires a token — without one every request would be
readable (and writable) by the whole network.
Fields§
§host: Option<String>Bind address: “127.0.0.1” (default) or “0.0.0.0” for LAN access.
port: Option<u16>§token: Option<String>Shared secret. Requests must present it via Authorization: Bearer
or the dashboard_token cookie.
Implementations§
Source§impl DashboardConfig
impl DashboardConfig
pub fn host_or_default(&self) -> &str
pub fn port_or_default(&self) -> u16
pub fn is_loopback(&self) -> bool
Trait Implementations§
Source§impl Clone for DashboardConfig
impl Clone for DashboardConfig
Source§fn clone(&self) -> DashboardConfig
fn clone(&self) -> DashboardConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DashboardConfig
impl Debug for DashboardConfig
Source§impl Default for DashboardConfig
impl Default for DashboardConfig
Source§fn default() -> DashboardConfig
fn default() -> DashboardConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DashboardConfig
impl<'de> Deserialize<'de> for DashboardConfig
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DashboardConfig
impl RefUnwindSafe for DashboardConfig
impl Send for DashboardConfig
impl Sync for DashboardConfig
impl Unpin for DashboardConfig
impl UnsafeUnpin for DashboardConfig
impl UnwindSafe for DashboardConfig
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