pub struct Service { /* private fields */ }
Implementations§
source§impl Service
impl Service
sourcepub async fn spawn<P: ProtocolIdentity>(
local_enr: Arc<RwLock<Enr>>,
enr_key: Arc<RwLock<CombinedKey>>,
kbuckets: Arc<RwLock<KBucketsTable<NodeId, Enr>>>,
config: Config
) -> Result<(Sender<()>, Sender<ServiceRequest>), Error>
pub async fn spawn<P: ProtocolIdentity>( local_enr: Arc<RwLock<Enr>>, enr_key: Arc<RwLock<CombinedKey>>, kbuckets: Arc<RwLock<KBucketsTable<NodeId, Enr>>>, config: Config ) -> Result<(Sender<()>, Sender<ServiceRequest>), Error>
Builds the Service
main struct.
local_enr
is the ENR
representing the local node. This contains node identifying information, such
as IP addresses and ports which we wish to broadcast to other nodes via this discovery
mechanism.
Auto Trait Implementations§
impl Freeze for Service
impl !RefUnwindSafe for Service
impl Send for Service
impl !Sync for Service
impl Unpin for Service
impl !UnwindSafe for Service
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