ErRecord

Enum ErRecord 

Source
pub enum ErRecord {
    V0(RecordV0),
}

Variants§

Implementations§

Source§

impl ErRecord

Source

pub fn pda(&self) -> (Pubkey, u8)

Computes record’s PDA for the given ER node

Source

pub fn seeds(&self) -> [&[u8]; 2]

Returns an array of seeds for the record’s PDA derivation

Source

pub fn identity(&self) -> &Pubkey

Returns identity pubkey of the given ER

Source

pub fn addr(&self) -> &str

Returns FQDN address for the given ER node

Source

pub fn base_fee(&self) -> u16

Returns transaction fees of given ER node

Source

pub fn features(&self) -> &FeaturesSet

Returns supported set of features by the given ER node

Source

pub fn block_time_ms(&self) -> u16

Returns the block time in ms of the given ER node

Source

pub fn status(&self) -> ErStatus

Returns current status of the given ER node

Source

pub fn load_average(&self) -> u32

Returns load average of the given ER node

Source

pub fn country_code(&self) -> CountryCode

Returns 3 digit country code of the given ER node

Source

pub fn set_addr(&mut self, addr: String)

Updates the FQDN address in the given ER record

Source

pub fn set_base_fee(&mut self, base_fee: u16)

Updates base transaction fee in the given ER record

Source

pub fn set_features(&mut self, features: FeaturesSet)

Updates the features set in the given ER record

Source

pub fn set_block_time_ms(&mut self, block_time_ms: u16)

Updates block time in ms in the given ER record

Source

pub fn set_status(&mut self, status: ErStatus)

Updates node status for the given ER record

Source

pub fn set_load_average(&mut self, load_average: u32)

Updates the load average for the given ER record

Source

pub fn set_country_code(&mut self, country_code: CountryCode)

Updates the country code for the given ER record

Trait Implementations§

Source§

impl BorshDeserialize for ErRecord

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 ErRecord

Source§

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

Source§

impl Debug for ErRecord

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl EnumExt for ErRecord

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