reth_network_types/peers/
kind.rs1#[derive(Debug, Clone, Copy, Default, Eq, PartialEq)]
5#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6#[cfg_attr(feature = "serde", serde(rename_all = "lowercase"))]
7pub enum PeerKind {
8 #[default]
10 Basic,
11 Static,
13 Trusted,
15}
16
17impl PeerKind {
18 pub const fn is_trusted(&self) -> bool {
20 matches!(self, Self::Trusted)
21 }
22
23 pub const fn is_static(&self) -> bool {
25 matches!(self, Self::Static)
26 }
27
28 pub const fn is_basic(&self) -> bool {
30 matches!(self, Self::Basic)
31 }
32}