pub struct CustomProcessBuilder<N, C> { /* private fields */ }Expand description
A node configuration builder, used to build a [NodeConfig] declaratively with fields validation.
Implementations§
Source§impl CustomProcessBuilder<WithOutName, WithOutCmd>
impl CustomProcessBuilder<WithOutName, WithOutCmd>
pub fn new() -> CustomProcessBuilder<WithOutName, WithOutCmd>
Source§impl<C: Cmd> CustomProcessBuilder<WithOutName, C>
impl<C: Cmd> CustomProcessBuilder<WithOutName, C>
Source§impl CustomProcessBuilder<WithName, WithOutCmd>
impl CustomProcessBuilder<WithName, WithOutCmd>
Sourcepub fn with_command<T>(
self,
command: T,
) -> CustomProcessBuilder<WithName, WithCmd>
pub fn with_command<T>( self, command: T, ) -> CustomProcessBuilder<WithName, WithCmd>
Set the command that will be executed to spawn the process.
Source§impl CustomProcessBuilder<WithName, WithCmd>
impl CustomProcessBuilder<WithName, WithCmd>
Sourcepub fn with_image<T>(self, image: T) -> Self
pub fn with_image<T>(self, image: T) -> Self
Set the image that will be used for the node (only podman/k8s).
Sourcepub fn with_args(self, args: Vec<Arg>) -> Self
pub fn with_args(self, args: Vec<Arg>) -> Self
Set the arguments that will be used when spawn the process.
Sourcepub fn with_env(self, env: Vec<impl Into<EnvVar>>) -> Self
pub fn with_env(self, env: Vec<impl Into<EnvVar>>) -> Self
Set the environment variables that will be used when spawn the process.
Sourcepub fn build(self) -> Result<CustomProcess, (String, Vec<Error>)>
pub fn build(self) -> Result<CustomProcess, (String, Vec<Error>)>
Seals the builder and returns a CustomProcess if there are no validation errors, else returns errors.
Trait Implementations§
Auto Trait Implementations§
impl<N, C> Freeze for CustomProcessBuilder<N, C>
impl<N, C> RefUnwindSafe for CustomProcessBuilder<N, C>where
N: RefUnwindSafe,
C: RefUnwindSafe,
impl<N, C> Send for CustomProcessBuilder<N, C>
impl<N, C> Sync for CustomProcessBuilder<N, C>
impl<N, C> Unpin for CustomProcessBuilder<N, C>
impl<N, C> UnwindSafe for CustomProcessBuilder<N, C>where
N: UnwindSafe,
C: 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