Type Definition mongodb::gridfs::Store
[−]
[src]
type Store = Arc<StoreInner>;
Alias for a thread-safe GridFS instance.
Trait Implementations
impl ThreadedStore for Store
[src]
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.