pub struct Resolver<Op, D>{ /* private fields */ }
Expand description
Network resolver that works directly with generic wire messages.
Implementations§
Source§impl<Op, D> Resolver<Op, D>
impl<Op, D> Resolver<Op, D>
Sourcepub async fn connect<E>(
context: E,
server_addr: SocketAddr,
) -> Result<Self, Error>
pub async fn connect<E>( context: E, server_addr: SocketAddr, ) -> Result<Self, Error>
Returns a resolver connected to the server at the given address.
Sourcepub async fn get_sync_target(&self) -> Result<Target<D>, Error>
pub async fn get_sync_target(&self) -> Result<Target<D>, Error>
Returns the current sync target from the server.
Trait Implementations§
Source§impl<Op, D> Resolver for Resolver<Op, D>
impl<Op, D> Resolver for Resolver<Op, D>
Source§async fn get_operations(
&self,
size: u64,
start_loc: u64,
max_ops: NonZeroU64,
) -> Result<FetchResult<Self::Op, Self::Digest>, Self::Error>
async fn get_operations( &self, size: u64, start_loc: u64, max_ops: NonZeroU64, ) -> Result<FetchResult<Self::Op, Self::Digest>, Self::Error>
Get the operations starting at
start_loc
in the database, up to max_ops
operations.
Returns the operations and a proof that they were present in the database when it had
size
operations.Auto Trait Implementations§
impl<Op, D> Freeze for Resolver<Op, D>
impl<Op, D> !RefUnwindSafe for Resolver<Op, D>
impl<Op, D> Send for Resolver<Op, D>
impl<Op, D> Sync for Resolver<Op, D>
impl<Op, D> Unpin for Resolver<Op, D>
impl<Op, D> !UnwindSafe for Resolver<Op, D>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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>
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