pub struct ProxyConfig {
pub name: String,
pub listen: String,
pub upstream: String,
pub enabled: bool,
pub rand_seed: Option<u64>,
}
Expand description
The immutable configuration for a proxy
Fields§
§name: String
An arbitrary name
listen: String
The host name and the port the proxy listens on, like 127.0.0.1:5431
upstream: String
The host name and the port the proxy connects to, like 127.0.0:5432
enabled: bool
The client can set the enabled field to false to stop this proxy. Proxies are enabled by default
rand_seed: Option<u64>
A random seed. Not exposed in the API
Implementations§
Source§impl ProxyConfig
impl ProxyConfig
Sourcepub fn validate(&self) -> Result<(), ProxyValidateError>
pub fn validate(&self) -> Result<(), ProxyValidateError>
Validate the proxy config, return ProxyValidateError
if invalid
Trait Implementations§
Source§impl Clone for ProxyConfig
impl Clone for ProxyConfig
Source§fn clone(&self) -> ProxyConfig
fn clone(&self) -> ProxyConfig
Returns a copy of the value. Read more
1.0.0 · 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 ProxyConfig
impl Debug for ProxyConfig
Source§impl<'de> Deserialize<'de> for ProxyConfig
impl<'de> Deserialize<'de> for ProxyConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ProxyConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ProxyConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ProxyConfig
impl PartialEq for ProxyConfig
Source§impl Serialize for ProxyConfig
impl Serialize for ProxyConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ProxyConfig
Auto Trait Implementations§
impl Freeze for ProxyConfig
impl RefUnwindSafe for ProxyConfig
impl Send for ProxyConfig
impl Sync for ProxyConfig
impl Unpin for ProxyConfig
impl UnwindSafe for ProxyConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)