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§

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