pub struct RepositoryBuilder<'a> { /* private fields */ }Expand description
A builder to simplify construction of TUF repositories containing Fuchsia packages.
Implementations§
Source§impl<'a> RepositoryBuilder<'a>
impl<'a> RepositoryBuilder<'a>
Sourcepub fn from_template_dir(path: impl Into<PathBuf>) -> Self
pub fn from_template_dir(path: impl Into<PathBuf>) -> Self
Creates a new RepositoryBuilder from a template TUF repository dir.
Sourcepub fn add_package(self, package: impl Into<MaybeOwned<'a, Package>>) -> Self
pub fn add_package(self, package: impl Into<MaybeOwned<'a, Package>>) -> Self
Adds a package (or a reference to one) to the repository.
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, the blobs will be exposed at “/blobs/{type}/”.
Sourcepub async fn build(self) -> Result<Repository, Error>
pub async fn build(self) -> Result<Repository, Error>
Builds the repository.
Trait Implementations§
Source§impl<'a> Debug for RepositoryBuilder<'a>
impl<'a> Debug for RepositoryBuilder<'a>
Auto Trait Implementations§
impl<'a> Freeze for RepositoryBuilder<'a>
impl<'a> RefUnwindSafe for RepositoryBuilder<'a>
impl<'a> Send for RepositoryBuilder<'a>
impl<'a> Sync for RepositoryBuilder<'a>
impl<'a> Unpin for RepositoryBuilder<'a>
impl<'a> UnwindSafe for RepositoryBuilder<'a>
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
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to [Self]§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>
§impl<T> IntoAny for T
impl<T> IntoAny for T
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T, U> TryIntoExt<U> for Twhere
U: TryFromExt<T>,
impl<T, U> TryIntoExt<U> for Twhere
U: TryFromExt<T>,
type Error = <U as TryFromExt<T>>::Error
§fn try_into_ext(self) -> Result<U, <T as TryIntoExt<U>>::Error>
fn try_into_ext(self) -> Result<U, <T as TryIntoExt<U>>::Error>
Tries to perform the conversion.