pub fn new_with_direction(key: impl Into<Cow<'static, str>>, direction: SortOrder) -> Self {
        let mut index = Self::default();
        index.add_key_with_direction(key, direction);
        index
    }
/// Make a new index for the given key with a direction.
///
/// [Mongo manual](https://docs.mongodb.com/manual/core/index-single/)
Make a new index for the given key with a direction.
[Mongo manual]
Make a new index for the given key with a direction . [ Mongo manual ]
pub fn new_with_direction(key: impl Into<Cow<'static, str>>, direction: SortOrder) -> Self {
        let mut index = Self::default();
        index.add_key_with_direction(key, direction);
        index
    }
pub fn new_with_direction ( key : impl Into < Cow < ' static , str > > , direction : SortOrder ) -> Self { let mut index = Self :: default ( ) ; index . add_key_with_direction ( key , direction ) ; index }
Make a new index for the given key with a direction.
Make a new index for the given key with a direction .
key
impl Into<Cow<'static, str>>
direction
SortOrder