pub struct Config {
pub membership: Config,
pub broadcast: Config,
pub max_message_size: usize,
}
Expand description
Protocol configuration
Fields§
§membership: Config
Configuration for the swarm membership layer
broadcast: Config
Configuration for the gossip broadcast layer
max_message_size: usize
Max message size in bytes.
This size should be the same across a network to ensure all nodes can transmit and read large messages.
At minimum, this size should be large enough to send gossip control messages. This can vary, depending on the size of the PeerIdentity
you use and the size of the PeerData
you transmit in your messages.
The default is DEFAULT_MAX_MESSAGE_SIZE
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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