Skip to content

Commit e7881da

Browse files
RUST-989 Update index management struct visibility (#431)
1 parent 1c75a3f commit e7881da

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/index/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ pub struct IndexModel {
1616
/// Specifies the index’s fields. For each field, specify a key-value pair in which the key is
1717
/// the name of the field to index and the value is index type.
1818
#[serde(rename = "key")]
19-
keys: Document,
19+
pub keys: Document,
2020

2121
/// The options for the index.
2222
#[serde(flatten)]
23-
options: Option<IndexOptions>,
23+
pub options: Option<IndexOptions>,
2424
}
2525

2626
impl IndexModel {

src/results.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ pub struct DeleteResult {
8080
/// Information about the index created as a result of a
8181
/// [`Collection::create_index`](../struct.Collection.html#method.create_index).
8282
#[derive(Debug, Clone, PartialEq)]
83+
#[non_exhaustive]
8384
pub struct CreateIndexResult {
8485
/// The name of the index created in the `createIndex` command.
8586
pub index_name: String,
@@ -117,6 +118,7 @@ impl From<CreateIndexesResult> for CreateIndexResult {
117118
/// Information about the indexes created as a result of a
118119
/// [`Collection::create_indexes`](../struct.Collection.html#method.create_indexes).
119120
#[derive(Debug, Clone, PartialEq)]
121+
#[non_exhaustive]
120122
pub struct CreateIndexesResult {
121123
/// The list containing the names of all indexes created in the `createIndexes` command.
122124
pub index_names: Vec<String>,

0 commit comments

Comments
 (0)