Struct zombienet_provider::shared::types::SpawnNodeOptions
source · pub struct SpawnNodeOptions {
pub name: String,
pub image: Option<String>,
pub resources: Option<Resources>,
pub program: String,
pub args: Vec<String>,
pub env: Vec<(String, String)>,
pub injected_files: Vec<TransferedFile>,
pub created_paths: Vec<PathBuf>,
pub db_snapshot: Option<AssetLocation>,
pub port_mapping: Option<HashMap<Port, Port>>,
}
Fields§
§name: String
Name of the node
image: Option<String>
Image of the node (IFF is supported by the provider)
resources: Option<Resources>
Resources to apply to the node (IFF is supported by the provider)
program: String
Main command to execute
args: Vec<String>
Arguments to pass to the main command
env: Vec<(String, String)>
Environment to set when running the program
injected_files: Vec<TransferedFile>
Files to inject at startup
created_paths: Vec<PathBuf>
Paths to create before start the node (e.g keystore)
should be created with create_dir_all
in order
to create the full path even when we have missing parts
db_snapshot: Option<AssetLocation>
Database snapshot to be injected (should be a tgz file) Could be a local or remote asset
port_mapping: Option<HashMap<Port, Port>>
Implementations§
source§impl SpawnNodeOptions
impl SpawnNodeOptions
pub fn new<S>(name: S, program: S) -> Self
pub fn image<S>(self, image: S) -> Self
pub fn resources(self, resources: Resources) -> Self
pub fn db_snapshot(self, db_snap: Option<AssetLocation>) -> Self
pub fn args<S, I>(self, args: I) -> Self
pub fn env<S, I>(self, env: I) -> Self
pub fn injected_files<I>(self, injected_files: I) -> Selfwhere
I: IntoIterator<Item = TransferedFile>,
pub fn created_paths<P, I>(self, created_paths: I) -> Self
pub fn port_mapping(self, ports: HashMap<Port, Port>) -> Self
Trait Implementations§
source§impl Clone for SpawnNodeOptions
impl Clone for SpawnNodeOptions
source§fn clone(&self) -> SpawnNodeOptions
fn clone(&self) -> SpawnNodeOptions
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for SpawnNodeOptions
impl RefUnwindSafe for SpawnNodeOptions
impl Send for SpawnNodeOptions
impl Sync for SpawnNodeOptions
impl Unpin for SpawnNodeOptions
impl UnwindSafe for SpawnNodeOptions
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§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>
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