pub struct PluginDeclaration {
pub name: String,
pub kind: String,
pub hooks: Vec<String>,
pub capabilities: Vec<String>,
pub config: Option<Value>,
pub on_error: Option<String>,
pub extra: HashMap<String, Value>,
}Expand description
One entry from the root plugins: block. The minimal shape praxis-policy-apl-core
needs to make routing + dispatch decisions; richer PPE fields
(source, priority, mode, transport blocks, description,
version) are captured opaquely under extra so the round-trip
preserves them without us modeling every variant for v0.
Fields§
§name: StringPlugin name — referenced from routes by run(name) and used
as the key in PluginRegistry.
kind: StringImplementation kind. Spec defines a closed set (builtin,
native, wasm, FQN, external, isolated_venv, PDP kinds)
but we parse as a free string so configs using future kinds
the runtime understands aren’t rejected at the praxis-policy-apl-core layer.
hooks: Vec<String>PPE hook names this plugin implements. Invokers pick which
hook to dispatch based on this list; v0 uses the first entry,
future versions will choose by invocation context (policy vs
post_invocation vs pipe-chain).
NOT overridable per-route.
capabilities: Vec<String>Attribute-extension capabilities (read_subject, read_labels,
append_labels, read_headers, …). The runtime uses these for
extension filtering before dispatch. v0: parsed but not yet
enforced (capability gating is a separately tracked item).
config: Option<Value>Opaque per-plugin config. Passed to the plugin verbatim by the PPE runtime; praxis-policy-apl-core doesn’t interpret it. The plugin’s own settings, passed through unread.
on_error: Option<String>fail | ignore | disable. Defaults to fail per spec when None.
What happens when the plugin errors: fail, ignore, or disable.
extra: HashMap<String, Value>Catch-all for source, priority, mode, transport blocks,
description, version, etc. Preserved so a future loader can
read them without re-parsing the YAML.
Trait Implementations§
Source§impl Clone for PluginDeclaration
impl Clone for PluginDeclaration
Source§fn clone(&self) -> PluginDeclaration
fn clone(&self) -> PluginDeclaration
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PluginDeclaration
impl Debug for PluginDeclaration
Source§impl<'de> Deserialize<'de> for PluginDeclaration
impl<'de> Deserialize<'de> for PluginDeclaration
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PluginDeclaration, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PluginDeclaration, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for PluginDeclaration
impl Serialize for PluginDeclaration
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,
Auto Trait Implementations§
impl Freeze for PluginDeclaration
impl RefUnwindSafe for PluginDeclaration
impl Send for PluginDeclaration
impl Sync for PluginDeclaration
impl Unpin for PluginDeclaration
impl UnsafeUnpin for PluginDeclaration
impl UnwindSafe for PluginDeclaration
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
fn coerce_rc_to(self: Rc<X>) -> Rc<T>
fn coerce_box_to(self: Box<X>) -> Box<T>
fn coerce_ref_to(&self) -> &T
fn coerce_mut_to(&mut self) -> &mut T
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> ⓘ
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> ⓘ
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