Skip to main content

Group

Trait Group 

Source
pub trait Group: 'static {
    const FIXED: bool;

    // Required method
    fn bank() -> BankNumber;
}
Available on crate feature bank only.
Expand description

The compile-time identity of a bank group.

The implementing type is the brand: two values share a group iff they share the type parameter G, checked entirely at compile time. The runtime bank() number is only consulted for the actual hardware switch.

Groups are normally generated by the #[bank] macro, one per banked module.

Required Associated Constants§

Source

const FIXED: bool

Whether this group is permanently mapped, so switching to it is a no-op.

GroupZero always is, and so is every group on a cartridge with no switchable window.

Required Methods§

Source

fn bank() -> BankNumber

The physical bank number, resolved at link time by gb-bank-pack.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§