pub struct OracleSet<'a> {
pub common_fields: CommonFields<'a, NoFlags>,
pub oracle_document_id: u32,
pub provider: Option<Cow<'a, str>>,
pub uri: Option<Cow<'a, str>>,
pub asset_class: Option<Cow<'a, str>>,
pub last_update_time: u32,
pub price_data_series: Vec<PriceData>,
}Expand description
An OracleSet transaction creates or updates an Oracle ledger entry.
See OracleSet:
<https://xrpl.org/docs/references/protocol/transactions/types/oracleset>
Fields§
§common_fields: CommonFields<'a, NoFlags>The base fields for all transaction models.
See Transaction Common Fields:
<https://xrpl.org/transaction-common-fields.html>
oracle_document_id: u32A unique identifier of the price oracle for the account.
provider: Option<Cow<'a, str>>An arbitrary value that identifies an oracle provider, such as Chainlink, Band, or DIA. This field is a string, up to 256 ASCII hex encoded characters (128 bytes).
uri: Option<Cow<'a, str>>An optional Universal Resource Identifier to reference price data off-chain. This field is limited to 256 bytes.
asset_class: Option<Cow<'a, str>>Describes the type of asset, such as “currency”, “commodity”, or “NFT”. This field is a string, up to 16 ASCII hex encoded characters (8 bytes).
last_update_time: u32The time the data was last updated, represented in the ripple epoch.
price_data_series: Vec<PriceData>An array of 1 to 10 PriceData objects, each representing one price data entry.
Implementations§
Source§impl<'a> OracleSet<'a>
impl<'a> OracleSet<'a>
pub fn new( account: Cow<'a, str>, account_txn_id: Option<Cow<'a, str>>, fee: Option<XRPAmount<'a>>, last_ledger_sequence: Option<u32>, memos: Option<Vec<Memo>>, sequence: Option<u32>, signers: Option<Vec<Signer>>, source_tag: Option<u32>, ticket_sequence: Option<u32>, oracle_document_id: u32, provider: Option<Cow<'a, str>>, uri: Option<Cow<'a, str>>, asset_class: Option<Cow<'a, str>>, last_update_time: u32, price_data_series: Vec<PriceData>, ) -> Self
Sourcepub fn with_oracle_document_id(self, id: u32) -> Self
pub fn with_oracle_document_id(self, id: u32) -> Self
Set the oracle document ID
Sourcepub fn with_provider(self, provider: Cow<'a, str>) -> Self
pub fn with_provider(self, provider: Cow<'a, str>) -> Self
Set the provider
Sourcepub fn with_asset_class(self, asset_class: Cow<'a, str>) -> Self
pub fn with_asset_class(self, asset_class: Cow<'a, str>) -> Self
Set the asset class
Sourcepub fn with_last_update_time(self, time: u32) -> Self
pub fn with_last_update_time(self, time: u32) -> Self
Set the last update time
Sourcepub fn with_price_data_series(self, series: Vec<PriceData>) -> Self
pub fn with_price_data_series(self, series: Vec<PriceData>) -> Self
Set the price data series
Trait Implementations§
Source§impl<'a> CommonTransactionBuilder<'a, NoFlags> for OracleSet<'a>
impl<'a> CommonTransactionBuilder<'a, NoFlags> for OracleSet<'a>
Source§fn get_mut_common_fields(&mut self) -> &mut CommonFields<'a, NoFlags>
fn get_mut_common_fields(&mut self) -> &mut CommonFields<'a, NoFlags>
Source§fn with_sequence(self, sequence: u32) -> Selfwhere
Self: Sized,
fn with_sequence(self, sequence: u32) -> Selfwhere
Self: Sized,
Source§fn with_last_ledger_sequence(self, last_ledger_sequence: u32) -> Selfwhere
Self: Sized,
fn with_last_ledger_sequence(self, last_ledger_sequence: u32) -> Selfwhere
Self: Sized,
Source§fn with_source_tag(self, source_tag: u32) -> Selfwhere
Self: Sized,
fn with_source_tag(self, source_tag: u32) -> Selfwhere
Self: Sized,
Source§fn with_ticket_sequence(self, ticket_sequence: u32) -> Selfwhere
Self: Sized,
fn with_ticket_sequence(self, ticket_sequence: u32) -> Selfwhere
Self: Sized,
Source§impl<'de, 'a> Deserialize<'de> for OracleSet<'a>
impl<'de, 'a> Deserialize<'de> for OracleSet<'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 OracleSet<'a>
Source§impl Model for OracleSet<'_>
impl Model for OracleSet<'_>
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.impl<'a> StructuralPartialEq for OracleSet<'a>
Source§impl<'a> Transaction<'a, NoFlags> for OracleSet<'a>
impl<'a> Transaction<'a, NoFlags> for OracleSet<'a>
fn get_transaction_type(&self) -> &TransactionType
fn get_common_fields(&self) -> &CommonFields<'_, NoFlags>
fn get_mut_common_fields(&mut self) -> &mut CommonFields<'a, NoFlags>
fn has_flag(&self, flag: &T) -> bool
fn get_field_value(&self, field: &str) -> XRPLModelResult<Option<String>>
fn is_signed(&self) -> bool
Auto Trait Implementations§
impl<'a> Freeze for OracleSet<'a>
impl<'a> RefUnwindSafe for OracleSet<'a>
impl<'a> Send for OracleSet<'a>
impl<'a> Sync for OracleSet<'a>
impl<'a> Unpin for OracleSet<'a>
impl<'a> UnsafeUnpin for OracleSet<'a>
impl<'a> UnwindSafe for OracleSet<'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.