pub trait CurrentVaultFields: CurrentLedgerObjectCommonFields {
Show 19 methods
// Provided methods
fn previous_txn_id(&self) -> Result<Hash256> { ... }
fn previous_txn_lgr_seq(&self) -> Result<u32> { ... }
fn sequence(&self) -> Result<u32> { ... }
fn owner_node(&self) -> Result<u64> { ... }
fn owner(&self) -> Result<AccountID> { ... }
fn account(&self) -> Result<AccountID> { ... }
fn data(&self) -> Result<Option<StandardBlob>> { ... }
fn asset(&self) -> Result<Issue> { ... }
fn assets_total(&self) -> Result<Option<Number>> { ... }
fn assets_available(&self) -> Result<Option<Number>> { ... }
fn assets_maximum(&self) -> Result<Option<Number>> { ... }
fn loss_unrealized(&self) -> Result<Option<Number>> { ... }
fn share_mpt_id(&self) -> Result<Hash192> { ... }
fn withdrawal_policy(&self) -> Result<u8> { ... }
fn scale(&self) -> Result<Option<u8>> { ... }
fn le_version(&self) -> Result<Option<u8>> { ... }
fn vault_kind(&self) -> Result<Option<u8>> { ... }
fn subscription_date(&self) -> Result<Option<u32>> { ... }
fn redemption_date(&self) -> Result<Option<u32>> { ... }
}Expand description
Trait providing access to fields specific to the current Vault object.
Provided Methods§
Sourcefn previous_txn_id(&self) -> Result<Hash256>
fn previous_txn_id(&self) -> Result<Hash256>
Identifies the transaction ID that most recently modified this object.
Sourcefn previous_txn_lgr_seq(&self) -> Result<u32>
fn previous_txn_lgr_seq(&self) -> Result<u32>
The sequence of the ledger that contains the transaction that most recently modified this object.
Sourcefn owner_node(&self) -> Result<u64>
fn owner_node(&self) -> Result<u64>
Identifies the page where this item is referenced in the owner’s directory.
Sourcefn data(&self) -> Result<Option<StandardBlob>>
fn data(&self) -> Result<Option<StandardBlob>>
Arbitrary metadata, in hex format, about the vault. Limited to 256 bytes. See Data Field Format for more information.
Sourcefn asset(&self) -> Result<Issue>
fn asset(&self) -> Result<Issue>
The asset of the vault. The vault supports XRP, trust line tokens, and MPTs.
Sourcefn assets_total(&self) -> Result<Option<Number>>
fn assets_total(&self) -> Result<Option<Number>>
The total value of the vault. Calculated as: assets available + assets on loan.
- Cash-basis vaults: Potential interest from scheduled, unpaid loans doesn’t count toward the total.
- Instant interest recognition vaults: Potential interest from scheduled, unpaid loans does count toward the total.
Sourcefn assets_available(&self) -> Result<Option<Number>>
fn assets_available(&self) -> Result<Option<Number>>
The amount of assets available for loans and withdrawals.
Sourcefn assets_maximum(&self) -> Result<Option<Number>>
fn assets_maximum(&self) -> Result<Option<Number>>
The maximum amount of assets that can be deposited into the vault. Set to 0 for no cap.
Sourcefn loss_unrealized(&self) -> Result<Option<Number>>
fn loss_unrealized(&self) -> Result<Option<Number>>
The potential loss amount that is not yet realized, expressed as the vault’s asset. Only a protocol connected to the vault can modify this attribute.
- Cash-basis vaults: Unrealized losses from interest aren’t included in this value.
- Instant interest recognition vaults: Unrealized losses from interest are included in this value.
The identifier of the share MPTokenIssuance object.
Sourcefn withdrawal_policy(&self) -> Result<u8>
fn withdrawal_policy(&self) -> Result<u8>
Indicates the withdrawal strategy used by the vault.
Sourcefn scale(&self) -> Result<Option<u8>>
fn scale(&self) -> Result<Option<u8>>
Specifies decimal precision for share calculations. Assets are multiplied by 10^Scale to
convert fractional amounts into whole number shares. For example, with a Scale of 6,
depositing 20.3 units creates 20,300,000 shares (20.3 × 10^Scale). For trust line tokens
this can be configured at vault creation, and valid values are between 0-18, with the
default being 6. For XRP and MPTs, this is fixed at 0. See Scaling Factor for more
information.
Sourcefn le_version(&self) -> Result<Option<u8>>
fn le_version(&self) -> Result<Option<u8>>
Indicates what type of accounting the vault uses. 1 indicates the vault uses cash-basis
accounting. If this field is omitted, the vault uses instant interest recognition
accounting.
Sourcefn vault_kind(&self) -> Result<Option<u8>>
fn vault_kind(&self) -> Result<Option<u8>>
Indicates the kind of vault. 1 is a closed-ended vault. If this field is omitted, it’s an
open-ended vault.
Sourcefn subscription_date(&self) -> Result<Option<u32>>
fn subscription_date(&self) -> Result<Option<u32>>
(Closed-ended vaults only) The time, in seconds since the Ripple Epoch, when the vault’s subscription window closes and its investment period begins.
Sourcefn redemption_date(&self) -> Result<Option<u32>>
fn redemption_date(&self) -> Result<Option<u32>>
(Closed-ended vaults only) The time, in seconds since the Ripple Epoch, when the vault’s investment period ends and depositors can redeem their shares.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".