pub enum MultiSearchParseError {
IndexOutOfBounds(usize),
ApiError {
index: usize,
message: String,
},
Deserialization {
index: usize,
source: Error,
},
}Expand description
Represents the possible errors that can occur when parsing a multi_search response.
This error enum is returned by the MultiSearchResultExt::parse_at method when it
fails to convert a raw search result into a strongly-typed SearchResult<T>.
Variants§
IndexOutOfBounds(usize)
Indicates that the requested index was outside the bounds of the results vector.
For a multi_search request with n search queries, the valid indices for the
results are 0 through n-1. This error occurs if the provided index is n or greater.
§Fields
0- The invalid index that was requested.
ApiError
Indicates that the Typesense server returned an error for the specific search query at this index.
§Fields
index- The index of the search query that failed.message- The error message returned by the Typesense API for this specific search.
Fields
Deserialization
Indicates a failure to deserialize a document’s JSON into the target struct T.
This typically happens when the fields in the document stored in Typesense do not
match the fields defined in the target Rust struct T. Check for mismatches in
field names or data types.
§Fields
index- The index of the search query where the deserialization error occurred.source- The underlyingserde_json::Errorthat provides detailed information about the deserialization failure.
Trait Implementations§
Source§impl Debug for MultiSearchParseError
impl Debug for MultiSearchParseError
Source§impl Display for MultiSearchParseError
impl Display for MultiSearchParseError
Source§impl Error for MultiSearchParseError
impl Error for MultiSearchParseError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for MultiSearchParseError
impl !UnwindSafe for MultiSearchParseError
impl Freeze for MultiSearchParseError
impl Send for MultiSearchParseError
impl Sync for MultiSearchParseError
impl Unpin for MultiSearchParseError
impl UnsafeUnpin for MultiSearchParseError
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
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.