pub struct StubOracle {
pub owner: Pubkey,
pub mint: Pubkey,
pub price: f64,
pub last_update_ts: i64,
pub last_update_slot: u64,
pub deviation: f64,
pub reserved: [u8; 104],
}Expand description
Account: StubOracle
Fields§
§owner: Pubkey§mint: Pubkey§price: f64§last_update_ts: i64§last_update_slot: u64§deviation: f64§reserved: [u8; 104]Trait Implementations§
Source§impl AccountDeserialize for StubOracle
impl AccountDeserialize for StubOracle
Source§fn try_deserialize(buf: &mut &[u8]) -> Result<Self>
fn try_deserialize(buf: &mut &[u8]) -> Result<Self>
Deserializes previously initialized account data. Should fail for all
uninitialized accounts, where the bytes are zeroed. Implementations
should be unique to a particular account type so that one can never
successfully deserialize the data of one account type into another.
For example, if the SPL token program were to implement this trait,
it should be impossible to deserialize a
Mint account into a token
Account.Source§fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<Self>
fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<Self>
Deserializes account data without checking the account discriminator.
This should only be used on account initialization, when the bytes of
the account are zeroed.
Source§impl AccountSerialize for StubOracle
impl AccountSerialize for StubOracle
Source§impl BorshDeserialize for StubOraclewhere
Pubkey: BorshDeserialize,
f64: BorshDeserialize,
i64: BorshDeserialize,
u64: BorshDeserialize,
[u8; 104]: BorshDeserialize,
impl BorshDeserialize for StubOraclewhere
Pubkey: BorshDeserialize,
f64: BorshDeserialize,
i64: BorshDeserialize,
u64: BorshDeserialize,
[u8; 104]: BorshDeserialize,
Source§impl BorshSerialize for StubOraclewhere
Pubkey: BorshSerialize,
f64: BorshSerialize,
i64: BorshSerialize,
u64: BorshSerialize,
[u8; 104]: BorshSerialize,
impl BorshSerialize for StubOraclewhere
Pubkey: BorshSerialize,
f64: BorshSerialize,
i64: BorshSerialize,
u64: BorshSerialize,
[u8; 104]: BorshSerialize,
Source§impl Clone for StubOracle
impl Clone for StubOracle
Source§fn clone(&self) -> StubOracle
fn clone(&self) -> StubOracle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for StubOracle
Source§impl Discriminator for StubOracle
impl Discriminator for StubOracle
const DISCRIMINATOR: [u8; 8]
fn discriminator() -> [u8; 8]
Auto Trait Implementations§
impl Freeze for StubOracle
impl RefUnwindSafe for StubOracle
impl Send for StubOracle
impl Sync for StubOracle
impl Unpin for StubOracle
impl UnsafeUnpin for StubOracle
impl UnwindSafe for StubOracle
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more