Struct grin_p2p::types::P2PConfig [−][src]
pub struct P2PConfig {}Show fields
pub host: IpAddr, pub port: u16, pub seeding_type: Seeding, pub seeds: Option<PeerAddrs>, pub peers_allow: Option<PeerAddrs>, pub peers_deny: Option<PeerAddrs>, pub peers_preferred: Option<PeerAddrs>, pub ban_window: Option<i64>, pub peer_max_inbound_count: Option<u32>, pub peer_max_outbound_count: Option<u32>, pub peer_min_preferred_outbound_count: Option<u32>, pub peer_listener_buffer_count: Option<u32>, pub dandelion_peer: Option<PeerAddr>,
Configuration for the peer-to-peer server.
Fields
host: IpAddr
port: u16
seeding_type: Seeding
Method used to get the list of seed nodes for initial bootstrap.
seeds: Option<PeerAddrs>
The list of seed nodes, if using Seeding as a seed type
peers_allow: Option<PeerAddrs>
peers_deny: Option<PeerAddrs>
peers_preferred: Option<PeerAddrs>
The list of preferred peers that we will try to connect to
ban_window: Option<i64>
peer_max_inbound_count: Option<u32>
peer_max_outbound_count: Option<u32>
peer_min_preferred_outbound_count: Option<u32>
peer_listener_buffer_count: Option<u32>
dandelion_peer: Option<PeerAddr>
Implementations
impl P2PConfig
[src]
impl P2PConfig
[src]Note certain fields are options just so they don’t have to be included in grin-server.toml, but we don’t want them to ever return none
pub fn ban_window(&self) -> i64
[src]
pub fn ban_window(&self) -> i64
[src]return ban window
pub fn peer_max_inbound_count(&self) -> u32
[src]
pub fn peer_max_inbound_count(&self) -> u32
[src]return maximum inbound peer connections count
pub fn peer_max_outbound_count(&self) -> u32
[src]
pub fn peer_max_outbound_count(&self) -> u32
[src]return maximum outbound peer connections count
pub fn peer_min_preferred_outbound_count(&self) -> u32
[src]
pub fn peer_min_preferred_outbound_count(&self) -> u32
[src]return minimum preferred outbound peer count
pub fn peer_listener_buffer_count(&self) -> u32
[src]
pub fn peer_listener_buffer_count(&self) -> u32
[src]return peer buffer count for listener
Trait Implementations
impl<'de> Deserialize<'de> for P2PConfig
[src]
impl<'de> Deserialize<'de> for P2PConfig
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for P2PConfig
[src]
Auto Trait Implementations
impl RefUnwindSafe for P2PConfig
impl Send for P2PConfig
impl Sync for P2PConfig
impl Unpin for P2PConfig
impl UnwindSafe for P2PConfig
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> CloneAny for T where
T: Any + Clone,
impl<T> CloneAny for T where
T: Any + Clone,
pub fn clone_any(&self) -> Box<dyn CloneAny + 'static, Global>
pub fn clone_any_send(&self) -> Box<dyn CloneAny + 'static + Send, Global> where
T: Send,
T: Send,
pub fn clone_any_sync(&self) -> Box<dyn CloneAny + 'static + Sync, Global> where
T: Sync,
T: Sync,
pub fn clone_any_send_sync(
&self
) -> Box<dyn CloneAny + 'static + Sync + Send, Global> where
T: Send + Sync,
&self
) -> Box<dyn CloneAny + 'static + Sync + Send, Global> where
T: Send + Sync,
impl<'a, T> DefaultFeatures<'a> for T where
T: 'a + Send + Sync + Clone,
impl<'a, T> DefaultFeatures<'a> for T where
T: 'a + Send + Sync + Clone,
pub fn clone_boxed(&self) -> Box<dyn DefaultFeatures<'a> + 'a, Global>
pub fn clone_boxed(&self) -> Box<dyn DefaultFeatures<'a> + 'a, Global>
Clone this value, and then immediately put it into a Box
behind a trait object of this trait. Read more
pub fn self_address_mut(&mut self) -> *mut ()
pub fn self_address_mut(&mut self) -> *mut ()
Returns the address of self
. Read more
impl<'a, T> NonSyncFeatures<'a> for T where
T: 'a + Clone,
impl<'a, T> NonSyncFeatures<'a> for T where
T: 'a + Clone,
pub fn clone_boxed(&self) -> Box<dyn NonSyncFeatures<'a> + 'a, Global>
pub fn clone_boxed(&self) -> Box<dyn NonSyncFeatures<'a> + 'a, Global>
Clone this value, and then immediately put it into a Box
behind a trait object of this trait. Read more
pub fn self_address_mut(&mut self) -> *mut ()
pub fn self_address_mut(&mut self) -> *mut ()
Returns the address of self
. Read more
impl<T> SafeBorrow<T> for T where
T: ?Sized,
impl<T> SafeBorrow<T> for T where
T: ?Sized,
pub fn borrow_replacement(ptr: &T) -> &T
pub fn borrow_replacement(ptr: &T) -> &T
Given ptr
, which was obtained from a prior call to Self::borrow()
,
return a value with the same nominal lifetime which is guaranteed to
survive mutations to Self
. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> DebugAny for T where
T: Any + Debug,
T: Any + Debug,
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> UnsafeAny for T where
T: Any,
T: Any,