pub enum DocumentSource {
LocalPath(PathBuf),
RemoteCached(PathBuf, Vec<u8>),
}
Expand description
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(PathBuf, Vec<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§
Trait Implementations§
Source§impl Debug for DocumentSource
impl Debug for DocumentSource
Source§impl PartialEq for DocumentSource
impl PartialEq for DocumentSource
impl Eq for DocumentSource
impl StructuralPartialEq for DocumentSource
Auto Trait Implementations§
impl Freeze for DocumentSource
impl RefUnwindSafe for DocumentSource
impl Send for DocumentSource
impl Sync for DocumentSource
impl Unpin for DocumentSource
impl UnwindSafe for DocumentSource
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more