pub struct CacheManifestBuilder { /* private fields */ }Expand description
Builder for CacheManifest. Mirrors v1’s
super::super::builders::CacheManifestBuilder API verbatim so
the consumer-side migration is a literal s/v1::/v2::/ swap.
Implementations§
Source§impl CacheManifestBuilder
impl CacheManifestBuilder
Sourcepub fn new(
service_name: impl Into<String>,
service_version: impl Into<String>,
) -> Self
pub fn new( service_name: impl Into<String>, service_version: impl Into<String>, ) -> Self
Begin a v2 manifest for service_name at service_version.
Pre-populates CacheManifest::broker_envelope_version = "v2"
plus the unix-ms created_at / last_active timestamps so the
callee only has to chain .root(...) calls.
Sourcepub fn root(self, kind: CacheRootKind, path: impl Into<String>) -> Self
pub fn root(self, kind: CacheRootKind, path: impl Into<String>) -> Self
Append one cache root of the given kind at path.
Sourcepub fn broker_instance(self, instance: impl Into<String>) -> Self
pub fn broker_instance(self, instance: impl Into<String>) -> Self
Set the broker instance label (e.g. "shared" or an
explicit-instance trust group).
Sourcepub fn bundle_id(self, bundle_id: impl Into<String>) -> Self
pub fn bundle_id(self, bundle_id: impl Into<String>) -> Self
Set the manifest bundle id (deploy hint for multi-service bundles).
Sourcepub fn build(self) -> CacheManifest
pub fn build(self) -> CacheManifest
Finalize into a CacheManifest without writing anywhere.
Sourcepub fn publish(self) -> Result<PathBuf, ManifestError>
pub fn publish(self) -> Result<PathBuf, ManifestError>
Build + write into the platform’s central registry, returning the written path.
§Errors
See write_to_central_v2.
Sourcepub fn publish_in(self, registry_dir: &Path) -> Result<PathBuf, ManifestError>
pub fn publish_in(self, registry_dir: &Path) -> Result<PathBuf, ManifestError>
Testable variant of Self::publish with an explicit registry
directory.
§Errors
Trait Implementations§
Source§impl Clone for CacheManifestBuilder
impl Clone for CacheManifestBuilder
Source§fn clone(&self) -> CacheManifestBuilder
fn clone(&self) -> CacheManifestBuilder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for CacheManifestBuilder
impl RefUnwindSafe for CacheManifestBuilder
impl Send for CacheManifestBuilder
impl Sync for CacheManifestBuilder
impl Unpin for CacheManifestBuilder
impl UnsafeUnpin for CacheManifestBuilder
impl UnwindSafe for CacheManifestBuilder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync 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>
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>
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