pub struct NetworkRemoteStore { /* private fields */ }Expand description
Bridges an async BlockTransport to the sync RemoteStore trait.
The pipeline code is synchronous. The daemon is async. This adapter
holds a tokio runtime handle and calls block_on to bridge the gap.
§Safety
Must NOT be called from within a tokio async context — that would deadlock. The CLI’s main thread (which runs the pipeline) is not inside tokio, so this is safe.
Implementations§
Source§impl NetworkRemoteStore
impl NetworkRemoteStore
Sourcepub fn new(transport: Arc<dyn BlockTransport>, runtime: Handle) -> Self
pub fn new(transport: Arc<dyn BlockTransport>, runtime: Handle) -> Self
Create a new adapter wrapping a BlockTransport.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NetworkRemoteStore
impl !RefUnwindSafe for NetworkRemoteStore
impl Send for NetworkRemoteStore
impl Sync for NetworkRemoteStore
impl Unpin for NetworkRemoteStore
impl UnsafeUnpin for NetworkRemoteStore
impl !UnwindSafe for NetworkRemoteStore
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> 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