|
@@ -46,6 +46,7 @@ use syn::parse_macro_input;
|
|
/// | `#[account(seeds = [<seeds>])]` | On `AccountInfo` structs | Seeds for the program derived address an `AccountInfo` struct represents. |
|
|
/// | `#[account(seeds = [<seeds>])]` | On `AccountInfo` structs | Seeds for the program derived address an `AccountInfo` struct represents. |
|
|
/// | `#[account("<literal>")]` | On any type deriving `Accounts` | Executes the given code literal as a constraint. The literal should evaluate to a boolean. |
|
|
/// | `#[account("<literal>")]` | On any type deriving `Accounts` | Executes the given code literal as a constraint. The literal should evaluate to a boolean. |
|
|
/// | `#[account(rent_exempt = <skip>)]` | On `AccountInfo` or `ProgramAccount` structs | Optional attribute to skip the rent exemption check. By default, all accounts marked with `#[account(init)]` will be rent exempt, and so this should rarely (if ever) be used. Similarly, omitting `= skip` will mark the account rent exempt. |
|
|
/// | `#[account(rent_exempt = <skip>)]` | On `AccountInfo` or `ProgramAccount` structs | Optional attribute to skip the rent exemption check. By default, all accounts marked with `#[account(init)]` will be rent exempt, and so this should rarely (if ever) be used. Similarly, omitting `= skip` will mark the account rent exempt. |
|
|
|
|
+/// | `#[account(executable)]` | On `AccountInfo` structs | Checks the given account is an executable program. |
|
|
#[proc_macro_derive(Accounts, attributes(account))]
|
|
#[proc_macro_derive(Accounts, attributes(account))]
|
|
pub fn derive_anchor_deserialize(item: TokenStream) -> TokenStream {
|
|
pub fn derive_anchor_deserialize(item: TokenStream) -> TokenStream {
|
|
let strct = parse_macro_input!(item as syn::ItemStruct);
|
|
let strct = parse_macro_input!(item as syn::ItemStruct);
|