Enum rust_releases_io::Document [−][src]
Expand description
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.
Tuple Fields of LocalPath
0: PathBuf
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.