Skip to main content

xrpl_common_stdlib/objects/
array_object.rs

1//! Placeholder types for array and object SFields.
2//!
3//! These types are used as placeholders in SField definitions for array and object types
4//! that cannot be directly retrieved from ledger objects. They are primarily used within
5//! `Locator` for navigating inner structures.
6
7/// Placeholder type for array SFields.
8///
9/// Array types in XRPL (like Signers, Memos, etc.) cannot be directly retrieved as complete
10/// values. Instead, they are navigated with `Locator` to reach specific array elements.
11///
12/// This type intentionally implements neither [`crate::fields::decoder::FromCurrentTx`] nor
13/// [`crate::fields::decoder::FromLedger`], so passing an aggregate SField (e.g. `sfield::Memos`)
14/// to a `get_field` accessor is a *compile-time* error rather than a runtime failure.
15#[derive(Debug, Clone, Copy, Eq, PartialEq)]
16pub struct Array;
17
18/// Placeholder type for object SFields.
19///
20/// Object types in XRPL (like Memo, SignerEntry, etc.) cannot be directly retrieved as complete
21/// values. Instead, they are navigated with `Locator` to reach specific object fields.
22///
23/// This type intentionally implements neither [`crate::fields::decoder::FromCurrentTx`] nor
24/// [`crate::fields::decoder::FromLedger`], so passing an aggregate SField (e.g. `sfield::Memo`)
25/// to a `get_field` accessor is a *compile-time* error rather than a runtime failure.
26#[derive(Debug, Clone, Copy, Eq, PartialEq)]
27pub struct Object;