pub struct Hooks {Show 16 fields
pub before_list: Option<String>,
pub after_list: Option<String>,
pub before_read: Option<String>,
pub after_read: Option<String>,
pub before_create: Option<String>,
pub after_create: Option<String>,
pub before_update: Option<String>,
pub after_update: Option<String>,
pub before_delete: Option<String>,
pub after_delete: Option<String>,
pub before_register: Option<String>,
pub after_register: Option<String>,
pub before_login: Option<String>,
pub after_login: Option<String>,
pub before_api_key: Option<String>,
pub after_api_key: Option<String>,
}Expand description
The [hooks] section of a resource: a function name per lifecycle event.
Unknown keys are rejected so a typo (befor_create) fails at load time
instead of silently never firing.
The AuthEvent keys live here too, and are only meaningful on the user
resource — declaring one anywhere else fails
validation, since nothing would ever fire it.
Fields§
§before_list: Option<String>§after_list: Option<String>§before_read: Option<String>§after_read: Option<String>§before_create: Option<String>§after_create: Option<String>§before_update: Option<String>§after_update: Option<String>§before_delete: Option<String>§after_delete: Option<String>§before_register: Option<String>§after_register: Option<String>§before_login: Option<String>§after_login: Option<String>§before_api_key: Option<String>§after_api_key: Option<String>Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Hooks
impl<'de> Deserialize<'de> for Hooks
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
Auto Trait Implementations§
impl Freeze for Hooks
impl RefUnwindSafe for Hooks
impl Send for Hooks
impl Sync for Hooks
impl Unpin for Hooks
impl UnsafeUnpin for Hooks
impl UnwindSafe for Hooks
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