Skip to main content

Module prelude

Module prelude 

Source
Available on crate feature bank only.
Expand description

Everything needed to write banked code in one import.

Macros§

far
Take a far pointer to a banked function, for heterogeneous dispatch.

Structs§

Anchor
Proof that the holder runs in bank 0 (the always-mapped region), and so may run a closure across a bank switch via scope / there.
Bank
A witness that group G’s bank is currently mapped.
DynFar
A far pointer whose bank is known only at runtime: a group-erased Far.
Far
A pointer to a T living in group G’s bank.
GroupZero
Bank 0: the always-mapped region.

Traits§

BankSafe
A value safe to carry across a bank switch: it embeds no pointer to banked code that the switch would unmap.
FarCall
A far pointer that can be called across a bank boundary.
FarWith
Borrowing a far pointer’s data across a bank boundary.
Group
The compile-time identity of a bank group.
Warp
A deferred banked call: a function applied to its arguments, not yet run.

Functions§

scope
Enter group G’s bank for the duration of f, then restore the caller (C).

Attribute Macros§

bank
Mark a function, static, impl block, or trait as banked.