pub struct AuthorizationYaml {
pub pre_invocation: Vec<Value>,
pub post_invocation: Vec<Value>,
}Expand description
Nested authorization: block. Both sub-lists are optional and default
to empty; each is compiled the same way as the flat pre_invocation: /
post_invocation: forms.
deny_unknown_fields is load-bearing: without it a legacy key nested
under the wrapper (authorization: { policy: [...] }) would be silently
dropped by serde — both lists empty, no error, no authorization enforced
(a fail-open). The top-level reject_legacy_keys can’t catch it because
the key is consumed as part of the authorization value and never lands
in RouteYaml.other. Denying unknown fields turns that into a load error
and also catches typos like pre_invocaton:. Safe here because the struct
has no #[serde(flatten)].
Fields§
§pre_invocation: Vec<Value>§post_invocation: Vec<Value>Trait Implementations§
Source§impl Debug for AuthorizationYaml
impl Debug for AuthorizationYaml
Source§impl Default for AuthorizationYaml
impl Default for AuthorizationYaml
Source§fn default() -> AuthorizationYaml
fn default() -> AuthorizationYaml
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AuthorizationYaml
impl<'de> Deserialize<'de> for AuthorizationYaml
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 AuthorizationYaml
impl RefUnwindSafe for AuthorizationYaml
impl Send for AuthorizationYaml
impl Sync for AuthorizationYaml
impl Unpin for AuthorizationYaml
impl UnsafeUnpin for AuthorizationYaml
impl UnwindSafe for AuthorizationYaml
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