xrpl_wasm_stdlib/core/ledger_objects/
array_object.rs1use crate::host::Result;
8
9#[derive(Debug, Clone, Copy, Eq, PartialEq)]
18pub struct Array;
19
20#[derive(Debug, Clone, Copy, Eq, PartialEq)]
29pub struct Object;
30
31use crate::core::ledger_objects::LedgerObjectFieldGetter;
34use crate::sfield::SField;
35
36impl LedgerObjectFieldGetter for Array {
37 #[inline]
38 fn get_from_current_ledger_obj<const CODE: i32>(_field: SField<Self, CODE>) -> Result<Self> {
39 unreachable!("Array is a placeholder type and cannot be retrieved from ledger objects")
41 }
42
43 #[inline]
44 fn get_from_ledger_obj<const CODE: i32>(
45 _slot: i32,
46 _field: SField<Self, CODE>,
47 ) -> Result<Self> {
48 unreachable!("Array is a placeholder type and cannot be retrieved from ledger objects")
50 }
51
52 #[inline]
53 fn get_from_current_ledger_obj_optional<const CODE: i32>(
54 _field: SField<Self, CODE>,
55 ) -> Result<Option<Self>> {
56 unreachable!("Array is a placeholder type and cannot be retrieved from ledger objects")
58 }
59
60 #[inline]
61 fn get_from_ledger_obj_optional<const CODE: i32>(
62 _slot: i32,
63 _field: SField<Self, CODE>,
64 ) -> Result<Option<Self>> {
65 unreachable!("Array is a placeholder type and cannot be retrieved from ledger objects")
67 }
68}
69
70impl LedgerObjectFieldGetter for Object {
71 #[inline]
72 fn get_from_current_ledger_obj<const CODE: i32>(_field: SField<Self, CODE>) -> Result<Self> {
73 unreachable!("Object is a placeholder type and cannot be retrieved from ledger objects")
75 }
76
77 #[inline]
78 fn get_from_ledger_obj<const CODE: i32>(
79 _slot: i32,
80 _field: SField<Self, CODE>,
81 ) -> Result<Self> {
82 unreachable!("Object is a placeholder type and cannot be retrieved from ledger objects")
84 }
85
86 #[inline]
87 fn get_from_current_ledger_obj_optional<const CODE: i32>(
88 _field: SField<Self, CODE>,
89 ) -> Result<Option<Self>> {
90 unreachable!("Object is a placeholder type and cannot be retrieved from ledger objects")
92 }
93
94 #[inline]
95 fn get_from_ledger_obj_optional<const CODE: i32>(
96 _slot: i32,
97 _field: SField<Self, CODE>,
98 ) -> Result<Option<Self>> {
99 unreachable!("Object is a placeholder type and cannot be retrieved from ledger objects")
101 }
102}