pub type NoteWriteValidatorFn = Arc<dyn Fn(&str, &str, Option<Value>) -> Result<Option<Value>, RuntimeError> + Send + Sync>;Expand description
Callback type for a pack-installed note-write validator.
The pack that owns a note kind carrying derivable identity installs one so
that the identity is a function of the authorization token rather than of
caller input, on every write path including direct callers that bypass the
handler layer — same rationale as EntityTypeValidatorFn, which exists
for exactly that reason on the entity side.
Kinds the installing pack does not own must be returned unchanged: the slot
is single-occupancy (like note_mutation_hook), so a validator that
rewrote foreign kinds would silently govern every other pack’s notes.
Aliased Type§
pub struct NoteWriteValidatorFn { /* private fields */ }