pub struct Barreleye { /* private fields */ }

Implementations§

Examples found in repository?
examples/create_new_label.rs (line 8)
4
5
6
7
8
9
10
11
12
13
async fn main() {
	// Define the client
	let url = "http://localhost:22775";
	let api_key = Some("7f9e9182-122d-45e1-b4be-d73fc99e9bc9");
	let client = Barreleye::new(url, api_key);

	// Create a new label
	let label = Label::create(&client, "Label #1", "Sample label").await;
	println!("{:?}", label);
}
More examples
Hide additional examples
examples/get_address_info.rs (line 8)
4
5
6
7
8
9
10
11
12
13
14
15
16
async fn main() {
	// Define the client
	let url = "http://localhost:22775";
	let api_key = None;
	let client = Barreleye::new(url, api_key);

	// Get info about the address
	match Info::get(&client, "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa").await {
		Ok(info) => println!("{:?}", info),
		Err(Error::Unavailable) => println!("Is Barreleye server running?"),
		Err(e) => println!("Error: {e}"),
	}
}
examples/create_new_network.rs (line 8)
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
async fn main() {
	// Define the client
	let url = "http://localhost:22775";
	let api_key = Some("7f9e9182-122d-45e1-b4be-d73fc99e9bc9");
	let client = Barreleye::new(url, api_key);

	// Create a new network
	let rpc_endpoint = "http://127.0.0.1:8545";
	let network = Network::create(
		&client,
		"Ethereum",         // name
		"Ethereum",         // tag
		Env::Mainnet,       // env
		Blockchain::Evm,    // blockchain
		1,                  // chain id
		12_000,             // block time in milliseconds
		vec![rpc_endpoint], // rpc endpoints
		100,                // rate limiter (requests per second)
	)
	.await;

	println!("{:?}", network);
}

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more