pub struct PeerInfoView {Show 15 fields
pub account_id: Option<AccountId>,
pub addr: String,
pub archival: bool,
pub block_hash: Option<CryptoHash>,
pub connection_established_time_millis: u64,
pub height: Option<u64>,
pub is_highest_block_invalid: bool,
pub is_outbound_peer: bool,
pub last_time_peer_requested_millis: u64,
pub last_time_received_message_millis: u64,
pub nonce: u64,
pub peer_id: PublicKey,
pub received_bytes_per_sec: u64,
pub sent_bytes_per_sec: u64,
pub tracked_shards: Vec<ShardId>,
}
Expand description
PeerInfoView
JSON schema
{
"type": "object",
"required": [
"addr",
"archival",
"connection_established_time_millis",
"is_highest_block_invalid",
"is_outbound_peer",
"last_time_peer_requested_millis",
"last_time_received_message_millis",
"nonce",
"peer_id",
"received_bytes_per_sec",
"sent_bytes_per_sec",
"tracked_shards"
],
"properties": {
"account_id": {
"anyOf": [
{
"$ref": "#/components/schemas/AccountId"
},
{
"type": "null"
}
]
},
"addr": {
"type": "string"
},
"archival": {
"type": "boolean"
},
"block_hash": {
"anyOf": [
{
"$ref": "#/components/schemas/CryptoHash"
},
{
"type": "null"
}
]
},
"connection_established_time_millis": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"height": {
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 0.0
},
"is_highest_block_invalid": {
"type": "boolean"
},
"is_outbound_peer": {
"type": "boolean"
},
"last_time_peer_requested_millis": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"last_time_received_message_millis": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"nonce": {
"description": "Connection nonce.",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"peer_id": {
"$ref": "#/components/schemas/PublicKey"
},
"received_bytes_per_sec": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"sent_bytes_per_sec": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"tracked_shards": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ShardId"
}
}
}
}
Fields§
§account_id: Option<AccountId>
§addr: String
§archival: bool
§block_hash: Option<CryptoHash>
§connection_established_time_millis: u64
§height: Option<u64>
§is_highest_block_invalid: bool
§is_outbound_peer: bool
§last_time_peer_requested_millis: u64
§last_time_received_message_millis: u64
§nonce: u64
Connection nonce.
peer_id: PublicKey
§received_bytes_per_sec: u64
§sent_bytes_per_sec: u64
§tracked_shards: Vec<ShardId>
Trait Implementations§
Source§impl Clone for PeerInfoView
impl Clone for PeerInfoView
Source§fn clone(&self) -> PeerInfoView
fn clone(&self) -> PeerInfoView
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 PeerInfoView
impl Debug for PeerInfoView
Source§impl<'de> Deserialize<'de> for PeerInfoView
impl<'de> Deserialize<'de> for PeerInfoView
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 From<&PeerInfoView> for PeerInfoView
impl From<&PeerInfoView> for PeerInfoView
Source§fn from(value: &PeerInfoView) -> Self
fn from(value: &PeerInfoView) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PeerInfoView
impl RefUnwindSafe for PeerInfoView
impl Send for PeerInfoView
impl Sync for PeerInfoView
impl Unpin for PeerInfoView
impl UnwindSafe for PeerInfoView
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