feat(put): privatize Put and PutOpts fields

This commit is contained in:
Kat Marchán 2019-06-30 23:21:37 -07:00
parent 87adc8cf9f
commit 7f1602e28f
No known key found for this signature in database
GPG Key ID: AEB529C08A3C7E9E
1 changed files with 11 additions and 11 deletions

View File

@ -27,13 +27,13 @@ where
/// Options and flags for opening a new cache file to write data into. /// Options and flags for opening a new cache file to write data into.
#[derive(Clone, Default)] #[derive(Clone, Default)]
pub struct PutOpts { pub struct PutOpts {
pub algorithm: Option<Algorithm>, pub(crate) algorithm: Option<Algorithm>,
pub sri: Option<Integrity>, pub(crate) sri: Option<Integrity>,
pub size: Option<usize>, pub(crate) size: Option<usize>,
pub time: Option<u128>, pub(crate) time: Option<u128>,
pub metadata: Option<Value>, pub(crate) metadata: Option<Value>,
pub uid: Option<Uid>, pub(crate) uid: Option<Uid>,
pub gid: Option<Gid>, pub(crate) gid: Option<Gid>,
} }
impl PutOpts { impl PutOpts {
@ -106,11 +106,11 @@ impl PutOpts {
/// A reference to an open file writing to the cache. /// A reference to an open file writing to the cache.
pub struct Put { pub struct Put {
pub cache: PathBuf, cache: PathBuf,
pub key: String, key: String,
pub written: usize, written: usize,
pub(crate) writer: write::Writer, pub(crate) writer: write::Writer,
pub opts: PutOpts, opts: PutOpts,
} }
impl Write for Put { impl Write for Put {