pub fn rename<N>(self, new_name: N) -> Result<CollectionSession<C>>
    where
        N: Into<String>,
    {
        self.execute(RenameCollection::new(
            self.name().into(),
            RenameTo::new(new_name),
        )).map(|collection| CollectionSession {
            entity: Entity::Object(collection),
            database_name: self.database_name,
            connector: self.connector,
            core: self.core,
        })
    }
/// Renames the collection represented by this session and returns the
/// renamed collection as a new `CollectionSession`.
Renames the collection represented by this session and returns the
renamed collection as a new `CollectionSession`.
Renames the collection represented by this session and returns the renamed collection as a new ` CollectionSession ` .
pub fn rename<N>(self, new_name: N) -> Result<CollectionSession<C>>
    where
        N: Into<String>,
    {
        self.execute(RenameCollection::new(
            self.name().into(),
            RenameTo::new(new_name),
        )).map(|collection| CollectionSession {
            entity: Entity::Object(collection),
            database_name: self.database_name,
            connector: self.connector,
            core: self.core,
        })
    }
pub fn rename < N > ( self , new_name : N ) -> Result < CollectionSession < C > > where N : Into < String > , { self . execute ( RenameCollection :: new ( self . name ( ) . into ( ) , RenameTo :: new ( new_name ) , ) ) . map ( | collection | CollectionSession { entity : Entity :: Object ( collection ) , database_name : self . database_name , connector : self . connector , core : self . core , } ) }
Renames the collection represented by this session and returns the
renamed collection as a new `CollectionSession`.
Renames the collection represented by this session and returns the renamed collection as a new ` CollectionSession ` .
self
new_name
N
self
new_name
N