pub struct LedgerField {
pub name: String,
pub index: Vec<u32>,
pub exported: bool,
pub storage: Storage,
}Fields§
§name: String§index: Vec<u32>Field index in the on-chain ledger layout. Older compactc
emits a scalar (0); newer compactc emits a path-style array
([0, 2]) for nested module layouts. Stored as a Vec<u32>
either way — single-element vec for the scalar form. The
runtime currently only consumes the leaf via
Self::leaf_index; the rest of the path is preserved for
future codegen / inspect tooling.
Wire-format preservation: a single-element vec serializes back
as a scalar so round-tripping through ciborium produces
byte-identical CBOR for the older single-int shape (matters
for ir_sha256 stability in codegen-emitted headers).
exported: bool§storage: StorageImplementations§
Source§impl LedgerField
impl LedgerField
Sourcepub fn leaf_index(&self) -> u32
pub fn leaf_index(&self) -> u32
Leaf index in the flat on-chain layout — equivalent to the old
scalar index field.
Trait Implementations§
Source§impl Clone for LedgerField
impl Clone for LedgerField
Source§impl Debug for LedgerField
impl Debug for LedgerField
Source§impl<'de> Deserialize<'de> for LedgerField
impl<'de> Deserialize<'de> for LedgerField
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Forget for LedgerField
impl Freeze for LedgerFieldwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<u32>: Freeze,
*const TypeDescriptor is !null: Freeze,
PhantomData<TypeDescriptor>: Freeze,
PhantomData<StructField>: Freeze,
PhantomData<String>: Freeze,
PhantomData<ContractCircuitSig>: Freeze,
impl Move for LedgerField
impl RefUnwindSafe for LedgerField
impl Send for LedgerField
impl Sync for LedgerField
impl Unpin for LedgerField
impl UnsafeUnpin for LedgerFieldwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<u32>: UnsafeUnpin,
*const TypeDescriptor is !null: UnsafeUnpin,
PhantomData<TypeDescriptor>: UnsafeUnpin,
PhantomData<StructField>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<ContractCircuitSig>: UnsafeUnpin,
impl UnwindSafe for LedgerField
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