pub struct Registration { /* private fields */ }
Implementations§
Source§impl Registration
impl Registration
pub async fn set_dht_enabled(&self, enabled: bool)
Sourcepub fn is_dht_enabled(&self) -> bool
pub fn is_dht_enabled(&self) -> bool
This function provides the information to the user whether DHT is enabled for this repository, not necessarily whether the DHT tasks are currently running. The subtle difference is in that this function should return true even in case e.g. the whole network is disabled.
Sourcepub async fn set_pex_enabled(&self, enabled: bool)
pub async fn set_pex_enabled(&self, enabled: bool)
Enables/disables peer exchange for this repo.
Note: sending/receiving over PEX for this repo is enabled only if it’s enabled using this function and also globally using Network::set_pex_send_enabled and/or Network::set_pex_recv_enabled.
pub fn is_pex_enabled(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Registration
impl !RefUnwindSafe for Registration
impl Send for Registration
impl Sync for Registration
impl Unpin for Registration
impl !UnwindSafe for Registration
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more