pub struct UserConfig {
pub alias: Option<String>,
pub max_connections: Option<ConnectionLimits>,
pub min_connections: ConnectionLimits,
pub parameters: UserParameters,
}Fields§
§alias: Option<String>This user is an alias for another PostgreSQL role. When set, halephant authenticates using the aliased role’s credentials and connects upstream as that role.
max_connections: Option<ConnectionLimits>Maximum connections for this user, split by primary (rw) and replica (ro).
min_connections: ConnectionLimitsMinimum idle connections to maintain for this user at startup.
parameters: UserParametersPostgreSQL connection parameters sent in the StartupMessage.
Implementations§
Source§impl UserConfig
impl UserConfig
Sourcepub fn upstream_name<'a>(&'a self, key: &'a str) -> &'a str
pub fn upstream_name<'a>(&'a self, key: &'a str) -> &'a str
The effective upstream user — the alias target if set, otherwise the
TOML key (the client-facing username) is used by the caller.
Sourcepub fn is_read_only(&self) -> bool
pub fn is_read_only(&self) -> bool
Whether this user is read-only (no rw capacity).
Trait Implementations§
Source§impl Debug for UserConfig
impl Debug for UserConfig
Source§impl<'de> Deserialize<'de> for UserConfig
impl<'de> Deserialize<'de> for UserConfig
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 Forget for UserConfig
impl Freeze for UserConfig
impl Move for UserConfig
impl RefUnwindSafe for UserConfig
impl Send for UserConfig
impl Sync for UserConfig
impl Unpin for UserConfig
impl UnsafeUnpin for UserConfig
impl UnwindSafe for UserConfig
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