pub struct NetworkService { /* private fields */ }Expand description
NetworkService wraps litep2p and provides consensus-level networking
Implementations§
Source§impl NetworkService
impl NetworkService
Sourcepub fn create(config: NetworkConfig) -> Result<NetworkServiceHandles>
pub fn create(config: NetworkConfig) -> Result<NetworkServiceHandles>
Create the network service and all handles for the consensus engine.
pub fn local_peer_id(&self) -> &PeerId
Auto Trait Implementations§
impl !Freeze for NetworkService
impl !RefUnwindSafe for NetworkService
impl Send for NetworkService
impl !Sync for NetworkService
impl Unpin for NetworkService
impl UnsafeUnpin for NetworkService
impl !UnwindSafe for NetworkService
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