Struct libp2p_pubsub_core::Config
source · pub struct Config { /* private fields */ }
Implementations§
source§impl Config
impl Config
sourcepub fn max_frame_size(&self) -> usize
pub fn max_frame_size(&self) -> usize
The maximum byte size for each pubsub frame (default is 65536 bytes).
This represents the maximum size of the entire protobuf payload. It must be at least large enough to support basic control messages.
Default is 65536 bytes.
sourcepub fn connection_idle_timeout(&self) -> Duration
pub fn connection_idle_timeout(&self) -> Duration
The time a connection is maintained to a peer without being in the mesh and without send/receiving a message from. Connections that idle beyond this timeout are disconnected.
Default is 120 seconds.
sourcepub fn heartbeat_interval(&self) -> Duration
pub fn heartbeat_interval(&self) -> Duration
The time between each heartbeat.
Default is 1 second.
sourcepub fn message_cache_capacity(&self) -> usize
pub fn message_cache_capacity(&self) -> usize
The maximum number of messages to cache.
Default is 1024.
sourcepub fn message_cache_ttl(&self) -> Duration
pub fn message_cache_ttl(&self) -> Duration
The time a message is kept in the cache.
Default is 5 seconds.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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