Struct mongodb::coll::options::IndexModel
[−]
[src]
pub struct IndexModel { pub keys: Document, pub options: IndexOptions, }
A single index model.
Fields
keys: Document
options: IndexOptions
Methods
impl IndexModel
[src]
fn new(keys: Document, options: Option<IndexOptions>) -> IndexModel
fn name(&self) -> Result<String>
Returns the name of the index as specified by the options, or as automatically generated using the keys.
fn generate_index_name(&self) -> Result<String>
Generates the index name from keys. Auto-generated names have the form "key1_val1_key2_val2..."
fn to_bson(&self) -> Result<Document>
Converts the model to its BSON document representation.
Trait Implementations
impl Clone for IndexModel
[src]
fn clone(&self) -> IndexModel
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more