pub struct Database { /* private fields */ }Implementations§
Source§impl Database
impl Database
pub fn new(name: String) -> Self
pub fn collection(&mut self, name: &str) -> &mut Collection
pub fn list_collection_names(&self) -> Vec<String>
pub fn create_collection( &mut self, name: &str, options: Option<CreateCollectionOptions>, ) -> Result<()>
pub fn drop_collection(&mut self, name: &str) -> Result<()>
pub fn stats(&self) -> Result<DatabaseStats>
pub fn run_command(&mut self, command: &Document) -> Result<Document>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Database
impl<'de> Deserialize<'de> for Database
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Database
impl RefUnwindSafe for Database
impl Send for Database
impl Sync for Database
impl Unpin for Database
impl UnwindSafe for Database
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more