SyncInstruction

Enum SyncInstruction 

Source
pub enum SyncInstruction {
    V0(SyncRecordV0),
}
Expand description

Versioned sync program instruction

Variants§

Implementations§

Source§

impl SyncInstruction

Source

pub fn pda(&self) -> Pubkey

Compute the record PDA for given ER node identity

Source

pub fn identity(&self) -> &Pubkey

Returns identity pubkey of the ER node

Source

pub fn addr(&mut self) -> &mut Option<String>

Returns address of the ER node, if set

Source

pub fn base_fee(&mut self) -> &mut Option<u16>

Returns base transaction fee charged by ER node, if set

Source

pub fn block_time_ms(&mut self) -> &mut Option<u16>

Returns the block time in ms of the given ER node, if set

Source

pub fn features(&mut self) -> &mut Option<FeaturesSet>

Returns the features set supported by ER node, if set

Source

pub fn status(&mut self) -> &mut Option<ErStatus>

Returns the status of ER node, if set

Source

pub fn load_average(&mut self) -> &mut Option<u32>

Returns last observed average load on the given ER node, if set

Source

pub fn country_code(&mut self) -> &mut Option<CountryCode>

Trait Implementations§

Source§

impl BorshDeserialize for SyncInstruction

Source§

fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>

Source§

fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>

Deserializes this instance from a given slice of bytes. Updates the buffer to point at the remaining bytes.
Source§

fn try_from_slice(v: &[u8]) -> Result<Self, Error>

Deserialize this instance from a slice of bytes.
Source§

fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>
where R: Read,

Source§

impl BorshSerialize for SyncInstruction

Source§

fn serialize<__W: Write>(&self, writer: &mut __W) -> Result<(), Error>

Source§

impl EnumExt for SyncInstruction

Source§

fn deserialize_variant<__R: Read>( reader: &mut __R, variant_tag: u8, ) -> Result<Self, Error>

Deserialises given variant of an enum from the reader. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V