pub struct P2pService { /* private fields */ }Implementations§
Source§impl P2pService
impl P2pService
pub fn requester(&self) -> P2pServiceRequester
pub async fn send_unicast(&self, dest: PeerId, data: Vec<u8>) -> Result<()>
pub async fn send_broadcast(&self, data: Vec<u8>)
pub async fn try_send_unicast(&self, dest: PeerId, data: Vec<u8>) -> Result<()>
pub async fn try_send_broadcast(&self, data: Vec<u8>)
pub async fn open_stream( &self, dest: PeerId, meta: Vec<u8>, ) -> Result<P2pQuicStream>
pub fn router(&self) -> &SharedRouterTable
pub async fn recv(&mut self) -> Option<P2pServiceEvent>
Auto Trait Implementations§
impl Freeze for P2pService
impl !RefUnwindSafe for P2pService
impl Send for P2pService
impl Sync for P2pService
impl Unpin for P2pService
impl !UnwindSafe for P2pService
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