Struct mon::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
[src]
fn name(&self) -> Result<String>
[src]
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>
[src]
Generates the index name from keys. Auto-generated names have the form "key1_val1_key2_val2..."
fn to_bson(&self) -> Result<Document>
[src]
Converts the model to its BSON document representation.
Trait Implementations
impl Clone for IndexModel
[src]
fn clone(&self) -> IndexModel
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more