[−][src]Trait mongodb_h2co3::gridfs::ThreadedStore
Required Methods
fn with_db(db: Database) -> Store
A new GridFS store within the database with prefix 'fs'.
fn with_prefix(db: Database, prefix: String) -> Store
A new GridFS store within the database with a specified prefix.
fn create(&self, name: String) -> Result<File>
Creates a new file.
fn open(&self, name: String) -> Result<File>
Opens a file by filename.
fn open_id(&self, id: ObjectId) -> Result<File>
Opens a file by object ID.
fn find(
&self,
filter: Option<Document>,
options: Option<FindOptions>
) -> Result<FileCursor>
&self,
filter: Option<Document>,
options: Option<FindOptions>
) -> Result<FileCursor>
Returns a cursor to all file documents matching the provided filter.
fn remove(&self, name: String) -> Result<()>
Removes a file from GridFS by filename.
fn remove_id(&self, id: ObjectId) -> Result<()>
Removes a file from GridFS by object ID.
fn put(&self, name: String) -> Result<()>
Inserts a new file from local into GridFS.
fn get(&self, name: String) -> Result<()>
Retrieves a file from GridFS into local storage.
Implementors
impl ThreadedStore for Store
[src]
impl ThreadedStore for Store
fn with_db(db: Database) -> Store
[src]
fn with_db(db: Database) -> Store
fn with_prefix(db: Database, prefix: String) -> Store
[src]
fn with_prefix(db: Database, prefix: String) -> Store
fn create(&self, name: String) -> Result<File>
[src]
fn create(&self, name: String) -> Result<File>
fn open(&self, name: String) -> Result<File>
[src]
fn open(&self, name: String) -> Result<File>
fn open_id(&self, id: ObjectId) -> Result<File>
[src]
fn open_id(&self, id: ObjectId) -> Result<File>
fn find(
&self,
filter: Option<Document>,
options: Option<FindOptions>
) -> Result<FileCursor>
[src]
fn find(
&self,
filter: Option<Document>,
options: Option<FindOptions>
) -> Result<FileCursor>
fn remove(&self, name: String) -> Result<()>
[src]
fn remove(&self, name: String) -> Result<()>
fn remove_id(&self, id: ObjectId) -> Result<()>
[src]
fn remove_id(&self, id: ObjectId) -> Result<()>
fn put(&self, name: String) -> Result<()>
[src]
fn put(&self, name: String) -> Result<()>
fn get(&self, name: String) -> Result<()>
[src]
fn get(&self, name: String) -> Result<()>