pub struct RecommendInput {
pub positive: Vec<VectorInput>,
pub negative: Vec<VectorInput>,
pub strategy: Option<i32>,
}
Fields§
§positive: Vec<VectorInput>
Look for vectors closest to the vectors from these points
negative: Vec<VectorInput>
Try to avoid vectors like the vector from these points
strategy: Option<i32>
How to use the provided vectors to find the results
Implementations§
source§impl RecommendInput
impl RecommendInput
sourcepub fn strategy(&self) -> RecommendStrategy
pub fn strategy(&self) -> RecommendStrategy
Returns the enum value of strategy
, or the default if the field is unset or set to an invalid enum value.
sourcepub fn set_strategy(&mut self, value: RecommendStrategy)
pub fn set_strategy(&mut self, value: RecommendStrategy)
Sets strategy
to the provided enum value.
Trait Implementations§
source§impl Clone for RecommendInput
impl Clone for RecommendInput
source§fn clone(&self) -> RecommendInput
fn clone(&self) -> RecommendInput
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for RecommendInput
impl Debug for RecommendInput
source§impl Default for RecommendInput
impl Default for RecommendInput
source§impl From<RecommendInput> for Query
impl From<RecommendInput> for Query
source§fn from(value: RecommendInput) -> Self
fn from(value: RecommendInput) -> Self
Converts to this type from the input type.
source§impl From<RecommendInputBuilder> for RecommendInput
impl From<RecommendInputBuilder> for RecommendInput
source§fn from(value: RecommendInputBuilder) -> Self
fn from(value: RecommendInputBuilder) -> Self
Converts to this type from the input type.
source§impl Message for RecommendInput
impl Message for RecommendInput
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Encodes the message to a newly allocated buffer.
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
.source§impl PartialEq for RecommendInput
impl PartialEq for RecommendInput
impl StructuralPartialEq for RecommendInput
Auto Trait Implementations§
impl Freeze for RecommendInput
impl RefUnwindSafe for RecommendInput
impl Send for RecommendInput
impl Sync for RecommendInput
impl Unpin for RecommendInput
impl UnwindSafe for RecommendInput
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request