Enum manifesta::DocumentSource[][src]

pub enum DocumentSource {
    LocalPath(PathBuf),
    RemoteCached(PathBufVec<u8>),
}

A DocumentSource represents a location from which a document can be accessed.

Variants

LocalPath(PathBuf)

To be used when the document is present on disk (e.g. if pulled from the cache), or accessible locally.

RemoteCached(PathBufVec<u8>)

To be used when the document has just been downloaded from a remote. The PathBuf represents the path to which the document contents were written (as cache). The Vec<u8> represents the document contents, so the just downloaded file doesn't have to be written to the cache location, and read again.

Implementations

impl DocumentSource[src]

pub fn load(&self) -> TResult<Vec<u8>>[src]

Trait Implementations

impl Debug for DocumentSource[src]

impl Eq for DocumentSource[src]

impl PartialEq<DocumentSource> for DocumentSource[src]

impl StructuralEq for DocumentSource[src]

impl StructuralPartialEq for DocumentSource[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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.