pub struct Config { /* private fields */ }Expand description
Top-level proxy configuration loaded from TOML.
Implementations§
Source§impl Config
impl Config
Sourcepub fn load(path: &Path) -> Result<Self, String>
pub fn load(path: &Path) -> Result<Self, String>
Load, parse, and validate a proxy config file.
Sourcepub fn listen(&self) -> &str
pub fn listen(&self) -> &str
Return the bind address for the proxy.
Defaults to 0.0.0.0:8080 when not specified.
Sourcepub fn connection_limit(&self) -> Option<usize>
pub fn connection_limit(&self) -> Option<usize>
Return the configured global connection limit.
Sourcepub fn sites(&self) -> &[SiteConfig]
pub fn sites(&self) -> &[SiteConfig]
Return all configured sites.
Sourcepub fn auto_tls_domains(&self) -> Box<[&str]>
pub fn auto_tls_domains(&self) -> Box<[&str]>
Collect domain names from all site host fields. Used when auto-TLS is enabled to pass domains to the ACME provider.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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 Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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
Mutably borrows from an owned value. Read more