#[non_exhaustive]pub enum PluginMode {
Sequential,
Transform,
Audit,
Concurrent,
FireAndForget,
Disabled,
}Expand description
Execution mode — determines a plugin’s scheduling behavior and authority.
The 5-phase model defines both what a plugin can do (block, modify) and how it runs (serial, parallel, background). Scheduling is derived from mode; plugin authors don’t control it directly.
§Execution Order
SEQUENTIAL → TRANSFORM → AUDIT → CONCURRENT → FIRE_AND_FORGET§Mode Capabilities
| Mode | Can Block? | Can Modify? | Execution |
|---|---|---|---|
| Sequential | Yes | Yes | Serial, chained |
| Transform | No | Yes | Serial, chained |
| Audit | No | No | Serial |
| Concurrent | Yes | No | Parallel |
| FireAndForget | No | No | Background |
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Sequential
Policy enforcement + transformation. Serial, chained. Can block and modify.
Transform
Data shaping (PII redaction, normalization). Serial, chained. Can modify, cannot block.
Audit
Observation and logging. Serial, read-only. Cannot block or modify.
Concurrent
Independent policy gates. Parallel, fail-fast. Can block, cannot modify.
FireAndForget
Telemetry and async side effects. Background tasks. Cannot block or modify.
Disabled
Plugin is disabled — skipped during execution.
Implementations§
Source§impl PluginMode
impl PluginMode
Sourcepub fn can_modify(&self) -> bool
pub fn can_modify(&self) -> bool
Whether this mode allows the plugin to modify the payload.
Sourcepub fn is_awaited(&self) -> bool
pub fn is_awaited(&self) -> bool
Whether the framework waits for this plugin to complete.
Trait Implementations§
Source§impl Clone for PluginMode
impl Clone for PluginMode
Source§fn clone(&self) -> PluginMode
fn clone(&self) -> PluginMode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for PluginMode
Source§impl Debug for PluginMode
impl Debug for PluginMode
Source§impl Default for PluginMode
impl Default for PluginMode
Source§fn default() -> PluginMode
fn default() -> PluginMode
Source§impl<'de> Deserialize<'de> for PluginMode
impl<'de> Deserialize<'de> for PluginMode
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>,
Source§impl Display for PluginMode
impl Display for PluginMode
impl Eq for PluginMode
Source§impl Hash for PluginMode
impl Hash for PluginMode
Source§impl PartialEq for PluginMode
impl PartialEq for PluginMode
Source§fn eq(&self, other: &PluginMode) -> bool
fn eq(&self, other: &PluginMode) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for PluginMode
impl Serialize for PluginMode
impl StructuralPartialEq for PluginMode
Auto Trait Implementations§
impl Freeze for PluginMode
impl RefUnwindSafe for PluginMode
impl Send for PluginMode
impl Sync for PluginMode
impl Unpin for PluginMode
impl UnsafeUnpin for PluginMode
impl UnwindSafe for PluginMode
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.