pub struct ExternalDocumentsIds(/* private fields */);Implementations§
Source§impl ExternalDocumentsIds
impl ExternalDocumentsIds
pub fn new(db: Database<Str, BEU32>) -> ExternalDocumentsIds
Sourcepub fn is_empty(&self, rtxn: &RoTxn<'_>) -> Result<bool>
pub fn is_empty(&self, rtxn: &RoTxn<'_>) -> Result<bool>
Returns true if hard and soft external documents lists are empty.
pub fn get<A: AsRef<str>>( &self, rtxn: &RoTxn<'_>, external_id: A, ) -> Result<Option<u32>>
Sourcepub fn to_hash_map(&self, rtxn: &RoTxn<'_>) -> Result<HashMap<String, u32>>
pub fn to_hash_map(&self, rtxn: &RoTxn<'_>) -> Result<HashMap<String, u32>>
An helper function to debug this type, returns an HashMap of both,
soft and hard fst maps, combined.
Sourcepub fn apply(
&self,
wtxn: &mut RwTxn<'_>,
operations: Vec<DocumentOperation>,
) -> Result<()>
pub fn apply( &self, wtxn: &mut RwTxn<'_>, operations: Vec<DocumentOperation>, ) -> Result<()>
Applies the list of operations passed as argument, modifying the current external to internal id mapping.
If the list contains multiple operations on the same external id, then the result is unspecified.
§Panics
- If attempting to delete a document that doesn’t exist
- If attempting to create a document that already exists
Auto Trait Implementations§
impl Freeze for ExternalDocumentsIds
impl RefUnwindSafe for ExternalDocumentsIds
impl Send for ExternalDocumentsIds
impl Sync for ExternalDocumentsIds
impl Unpin for ExternalDocumentsIds
impl UnwindSafe for ExternalDocumentsIds
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