pub struct N0;Expand description
Configures the endpoint to use the n0 defaults
Currently this consists of
- the DNS Address Lookup service.
- the default relay servers provided by Number 0.
- setting the
rustls::crypto::CryptoProviderto ring or aws-lc-rs, depending on which feature is enabled in iroh (preferring ring if both are enabled).
Due to the last point, this preset is only available with the ring or
aws-lc-rs preset installed.
If you want to set your own crypto provider, we recommend copying the
implementation of this preset into your own and setting the appropriate crypto
provider there.
The default address lookup service publishes to and resolves from the
n0.computer dns server iroh.link.
This is equivalent to adding both a crate::address_lookup::PkarrPublisher
and a crate::address_lookup::DnsAddressLookup, both configured to use the
n0.computer dns server.
This will by default use N0_DNS_PKARR_RELAY_PROD.
When in tests, or when the test-utils feature is enabled, this will use the
N0_DNS_PKARR_RELAY_STAGING.
Trait Implementations§
impl Copy for N0
Auto Trait Implementations§
impl Freeze for N0
impl RefUnwindSafe for N0
impl Send for N0
impl Sync for N0
impl Unpin for N0
impl UnsafeUnpin for N0
impl UnwindSafe for N0
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
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>
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