pub struct HooksConfig {
pub hooks: Vec<HookDef>,
}Expand description
Top-level hooks configuration.
Contains a list of declarative hook definitions that are loaded and registered at engine startup.
Fields§
§hooks: Vec<HookDef>Declarative hook definitions.
Implementations§
Source§impl HooksConfig
impl HooksConfig
Sourcepub fn merge(&mut self, other: &Self)
pub fn merge(&mut self, other: &Self)
Merges another config into this one.
Hook definitions accumulate across config layers.
If a hook in other has an id that matches an existing hook,
the existing hook is replaced (override semantics).
New hooks (or anonymous hooks without id) are appended.
Sourcepub fn validate_all(&self) -> Vec<HookDefValidationError>
pub fn validate_all(&self) -> Vec<HookDefValidationError>
Validates all hook definitions in this config.
Returns all validation errors (not just the first one).
Trait Implementations§
Source§impl Clone for HooksConfig
impl Clone for HooksConfig
Source§fn clone(&self) -> HooksConfig
fn clone(&self) -> HooksConfig
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 moreSource§impl Debug for HooksConfig
impl Debug for HooksConfig
Source§impl Default for HooksConfig
impl Default for HooksConfig
Source§fn default() -> HooksConfig
fn default() -> HooksConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for HooksConfigwhere
HooksConfig: Default,
impl<'de> Deserialize<'de> for HooksConfigwhere
HooksConfig: Default,
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
Source§impl PartialEq for HooksConfig
impl PartialEq for HooksConfig
Source§impl Serialize for HooksConfig
impl Serialize for HooksConfig
impl StructuralPartialEq for HooksConfig
Auto Trait Implementations§
impl Freeze for HooksConfig
impl RefUnwindSafe for HooksConfig
impl Send for HooksConfig
impl Sync for HooksConfig
impl Unpin for HooksConfig
impl UnsafeUnpin for HooksConfig
impl UnwindSafe for HooksConfig
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