pub struct Static {
pub name: Spanned<&'static str>,
pub type_: Spanned<StaticType>,
pub items: Vec<Spanned<Expr>>,
}
Expand description
A static declaration: static FOO: [u8] = [BYTE, BYTE, BYTE, ...];
A static
is a series of bytes that end up in the ROM, which can be copied
into VRAM or similar. In assembler terms, every static
is its own section
which can be placed during the linking phase.
Note: At the moment, only a literal slice of bytes is allowed, but in the future it’s planned that other static expressions will become possible.
Fields
name: Spanned<&'static str>
The name of this static
type_: Spanned<StaticType>
The intended type of the static.
items: Vec<Spanned<Expr>>
The list of byte expressions in the static slice.
Implementations
Trait Implementations
sourceimpl PartialEq<Static> for Static
impl PartialEq<Static> for Static
impl Eq for Static
impl StructuralEq for Static
impl StructuralPartialEq for Static
Auto Trait Implementations
impl RefUnwindSafe for Static
impl Send for Static
impl Sync for Static
impl Unpin for Static
impl UnwindSafe for Static
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more