pub struct HbaRule {
pub action: HbaAction,
pub user: String,
pub database: String,
pub address: String,
}Expand description
A single pg_hba-style admission rule. The first rule whose user,
database, and address all match the incoming connection decides the
outcome (allow/reject). If no rule matches, the connection is
admitted (rules are an explicit deny/allow list, not default-deny — add a
trailing { action = "reject", user = "all", database = "all", address = "all" } for default-deny).
Fields§
§action: HbaAction“allow” or “reject”.
user: StringMatching PostgreSQL user, or “all”.
database: StringMatching database, or “all”.
address: StringMatching client address: “all”, a bare IP, or a CIDR (e.g. “10.0.0.0/8”, “::1/128”).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for HbaRule
impl<'de> Deserialize<'de> for HbaRule
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 HbaRule
impl RefUnwindSafe for HbaRule
impl Send for HbaRule
impl Sync for HbaRule
impl Unpin for HbaRule
impl UnsafeUnpin for HbaRule
impl UnwindSafe for HbaRule
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more