pub struct TokioP2PNetworkServer { /* private fields */ }Implementations§
Source§impl TokioP2PNetworkServer
impl TokioP2PNetworkServer
Sourcepub fn new(
name: impl Into<String>,
socket: UdpSocket,
tokio: Option<Runtime>,
) -> Self
pub fn new( name: impl Into<String>, socket: UdpSocket, tokio: Option<Runtime>, ) -> Self
Owns the passed runtime, using it only if no contextual handle is available;
if None is passed, it creates a runtime with multi-threaded support,
CPU-based thread pool size and all features enabled.
pub fn start<UntypedMsgHandlerT: UntypedMsgHandler + 'static, MsgT, DeT>( &self, handler: UntypedMsgHandlerT, deserializer: DeT, buffer_size: usize, ) -> Result<TokioJoinHandle<()>>
Auto Trait Implementations§
impl Freeze for TokioP2PNetworkServer
impl RefUnwindSafe for TokioP2PNetworkServer
impl Send for TokioP2PNetworkServer
impl Sync for TokioP2PNetworkServer
impl Unpin for TokioP2PNetworkServer
impl UnwindSafe for TokioP2PNetworkServer
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