pub struct FileSystemRepositoryBuilder { /* private fields */ }Expand description
A builder to create a repository contained on the local file system.
Implementations§
Source§impl FileSystemRepositoryBuilder
impl FileSystemRepositoryBuilder
Sourcepub fn new(metadata_repo_path: Utf8PathBuf, blob_repo_path: Utf8PathBuf) -> Self
pub fn new(metadata_repo_path: Utf8PathBuf, blob_repo_path: Utf8PathBuf) -> Self
Creates a FileSystemRepositoryBuilder where the TUF metadata is stored in
metadata_repo_path, and the blobs are stored in blob_repo_path.
Sourcepub fn copy_mode(self, copy_mode: CopyMode) -> Self
pub fn copy_mode(self, copy_mode: CopyMode) -> Self
Select which CopyMode to use when copying files into the repository.
Sourcepub fn alias(self, alias: String) -> Self
pub fn alias(self, alias: String) -> Self
alias this repository to this name when this repository is registered on a target.
Sourcepub fn aliases(self, aliases: impl IntoIterator<Item = String>) -> Self
pub fn aliases(self, aliases: impl IntoIterator<Item = String>) -> Self
alias this repository to these names when this repository is registered on a target.
Sourcepub fn delivery_blob_type(self, delivery_blob_type: DeliveryBlobType) -> Self
pub fn delivery_blob_type(self, delivery_blob_type: DeliveryBlobType) -> Self
Set the type of delivery blob to generate when copying blobs into the repository.
Sourcepub fn blob_repo_path(self, blob_repo_path: Utf8PathBuf) -> Self
pub fn blob_repo_path(self, blob_repo_path: Utf8PathBuf) -> Self
Set the path to the blob repo.
Sourcepub fn build(self) -> FileSystemRepository
pub fn build(self) -> FileSystemRepository
Build a FileSystemRepository.
Auto Trait Implementations§
impl Freeze for FileSystemRepositoryBuilder
impl RefUnwindSafe for FileSystemRepositoryBuilder
impl Send for FileSystemRepositoryBuilder
impl Sync for FileSystemRepositoryBuilder
impl Unpin for FileSystemRepositoryBuilder
impl UnwindSafe for FileSystemRepositoryBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more