pub struct HardhatCommand<C: HardhatCommandContext> { /* private fields */ }Implementations§
Source§impl<C> HardhatCommand<C>where
C: HardhatCommandContext,
impl<C> HardhatCommand<C>where
C: HardhatCommandContext,
pub fn new() -> Result<Self>
Sourcepub fn new_with<P>(hardhat_root: P) -> Result<Self>
pub fn new_with<P>(hardhat_root: P) -> Result<Self>
Create new hardhat network instance with hardhat project root path.
Sourcepub fn is_started(&self) -> bool
pub fn is_started(&self) -> bool
Returns if network started.
Sourcepub async fn start(&mut self) -> Result<bool>
pub async fn start(&mut self) -> Result<bool>
Start hardhat network child process.
If already started, returns false.
Sourcepub async fn stop(&mut self) -> Result<()>
pub async fn stop(&mut self) -> Result<()>
Stop hardhat network.
If hardhat network already stopped, returns HardhatError::HardhatNetworkStopped
Sourcepub async fn status(&mut self) -> Result<ExitStatus>
pub async fn status(&mut self) -> Result<ExitStatus>
Wait until child process stopped and returns status code.
Trait Implementations§
Source§impl<C: Debug + HardhatCommandContext> Debug for HardhatCommand<C>
impl<C: Debug + HardhatCommandContext> Debug for HardhatCommand<C>
Source§impl<C> Drop for HardhatCommand<C>where
C: HardhatCommandContext,
impl<C> Drop for HardhatCommand<C>where
C: HardhatCommandContext,
Auto Trait Implementations§
impl<C> Freeze for HardhatCommand<C>
impl<C> !RefUnwindSafe for HardhatCommand<C>
impl<C> Send for HardhatCommand<C>where
C: Send,
impl<C> Sync for HardhatCommand<C>where
C: Sync,
impl<C> Unpin for HardhatCommand<C>where
C: Unpin,
impl<C> !UnwindSafe for HardhatCommand<C>
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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