pub struct Amendments<'a> {
pub common_fields: CommonFields<'a, NoFlags>,
pub amendments: Option<Vec<Cow<'a, str>>>,
pub majorities: Option<Vec<Majority>>,
}
Expand description
The Amendments
object type contains a list of Amendments
that are currently active.
Each ledger version contains at most one Amendments`` object.
<https://xrpl.org/amendments-object.html#amendments>
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>
amendments: Option<Vec<Cow<'a, str>>>
Array of 256-bit amendment IDs for all currently enabled amendments. If omitted, there are no enabled amendments.
majorities: Option<Vec<Majority>>
Array of objects describing the status of amendments that have majority support but are not yet enabled. If omitted, there are no pending amendments with majority support.
Implementations§
Trait Implementations§
Source§impl<'a> Clone for Amendments<'a>
impl<'a> Clone for Amendments<'a>
Source§fn clone(&self) -> Amendments<'a>
fn clone(&self) -> Amendments<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for Amendments<'a>
impl<'a> Debug for Amendments<'a>
Source§impl<'de, 'a> Deserialize<'de> for Amendments<'a>
impl<'de, 'a> Deserialize<'de> for Amendments<'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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a> LedgerObject<NoFlags> for Amendments<'a>
impl<'a> LedgerObject<NoFlags> for Amendments<'a>
fn get_ledger_entry_type(&self) -> LedgerEntryType
fn has_flag(&self, flag: &T) -> bool
Source§impl<'a> Model for Amendments<'a>
impl<'a> Model for Amendments<'a>
Source§fn get_errors(&self) -> XRPLModelResult<()>
fn get_errors(&self) -> XRPLModelResult<()>
Collects a models errors and returns the first error that occurs.
Source§fn validate(&self) -> XRPLModelResult<()>
fn validate(&self) -> XRPLModelResult<()>
Simply forwards the error from
get_errors
if there was one.Source§impl<'a> PartialEq for Amendments<'a>
impl<'a> PartialEq for Amendments<'a>
Source§impl<'a> Serialize for Amendments<'a>
impl<'a> Serialize for Amendments<'a>
impl<'a> Eq for Amendments<'a>
impl<'a> StructuralPartialEq for Amendments<'a>
Auto Trait Implementations§
impl<'a> Freeze for Amendments<'a>
impl<'a> RefUnwindSafe for Amendments<'a>
impl<'a> Send for Amendments<'a>
impl<'a> Sync for Amendments<'a>
impl<'a> Unpin for Amendments<'a>
impl<'a> UnwindSafe for Amendments<'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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Compare self to
key
and return true
if they are equal.