Struct litep2p::protocol::notification::Config
source · pub struct Config { /* private fields */ }
Expand description
Notification configuration.
Implementations§
source§impl Config
impl Config
sourcepub fn new(
protocol_name: ProtocolName,
max_notification_size: usize,
handshake: Vec<u8>,
fallback_names: Vec<ProtocolName>,
auto_accept: bool,
sync_channel_size: usize,
async_channel_size: usize,
should_dial: bool,
) -> (Self, NotificationHandle)
pub fn new( protocol_name: ProtocolName, max_notification_size: usize, handshake: Vec<u8>, fallback_names: Vec<ProtocolName>, auto_accept: bool, sync_channel_size: usize, async_channel_size: usize, should_dial: bool, ) -> (Self, NotificationHandle)
Create new Config
.
sourcepub fn set_handshake(&mut self, handshake: Vec<u8>)
pub fn set_handshake(&mut self, handshake: Vec<u8>)
Set handshake for the protocol.
This function is used to work around an issue in Polkadot SDK and users should not depend on its continued existence.
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§
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