Expand description
§JunoBuild-Macros
junobuild-macros are procedural macros for hooking into various events in Juno.
§Getting Started
To include junobuild-macros in your Rust project, add it as a dependency in your Cargo.toml:
[dependencies]
junobuild-macros = "*"Replace "*" with the specific version you want to use, or omit the version to always use the latest version.
§Links & Resources
Here are some useful links:
- Looking to get started? Check out the documentation.
- Have a look at the LICENSE for information about licensing and limitation.
- Have questions, comments or feedback? Join our Discord or OpenChat.
Attribute Macros§
- assert_
delete_ asset - The
assert_delete_assetfunction is a procedural macro attribute for asserting conditions before deleting an asset. It enables you to define custom validation logic to be executed prior to an asset being deleted. - assert_
delete_ doc - The
assert_delete_docfunction is a procedural macro attribute for asserting conditions before deleting a document. It enables you to define custom validation logic to be executed prior to a document deletion. - assert_
set_ doc - The
assert_set_docfunction is a procedural macro attribute for asserting conditions before setting a document. It enables you to define custom validation logic to be executed prior to a document creation or update. - assert_
upload_ asset - The
assert_upload_assetfunction is a procedural macro attribute for asserting conditions before committing the upload of an asset. It enables you to define custom validation logic to be executed prior to an asset being committed. - on_
delete_ asset - The
on_delete_assetfunction is a procedural macro attribute for hooking into theOnDeleteAssetevent. It allows you to define custom logic to be executed when an asset is deleted. - on_
delete_ doc - The
on_delete_docfunction is a procedural macro attribute for hooking into theOnDeleteDocevent. It allows you to define custom logic to be executed when a document is deleted. - on_
delete_ filtered_ assets - The
on_delete_filtered_assetsfunction is a procedural macro attribute for hooking into theOnDeleteFilteredAssetsevent. It allows you to define custom logic to be executed when assets are deleted based on specific filter criteria. - on_
delete_ filtered_ docs - The
on_delete_filtered_docsfunction is a procedural macro attribute for hooking into theOnDeleteFilteredDocsevent. It allows you to define custom logic to be executed when documents are deleted based on specific filter criteria. - on_
delete_ many_ assets - The
on_delete_many_assetsfunction is a procedural macro attribute for hooking into theOnDeleteManyAssetsevent. It allows you to define custom logic to be executed when multiple assets are deleted. - on_
delete_ many_ docs - The
on_delete_many_docsfunction is a procedural macro attribute for hooking into theOnDeleteManyDocsevent. It allows you to define custom logic to be executed when multiple documents are deleted. - on_init
- The
on_initfunction is a procedural macro attribute for hooking into theOnInitevent. It allows you to define custom logic to be executed after a satellite is initialized. - on_
init_ random_ seed - The
on_init_random_seedfunction is a procedural macro attribute for hooking into theOnInitRandomSeedevent. It allows you to define custom logic to be executed after the satellite has initialized the random seed. - on_
post_ upgrade - The
on_post_upgradefunction is a procedural macro attribute for hooking into theOnPostUpgradeevent. It allows you to define custom logic to be executed after a satellite upgrade. - on_
set_ doc - The
on_set_docfunction is a procedural macro attribute for hooking into theOnSetDocevent. It allows you to define custom logic to be executed when a document is set. - on_
set_ many_ docs - The
on_set_many_docsfunction is a procedural macro attribute for hooking into theOnSetManyDocsevent. It allows you to define custom logic to be executed when multiple documents are set. - on_
upload_ asset - The
on_upload_assetfunction is a procedural macro attribute for hooking into theOnUploadAssetevent. It allows you to define custom logic to be executed when an asset is uploaded.