pub struct Collection { /* private fields */ }
Implementations§
Source§impl Collection
impl Collection
pub fn new( client: MilvusServiceClient<InterceptedService<Channel, AuthInterceptor>>, info: DescribeCollectionResponse, ) -> Self
pub fn schema(&self) -> &CollectionSchema
pub async fn get_load_percent(&self) -> Result<i64>
pub async fn load(&self, replica_number: i32) -> Result<()>
Sourcepub async fn create_alias<S: ToString>(&self, alias: S) -> Result<()>
pub async fn create_alias<S: ToString>(&self, alias: S) -> Result<()>
Create a collection alias
Sourcepub async fn drop_alias<S: ToString>(&self, alias: S) -> Result<()>
pub async fn drop_alias<S: ToString>(&self, alias: S) -> Result<()>
Drop a collection alias
Sourcepub async fn alter_alias<S: ToString>(&self, alias: S) -> Result<()>
pub async fn alter_alias<S: ToString>(&self, alias: S) -> Result<()>
Alter a collection alias
pub async fn is_loaded(&self) -> Result<bool>
pub async fn release(&self) -> Result<()>
pub async fn delete<S: AsRef<str>>( &self, expr: S, partition_name: Option<&str>, ) -> Result<()>
pub async fn drop(&self) -> Result<()>
pub async fn exist(&self) -> Result<bool>
pub async fn flush(&self) -> Result<()>
pub async fn load_partition_list(&self) -> Result<()>
pub async fn create_partition<S: AsRef<str>>(&self, name: S) -> Result<()>
pub async fn has_partition<P: AsRef<str>>(&self, p: P) -> Result<bool>
pub async fn create( &self, shards_num: Option<i32>, consistency_level: Option<ConsistencyLevel>, ) -> Result<()>
pub async fn query<Exp, P>( &self, expr: Exp, partition_names: P, ) -> Result<Vec<FieldColumn>>
pub async fn insert( &self, fields_data: Vec<FieldColumn>, partition_name: Option<&str>, ) -> Result<MutationResult>
pub async fn search<S, I>( &self, data: Vec<Value<'_>>, vec_field: S, topk: i32, metric_type: MetricType, output_fields: I, option: &SearchOption, ) -> Result<Vec<SearchResult<'_>>>
pub async fn create_index( &self, field_name: impl Into<String>, index_params: IndexParams, ) -> Result<()>
pub async fn describe_index<S>(&self, field_name: S) -> Result<Vec<IndexInfo>>
pub async fn drop_index<S>(&self, field_name: S) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Collection
impl !RefUnwindSafe for Collection
impl Send for Collection
impl Sync for Collection
impl Unpin for Collection
impl !UnwindSafe for Collection
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> 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