[][src]Struct libp2p_bitswap::BitswapConfig

pub struct BitswapConfig<P: StoreParams> {
    pub store: Box<dyn BitswapStore<P>>,
    pub request_timeout: Duration,
    pub connection_keep_alive: Duration,
    pub receive_limit: NonZeroU16,
}

Bitswap configuration.

Fields

store: Box<dyn BitswapStore<P>>

The bitswap store.

request_timeout: Duration

Timeout of a request.

connection_keep_alive: Duration

Time a connection is kept alive.

receive_limit: NonZeroU16

The number of concurrent requests per peer.

Implementations

impl<P: StoreParams> BitswapConfig<P>[src]

pub fn new<S: BitswapStore<P>>(store: S) -> Self[src]

Creates a new BitswapConfig.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> References<RawCodec> for 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]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,