pub struct AnvilInstance { /* private fields */ }Expand description
An anvil CLI instance. Will close the instance when dropped.
Construct this using Anvil.
Implementations§
Source§impl AnvilInstance
impl AnvilInstance
Sourcepub const fn child_mut(&mut self) -> &mut Child
pub const fn child_mut(&mut self) -> &mut Child
Returns a mutable reference to the child process.
Sourcepub fn keys(&self) -> &[K256SecretKey]
pub fn keys(&self) -> &[K256SecretKey]
Returns the private keys used to instantiate this instance
Sourcepub fn first_key(&self) -> &K256SecretKey
pub fn first_key(&self) -> &K256SecretKey
Sourcepub fn nth_key(&self, idx: usize) -> Option<&K256SecretKey>
pub fn nth_key(&self, idx: usize) -> Option<&K256SecretKey>
Returns the private key for the given index.
Sourcepub fn ws_endpoint(&self) -> String
pub fn ws_endpoint(&self) -> String
Returns the Websocket endpoint of this instance
Sourcepub fn endpoint_url(&self) -> Url
pub fn endpoint_url(&self) -> Url
Returns the HTTP endpoint url of this instance
Sourcepub fn ws_endpoint_url(&self) -> Url
pub fn ws_endpoint_url(&self) -> Url
Returns the Websocket endpoint url of this instance
Sourcepub fn wallet(&self) -> Option<EthereumWallet>
pub fn wallet(&self) -> Option<EthereumWallet>
Returns the EthereumWallet of this instance generated from anvil dev accounts.
Trait Implementations§
Source§impl Debug for AnvilInstance
impl Debug for AnvilInstance
Auto Trait Implementations§
impl Freeze for AnvilInstance
impl !RefUnwindSafe for AnvilInstance
impl Send for AnvilInstance
impl Sync for AnvilInstance
impl Unpin for AnvilInstance
impl !UnwindSafe for AnvilInstance
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