xrpl_escrow_stdlib/ledger_objects/escrow.rs
1//! The slot-based `Escrow` handle.
2//!
3//! `Escrow` and the generic `EscrowFields` trait are generated in
4//! `xrpl_common_stdlib::objects` (re-exported here for a stable path). Every field — including
5//! `Data`, which reads as a `StandardBlob` via `EscrowFields::data()` — is available through the
6//! generated trait. Only the escrow-only, host-mutable *write* of `Data` (`set_data`) is
7//! hand-written; see `ctx::EscrowFinishContext` / `ledger_objects::traits`.
8
9pub use xrpl_common_stdlib::objects::Escrow;
10
11#[cfg(test)]
12mod tests {
13 use super::*;
14 use xrpl_common_stdlib::objects::traits::LedgerObjectCommonFields;
15
16 #[test]
17 fn test_new() {
18 let escrow = Escrow::new(42);
19 assert_eq!(escrow.get_slot_num(), 42);
20 }
21}