[][src]Enum mongo_file_center::FileData

pub enum FileData {
    Collection(Vec<u8>),
    GridFS(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(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 Sync for FileData

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

impl<T, U> TryInto 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, U> TryInto for T where
    U: TryFrom<T>, 

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

impl<T> Same for T

type Output = T

Should always be Self