[][src]Enum mongo_file_center::FileData

pub enum FileData {
    Collection(Vec<u8>),
    GridFS(Box<File>),
}

To represent the file data retrieved from MongoDB.

Variants

Collection(Vec<u8>)

Data from collections are buffered in memory as a Vec instance.

GridFS(Box<File>)

Data from GridFS are represented by a GridFS file.

Methods

impl FileData[src]

pub fn into_vec(self) -> Result<Vec<u8>, Error>[src]

Turn into a Vec instance.

pub fn into_vec_unchecked(self) -> Vec<u8>[src]

Turn into a Vec instance without wrapping. This method is usually used when you are sure the data is from a collection.

Trait Implementations

impl Debug for FileData[src]

Auto Trait Implementations

impl Send for FileData

impl Unpin for FileData

impl Sync for FileData

impl !UnwindSafe for FileData

impl !RefUnwindSafe for FileData

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> Same<T> for T

type Output = T

Should always be Self