pub struct TestEnv { /* private fields */ }
Expand description
Represent a test environment with an elements node and an electrum server.
useful for testing only, wrapper over lwk_test_util::TestElectrumServer
Implementations§
source§impl TestEnv
impl TestEnv
pub fn new() -> TestEnv
pub fn generate(&self, blocks: u32)
pub fn height(&self) -> u64
pub fn send_to_address( &self, address: &Address, satoshi: u64, asset: Option<AssetId> ) -> Txid
pub fn issue_asset(&self, satoshi: u64) -> AssetId
pub fn get_new_address(&self) -> Arc<Address>
pub fn electrum_url(&self) -> String
Trait Implementations§
source§impl<T> LowerReturn<T> for TestEnv
impl<T> LowerReturn<T> for TestEnv
§type ReturnType = <TestEnv as FfiConverterArc<UniFfiTag>>::FfiType
type ReturnType = <TestEnv as FfiConverterArc<UniFfiTag>>::FfiType
The type that should be returned by scaffolding functions for this type. Read more
source§fn lower_return(obj: Self) -> Result<Self::ReturnType, RustBuffer>
fn lower_return(obj: Self) -> Result<Self::ReturnType, RustBuffer>
Lower this value for scaffolding function return Read more
const TYPE_ID_META: MetadataBuffer = _
Auto Trait Implementations§
impl !Freeze for TestEnv
impl !RefUnwindSafe for TestEnv
impl Send for TestEnv
impl Sync for TestEnv
impl Unpin for TestEnv
impl !UnwindSafe for TestEnv
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
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>
Converts
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>
Converts
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 more