pub struct ShardKeySelectorBuilder { /* private fields */ }Implementations§
Source§impl ShardKeySelectorBuilder
impl ShardKeySelectorBuilder
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new ShardKeySelectorBuilder with default values.
§Examples
use qdrant_client::qdrant::{ShardKey, ShardKeySelectorBuilder};
let selector = ShardKeySelectorBuilder::new()
.add_shard_key(ShardKey::from("key1".to_string()))
.build();pub fn with_shard_key(shard_key: impl Into<ShardKey>) -> Self
Sourcepub fn with_shard_keys(shard_keys: impl Into<Vec<ShardKey>>) -> Self
pub fn with_shard_keys(shard_keys: impl Into<Vec<ShardKey>>) -> Self
Create a new ShardKeySelectorBuilder with the given shard keys.
§Arguments
shard_keys- List of shard keys which should be used in the request
§Examples
use qdrant_client::qdrant::{ShardKey, ShardKeySelectorBuilder};
let selector = ShardKeySelectorBuilder::with_shard_keys(
vec![ShardKey::from("key1".to_string())]
).build();Sourcepub fn shard_keys(self, value: impl Into<Vec<ShardKey>>) -> Self
pub fn shard_keys(self, value: impl Into<Vec<ShardKey>>) -> Self
Set the shard keys which should be used in the request.
§Arguments
shard_keys- List of shard keys which should be used in the request
Sourcepub fn add_shard_key(self, shard_key: impl Into<ShardKey>) -> Self
pub fn add_shard_key(self, shard_key: impl Into<ShardKey>) -> Self
Sourcepub fn fallback(self, value: impl Into<ShardKey>) -> Self
pub fn fallback(self, value: impl Into<ShardKey>) -> Self
Set a fallback shard key to use if the primary shard keys are not available.
§Arguments
fallback- Fallback shard key
pub fn build(self) -> ShardKeySelector
Trait Implementations§
Source§impl Clone for ShardKeySelectorBuilder
impl Clone for ShardKeySelectorBuilder
Source§fn clone(&self) -> ShardKeySelectorBuilder
fn clone(&self) -> ShardKeySelectorBuilder
Returns a duplicate 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 Default for ShardKeySelectorBuilder
impl Default for ShardKeySelectorBuilder
Source§impl From<ShardKeySelectorBuilder> for ShardKeySelector
impl From<ShardKeySelectorBuilder> for ShardKeySelector
Source§fn from(value: ShardKeySelectorBuilder) -> Self
fn from(value: ShardKeySelectorBuilder) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ShardKeySelectorBuilder
impl RefUnwindSafe for ShardKeySelectorBuilder
impl Send for ShardKeySelectorBuilder
impl Sync for ShardKeySelectorBuilder
impl Unpin for ShardKeySelectorBuilder
impl UnwindSafe for ShardKeySelectorBuilder
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