pub struct MemorySearch { /* private fields */ }Expand description
Resources held at the system level: the same in every tenant and project.
Implementations§
Source§impl MemorySearch
impl MemorySearch
Sourcepub fn new(resources: impl IntoIterator<Item = Resource>) -> Self
pub fn new(resources: impl IntoIterator<Item = Resource>) -> Self
A backend over resources, searched by the R4 search parameters. Each
is stored as version 1; one without an id is left out, since no
search could return it.
Trait Implementations§
Source§impl SearchEngine for MemorySearch
impl SearchEngine for MemorySearch
Source§fn index(
&self,
_fhir_version: SupportedFHIRVersions,
resources: Vec<IndexResource>,
) -> impl Future<Output = Result<IndexOutcome, OperationOutcomeError>> + Send
fn index( &self, _fhir_version: SupportedFHIRVersions, resources: Vec<IndexResource>, ) -> impl Future<Output = Result<IndexOutcome, OperationOutcomeError>> + Send
Adds, replaces or removes each resource by type and id. The resources are system-level, so the tenant and project aren’t recorded.
Source§fn migrate(
&self,
_fhir_version: &SupportedFHIRVersions,
) -> impl Future<Output = Result<(), OperationOutcomeError>> + Send
fn migrate( &self, _fhir_version: &SupportedFHIRVersions, ) -> impl Future<Output = Result<(), OperationOutcomeError>> + Send
Nothing to migrate: there is no index.
async fn search( &self, _fhir_version: &SupportedFHIRVersions, _tenant: &TenantId, project: &ProjectId, search_request: &SearchRequest, options: Option<SearchOptions>, ) -> Result<SearchReturn, OperationOutcomeError>
Auto Trait Implementations§
impl !Freeze for MemorySearch
impl RefUnwindSafe for MemorySearch
impl Send for MemorySearch
impl Sync for MemorySearch
impl Unpin for MemorySearch
impl UnsafeUnpin for MemorySearch
impl UnwindSafe for MemorySearch
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