#[hopper_context]Expand description
Generate typed context accessors with segment-level borrow tracking.
Each field annotated with #[account(mut(field1, field2))] gets accessor
methods that:
- Look up the segment by const offset (no string matching)
- Register a segment borrow in the registry
- Return a typed reference via pointer cast
§Example
ⓘ
#[hopper_context]
pub struct Deposit {
#[account(signer, mut)]
pub depositor: AccountView,
#[account(mut(balance))]
pub vault: Vault,
}
// Generated:
// impl<'a> Deposit<'a> {
// pub fn vault_balance_mut(&mut self) -> Result<RefMut<WireU64>, ProgramError> { ... }
// }