pub struct BitcoinD {
pub client: Client,
pub params: ConnectParams,
/* private fields */
}
Expand description
Struct representing the bitcoind process with related information
Fields
client: Client
Rpc client linked to this bitcoind process
params: ConnectParams
Contains information to connect to this node
Implementations
sourceimpl BitcoinD
impl BitcoinD
sourcepub fn new<S: AsRef<OsStr>>(exe: S) -> Result<BitcoinD, Error>
pub fn new<S: AsRef<OsStr>>(exe: S) -> Result<BitcoinD, Error>
Launch the bitcoind process from the given exe
executable with default args.
Waits for the node to be ready to accept connections before returning
sourcepub fn with_conf<S: AsRef<OsStr>>(
exe: S,
conf: &Conf<'_>
) -> Result<BitcoinD, Error>
pub fn with_conf<S: AsRef<OsStr>>(
exe: S,
conf: &Conf<'_>
) -> Result<BitcoinD, Error>
Launch the bitcoind process from the given exe
executable with given Conf param
sourcepub fn rpc_url(&self) -> String
pub fn rpc_url(&self) -> String
Returns the rpc URL including the schema eg. http://127.0.0.1:44842
sourcepub fn rpc_url_with_wallet<T: AsRef<str>>(&self, wallet_name: T) -> String
pub fn rpc_url_with_wallet<T: AsRef<str>>(&self, wallet_name: T) -> String
Returns the rpc URL including the schema and the given wallet_name
eg. http://127.0.0.1:44842/wallet/my_wallet
sourcepub fn p2p_connect(&self, listen: bool) -> Option<P2P>
pub fn p2p_connect(&self, listen: bool) -> Option<P2P>
Returns the P2P enum to connect to this node p2p port
sourcepub fn stop(&mut self) -> Result<ExitStatus, Error>
pub fn stop(&mut self) -> Result<ExitStatus, Error>
Stop the node, waiting correct process termination
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for BitcoinD
impl Send for BitcoinD
impl Sync for BitcoinD
impl Unpin for BitcoinD
impl !UnwindSafe for BitcoinD
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more