Skip to main content

Module locator

Module locator 

Source
Expand description

Builder for nested field access locators.

Locators encode a path to a nested field (sfields and array indices) in a compact binary format understood by the host. Use it to access fields like Memos[0].MemoType.

Example

use xrpl_wasm_stdlib::core::locator::Locator;
use xrpl_wasm_stdlib::sfield;
let mut l = Locator::new();
l.pack(sfield::Memos);
l.pack(0);
l.pack(sfield::MemoType);

Structsยง

Locator
A Locator encodes a path to a nested field as a sequence of 4-byte packed values (sfield codes or array indices) in a compact binary format understood by the host.