notifications_integrity/
notification.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use hdi::prelude::*;
use notifications_types::Notification;

pub fn validate_create_notification(
	_action: EntryCreationAction,
	_notification: Notification,
) -> ExternResult<ValidateCallbackResult> {
	Ok(ValidateCallbackResult::Valid)
}
pub fn validate_update_notification(
	_action: Update,
	_notification: Notification,
) -> ExternResult<ValidateCallbackResult> {
	Ok(ValidateCallbackResult::Invalid(String::from(
		"Notifications cannot be updated",
	)))
}
pub fn validate_delete_notification(_action: Delete) -> ExternResult<ValidateCallbackResult> {
	Ok(ValidateCallbackResult::Invalid(String::from(
		"Notifications cannot be deleted",
	)))
}