pub struct RethInstance { /* private fields */ }
Expand description
A Reth instance. Will close the instance when dropped.
Construct this using Reth
.
Implementations§
source§impl RethInstance
impl RethInstance
sourcepub const fn p2p_port(&self) -> Option<u16>
pub const fn p2p_port(&self) -> Option<u16>
Returns the p2p port of this instance.
If discovery is disabled, this will be None
.
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 fn stdout(&mut self) -> Result<ChildStdout, NodeError>
pub fn stdout(&mut self) -> Result<ChildStdout, NodeError>
Takes the stdout contained in the child process.
This leaves a None
in its place, so calling methods that require a stdout to be present
will fail if called after this.
Trait Implementations§
source§impl Debug for RethInstance
impl Debug for RethInstance
Auto Trait Implementations§
impl !Freeze for RethInstance
impl RefUnwindSafe for RethInstance
impl Send for RethInstance
impl Sync for RethInstance
impl Unpin for RethInstance
impl UnwindSafe for RethInstance
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