pub struct ChainInfoResponse {
pub chain_descriptor: String,
pub current_epoch: f64,
pub epoch_elapsed: f64,
pub epoch_duration: f64,
pub additional_info: AdditionalInfo,
}
Fields§
§chain_descriptor: String
The protocol identifier (e.g. "ETH"/"SOL").
current_epoch: f64
The current epoch number of the blockchain network.
epoch_elapsed: f64
The percentage of time that has elapsed within the current epoch, represented as a decimal value between 0 and 1.
epoch_duration: f64
The total duration in milliseconds of a single epoch.
additional_info: AdditionalInfo
Implementations§
Source§impl ChainInfoResponse
impl ChainInfoResponse
pub fn new( chain_descriptor: String, current_epoch: f64, epoch_elapsed: f64, epoch_duration: f64, additional_info: AdditionalInfo, ) -> ChainInfoResponse
Trait Implementations§
Source§impl Clone for ChainInfoResponse
impl Clone for ChainInfoResponse
Source§fn clone(&self) -> ChainInfoResponse
fn clone(&self) -> ChainInfoResponse
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ChainInfoResponse
impl Debug for ChainInfoResponse
Source§impl Default for ChainInfoResponse
impl Default for ChainInfoResponse
Source§fn default() -> ChainInfoResponse
fn default() -> ChainInfoResponse
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ChainInfoResponse
impl<'de> Deserialize<'de> for ChainInfoResponse
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ChainInfoResponse
impl PartialEq for ChainInfoResponse
Source§impl Serialize for ChainInfoResponse
impl Serialize for ChainInfoResponse
impl StructuralPartialEq for ChainInfoResponse
Auto Trait Implementations§
impl Freeze for ChainInfoResponse
impl RefUnwindSafe for ChainInfoResponse
impl Send for ChainInfoResponse
impl Sync for ChainInfoResponse
impl Unpin for ChainInfoResponse
impl UnwindSafe for ChainInfoResponse
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