Learn BDK – Bitcoin Dev Kit
Here we continue trying out BDK and learning to use it with Rust : By the end of this article our code will do the following : During testing I had this “Dust” error, so let’s just cover that first… BDK – Error: OutputBelowDustLimit(0) When testing on Testnet you may come across errors with the […]
Result v Option for Error Handling in Rust
Error handling is a crucial aspect of writing robust and reliable code. In Rust, two common types for representing potential errors are Option and Result. While both are useful, there are situations where using Result provides a more expressive and idiomatic way to handle errors, especially when dealing with functions that can fail due to […]
How to implement a method for an enum in Rust
In Rust, an enum can contain variants that allow different types or associated data with each variant. You can define functions that operate on these associated data by implementing methods for the enum. Note the enum + impl rater than the common struct + impl Webdock Fast Cloud VPS Linux Hosting Example code: In this […]
Bitwise Operators in Rust
Bitwise operators in Rust allow manipulation of individual bits in binary representations of data. They are useful for low-level operations like setting or clearing specific bits, creating bitmasks, and optimizing algorithms. Rust provides bitwise AND, OR, XOR, left shift, and right shift operators for efficient bit-level manipulation. Webdock – Fast Cloud VPS Linux Hosting Lets’s […]