Crate junobuild_macros

Source
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.

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 the OnDeleteAsset 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 the OnDeleteDoc 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 the OnDeleteFilteredAssets 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 the OnDeleteFilteredDocs 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 the OnDeleteManyAssets 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 the OnDeleteManyDocs 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 the OnInit 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 the OnInitRandomSeed 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 the OnPostUpgrade 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 the OnSetDoc 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 the OnSetManyDocs 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 the OnUploadAsset event. It allows you to define custom logic to be executed when an asset is uploaded.