[−][src]Struct gossip::GossipConfig
The gossip parameters
Implementations
impl GossipConfig
[src]
pub fn new(
push: bool,
pull: bool,
gossip_period: u64,
update_expiration: UpdateExpirationMode
) -> Self
[src]
push: bool,
pull: bool,
gossip_period: u64,
update_expiration: UpdateExpirationMode
) -> Self
Creates a new gossip configuration
Arguments
push
- If the node push its content to other nodespull
- When active, if the node will pull content from other peers; when passive, if the node responds with its content to push requestsgossip_period
- Length of each gossip periodupdate_expiration
- Strategy for update expiration, see UpdateExpirationMode
pub fn new_with_deviation(
push: bool,
pull: bool,
gossip_period: u64,
gossip_deviation: u64,
update_expiration: UpdateExpirationMode
) -> Self
[src]
push: bool,
pull: bool,
gossip_period: u64,
gossip_deviation: u64,
update_expiration: UpdateExpirationMode
) -> Self
Creates a new configuration with the possibility to randomize the period; this is useful when testing locally in order to avoid network saturation
Arguments
gossip_deviation
- The maximum value of the random value added to the period
pub fn is_push(&self) -> bool
[src]
pub fn is_pull(&self) -> bool
[src]
pub fn gossip_period(&self) -> u64
[src]
pub fn gossip_deviation(&self) -> u64
[src]
pub fn update_expiration(&self) -> &UpdateExpirationMode
[src]
Trait Implementations
impl Default for GossipConfig
[src]
Auto Trait Implementations
impl RefUnwindSafe for GossipConfig
[src]
impl Send for GossipConfig
[src]
impl Sync for GossipConfig
[src]
impl Unpin for GossipConfig
[src]
impl UnwindSafe for GossipConfig
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,