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]
impl IndexModel
pub fn new(keys: Document, options: Option<IndexOptions>) -> IndexModel
[src]
pub fn new(keys: Document, options: Option<IndexOptions>) -> IndexModel
pub fn name(&self) -> Result<String>
[src]
pub fn name(&self) -> Result<String>
Returns the name of the index as specified by the options, or as automatically generated using the keys.
pub fn generate_index_name(&self) -> Result<String>
[src]
pub fn generate_index_name(&self) -> Result<String>
Generates the index name from keys. Auto-generated names have the form "key1_val1_key2_val2..."
pub fn to_bson(&self) -> Result<Document>
[src]
pub fn to_bson(&self) -> Result<Document>
Converts the model to its BSON document representation.
Trait Implementations
impl Clone for IndexModel
[src]
impl Clone for IndexModel
fn clone(&self) -> IndexModel
[src]
fn clone(&self) -> IndexModel
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for IndexModel
[src]
impl Debug for IndexModel
Auto Trait Implementations
impl Send for IndexModel
impl Send for IndexModel
impl Sync for IndexModel
impl Sync for IndexModel