Enum rust_releases_io::Document [−][src]
A Document
represents a resource which can be used as an input to construct a ReleaseIndex
.
Variants
LocalPath(PathBuf)
This variant can be used when the document is present on disk (e.g. if pulled from the cache), or accessible locally by following a path.
This variant can be used when the document is present in memory
This variant can be used when the document has just been downloaded from a remote server,
but had to be both written to disk, and used immediately (often in combination with something
that implements Write
).
The PathBuf
represents the path to which the document contents were written (e.g. 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 Document
[src]
Trait Implementations
impl Debug for Document
[src]
impl Eq for Document
[src]
impl PartialEq<Document> for Document
[src]
impl StructuralEq for Document
[src]
impl StructuralPartialEq for Document
[src]
Auto Trait Implementations
impl RefUnwindSafe for Document
impl Send for Document
impl Sync for Document
impl Unpin for Document
impl UnwindSafe for Document
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,