pub struct FileSystemRepositoryBuilder<D> { /* private fields */ }Expand description
A builder to create a repository contained on the local file system.
Implementations§
Source§impl<D> FileSystemRepositoryBuilder<D>where
D: Pouf,
impl<D> FileSystemRepositoryBuilder<D>where
D: Pouf,
Sourcepub fn new<P: Into<PathBuf>>(local_path: P) -> Self
pub fn new<P: Into<PathBuf>>(local_path: P) -> Self
Create a new repository with the given local_path prefix.
Sourcepub fn metadata_prefix<P: Into<PathBuf>>(self, metadata_prefix: P) -> Self
pub fn metadata_prefix<P: Into<PathBuf>>(self, metadata_prefix: P) -> Self
The argument metadata_prefix is used to provide an alternate path where metadata is
stored on the repository. If None, this defaults to /. For example, if there is a TUF
repository at /usr/local/repo/, but all metadata is stored at /usr/local/repo/meta/,
then passing the arg Some("meta".into()) would cause root.json to be fetched from
/usr/local/repo/meta/root.json.
Sourcepub fn targets_prefix<P: Into<PathBuf>>(self, targets_prefix: P) -> Self
pub fn targets_prefix<P: Into<PathBuf>>(self, targets_prefix: P) -> Self
The argument targets_prefix is used to provide an alternate path where targets are
stored on the repository. If None, this defaults to /. For example, if there is a TUF
repository at /usr/local/repo/, but all targets are stored at /usr/local/repo/targets/,
then passing the arg Some("targets".into()) would cause hello-world to be fetched from
/usr/local/repo/targets/hello-world.
Sourcepub fn build(self) -> FileSystemRepository<D>
pub fn build(self) -> FileSystemRepository<D>
Build a FileSystemRepository.