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