Trait mongodb::gridfs::ThreadedStore [] [src]

pub trait ThreadedStore {
    fn with_db(db: Database) -> Store;
fn with_prefix(db: Database, prefix: String) -> Store;
fn create(&self, name: String) -> Result<File>;
fn open(&self, name: String) -> Result<File>;
fn open_id(&self, id: ObjectId) -> Result<File>;
fn find(
        &self,
        filter: Option<Document>,
        options: Option<FindOptions>
    ) -> Result<FileCursor>;
fn remove(&self, name: String) -> Result<()>;
fn remove_id(&self, id: ObjectId) -> Result<()>;
fn put(&self, name: String) -> Result<()>;
fn get(&self, name: String) -> Result<()>; }

Required Methods

A new GridFS store within the database with prefix 'fs'.

A new GridFS store within the database with a specified prefix.

Creates a new file.

Opens a file by filename.

Opens a file by object ID.

Returns a cursor to all file documents matching the provided filter.

Removes a file from GridFS by filename.

Removes a file from GridFS by object ID.

Inserts a new file from local into GridFS.

Retrieves a file from GridFS into local storage.

Implementors