Skip to content

Commit 51075d0

Browse files
committed
Add Document::index function
1 parent 9e78312 commit 51075d0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/documents.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ use crate::{errors::Error, indexes::Index};
5555
pub trait Document {
5656
const INDEX_STR: &'static str;
5757

58+
fn index(client: &crate::client::Client) -> Index {
59+
client.index(Self::INDEX_STR)
60+
}
5861
fn generate_settings() -> Settings;
5962
async fn generate_index(client: &crate::client::Client) -> Result<Index, Task>;
6063
}

0 commit comments

Comments
 (0)