pub struct CacheManifestBuilder { /* private fields */ }Expand description
Builder for a frozen v1 cache manifest.
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 manifest for this application-selected service and version.
Sourcepub fn broker_instance(self, instance: impl Into<String>) -> Self
pub fn broker_instance(self, instance: impl Into<String>) -> Self
Record the application-selected broker-instance label.
Sourcepub fn root(self, kind: CacheRootKind, path: impl Into<String>) -> Self
pub fn root(self, kind: CacheRootKind, path: impl Into<String>) -> Self
Append one root, retaining caller order in the v1 record.
Sourcepub fn build(self) -> Result<CacheManifest, DaemonRegistrationError>
pub fn build(self) -> Result<CacheManifest, DaemonRegistrationError>
Build and SHA-256 seal this manifest without persisting it.
Sourcepub fn publish(self) -> Result<PathBuf, DaemonRegistrationError>
pub fn publish(self) -> Result<PathBuf, DaemonRegistrationError>
Build, seal, and atomically publish this manifest in the default registry.
Sourcepub fn publish_in(
self,
registry_dir: impl AsRef<Path>,
) -> Result<PathBuf, DaemonRegistrationError>
pub fn publish_in( self, registry_dir: impl AsRef<Path>, ) -> Result<PathBuf, DaemonRegistrationError>
Build, seal, and atomically publish this manifest in registry_dir.
Trait Implementations§
Source§impl Clone for CacheManifestBuilder
impl Clone for CacheManifestBuilder
Auto 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
Mutably borrows from an owned value. Read more
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>
Convert
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>
Convert
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)
Convert
&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)
Convert
&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> ⓘ
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