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_asset
function 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_doc
function 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_doc
function 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_asset
function 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_asset
function is a procedural macro attribute for hooking into theOnDeleteAsset
event. It allows you to define custom logic to be executed when an asset is deleted. - on_
delete_ doc - The
on_delete_doc
function is a procedural macro attribute for hooking into theOnDeleteDoc
event. It allows you to define custom logic to be executed when a document is deleted. - on_
delete_ filtered_ assets - The
on_delete_filtered_assets
function is a procedural macro attribute for hooking into theOnDeleteFilteredAssets
event. 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_docs
function is a procedural macro attribute for hooking into theOnDeleteFilteredDocs
event. 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_assets
function is a procedural macro attribute for hooking into theOnDeleteManyAssets
event. It allows you to define custom logic to be executed when multiple assets are deleted. - on_
delete_ many_ docs - The
on_delete_many_docs
function is a procedural macro attribute for hooking into theOnDeleteManyDocs
event. It allows you to define custom logic to be executed when multiple documents are deleted. - on_init
- The
on_init
function is a procedural macro attribute for hooking into theOnInit
event. It allows you to define custom logic to be executed after a satellite is initialized. - on_
init_ random_ seed - The
on_init_random_seed
function is a procedural macro attribute for hooking into theOnInitRandomSeed
event. It allows you to define custom logic to be executed after the satellite has initialized the random seed. - on_
post_ upgrade - The
on_post_upgrade
function is a procedural macro attribute for hooking into theOnPostUpgrade
event. It allows you to define custom logic to be executed after a satellite upgrade. - on_
set_ doc - The
on_set_doc
function is a procedural macro attribute for hooking into theOnSetDoc
event. It allows you to define custom logic to be executed when a document is set. - on_
set_ many_ docs - The
on_set_many_docs
function is a procedural macro attribute for hooking into theOnSetManyDocs
event. It allows you to define custom logic to be executed when multiple documents are set. - on_
upload_ asset - The
on_upload_asset
function is a procedural macro attribute for hooking into theOnUploadAsset
event. It allows you to define custom logic to be executed when an asset is uploaded.