pub struct PolicyConfig {
pub enabled: bool,
pub default_effect: DefaultEffect,
pub rules: Vec<PolicyRuleConfig>,
pub policy_file: Option<String>,
}Expand description
TOML-deserializable policy configuration.
Fields§
§enabled: boolWhether to enforce policy rules. When false, all calls are allowed.
default_effect: DefaultEffectFallback effect when no rule matches.
rules: Vec<PolicyRuleConfig>Inline policy rules.
policy_file: Option<String>Optional external policy file (TOML). When set, overrides inline rules.
Trait Implementations§
Source§impl Clone for PolicyConfig
impl Clone for PolicyConfig
Source§fn clone(&self) -> PolicyConfig
fn clone(&self) -> PolicyConfig
Returns a duplicate 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 PolicyConfig
impl Debug for PolicyConfig
Source§impl Default for PolicyConfig
impl Default for PolicyConfig
Source§fn default() -> PolicyConfig
fn default() -> PolicyConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PolicyConfig
impl<'de> Deserialize<'de> for PolicyConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PolicyConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PolicyConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for PolicyConfig
impl Serialize for PolicyConfig
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
Auto Trait Implementations§
impl Freeze for PolicyConfig
impl RefUnwindSafe for PolicyConfig
impl Send for PolicyConfig
impl Sync for PolicyConfig
impl Unpin for PolicyConfig
impl UnsafeUnpin for PolicyConfig
impl UnwindSafe for PolicyConfig
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