pub struct ClientDatabaseWorker<Block, StorageBackend>where
Block: GenericOwnedBlock,{ /* private fields */ }Expand description
Worker that writes everything ClientDatabase persists, returned by
ClientDatabase::open()
Implementations§
Source§impl<Block, StorageBackend> ClientDatabaseWorker<Block, StorageBackend>where
Block: GenericOwnedBlock,
StorageBackend: ClientDatabaseStorageBackend,
impl<Block, StorageBackend> ClientDatabaseWorker<Block, StorageBackend>where
Block: GenericOwnedBlock,
StorageBackend: ClientDatabaseStorageBackend,
Sourcepub async fn run(self) -> Result<(), ClientDatabaseWorkerError>
pub async fn run(self) -> Result<(), ClientDatabaseWorkerError>
Run the worker until all database handles are dropped and everything sent to it is written, or until a write fails
Trait Implementations§
Auto Trait Implementations§
impl<Block, StorageBackend> !RefUnwindSafe for ClientDatabaseWorker<Block, StorageBackend>
impl<Block, StorageBackend> !UnwindSafe for ClientDatabaseWorker<Block, StorageBackend>
impl<Block, StorageBackend> Forget for ClientDatabaseWorker<Block, StorageBackend>
impl<Block, StorageBackend> Freeze for ClientDatabaseWorker<Block, StorageBackend>where
*const ArcInner<RwLock<State<Block>>> is !null: Freeze,
PhantomData<RwLock<State<Block>>>: Freeze,
StorageBackend: Freeze,
*const u8 is !null: Freeze,
PhantomData<OwnedAlignedBuffer<Align<4096>>>: Freeze,
PhantomData<WriteInFlight>: Freeze,
[LogEnd; 2]: Freeze,
PhantomData<u32>: Freeze,
PhantomData<SegmentHeader>: Freeze,
PhantomData<SuperSegmentHeader>: Freeze,
*const ArcInner<Chan<Task, Semaphore>> is !null: Freeze,
PhantomData<ArcInner<Chan<Task, Semaphore>>>: Freeze,
PhantomData<BlockInFlight>: Freeze,
impl<Block, StorageBackend> Move for ClientDatabaseWorker<Block, StorageBackend>
impl<Block, StorageBackend> Send for ClientDatabaseWorker<Block, StorageBackend>
impl<Block, StorageBackend> Sync for ClientDatabaseWorker<Block, StorageBackend>
impl<Block, StorageBackend> Unpin for ClientDatabaseWorker<Block, StorageBackend>where
Block: Unpin,
StorageBackend: Unpin,
*const ArcInner<RwLock<State<Block>>> is !null: Unpin,
Align8<usize>: Unpin,
Align8<*mut Inner<()>>: Unpin,
*const u8 is !null: Unpin,
*const ArcInner<MerkleMountainRange<4294967295, Blake3StaticMerkleHasher<*b"\xffoK\xc6\xc4<2\x83\xd0H\xee\x93\x87.\xa2\x17\xb5\xcb\x95a\xb8\xfby\xa1\x1d\xec\xcb\x03\rq\x0c(">>> is !null: Unpin,
*const ArcInner<[ContractSlotState]> is !null: Unpin,
*const ArcInner<[ShardSegmentRoot]> is !null: Unpin,
<Block as GenericOwnedBlock>::Header: Unpin,
*const ClientDatabaseBlock<Block> is !null: Unpin,
ClientDatabaseBlock<Block>: Unpin,
*const LeafNode<ShardIndex, LocalSegmentIndex> is !null: Unpin,
Box<(ShardIndex, LocalSegmentIndex)>: Unpin,
Receiver<(Result<(), StorageBackendError>, SharedAlignedBuffer<Align<4096>>)>: Unpin,
[LogEnd; 2]: Unpin,
Receiver<Task>: Unpin,
impl<Block, StorageBackend> UnsafeUnpin for ClientDatabaseWorker<Block, StorageBackend>where
*const ArcInner<RwLock<State<Block>>> is !null: UnsafeUnpin,
PhantomData<RwLock<State<Block>>>: UnsafeUnpin,
StorageBackend: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<OwnedAlignedBuffer<Align<4096>>>: UnsafeUnpin,
PhantomData<WriteInFlight>: UnsafeUnpin,
[LogEnd; 2]: UnsafeUnpin,
PhantomData<u32>: UnsafeUnpin,
PhantomData<SegmentHeader>: UnsafeUnpin,
PhantomData<SuperSegmentHeader>: UnsafeUnpin,
*const ArcInner<Chan<Task, Semaphore>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Chan<Task, Semaphore>>>: UnsafeUnpin,
PhantomData<BlockInFlight>: UnsafeUnpin,
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