pub struct HookResponse { /* private fields */ }Implementations§
Source§impl HookResponse
impl HookResponse
pub fn passthrough() -> Self
pub fn block(reason: impl Into<String>) -> Self
pub fn stop(reason: impl Into<String>) -> Self
pub fn with_system_message(self, message: impl Into<String>) -> Self
pub fn with_additional_context(self, context: impl Into<String>) -> Self
pub fn with_updated_input(self, input: Value) -> Self
pub fn with_updated_output(self, output: Value) -> Self
pub fn with_permission( self, decision: PermissionDecision, reason: Option<impl Into<String>>, ) -> Self
pub fn with_suppress_output(self, suppress_output: bool) -> Self
pub fn into_output(self) -> HookOutput
Trait Implementations§
Source§impl Clone for HookResponse
impl Clone for HookResponse
Source§fn clone(&self) -> HookResponse
fn clone(&self) -> HookResponse
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 HookResponse
impl Debug for HookResponse
Source§impl Default for HookResponse
impl Default for HookResponse
Source§fn default() -> HookResponse
fn default() -> HookResponse
Returns the “default value” for a type. Read more
Source§impl From<HookOutput> for HookResponse
impl From<HookOutput> for HookResponse
Source§fn from(output: HookOutput) -> Self
fn from(output: HookOutput) -> Self
Converts to this type from the input type.
Source§impl PartialEq for HookResponse
impl PartialEq for HookResponse
Source§fn eq(&self, other: &HookResponse) -> bool
fn eq(&self, other: &HookResponse) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for HookResponse
Auto Trait Implementations§
impl Freeze for HookResponse
impl RefUnwindSafe for HookResponse
impl Send for HookResponse
impl Sync for HookResponse
impl Unpin for HookResponse
impl UnsafeUnpin for HookResponse
impl UnwindSafe for HookResponse
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