pub struct Network {
doh: String,
private: PrivateAddresses,
}Expand description
The resolution the lexicon spec describes, over the network.
Fields§
§doh: String§private: PrivateAddressesImplementations§
Source§impl Network
impl Network
Sourcepub fn new(doh: impl Into<String>, private: PrivateAddresses) -> Self
pub fn new(doh: impl Into<String>, private: PrivateAddresses) -> Self
Asks doh, a DNS-over-HTTPS resolver answering the JSON form, for
the authority’s TXT record. The resolver is this deployment’s own
configuration, so it may be on a private address. Every server an
authority names is refused one unless private allows it.
The DID the _lexicon TXT record for nsid’s authority names.
Exactly one did= value, at exactly that name. No other name is
tried.
Sourceasync fn identity(&self, did: &str) -> Result<(String, CommitKey), Unresolved>
async fn identity(&self, did: &str) -> Result<(String, CommitKey), Unresolved>
The server holding did’s repository, and the key its commits are
signed with.
Sourceasync fn record(
&self,
endpoint: &str,
did: &str,
key: &CommitKey,
nsid: &str,
) -> Result<Vec<Value>, Unresolved>
async fn record( &self, endpoint: &str, did: &str, key: &CommitKey, nsid: &str, ) -> Result<Vec<Value>, Unresolved>
The set’s permissions, out of the proof endpoint answers with.
Sourceasync fn get(&self, url: &str, max_bytes: usize) -> Result<Vec<u8>, Unresolved>
async fn get(&self, url: &str, max_bytes: usize) -> Result<Vec<u8>, Unresolved>
A GET through a client pinned to url’s own addresses, following no
redirect, with its body read against max_bytes.
Sourceasync fn send(&self, url: &str) -> Result<Response, Unresolved>
async fn send(&self, url: &str) -> Result<Response, Unresolved>
The same GET, with the status left to the caller.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Network
impl RefUnwindSafe for Network
impl Send for Network
impl Sync for Network
impl Unpin for Network
impl UnsafeUnpin for Network
impl UnwindSafe for Network
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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