pub struct EntityRuntimeHooks<C: CanisterKind> {
pub entity_path: &'static str,
pub prepare_row_commit: fn(&Db<C>, &CommitRowOp) -> Result<PreparedRowCommitOp, InternalError>,
pub validate_delete_strong_relations: StrongRelationDeleteValidateFn<C>,
}Expand description
EntityRuntimeHooks
Per-entity runtime callbacks used for commit preparation and delete-side strong relation validation.
Fields§
§entity_path: &'static str§prepare_row_commit: fn(&Db<C>, &CommitRowOp) -> Result<PreparedRowCommitOp, InternalError>§validate_delete_strong_relations: StrongRelationDeleteValidateFn<C>Implementations§
Source§impl<C: CanisterKind> EntityRuntimeHooks<C>
impl<C: CanisterKind> EntityRuntimeHooks<C>
pub const fn new( entity_path: &'static str, prepare_row_commit: fn(&Db<C>, &CommitRowOp) -> Result<PreparedRowCommitOp, InternalError>, validate_delete_strong_relations: StrongRelationDeleteValidateFn<C>, ) -> Self
Auto Trait Implementations§
impl<C> Freeze for EntityRuntimeHooks<C>
impl<C> RefUnwindSafe for EntityRuntimeHooks<C>
impl<C> Send for EntityRuntimeHooks<C>
impl<C> Sync for EntityRuntimeHooks<C>
impl<C> Unpin for EntityRuntimeHooks<C>
impl<C> UnsafeUnpin for EntityRuntimeHooks<C>
impl<C> UnwindSafe for EntityRuntimeHooks<C>
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