Struct ethers_core::utils::GethInstance
source · pub struct GethInstance { /* private fields */ }
Available on non-WebAssembly only.
Expand description
A geth instance. Will close the instance when dropped.
Construct this using Geth
.
Implementations§
source§impl GethInstance
impl GethInstance
sourcepub fn ws_endpoint(&self) -> String
pub fn ws_endpoint(&self) -> String
Returns the Websocket endpoint of this instance
sourcepub fn genesis(&self) -> &Option<Genesis>
pub fn genesis(&self) -> &Option<Genesis>
Returns the genesis configuration used to configure this instance
sourcepub fn clique_private_key(&self) -> &Option<SigningKey>
pub fn clique_private_key(&self) -> &Option<SigningKey>
Returns the private key used to configure clique on this instance
sourcepub fn stderr(&mut self) -> Result<ChildStderr, GethInstanceError>
pub fn stderr(&mut self) -> Result<ChildStderr, GethInstanceError>
Takes the stderr contained in the child process.
This leaves a None
in its place, so calling methods that require a stderr to be present
will fail if called after this.
sourcepub fn wait_to_add_peer(&mut self, id: H256) -> Result<(), GethInstanceError>
pub fn wait_to_add_peer(&mut self, id: H256) -> Result<(), GethInstanceError>
Blocks until geth adds the specified peer, using 20s as the timeout.
Requires the stderr to be present in the GethInstance
.
Trait Implementations§
source§impl Debug for GethInstance
impl Debug for GethInstance
Auto Trait Implementations§
impl RefUnwindSafe for GethInstance
impl Send for GethInstance
impl Sync for GethInstance
impl Unpin for GethInstance
impl UnwindSafe for GethInstance
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