mirror of https://github.com/zkat/cacache-rs.git
feat(put): privatize Put and PutOpts fields
This commit is contained in:
parent
87adc8cf9f
commit
7f1602e28f
22
src/put.rs
22
src/put.rs
|
|
@ -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 {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue