pub struct PriceData {
pub base_asset: String,
pub quote_asset: String,
pub asset_price: Option<String>,
pub scale: Option<u8>,
}Expand description
Represents a single price data entry in an Oracle’s PriceDataSeries.
See OracleSet:
<https://xrpl.org/docs/references/protocol/transactions/types/oracleset>
Fields§
§base_asset: String§quote_asset: String§asset_price: Option<String>The token pair’s price. When omitted on an OracleSet update, rippled deletes the existing price data entry for this base/quote pair.
scale: Option<u8>Decimal scale factor. Actual price = asset_price × 10^(−scale). Range 0–20. Must be present when asset_price is present, and absent when asset_price is absent.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PriceData
impl<'de> Deserialize<'de> for PriceData
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
impl Eq for PriceData
Source§impl Model for PriceData
impl Model for PriceData
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.impl StructuralPartialEq for PriceData
Auto Trait Implementations§
impl Freeze for PriceData
impl RefUnwindSafe for PriceData
impl Send for PriceData
impl Sync for PriceData
impl Unpin for PriceData
impl UnsafeUnpin for PriceData
impl UnwindSafe for PriceData
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,
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
Compare self to
key and return true if they are equal.