pub struct SimilarResponse {
pub result: Vec<ExplainedResult>,
}Expand description
Response structure for the /similar endpoint
Fields§
§result: Vec<ExplainedResult>List of similar items with explanations
Implementations§
Source§impl SimilarResponse
impl SimilarResponse
Sourcepub fn new(results: Vec<ExplainedResult>) -> Self
pub fn new(results: Vec<ExplainedResult>) -> Self
Create a new similar response
Sourcepub fn from_ranked(
ranked_list: Vec<RankedResult>,
include_payload: bool,
) -> Self
pub fn from_ranked( ranked_list: Vec<RankedResult>, include_payload: bool, ) -> Self
Create from ranked results
Trait Implementations§
Source§impl Clone for SimilarResponse
impl Clone for SimilarResponse
Source§fn clone(&self) -> SimilarResponse
fn clone(&self) -> SimilarResponse
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SimilarResponse
impl Debug for SimilarResponse
Auto Trait Implementations§
impl Freeze for SimilarResponse
impl RefUnwindSafe for SimilarResponse
impl Send for SimilarResponse
impl Sync for SimilarResponse
impl Unpin for SimilarResponse
impl UnwindSafe for SimilarResponse
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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