pub struct GethInstance { /* private fields */ }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 ipc_endpoint(&self) -> String
pub fn ipc_endpoint(&self) -> String
Returns the IPC 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 const fn data_dir(&self) -> Option<&PathBuf>
pub const fn data_dir(&self) -> Option<&PathBuf>
Returns the path to this instances’ data directory
Sourcepub const fn genesis(&self) -> Option<&Genesis>
pub const fn genesis(&self) -> Option<&Genesis>
Returns the genesis configuration used to configure this instance
Sourcepub const fn clique_private_key(&self) -> Option<&SigningKey>
👎Deprecated: clique support was removed in geth >=1.14
pub const fn clique_private_key(&self) -> Option<&SigningKey>
clique support was removed in geth >=1.14
Returns the private key used to configure clique on this instance
Sourcepub fn stderr(&mut self) -> Result<ChildStderr, NodeError>
pub fn stderr(&mut self) -> Result<ChildStderr, NodeError>
Takes the stderr contained in the child process.
Stderr is available only when Geth::keep_stderr was set. This leaves None in its
place, so later calls that require stderr return NodeError::NoStderr.
Sourcepub fn wait_to_add_peer(&mut self, id: &str) -> Result<(), NodeError>
pub fn wait_to_add_peer(&mut self, id: &str) -> Result<(), NodeError>
Blocks until geth adds the specified peer, using a 20-second deadline checked between complete stderr lines. A live process that emits no newline can block past the deadline.
Requires Geth::keep_stderr to have been set and Self::stderr not to have taken the
handle.
Trait Implementations§
Source§impl Debug for GethInstance
impl Debug for GethInstance
Source§impl Drop for GethInstance
impl Drop for GethInstance
Auto Trait Implementations§
impl !Freeze for GethInstance
impl RefUnwindSafe for GethInstance
impl Send for GethInstance
impl Sync for GethInstance
impl Unpin for GethInstance
impl UnsafeUnpin 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
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> ⓘ
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> ⓘ
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 moreSource§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
Source§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 1136 bytes