pub struct IndexingWorker { /* private fields */ }Implementations§
Source§impl IndexingWorker
impl IndexingWorker
Sourcepub async fn new(
config: Arc<WorkerEnvironment>,
) -> Result<Self, OperationOutcomeError>
pub async fn new( config: Arc<WorkerEnvironment>, ) -> Result<Self, OperationOutcomeError>
Creates and initializes a new worker.
This initializes the repository and search engine using the provided configuration, then waits for the search engine to become available. The search engine connection is retried up to 5 times, with a 5-second delay between attempts.
§Arguments
config- Shared worker configuration containing the repository, search engine, and concurrency settings.
§Errors
Returns an error if:
- creating the repository fails.
- creating the search engine fails.
- the search engine remains unavailable after 5 connection attempts.
§Returns
Returns an initialized Self with the repository and search engine
ready for use.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for IndexingWorker
impl !UnwindSafe for IndexingWorker
impl Freeze for IndexingWorker
impl Send for IndexingWorker
impl Sync for IndexingWorker
impl Unpin for IndexingWorker
impl UnsafeUnpin for IndexingWorker
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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