Crate Usage
You can easily add Subscan
to your code and use its results in your application. Since Subscan
works asynchronously, you need to use it in async
code blocks. We recommend using Tokio as the async runtime
This chapter provides step-by-step guidance on how to integrate Subscan
into your code. For more detailed usage and additional code examples, visit the project's docs.rs page or check the examples/ folder in the repository
-
Add
subscan
crate into your project dependencies~$ cargo add subscan
-
Create a new instance and start to use it
#[tokio::main] async fn main() { // set module conccurrency to 1 // set HTTP timeout to 120 let config = SubscanConfig { concurrency: 1, timeout: 120, ..Default::default() }; let subscan = Subscan::from(config); let result = subscan.scan("example.com").await; for item in result.items { // do something with item } }