pub struct HDOracleEmulator { /* private fields */ }Expand description
hierarchical deterministic oracle emulator
Implementations§
Source§impl HDOracleEmulator
impl HDOracleEmulator
Sourcepub fn new(root: ExtendedPrivKey, debug: bool) -> Self
pub fn new(root: ExtendedPrivKey, debug: bool) -> Self
create a new HDOracleEmulator
if debug is set, runs in a “single threaded” mode where we can observe errors on connections rather than ignoring them.
Sourcepub async fn bind<A: ToSocketAddrs>(self, a: A) -> Result<()>
pub async fn bind<A: ToSocketAddrs>(self, a: A) -> Result<()>
binds a HDOracleEmulator to a socket interface and runs the server
This will only return when debug = false if The TcpListener fails. When debug = true, then we join each connection one at a time and return any errors.
Trait Implementations§
Source§impl Clone for HDOracleEmulator
impl Clone for HDOracleEmulator
Source§fn clone(&self) -> HDOracleEmulator
fn clone(&self) -> HDOracleEmulator
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for HDOracleEmulator
impl RefUnwindSafe for HDOracleEmulator
impl Send for HDOracleEmulator
impl Sync for HDOracleEmulator
impl Unpin for HDOracleEmulator
impl UnwindSafe for HDOracleEmulator
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