pub struct BootstrapSequence<S: BootstrapState> { /* private fields */ }Expand description
Type-safe bootstrap sequence builder.
Uses the type state pattern to ensure initialization happens in the correct order: Profile -> Secrets -> Paths
Implementations§
Source§impl BootstrapSequence<Uninitialized>
impl BootstrapSequence<Uninitialized>
Sourcepub fn with_profile(
self,
path: &Path,
) -> Result<BootstrapSequence<ProfileInitialized>>
pub fn with_profile( self, path: &Path, ) -> Result<BootstrapSequence<ProfileInitialized>>
Initializes the profile from a path.
This must be called first before secrets or paths can be initialized.
Sourcepub const fn skip_profile(self) -> Self
pub const fn skip_profile(self) -> Self
Skips profile initialization (for commands that don’t need it).
Source§impl BootstrapSequence<ProfileInitialized>
impl BootstrapSequence<ProfileInitialized>
Sourcepub fn with_secrets(self) -> Result<BootstrapSequence<SecretsInitialized>>
pub fn with_secrets(self) -> Result<BootstrapSequence<SecretsInitialized>>
Initializes secrets from the loaded profile.
Requires profile to be initialized first.
Sourcepub const fn skip_secrets(self) -> Self
pub const fn skip_secrets(self) -> Self
Skips secrets initialization but allows moving forward.
Useful for commands that need profile but not secrets.
Source§impl BootstrapSequence<SecretsInitialized>
impl BootstrapSequence<SecretsInitialized>
Sourcepub fn with_paths(self) -> Result<BootstrapSequence<PathsInitialized>>
pub fn with_paths(self) -> Result<BootstrapSequence<PathsInitialized>>
Initializes application paths from the profile configuration.
Requires secrets to be initialized first.
Sourcepub fn with_paths_config(
self,
paths_config: &PathsConfig,
) -> Result<BootstrapSequence<PathsInitialized>>
pub fn with_paths_config( self, paths_config: &PathsConfig, ) -> Result<BootstrapSequence<PathsInitialized>>
Initializes paths with custom configuration.
Sourcepub const fn skip_paths(self) -> Self
pub const fn skip_paths(self) -> Self
Skips paths initialization.
Source§impl BootstrapSequence<PathsInitialized>
impl BootstrapSequence<PathsInitialized>
Sourcepub const fn complete(&self) -> BootstrapComplete
pub const fn complete(&self) -> BootstrapComplete
Returns a reference to indicate bootstrap is complete.
Trait Implementations§
Source§impl<S: Debug + BootstrapState> Debug for BootstrapSequence<S>
impl<S: Debug + BootstrapState> Debug for BootstrapSequence<S>
Source§impl Default for BootstrapSequence<Uninitialized>
impl Default for BootstrapSequence<Uninitialized>
Auto Trait Implementations§
impl<S> Freeze for BootstrapSequence<S>
impl<S> RefUnwindSafe for BootstrapSequence<S>where
S: RefUnwindSafe,
impl<S> Send for BootstrapSequence<S>where
S: Send,
impl<S> Sync for BootstrapSequence<S>where
S: Sync,
impl<S> Unpin for BootstrapSequence<S>where
S: Unpin,
impl<S> UnwindSafe for BootstrapSequence<S>where
S: UnwindSafe,
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