Skip to content
This repository was archived by the owner on Jun 30, 2022. It is now read-only.

Commit dece483

Browse files
committed
Add deprecated attribute to functions and structs
1 parent 3872f8d commit dece483

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ pub struct AccKey
110110
}
111111

112112
/// Mapping accounts form a linked-list containing the listing of all products on Pyth.
113+
#[deprecated = "This crate has deprecated. Please use pyth-sdk-solana"]
113114
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
114115
#[repr(C)]
115116
pub struct Mapping
@@ -139,6 +140,7 @@ unsafe impl Pod for Mapping {}
139140

140141
/// Product accounts contain metadata for a single product, such as its symbol ("Crypto.BTC/USD")
141142
/// and its base/quote currencies.
143+
#[deprecated = "This crate has deprecated. Please use pyth-sdk-solana"]
142144
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
143145
#[repr(C)]
144146
pub struct Product
@@ -219,6 +221,7 @@ pub struct Ema
219221
}
220222

221223
/// Price accounts represent a continuously-updating price feed for a product.
224+
#[deprecated = "This crate has deprecated. Please use pyth-sdk-solana"]
222225
#[derive(Copy, Clone, Debug, Default, PartialEq, Eq)]
223226
#[repr(C)]
224227
pub struct Price
@@ -390,6 +393,7 @@ fn load<T: Pod>(data: &[u8]) -> Result<&T, PodCastError> {
390393
}
391394

392395
/** Get a `Mapping` account from the raw byte value of a Solana account. */
396+
#[deprecated = "This crate has deprecated. Please use pyth-sdk-solana"]
393397
pub fn load_mapping(data: &[u8]) -> Result<&Mapping, PythError> {
394398
let pyth_mapping = load::<Mapping>(&data).map_err(|_| PythError::InvalidAccountData)?;
395399

@@ -407,6 +411,7 @@ pub fn load_mapping(data: &[u8]) -> Result<&Mapping, PythError> {
407411
}
408412

409413
/** Get a `Product` account from the raw byte value of a Solana account. */
414+
#[deprecated = "This crate has deprecated. Please use pyth-sdk-solana"]
410415
pub fn load_product(data: &[u8]) -> Result<&Product, PythError> {
411416
let pyth_product = load::<Product>(&data).map_err(|_| PythError::InvalidAccountData)?;
412417

@@ -424,6 +429,7 @@ pub fn load_product(data: &[u8]) -> Result<&Product, PythError> {
424429
}
425430

426431
/** Get a `Price` account from the raw byte value of a Solana account. */
432+
#[deprecated = "This crate has deprecated. Please use pyth-sdk-solana"]
427433
pub fn load_price(data: &[u8]) -> Result<&Price, PythError> {
428434
let pyth_price = load::<Price>(&data).map_err(|_| PythError::InvalidAccountData)?;
429435

0 commit comments

Comments
 (0)