pub struct FrameInfo {
pub account_count: usize,
pub instruction_data_range: Range<usize>,
pub program_id_offset: usize,
pub slot_offsets: [usize; 256],
}Expand description
Summary of a safely-parsed loader input frame.
Only metadata is returned. the full AccountView construction
requires the raw pointer path. This struct is what off-chain tools
(and fuzz harnesses) need to verify a buffer is well-formed.
The slot_offsets array is a fixed [usize; MAX_SAFE_ACCOUNT_SLOTS]
with the first account_count entries populated. Remaining entries
are zero. Callers can distinguish duplicate vs canonical slots by
checking whether buffer[offset] equals 0xFF.
Fields§
§account_count: usizeNumber of accounts the loader would hand to the program.
instruction_data_range: Range<usize>Byte range of the instruction data within the original buffer.
program_id_offset: usizeByte offset of the 32-byte program id within the original buffer.
slot_offsets: [usize; 256]Byte offsets of each account slot, indexable 0..account_count.
Trait Implementations§
impl Eq for FrameInfo
impl StructuralPartialEq for FrameInfo
Auto Trait Implementations§
impl Freeze for FrameInfo
impl RefUnwindSafe for FrameInfo
impl Send for FrameInfo
impl Sync for FrameInfo
impl Unpin for FrameInfo
impl UnsafeUnpin for FrameInfo
impl UnwindSafe for FrameInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more