pub struct DirectoryNode<'a> {
pub common_fields: CommonFields<'a, NoFlags>,
pub exchange_rate: Option<Cow<'a, str>>,
pub indexes: Vec<Cow<'a, str>>,
pub root_index: Cow<'a, str>,
pub index_next: Option<u64>,
pub index_previous: Option<u64>,
pub owner: Option<Cow<'a, str>>,
pub taker_gets_currency: Option<Cow<'a, str>>,
pub taker_gets_issuer: Option<Cow<'a, str>>,
pub taker_pays_currency: Option<Cow<'a, str>>,
pub taker_pays_issuer: Option<Cow<'a, str>>,
}Expand description
The DirectoryNode object type provides a list of links to other objects in the ledger’s state
tree. A single conceptual Directory takes the form of a doubly linked list, with one or more
DirectoryNode objects each containing up to 32 IDs of other objects. The first object is called
the root of the directory, and all objects other than the root object can be added or deleted
as necessary.
There are two kinds of Directories:
Ownerdirectories list other objects owned by an account, such asRippleState(trust line) orOfferobjects.Offerdirectories list the offers available in the decentralized exchange. A singleOfferdirectory contains all the offers that have the same exchange rate for the same token.
<https://xrpl.org/directorynode.html#directorynode>
Fields§
§common_fields: CommonFields<'a, NoFlags>The base fields for all ledger object models.
See Ledger Object Common Fields:
<https://xrpl.org/ledger-entry-common-fields.html>
exchange_rate: Option<Cow<'a, str>>(Offer Directories only) DEPRECATED. Do not use.
indexes: Vec<Cow<'a, str>>The contents of this Directory: an array of IDs of other objects.
root_index: Cow<'a, str>The ID of root object for this directory.
index_next: Option<u64>If this Directory consists of multiple pages, this ID links to the next object in the chain,
wrapping around at the end.
index_previous: Option<u64>If this Directory consists of multiple pages, this ID links to the previous object in the
chain, wrapping around at the beginning.
owner: Option<Cow<'a, str>>(Owner Directories only) The address of the account that owns the objects in this directory.
taker_gets_currency: Option<Cow<'a, str>>(Offer Directories only) The currency code of the TakerGets amount from the offers in this
directory.
taker_gets_issuer: Option<Cow<'a, str>>(Offer Directories only) The currency code of the TakerPays amount from the offers in this
(Offer Directories only) The issuer of the TakerGets amount from the offers in this
directory.
taker_pays_currency: Option<Cow<'a, str>>directory.
taker_pays_issuer: Option<Cow<'a, str>>(Offer Directories only) The issuer of the TakerPays amount from the offers in this
directory.
Implementations§
Source§impl<'a> DirectoryNode<'a>
impl<'a> DirectoryNode<'a>
pub fn new( index: Option<Cow<'a, str>>, ledger_index: Option<Cow<'a, str>>, indexes: Vec<Cow<'a, str>>, root_index: Cow<'a, str>, exchange_rate: Option<Cow<'a, str>>, index_next: Option<u64>, index_previous: Option<u64>, owner: Option<Cow<'a, str>>, taker_gets_currency: Option<Cow<'a, str>>, taker_gets_issuer: Option<Cow<'a, str>>, taker_pays_currency: Option<Cow<'a, str>>, taker_pays_issuer: Option<Cow<'a, str>>, ) -> Self
Trait Implementations§
Source§impl<'a> Clone for DirectoryNode<'a>
impl<'a> Clone for DirectoryNode<'a>
Source§fn clone(&self) -> DirectoryNode<'a>
fn clone(&self) -> DirectoryNode<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a> Debug for DirectoryNode<'a>
impl<'a> Debug for DirectoryNode<'a>
Source§impl<'de, 'a> Deserialize<'de> for DirectoryNode<'a>
impl<'de, 'a> Deserialize<'de> for DirectoryNode<'a>
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>,
impl<'a> Eq for DirectoryNode<'a>
Source§impl<'a> LedgerObject<NoFlags> for DirectoryNode<'a>
impl<'a> LedgerObject<NoFlags> for DirectoryNode<'a>
fn get_ledger_entry_type(&self) -> LedgerEntryType
fn has_flag(&self, flag: &T) -> bool
Source§impl<'a> Model for DirectoryNode<'a>
impl<'a> Model for DirectoryNode<'a>
Source§fn get_errors(&self) -> XRPLModelResult<()>
fn get_errors(&self) -> XRPLModelResult<()>
Source§fn validate(&self) -> XRPLModelResult<()>
fn validate(&self) -> XRPLModelResult<()>
get_errors if there was one.Source§impl<'a> PartialEq for DirectoryNode<'a>
impl<'a> PartialEq for DirectoryNode<'a>
Source§impl<'a> Serialize for DirectoryNode<'a>
impl<'a> Serialize for DirectoryNode<'a>
impl<'a> StructuralPartialEq for DirectoryNode<'a>
Auto Trait Implementations§
impl<'a> Freeze for DirectoryNode<'a>
impl<'a> RefUnwindSafe for DirectoryNode<'a>
impl<'a> Send for DirectoryNode<'a>
impl<'a> Sync for DirectoryNode<'a>
impl<'a> Unpin for DirectoryNode<'a>
impl<'a> UnsafeUnpin for DirectoryNode<'a>
impl<'a> UnwindSafe for DirectoryNode<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.