pub struct EncodeHints {
pub wide: Option<bool>,
pub bpf_call_local: Option<bool>,
}Expand description
Per-call encoding hints that arches interpret in their own
convention. Today the only hint is wide (x86’s short-vs-rel32
toggle); fixed-width arches (BPF, AArch64) ignore it.
Kept as a plain struct rather than per-method args so the trait can grow new hints without breaking every impl.
Fields§
§wide: Option<bool>Force a wide-form encoding. On x86 this means “use rel32
even when rel8 would fit”; on BPF this is ignored (slot
offsets are always one slot wide). None = arch picks.
bpf_call_local: Option<bool>BPF call-convention hint for encode_call: Some(true)
requests call_local (opcode 0x8d, Linux eBPF style),
Some(false) requests call_internal (opcode 0x85
src=1, Solana sBPF style), None defers to the codec’s
default. Lifters that have the original opcode (e.g.
the byte-drop pass with pinned bytes) set this so the
regen matches the original encoding exactly. Ignored by
non-BPF arches.
Implementations§
Source§impl EncodeHints
impl EncodeHints
Trait Implementations§
Source§impl Clone for EncodeHints
impl Clone for EncodeHints
Source§fn clone(&self) -> EncodeHints
fn clone(&self) -> EncodeHints
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more