Enum mongodm::index::IndexOption [−][src]
pub enum IndexOption {
Background,
Unique,
Name(String),
PartialFilterExpression(Document),
Sparse,
ExpireAfterSeconds(i32),
StorageEngine(Document),
Collation(Document),
Custom {
name: String,
value: Bson,
},
}
Expand description
Option to be used at index creation.
Variants
Background
Enable background builds
Unique
Creates a unique index
Name(String)
Tuple Fields
0: String
Name of the index
PartialFilterExpression(Document)
Tuple Fields
0: Document
Only references documents that match the filter expression
Sparse
Only references documents with the specified field
ExpireAfterSeconds(i32)
Tuple Fields
0: i32
TTL to control how long data is retained in the collectino
StorageEngine(Document)
Tuple Fields
0: Document
Configure the storage engine
Collation(Document)
Tuple Fields
0: Document
Specifies the collation
Custom
Specify a custom index option. This is present to provide forwards compatibility.
Implementations
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for IndexOption
impl Send for IndexOption
impl Sync for IndexOption
impl Unpin for IndexOption
impl UnwindSafe for IndexOption
Blanket Implementations
Mutably borrows from an owned value. Read more