Struct grin_p2p::types::PeerInfoDisplay
source · pub struct PeerInfoDisplay {
pub capabilities: Capabilities,
pub user_agent: String,
pub version: ProtocolVersion,
pub addr: PeerAddr,
pub direction: Direction,
pub total_difficulty: Difficulty,
pub height: u64,
}
Expand description
Flatten out a PeerInfo and nested PeerLiveInfo (taking a read lock on it) so we can serialize/deserialize the data for the API and the TUI.
Fields§
§capabilities: Capabilities
§user_agent: String
§version: ProtocolVersion
§addr: PeerAddr
§direction: Direction
§total_difficulty: Difficulty
§height: u64
Trait Implementations§
source§impl Clone for PeerInfoDisplay
impl Clone for PeerInfoDisplay
source§fn clone(&self) -> PeerInfoDisplay
fn clone(&self) -> PeerInfoDisplay
Returns a copy 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 PeerInfoDisplay
impl Debug for PeerInfoDisplay
source§impl<'de> Deserialize<'de> for PeerInfoDisplay
impl<'de> Deserialize<'de> for PeerInfoDisplay
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<PeerInfo> for PeerInfoDisplay
impl From<PeerInfo> for PeerInfoDisplay
source§fn from(info: PeerInfo) -> PeerInfoDisplay
fn from(info: PeerInfo) -> PeerInfoDisplay
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PeerInfoDisplay
impl RefUnwindSafe for PeerInfoDisplay
impl Send for PeerInfoDisplay
impl Sync for PeerInfoDisplay
impl Unpin for PeerInfoDisplay
impl UnwindSafe for PeerInfoDisplay
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<'a, T> DefaultFeatures<'a> for T
impl<'a, T> DefaultFeatures<'a> for T
source§fn clone_boxed(&self) -> Box<dyn DefaultFeatures<'a>>
fn clone_boxed(&self) -> Box<dyn DefaultFeatures<'a>>
Clone this value, and then immediately put it into a
Box
behind a trait object of this trait.source§impl<'a, T> NonSyncFeatures<'a> for Twhere
T: 'a + Clone,
impl<'a, T> NonSyncFeatures<'a> for Twhere
T: 'a + Clone,
source§fn clone_boxed(&self) -> Box<dyn NonSyncFeatures<'a>>
fn clone_boxed(&self) -> Box<dyn NonSyncFeatures<'a>>
Clone this value, and then immediately put it into a
Box
behind a trait object of this trait.