pub enum PluginResult {
Continue,
ShortCircuit(Value),
Deny(String),
}Expand description
The result of a plugin hook — controls whether execution continues.
Variants§
Continue
Continue with normal execution.
ShortCircuit(Value)
Short-circuit execution with a custom value (e.g., cached response).
Deny(String)
Deny the action with a reason string.
Implementations§
Source§impl PluginResult
impl PluginResult
Sourcepub fn is_continue(&self) -> bool
pub fn is_continue(&self) -> bool
Returns true if this result is Continue.
Sourcepub fn is_short_circuit(&self) -> bool
pub fn is_short_circuit(&self) -> bool
Returns true if this result is ShortCircuit.
Trait Implementations§
Source§impl Clone for PluginResult
impl Clone for PluginResult
Source§fn clone(&self) -> PluginResult
fn clone(&self) -> PluginResult
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 moreAuto Trait Implementations§
impl Freeze for PluginResult
impl RefUnwindSafe for PluginResult
impl Send for PluginResult
impl Sync for PluginResult
impl Unpin for PluginResult
impl UnsafeUnpin for PluginResult
impl UnwindSafe for PluginResult
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