diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/.lock b/static/rust/redstone/crypto_radix,network_radix/.lock similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/.lock rename to static/rust/redstone/crypto_radix,network_radix/.lock diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/crates.js b/static/rust/redstone/crypto_radix,network_radix/crates.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/crates.js rename to static/rust/redstone/crypto_radix,network_radix/crates.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/.lock b/static/rust/redstone/crypto_radix,network_radix/doc/.lock similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/.lock rename to static/rust/redstone/crypto_radix,network_radix/doc/.lock diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/crates.js b/static/rust/redstone/crypto_radix,network_radix/doc/crates.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/crates.js rename to static/rust/redstone/crypto_radix,network_radix/doc/crates.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/help.html b/static/rust/redstone/crypto_radix,network_radix/doc/help.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/help.html rename to static/rust/redstone/crypto_radix,network_radix/doc/help.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/all.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/all.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/all.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/all.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/aggregator/fn.aggregate_matrix.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/aggregator/fn.aggregate_matrix.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/aggregator/fn.aggregate_matrix.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/aggregator/fn.aggregate_matrix.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/aggregator/fn.aggregate_values.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/aggregator/fn.aggregate_values.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/aggregator/fn.aggregate_values.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/aggregator/fn.aggregate_values.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/aggregator/fn.make_value_signer_matrix.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/aggregator/fn.make_value_signer_matrix.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/aggregator/fn.make_value_signer_matrix.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/aggregator/fn.make_value_signer_matrix.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/aggregator/index.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/aggregator/index.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/aggregator/index.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/aggregator/index.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/aggregator/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/aggregator/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/aggregator/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/aggregator/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/aggregator/type.Matrix.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/aggregator/type.Matrix.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/aggregator/type.Matrix.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/aggregator/type.Matrix.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/config/index.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/config/index.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/config/index.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/config/index.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/config/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/config/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/config/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/config/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/config/struct.Config.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/config/struct.Config.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/config/struct.Config.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/config/struct.Config.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/index.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/index.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/index.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/index.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/processor/fn.make_processor_result.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/processor/fn.make_processor_result.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/processor/fn.make_processor_result.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/processor/fn.make_processor_result.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/processor/fn.process_payload.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/processor/fn.process_payload.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/processor/fn.process_payload.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/processor/fn.process_payload.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/processor/index.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/processor/index.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/processor/index.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/processor/index.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/processor/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/processor/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/processor/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/processor/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/processor_result/index.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/processor_result/index.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/processor_result/index.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/processor_result/index.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/processor_result/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/processor_result/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/processor_result/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/processor_result/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/processor_result/struct.ProcessorResult.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/processor_result/struct.ProcessorResult.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/processor_result/struct.ProcessorResult.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/processor_result/struct.ProcessorResult.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/validator/index.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/validator/index.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/validator/index.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/validator/index.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/validator/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/validator/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/validator/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/validator/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/validator/trait.Validator.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/validator/trait.Validator.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/validator/trait.Validator.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/core/validator/trait.Validator.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/index.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/crypto/index.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/index.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/crypto/index.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/keccak256/fn.keccak256.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/crypto/keccak256/fn.keccak256.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/keccak256/fn.keccak256.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/crypto/keccak256/fn.keccak256.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/keccak256/index.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/crypto/keccak256/index.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/keccak256/index.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/crypto/keccak256/index.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/keccak256/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/crypto/keccak256/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/keccak256/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/crypto/keccak256/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/recover/crypto256/fn.recover_public_key.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/crypto/recover/crypto256/fn.recover_public_key.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/recover/crypto256/fn.recover_public_key.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/crypto/recover/crypto256/fn.recover_public_key.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/recover/crypto256/index.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/crypto/recover/crypto256/index.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/recover/crypto256/index.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/crypto/recover/crypto256/index.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/recover/crypto256/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/crypto/recover/crypto256/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/recover/crypto256/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/crypto/recover/crypto256/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/recover/fn.recover_address.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/crypto/recover/fn.recover_address.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/recover/fn.recover_address.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/crypto/recover/fn.recover_address.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/recover/index.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/crypto/recover/index.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/recover/index.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/crypto/recover/index.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/recover/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/crypto/recover/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/recover/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/crypto/recover/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/crypto/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/crypto/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/index.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/index.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/index.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/index.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/macro.print_and_panic!.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/macro.print_and_panic!.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/macro.print_and_panic!.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/macro.print_and_panic!.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/macro.print_and_panic.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/macro.print_and_panic.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/macro.print_and_panic.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/macro.print_and_panic.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/macro.print_debug!.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/macro.print_debug!.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/macro.print_debug!.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/macro.print_debug!.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/macro.print_debug.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/macro.print_debug.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/macro.print_debug.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/macro.print_debug.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/as_str/index.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/as_str/index.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/as_str/index.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/as_str/index.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/as_str/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/as_str/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/as_str/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/as_str/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/as_str/trait.AsAsciiStr.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/as_str/trait.AsAsciiStr.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/as_str/trait.AsAsciiStr.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/as_str/trait.AsAsciiStr.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/as_str/trait.AsHexStr.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/as_str/trait.AsHexStr.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/as_str/trait.AsHexStr.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/as_str/trait.AsHexStr.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/assert/fn.assert_or_revert.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/assert/fn.assert_or_revert.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/assert/fn.assert_or_revert.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/assert/fn.assert_or_revert.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/assert/fn.assert_or_revert_bool_with.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/assert/fn.assert_or_revert_bool_with.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/assert/fn.assert_or_revert_bool_with.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/assert/fn.assert_or_revert_bool_with.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/assert/index.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/assert/index.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/assert/index.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/assert/index.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/assert/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/assert/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/assert/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/assert/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/assert/trait.Assert.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/assert/trait.Assert.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/assert/trait.Assert.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/assert/trait.Assert.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/assert/trait.Unwrap.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/assert/trait.Unwrap.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/assert/trait.Unwrap.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/assert/trait.Unwrap.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/error/enum.Error.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/error/enum.Error.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/error/enum.Error.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/error/enum.Error.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/error/index.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/error/index.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/error/index.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/error/index.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/error/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/error/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/error/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/error/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/error/trait.ContractErrorContent.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/error/trait.ContractErrorContent.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/error/trait.ContractErrorContent.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/error/trait.ContractErrorContent.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/flattened/index.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/flattened/index.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/flattened/index.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/flattened/index.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/flattened/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/flattened/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/flattened/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/flattened/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/flattened/trait.Flattened.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/flattened/trait.Flattened.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/flattened/trait.Flattened.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/flattened/trait.Flattened.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/from_bytes_repr/index.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/from_bytes_repr/index.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/from_bytes_repr/index.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/from_bytes_repr/index.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/from_bytes_repr/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/from_bytes_repr/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/from_bytes_repr/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/from_bytes_repr/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/from_bytes_repr/trait.FromBytesRepr.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/from_bytes_repr/trait.FromBytesRepr.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/from_bytes_repr/trait.FromBytesRepr.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/from_bytes_repr/trait.FromBytesRepr.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/from_bytes_repr/trait.Sanitized.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/from_bytes_repr/trait.Sanitized.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/from_bytes_repr/trait.Sanitized.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/from_bytes_repr/trait.Sanitized.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/index.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/index.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/index.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/index.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/print_debug/index.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/print_debug/index.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/print_debug/index.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/print_debug/index.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/print_debug/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/print_debug/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/print_debug/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/print_debug/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/radix/from_bytes_repr/index.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/radix/from_bytes_repr/index.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/radix/from_bytes_repr/index.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/radix/from_bytes_repr/index.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/radix/from_bytes_repr/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/radix/from_bytes_repr/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/radix/from_bytes_repr/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/radix/from_bytes_repr/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/radix/index.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/radix/index.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/radix/index.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/radix/index.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/radix/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/radix/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/radix/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/radix/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/radix/struct.Radix.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/radix/struct.Radix.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/radix/struct.Radix.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/radix/struct.Radix.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/radix/u256_ext/index.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/radix/u256_ext/index.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/radix/u256_ext/index.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/radix/u256_ext/index.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/radix/u256_ext/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/radix/u256_ext/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/radix/u256_ext/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/radix/u256_ext/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/radix/u256_ext/trait.U256Ext.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/radix/u256_ext/trait.U256Ext.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/radix/u256_ext/trait.U256Ext.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/radix/u256_ext/trait.U256Ext.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/constant.VALUE_SIZE.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/specific/constant.VALUE_SIZE.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/constant.VALUE_SIZE.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/specific/constant.VALUE_SIZE.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/fn.print.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/specific/fn.print.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/fn.print.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/specific/fn.print.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/fn.revert.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/specific/fn.revert.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/fn.revert.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/specific/fn.revert.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/index.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/specific/index.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/index.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/specific/index.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/specific/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/specific/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/trait.NetworkSpecific.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/specific/trait.NetworkSpecific.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/trait.NetworkSpecific.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/specific/trait.NetworkSpecific.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/type.Bytes.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/specific/type.Bytes.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/type.Bytes.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/specific/type.Bytes.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/type.Network.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/specific/type.Network.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/type.Network.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/specific/type.Network.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/type.U256.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/specific/type.U256.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/type.U256.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/specific/type.U256.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/type._Network.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/type._Network.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/type._Network.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/network/type._Network.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.DATA_FEED_ID_BS.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/constants/constant.DATA_FEED_ID_BS.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.DATA_FEED_ID_BS.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/constants/constant.DATA_FEED_ID_BS.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.DATA_PACKAGES_COUNT_BS.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/constants/constant.DATA_PACKAGES_COUNT_BS.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.DATA_PACKAGES_COUNT_BS.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/constants/constant.DATA_PACKAGES_COUNT_BS.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.DATA_POINTS_COUNT_BS.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/constants/constant.DATA_POINTS_COUNT_BS.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.DATA_POINTS_COUNT_BS.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/constants/constant.DATA_POINTS_COUNT_BS.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.DATA_POINT_VALUE_BYTE_SIZE_BS.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/constants/constant.DATA_POINT_VALUE_BYTE_SIZE_BS.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.DATA_POINT_VALUE_BYTE_SIZE_BS.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/constants/constant.DATA_POINT_VALUE_BYTE_SIZE_BS.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.MAX_TIMESTAMP_AHEAD_MS.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/constants/constant.MAX_TIMESTAMP_AHEAD_MS.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.MAX_TIMESTAMP_AHEAD_MS.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/constants/constant.MAX_TIMESTAMP_AHEAD_MS.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.MAX_TIMESTAMP_DELAY_MS.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/constants/constant.MAX_TIMESTAMP_DELAY_MS.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.MAX_TIMESTAMP_DELAY_MS.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/constants/constant.MAX_TIMESTAMP_DELAY_MS.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.REDSTONE_MARKER.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/constants/constant.REDSTONE_MARKER.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.REDSTONE_MARKER.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/constants/constant.REDSTONE_MARKER.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.REDSTONE_MARKER_BS.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/constants/constant.REDSTONE_MARKER_BS.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.REDSTONE_MARKER_BS.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/constants/constant.REDSTONE_MARKER_BS.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.SIGNATURE_BS.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/constants/constant.SIGNATURE_BS.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.SIGNATURE_BS.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/constants/constant.SIGNATURE_BS.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.TIMESTAMP_BS.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/constants/constant.TIMESTAMP_BS.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.TIMESTAMP_BS.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/constants/constant.TIMESTAMP_BS.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.UNSIGNED_METADATA_BYTE_SIZE_BS.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/constants/constant.UNSIGNED_METADATA_BYTE_SIZE_BS.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.UNSIGNED_METADATA_BYTE_SIZE_BS.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/constants/constant.UNSIGNED_METADATA_BYTE_SIZE_BS.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/index.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/constants/index.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/index.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/constants/index.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/constants/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/constants/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_package/fn.trim_data_package.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/data_package/fn.trim_data_package.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_package/fn.trim_data_package.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/data_package/fn.trim_data_package.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_package/fn.trim_data_packages.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/data_package/fn.trim_data_packages.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_package/fn.trim_data_packages.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/data_package/fn.trim_data_packages.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_package/index.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/data_package/index.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_package/index.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/data_package/index.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_package/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/data_package/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_package/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/data_package/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_package/struct.DataPackage.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/data_package/struct.DataPackage.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_package/struct.DataPackage.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/data_package/struct.DataPackage.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_point/fn.trim_data_point.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/data_point/fn.trim_data_point.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_point/fn.trim_data_point.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/data_point/fn.trim_data_point.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_point/fn.trim_data_points.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/data_point/fn.trim_data_points.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_point/fn.trim_data_points.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/data_point/fn.trim_data_points.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_point/index.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/data_point/index.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_point/index.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/data_point/index.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_point/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/data_point/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_point/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/data_point/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_point/struct.DataPoint.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/data_point/struct.DataPoint.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_point/struct.DataPoint.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/data_point/struct.DataPoint.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/index.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/index.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/index.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/index.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/marker/fn.trim_redstone_marker.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/marker/fn.trim_redstone_marker.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/marker/fn.trim_redstone_marker.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/marker/fn.trim_redstone_marker.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/marker/index.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/marker/index.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/marker/index.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/marker/index.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/marker/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/marker/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/marker/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/marker/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/payload/fn.trim_metadata.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/payload/fn.trim_metadata.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/payload/fn.trim_metadata.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/payload/fn.trim_metadata.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/payload/fn.trim_payload.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/payload/fn.trim_payload.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/payload/fn.trim_payload.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/payload/fn.trim_payload.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/payload/index.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/payload/index.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/payload/index.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/payload/index.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/payload/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/payload/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/payload/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/payload/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/payload/struct.Payload.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/payload/struct.Payload.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/payload/struct.Payload.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/payload/struct.Payload.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/protocol/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/filter/index.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/utils/filter/index.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/filter/index.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/utils/filter/index.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/filter/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/utils/filter/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/filter/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/utils/filter/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/filter/trait.FilterSome.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/utils/filter/trait.FilterSome.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/filter/trait.FilterSome.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/utils/filter/trait.FilterSome.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/index.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/utils/index.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/index.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/utils/index.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/median/fn.maybe_pick_median.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/utils/median/fn.maybe_pick_median.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/median/fn.maybe_pick_median.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/utils/median/fn.maybe_pick_median.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/median/index.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/utils/median/index.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/median/index.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/utils/median/index.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/median/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/utils/median/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/median/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/utils/median/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/median/trait.Averageable.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/utils/median/trait.Averageable.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/median/trait.Averageable.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/utils/median/trait.Averageable.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/median/trait.Avg.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/utils/median/trait.Avg.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/median/trait.Avg.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/utils/median/trait.Avg.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/median/trait.Median.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/utils/median/trait.Median.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/median/trait.Median.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/utils/median/trait.Median.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/utils/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/utils/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/trim/index.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/utils/trim/index.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/trim/index.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/utils/trim/index.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/trim/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/utils/trim/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/trim/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/utils/trim/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/trim/trait.Trim.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/utils/trim/trait.Trim.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/trim/trait.Trim.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/utils/trim/trait.Trim.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/trim_zeros/index.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/utils/trim_zeros/index.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/trim_zeros/index.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/utils/trim_zeros/index.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/trim_zeros/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/utils/trim_zeros/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/trim_zeros/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/utils/trim_zeros/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/trim_zeros/trait.TrimZeros.html b/static/rust/redstone/crypto_radix,network_radix/doc/redstone/utils/trim_zeros/trait.TrimZeros.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/trim_zeros/trait.TrimZeros.html rename to static/rust/redstone/crypto_radix,network_radix/doc/redstone/utils/trim_zeros/trait.TrimZeros.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/search-index.js b/static/rust/redstone/crypto_radix,network_radix/doc/search-index.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/search-index.js rename to static/rust/redstone/crypto_radix,network_radix/doc/search-index.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/search.desc/redstone/redstone-desc-0-.js b/static/rust/redstone/crypto_radix,network_radix/doc/search.desc/redstone/redstone-desc-0-.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/search.desc/redstone/redstone-desc-0-.js rename to static/rust/redstone/crypto_radix,network_radix/doc/search.desc/redstone/redstone-desc-0-.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/settings.html b/static/rust/redstone/crypto_radix,network_radix/doc/settings.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/settings.html rename to static/rust/redstone/crypto_radix,network_radix/doc/settings.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src-files.js b/static/rust/redstone/crypto_radix,network_radix/doc/src-files.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src-files.js rename to static/rust/redstone/crypto_radix,network_radix/doc/src-files.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/core/aggregator.rs.html b/static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/core/aggregator.rs.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/core/aggregator.rs.html rename to static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/core/aggregator.rs.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/core/config.rs.html b/static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/core/config.rs.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/core/config.rs.html rename to static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/core/config.rs.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/core/mod.rs.html b/static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/core/mod.rs.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/core/mod.rs.html rename to static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/core/mod.rs.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/core/processor.rs.html b/static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/core/processor.rs.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/core/processor.rs.html rename to static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/core/processor.rs.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/core/processor_result.rs.html b/static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/core/processor_result.rs.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/core/processor_result.rs.html rename to static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/core/processor_result.rs.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/core/validator.rs.html b/static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/core/validator.rs.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/core/validator.rs.html rename to static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/core/validator.rs.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/crypto/keccak256.rs.html b/static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/crypto/keccak256.rs.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/crypto/keccak256.rs.html rename to static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/crypto/keccak256.rs.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/crypto/mod.rs.html b/static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/crypto/mod.rs.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/crypto/mod.rs.html rename to static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/crypto/mod.rs.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/crypto/recover.rs.html b/static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/crypto/recover.rs.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/crypto/recover.rs.html rename to static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/crypto/recover.rs.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/lib.rs.html b/static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/lib.rs.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/lib.rs.html rename to static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/lib.rs.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/as_str.rs.html b/static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/network/as_str.rs.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/as_str.rs.html rename to static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/network/as_str.rs.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/assert.rs.html b/static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/network/assert.rs.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/assert.rs.html rename to static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/network/assert.rs.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/casper/error.rs.html b/static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/network/casper/error.rs.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/casper/error.rs.html rename to static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/network/casper/error.rs.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/casper/from_bytes_repr.rs.html b/static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/network/casper/from_bytes_repr.rs.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/casper/from_bytes_repr.rs.html rename to static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/network/casper/from_bytes_repr.rs.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/casper/mod.rs.html b/static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/network/casper/mod.rs.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/casper/mod.rs.html rename to static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/network/casper/mod.rs.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/error.rs.html b/static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/network/error.rs.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/error.rs.html rename to static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/network/error.rs.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/flattened.rs.html b/static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/network/flattened.rs.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/flattened.rs.html rename to static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/network/flattened.rs.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/from_bytes_repr.rs.html b/static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/network/from_bytes_repr.rs.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/from_bytes_repr.rs.html rename to static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/network/from_bytes_repr.rs.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/mod.rs.html b/static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/network/mod.rs.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/mod.rs.html rename to static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/network/mod.rs.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/print_debug.rs.html b/static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/network/print_debug.rs.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/print_debug.rs.html rename to static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/network/print_debug.rs.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/pure/from_bytes_repr.rs.html b/static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/network/pure/from_bytes_repr.rs.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/pure/from_bytes_repr.rs.html rename to static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/network/pure/from_bytes_repr.rs.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/pure/mod.rs.html b/static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/network/pure/mod.rs.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/pure/mod.rs.html rename to static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/network/pure/mod.rs.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/radix/from_bytes_repr.rs.html b/static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/network/radix/from_bytes_repr.rs.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/radix/from_bytes_repr.rs.html rename to static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/network/radix/from_bytes_repr.rs.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/radix/mod.rs.html b/static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/network/radix/mod.rs.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/radix/mod.rs.html rename to static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/network/radix/mod.rs.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/radix/u256_ext.rs.html b/static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/network/radix/u256_ext.rs.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/radix/u256_ext.rs.html rename to static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/network/radix/u256_ext.rs.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/specific.rs.html b/static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/network/specific.rs.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/specific.rs.html rename to static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/network/specific.rs.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/protocol/constants.rs.html b/static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/protocol/constants.rs.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/protocol/constants.rs.html rename to static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/protocol/constants.rs.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/protocol/data_package.rs.html b/static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/protocol/data_package.rs.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/protocol/data_package.rs.html rename to static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/protocol/data_package.rs.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/protocol/data_point.rs.html b/static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/protocol/data_point.rs.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/protocol/data_point.rs.html rename to static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/protocol/data_point.rs.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/protocol/marker.rs.html b/static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/protocol/marker.rs.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/protocol/marker.rs.html rename to static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/protocol/marker.rs.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/protocol/mod.rs.html b/static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/protocol/mod.rs.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/protocol/mod.rs.html rename to static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/protocol/mod.rs.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/protocol/payload.rs.html b/static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/protocol/payload.rs.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/protocol/payload.rs.html rename to static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/protocol/payload.rs.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/utils/filter.rs.html b/static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/utils/filter.rs.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/utils/filter.rs.html rename to static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/utils/filter.rs.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/utils/median.rs.html b/static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/utils/median.rs.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/utils/median.rs.html rename to static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/utils/median.rs.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/utils/mod.rs.html b/static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/utils/mod.rs.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/utils/mod.rs.html rename to static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/utils/mod.rs.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/utils/trim.rs.html b/static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/utils/trim.rs.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/utils/trim.rs.html rename to static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/utils/trim.rs.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/utils/trim_zeros.rs.html b/static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/utils/trim_zeros.rs.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/utils/trim_zeros.rs.html rename to static/rust/redstone/crypto_radix,network_radix/doc/src/redstone/utils/trim_zeros.rs.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/COPYRIGHT-23e9bde6c69aea69.txt b/static/rust/redstone/crypto_radix,network_radix/doc/static.files/COPYRIGHT-23e9bde6c69aea69.txt similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/COPYRIGHT-23e9bde6c69aea69.txt rename to static/rust/redstone/crypto_radix,network_radix/doc/static.files/COPYRIGHT-23e9bde6c69aea69.txt diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/FiraSans-LICENSE-db4b642586e02d97.txt b/static/rust/redstone/crypto_radix,network_radix/doc/static.files/FiraSans-LICENSE-db4b642586e02d97.txt similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/FiraSans-LICENSE-db4b642586e02d97.txt rename to static/rust/redstone/crypto_radix,network_radix/doc/static.files/FiraSans-LICENSE-db4b642586e02d97.txt diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 b/static/rust/redstone/crypto_radix,network_radix/doc/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 rename to static/rust/redstone/crypto_radix,network_radix/doc/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 b/static/rust/redstone/crypto_radix,network_radix/doc/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 rename to static/rust/redstone/crypto_radix,network_radix/doc/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt b/static/rust/redstone/crypto_radix,network_radix/doc/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt rename to static/rust/redstone/crypto_radix,network_radix/doc/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/LICENSE-MIT-65090b722b3f6c56.txt b/static/rust/redstone/crypto_radix,network_radix/doc/static.files/LICENSE-MIT-65090b722b3f6c56.txt similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/LICENSE-MIT-65090b722b3f6c56.txt rename to static/rust/redstone/crypto_radix,network_radix/doc/static.files/LICENSE-MIT-65090b722b3f6c56.txt diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 b/static/rust/redstone/crypto_radix,network_radix/doc/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 rename to static/rust/redstone/crypto_radix,network_radix/doc/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt b/static/rust/redstone/crypto_radix,network_radix/doc/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt rename to static/rust/redstone/crypto_radix,network_radix/doc/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 b/static/rust/redstone/crypto_radix,network_radix/doc/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 rename to static/rust/redstone/crypto_radix,network_radix/doc/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt b/static/rust/redstone/crypto_radix,network_radix/doc/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt rename to static/rust/redstone/crypto_radix,network_radix/doc/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 b/static/rust/redstone/crypto_radix,network_radix/doc/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 rename to static/rust/redstone/crypto_radix,network_radix/doc/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 b/static/rust/redstone/crypto_radix,network_radix/doc/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 rename to static/rust/redstone/crypto_radix,network_radix/doc/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 b/static/rust/redstone/crypto_radix,network_radix/doc/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 rename to static/rust/redstone/crypto_radix,network_radix/doc/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 b/static/rust/redstone/crypto_radix,network_radix/doc/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 rename to static/rust/redstone/crypto_radix,network_radix/doc/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md b/static/rust/redstone/crypto_radix,network_radix/doc/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md rename to static/rust/redstone/crypto_radix,network_radix/doc/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 b/static/rust/redstone/crypto_radix,network_radix/doc/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 rename to static/rust/redstone/crypto_radix,network_radix/doc/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/favicon-2c020d218678b618.svg b/static/rust/redstone/crypto_radix,network_radix/doc/static.files/favicon-2c020d218678b618.svg similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/favicon-2c020d218678b618.svg rename to static/rust/redstone/crypto_radix,network_radix/doc/static.files/favicon-2c020d218678b618.svg diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/favicon-32x32-422f7d1d52889060.png b/static/rust/redstone/crypto_radix,network_radix/doc/static.files/favicon-32x32-422f7d1d52889060.png similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/favicon-32x32-422f7d1d52889060.png rename to static/rust/redstone/crypto_radix,network_radix/doc/static.files/favicon-32x32-422f7d1d52889060.png diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/main-20a3ad099b048cf2.js b/static/rust/redstone/crypto_radix,network_radix/doc/static.files/main-20a3ad099b048cf2.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/main-20a3ad099b048cf2.js rename to static/rust/redstone/crypto_radix,network_radix/doc/static.files/main-20a3ad099b048cf2.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/normalize-76eba96aa4d2e634.css b/static/rust/redstone/crypto_radix,network_radix/doc/static.files/normalize-76eba96aa4d2e634.css similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/normalize-76eba96aa4d2e634.css rename to static/rust/redstone/crypto_radix,network_radix/doc/static.files/normalize-76eba96aa4d2e634.css diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/noscript-df360f571f6edeae.css b/static/rust/redstone/crypto_radix,network_radix/doc/static.files/noscript-df360f571f6edeae.css similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/noscript-df360f571f6edeae.css rename to static/rust/redstone/crypto_radix,network_radix/doc/static.files/noscript-df360f571f6edeae.css diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/rust-logo-151179464ae7ed46.svg b/static/rust/redstone/crypto_radix,network_radix/doc/static.files/rust-logo-151179464ae7ed46.svg similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/rust-logo-151179464ae7ed46.svg rename to static/rust/redstone/crypto_radix,network_radix/doc/static.files/rust-logo-151179464ae7ed46.svg diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/rustdoc-dd39b87e5fcfba68.css b/static/rust/redstone/crypto_radix,network_radix/doc/static.files/rustdoc-dd39b87e5fcfba68.css similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/rustdoc-dd39b87e5fcfba68.css rename to static/rust/redstone/crypto_radix,network_radix/doc/static.files/rustdoc-dd39b87e5fcfba68.css diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/scrape-examples-ef1e698c1d417c0c.js b/static/rust/redstone/crypto_radix,network_radix/doc/static.files/scrape-examples-ef1e698c1d417c0c.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/scrape-examples-ef1e698c1d417c0c.js rename to static/rust/redstone/crypto_radix,network_radix/doc/static.files/scrape-examples-ef1e698c1d417c0c.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/search-d52510db62a78183.js b/static/rust/redstone/crypto_radix,network_radix/doc/static.files/search-d52510db62a78183.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/search-d52510db62a78183.js rename to static/rust/redstone/crypto_radix,network_radix/doc/static.files/search-d52510db62a78183.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/settings-4313503d2e1961c2.js b/static/rust/redstone/crypto_radix,network_radix/doc/static.files/settings-4313503d2e1961c2.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/settings-4313503d2e1961c2.js rename to static/rust/redstone/crypto_radix,network_radix/doc/static.files/settings-4313503d2e1961c2.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/src-script-e66d777a5a92e9b2.js b/static/rust/redstone/crypto_radix,network_radix/doc/static.files/src-script-e66d777a5a92e9b2.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/src-script-e66d777a5a92e9b2.js rename to static/rust/redstone/crypto_radix,network_radix/doc/static.files/src-script-e66d777a5a92e9b2.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/storage-118b08c4c78b968e.js b/static/rust/redstone/crypto_radix,network_radix/doc/static.files/storage-118b08c4c78b968e.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/storage-118b08c4c78b968e.js rename to static/rust/redstone/crypto_radix,network_radix/doc/static.files/storage-118b08c4c78b968e.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/clone/trait.Clone.js b/static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/core/clone/trait.Clone.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/clone/trait.Clone.js rename to static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/core/clone/trait.Clone.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/cmp/trait.Eq.js b/static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/core/cmp/trait.Eq.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/cmp/trait.Eq.js rename to static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/core/cmp/trait.Eq.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/cmp/trait.PartialEq.js b/static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/core/cmp/trait.PartialEq.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/cmp/trait.PartialEq.js rename to static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/core/cmp/trait.PartialEq.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/convert/trait.From.js b/static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/core/convert/trait.From.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/convert/trait.From.js rename to static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/core/convert/trait.From.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/fmt/trait.Debug.js b/static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/core/fmt/trait.Debug.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/fmt/trait.Debug.js rename to static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/core/fmt/trait.Debug.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/fmt/trait.Display.js b/static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/core/fmt/trait.Display.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/fmt/trait.Display.js rename to static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/core/fmt/trait.Display.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/marker/trait.Freeze.js b/static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/core/marker/trait.Freeze.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/marker/trait.Freeze.js rename to static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/core/marker/trait.Freeze.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/marker/trait.Send.js b/static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/core/marker/trait.Send.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/marker/trait.Send.js rename to static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/core/marker/trait.Send.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/marker/trait.StructuralPartialEq.js b/static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/core/marker/trait.StructuralPartialEq.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/marker/trait.StructuralPartialEq.js rename to static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/core/marker/trait.StructuralPartialEq.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/marker/trait.Sync.js b/static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/core/marker/trait.Sync.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/marker/trait.Sync.js rename to static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/core/marker/trait.Sync.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/marker/trait.Unpin.js b/static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/core/marker/trait.Unpin.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/marker/trait.Unpin.js rename to static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/core/marker/trait.Unpin.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js b/static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js rename to static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js b/static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js rename to static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/core/validator/trait.Validator.js b/static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/redstone/core/validator/trait.Validator.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/core/validator/trait.Validator.js rename to static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/redstone/core/validator/trait.Validator.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/network/as_str/trait.AsAsciiStr.js b/static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/redstone/network/as_str/trait.AsAsciiStr.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/network/as_str/trait.AsAsciiStr.js rename to static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/redstone/network/as_str/trait.AsAsciiStr.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/network/as_str/trait.AsHexStr.js b/static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/redstone/network/as_str/trait.AsHexStr.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/network/as_str/trait.AsHexStr.js rename to static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/redstone/network/as_str/trait.AsHexStr.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/network/assert/trait.Assert.js b/static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/redstone/network/assert/trait.Assert.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/network/assert/trait.Assert.js rename to static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/redstone/network/assert/trait.Assert.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/network/assert/trait.Unwrap.js b/static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/redstone/network/assert/trait.Unwrap.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/network/assert/trait.Unwrap.js rename to static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/redstone/network/assert/trait.Unwrap.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/network/flattened/trait.Flattened.js b/static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/redstone/network/flattened/trait.Flattened.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/network/flattened/trait.Flattened.js rename to static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/redstone/network/flattened/trait.Flattened.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/network/from_bytes_repr/trait.FromBytesRepr.js b/static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/redstone/network/from_bytes_repr/trait.FromBytesRepr.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/network/from_bytes_repr/trait.FromBytesRepr.js rename to static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/redstone/network/from_bytes_repr/trait.FromBytesRepr.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/network/from_bytes_repr/trait.Sanitized.js b/static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/redstone/network/from_bytes_repr/trait.Sanitized.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/network/from_bytes_repr/trait.Sanitized.js rename to static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/redstone/network/from_bytes_repr/trait.Sanitized.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/network/radix/u256_ext/trait.U256Ext.js b/static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/redstone/network/radix/u256_ext/trait.U256Ext.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/network/radix/u256_ext/trait.U256Ext.js rename to static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/redstone/network/radix/u256_ext/trait.U256Ext.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/network/specific/trait.NetworkSpecific.js b/static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/redstone/network/specific/trait.NetworkSpecific.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/network/specific/trait.NetworkSpecific.js rename to static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/redstone/network/specific/trait.NetworkSpecific.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/utils/filter/trait.FilterSome.js b/static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/redstone/utils/filter/trait.FilterSome.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/utils/filter/trait.FilterSome.js rename to static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/redstone/utils/filter/trait.FilterSome.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/utils/median/trait.Averageable.js b/static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/redstone/utils/median/trait.Averageable.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/utils/median/trait.Averageable.js rename to static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/redstone/utils/median/trait.Averageable.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/utils/median/trait.Avg.js b/static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/redstone/utils/median/trait.Avg.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/utils/median/trait.Avg.js rename to static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/redstone/utils/median/trait.Avg.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/utils/median/trait.Median.js b/static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/redstone/utils/median/trait.Median.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/utils/median/trait.Median.js rename to static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/redstone/utils/median/trait.Median.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/utils/trim/trait.Trim.js b/static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/redstone/utils/trim/trait.Trim.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/utils/trim/trait.Trim.js rename to static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/redstone/utils/trim/trait.Trim.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/utils/trim_zeros/trait.TrimZeros.js b/static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/redstone/utils/trim_zeros/trait.TrimZeros.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/utils/trim_zeros/trait.TrimZeros.js rename to static/rust/redstone/crypto_radix,network_radix/doc/trait.impl/redstone/utils/trim_zeros/trait.TrimZeros.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/type.impl/alloc/vec/struct.Vec.js b/static/rust/redstone/crypto_radix,network_radix/doc/type.impl/alloc/vec/struct.Vec.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/type.impl/alloc/vec/struct.Vec.js rename to static/rust/redstone/crypto_radix,network_radix/doc/type.impl/alloc/vec/struct.Vec.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/type.impl/redstone/network/casper/struct.Casper.js b/static/rust/redstone/crypto_radix,network_radix/doc/type.impl/redstone/network/casper/struct.Casper.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/type.impl/redstone/network/casper/struct.Casper.js rename to static/rust/redstone/crypto_radix,network_radix/doc/type.impl/redstone/network/casper/struct.Casper.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/type.impl/redstone/network/pure/struct.Std.js b/static/rust/redstone/crypto_radix,network_radix/doc/type.impl/redstone/network/pure/struct.Std.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/type.impl/redstone/network/pure/struct.Std.js rename to static/rust/redstone/crypto_radix,network_radix/doc/type.impl/redstone/network/pure/struct.Std.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/type.impl/redstone/network/radix/struct.Radix.js b/static/rust/redstone/crypto_radix,network_radix/doc/type.impl/redstone/network/radix/struct.Radix.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/type.impl/redstone/network/radix/struct.Radix.js rename to static/rust/redstone/crypto_radix,network_radix/doc/type.impl/redstone/network/radix/struct.Radix.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/type.impl/redstone/network/type._Network.js b/static/rust/redstone/crypto_radix,network_radix/doc/type.impl/redstone/network/type._Network.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/doc/type.impl/redstone/network/type._Network.js rename to static/rust/redstone/crypto_radix,network_radix/doc/type.impl/redstone/network/type._Network.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/help.html b/static/rust/redstone/crypto_radix,network_radix/help.html similarity index 82% rename from static/rust/redstone/crypto_secp256k1,network_radix/help.html rename to static/rust/redstone/crypto_radix,network_radix/help.html index f173d86a..616df0e4 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/help.html +++ b/static/rust/redstone/crypto_radix,network_radix/help.html @@ -1 +1 @@ -Help

Rustdoc help

Back
\ No newline at end of file +Help

Rustdoc help

Back
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/all.html b/static/rust/redstone/crypto_radix,network_radix/redstone/all.html similarity index 73% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/all.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/all.html index 552ba979..1ae452f7 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/all.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/all.html @@ -1 +1 @@ -List of all items in this crate

List of all items

Structs

Enums

Traits

Macros

Functions

Type Aliases

Constants

\ No newline at end of file +List of all items in this crate

List of all items

Structs

Enums

Traits

Macros

Functions

Type Aliases

Constants

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/aggregator/fn.aggregate_matrix.html b/static/rust/redstone/crypto_radix,network_radix/redstone/core/aggregator/fn.aggregate_matrix.html similarity index 83% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/aggregator/fn.aggregate_matrix.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/core/aggregator/fn.aggregate_matrix.html index 0792edbc..218d36be 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/aggregator/fn.aggregate_matrix.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/core/aggregator/fn.aggregate_matrix.html @@ -1 +1 @@ -aggregate_matrix in redstone::core::aggregator - Rust

Function redstone::core::aggregator::aggregate_matrix

source ·
fn aggregate_matrix(matrix: Vec<Vec<Option<U256>>>, config: Config) -> Vec<U256>
\ No newline at end of file +aggregate_matrix in redstone::core::aggregator - Rust

Function redstone::core::aggregator::aggregate_matrix

source ·
fn aggregate_matrix(matrix: Vec<Vec<Option<U256>>>, config: Config) -> Vec<U256>
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/aggregator/fn.aggregate_values.html b/static/rust/redstone/crypto_radix,network_radix/redstone/core/aggregator/fn.aggregate_values.html similarity index 92% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/aggregator/fn.aggregate_values.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/core/aggregator/fn.aggregate_values.html index 15726f8e..56391872 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/aggregator/fn.aggregate_values.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/core/aggregator/fn.aggregate_values.html @@ -1,7 +1,7 @@ -aggregate_values in redstone::core::aggregator - Rust

Function redstone::core::aggregator::aggregate_values

source ·
pub(crate) fn aggregate_values(
+aggregate_values in redstone::core::aggregator - Rust

Function redstone::core::aggregator::aggregate_values

source ·
pub(crate) fn aggregate_values(
     config: Config,
-    data_packages: Vec<DataPackage>,
-) -> Vec<U256>
Expand description

Aggregates values from a collection of data packages according to the provided configuration.

+ data_packages: Vec<DataPackage>, +) -> Vec<U256>
Expand description

Aggregates values from a collection of data packages according to the provided configuration.

This function takes a configuration and a vector of data packages, constructs a matrix of values and their corresponding signers, and then aggregates these values based on the aggregation logic defined in the provided configuration. The aggregation strategy could vary, for example, by taking diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/aggregator/fn.make_value_signer_matrix.html b/static/rust/redstone/crypto_radix,network_radix/redstone/core/aggregator/fn.make_value_signer_matrix.html similarity index 84% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/aggregator/fn.make_value_signer_matrix.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/core/aggregator/fn.make_value_signer_matrix.html index f3dc8819..f3c03b87 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/aggregator/fn.make_value_signer_matrix.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/core/aggregator/fn.make_value_signer_matrix.html @@ -1,4 +1,4 @@ -make_value_signer_matrix in redstone::core::aggregator - Rust

Function redstone::core::aggregator::make_value_signer_matrix

source ·
fn make_value_signer_matrix(
+make_value_signer_matrix in redstone::core::aggregator - Rust

Function redstone::core::aggregator::make_value_signer_matrix

source ·
fn make_value_signer_matrix(
     config: &Config,
-    data_packages: Vec<DataPackage>,
-) -> Vec<Vec<Option<U256>>>
\ No newline at end of file + data_packages: Vec<DataPackage>, +) -> Vec<Vec<Option<U256>>>
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/aggregator/index.html b/static/rust/redstone/crypto_radix,network_radix/redstone/core/aggregator/index.html similarity index 89% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/aggregator/index.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/core/aggregator/index.html index 7aa39374..d9b656ee 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/aggregator/index.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/core/aggregator/index.html @@ -1 +1 @@ -redstone::core::aggregator - Rust

Module redstone::core::aggregator

source ·

Functions§

Type Aliases§

\ No newline at end of file +redstone::core::aggregator - Rust

Module redstone::core::aggregator

source ·

Functions§

Type Aliases§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/aggregator/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/redstone/core/aggregator/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/aggregator/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/redstone/core/aggregator/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/aggregator/type.Matrix.html b/static/rust/redstone/crypto_radix,network_radix/redstone/core/aggregator/type.Matrix.html similarity index 85% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/aggregator/type.Matrix.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/core/aggregator/type.Matrix.html index 61c3f974..5fadd5eb 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/aggregator/type.Matrix.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/core/aggregator/type.Matrix.html @@ -1 +1 @@ -Matrix in redstone::core::aggregator - Rust

Type Alias redstone::core::aggregator::Matrix

source ·
type Matrix = Vec<Vec<Option<U256>>>;

Aliased Type§

struct Matrix { /* private fields */ }
\ No newline at end of file +Matrix in redstone::core::aggregator - Rust

Type Alias redstone::core::aggregator::Matrix

source ·
type Matrix = Vec<Vec<Option<U256>>>;

Aliased Type§

struct Matrix { /* private fields */ }
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/config/index.html b/static/rust/redstone/crypto_radix,network_radix/redstone/core/config/index.html similarity index 90% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/config/index.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/core/config/index.html index 32a77abc..5badc729 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/config/index.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/core/config/index.html @@ -1 +1 @@ -redstone::core::config - Rust

Module redstone::core::config

source ·

Structs§

  • Configuration for a RedStone payload processor.
\ No newline at end of file +redstone::core::config - Rust

Module redstone::core::config

source ·

Structs§

  • Configuration for a RedStone payload processor.
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/config/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/redstone/core/config/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/config/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/redstone/core/config/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/config/struct.Config.html b/static/rust/redstone/crypto_radix,network_radix/redstone/core/config/struct.Config.html similarity index 65% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/config/struct.Config.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/core/config/struct.Config.html index 67c161a4..717a792d 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/config/struct.Config.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/core/config/struct.Config.html @@ -1,39 +1,47 @@ -Config in redstone::core::config - Rust

Struct redstone::core::config::Config

source ·
pub struct Config {
-    pub signer_count_threshold: u8,
-    pub signers: Vec<Bytes>,
-    pub feed_ids: Vec<U256>,
-    pub block_timestamp: u64,
+Config in redstone::core::config - Rust

Struct redstone::core::config::Config

source ·
pub struct Config {
+    pub signer_count_threshold: u8,
+    pub signers: Vec<Bytes>,
+    pub feed_ids: Vec<U256>,
+    pub block_timestamp: u64,
 }
Expand description

Configuration for a RedStone payload processor.

Specifies the parameters necessary for the verification and aggregation of values from various data points passed by the RedStone payload.

-

Fields§

§signer_count_threshold: u8

The minimum number of signers required validating the data.

+

Fields§

§signer_count_threshold: u8

The minimum number of signers required validating the data.

Specifies how many unique signers (from different addresses) are required for the data to be considered valid and trustworthy.

-
§signers: Vec<Bytes>

List of identifiers for signers authorized to sign the data.

+
§signers: Vec<Bytes>

List of identifiers for signers authorized to sign the data.

Each signer is identified by a unique, network-specific byte string (Bytes), which represents their address.

-
§feed_ids: Vec<U256>

Identifiers for the data feeds from which values are aggregated.

+
§feed_ids: Vec<U256>

Identifiers for the data feeds from which values are aggregated.

Each data feed id is represented by the network-specific U256 type.

-
§block_timestamp: u64

The current block time in timestamp format, used for verifying data timeliness.

+
§block_timestamp: u64

The current block time in timestamp format, used for verifying data timeliness.

The value’s been expressed in milliseconds since the Unix epoch (January 1, 1970) and allows for determining whether the data is current in the context of blockchain time.

-

Trait Implementations§

source§

impl Debug for Config

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Validator for Config

source§

fn feed_index(&self, feed_id: U256) -> Option<usize>

Retrieves the index of a given data feed. Read more
source§

fn signer_index(&self, signer: &[u8]) -> Option<usize>

Retrieves the index of a given signer. Read more
source§

fn validate_signer_count_threshold( +

Trait Implementations§

source§

impl Debug for Config

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Validator for Config

source§

fn feed_index(&self, feed_id: U256) -> Option<usize>

Retrieves the index of a given data feed. Read more
source§

fn signer_index(&self, signer: &[u8]) -> Option<usize>

Retrieves the index of a given signer. Read more
source§

fn validate_signer_count_threshold( &self, - index: usize, - values: &[Option<U256>], -) -> Vec<U256>

Validates the signer count threshold for a given index within a set of values. Read more
source§

fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64

Validates the timestamp for a given index. Read more

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

Blanket Implementations§

source§

impl<T> Any for T
where - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<U> As for U

§

fn as_<T>(self) -> T
where + index: usize, + values: &[Option<U256>], +) -> Vec<U256>

Validates the signer count threshold for a given index within a set of values. Read more
source§

fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64

Validates the timestamp for a given index. Read more

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<U> As for U

§

fn as_<T>(self) -> T
where T: CastFrom<U>,

Casts self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read more
source§

impl<T, F> Assert<F> for T
where - T: Debug, - F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where - E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for T
where - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+ T: Debug, + F: Fn(&T) -> bool,
source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where + E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T, U> ContextualTryInto<U> for T
where + U: ContextualTryFrom<T>,

§

type Error = <U as ContextualTryFrom<T>>::Error

§

type Context = <U as ContextualTryFrom<T>>::Context

§

fn contextual_try_into( + self, + context: &<U as ContextualTryFrom<T>>::Context, +) -> Result<U, <U as ContextualTryFrom<T>>::Error>

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where - V: MultiLane<T>,

§

fn vzip(self) -> V

\ No newline at end of file +From<T> for U chooses to do.

+
§

impl<X, Y> LabelledResolve<Y> for X
where + Y: LabelledResolveFrom<X>,

§

fn labelled_resolve( + self, + resolver: &impl LabelResolver<<Y as LabelledResolvable>::ResolverOutput>, +) -> Y

§

impl<X, Y> Resolve<Y> for X
where + Y: ResolveFrom<X>,

§

fn resolve(self) -> Y

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/index.html b/static/rust/redstone/crypto_radix,network_radix/redstone/core/index.html similarity index 88% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/index.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/core/index.html index e427a2e8..e5c1246b 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/index.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/core/index.html @@ -1 +1 @@ -redstone::core - Rust

Module redstone::core

source ·

Modules§

\ No newline at end of file +redstone::core - Rust

Module redstone::core

source ·

Modules§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/processor/fn.make_processor_result.html b/static/rust/redstone/crypto_radix,network_radix/redstone/core/processor/fn.make_processor_result.html similarity index 89% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/processor/fn.make_processor_result.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/core/processor/fn.make_processor_result.html index d15046f1..33203759 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/processor/fn.make_processor_result.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/core/processor/fn.make_processor_result.html @@ -1 +1 @@ -make_processor_result in redstone::core::processor - Rust

Function redstone::core::processor::make_processor_result

source ·
fn make_processor_result(config: Config, payload: Payload) -> ProcessorResult
\ No newline at end of file +make_processor_result in redstone::core::processor - Rust

Function redstone::core::processor::make_processor_result

source ·
fn make_processor_result(config: Config, payload: Payload) -> ProcessorResult
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/processor/fn.process_payload.html b/static/rust/redstone/crypto_radix,network_radix/redstone/core/processor/fn.process_payload.html similarity index 91% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/processor/fn.process_payload.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/core/processor/fn.process_payload.html index b1ad0b84..6a5eb34e 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/processor/fn.process_payload.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/core/processor/fn.process_payload.html @@ -1,4 +1,4 @@ -process_payload in redstone::core::processor - Rust

Function redstone::core::processor::process_payload

source ·
pub fn process_payload(config: Config, payload_bytes: Bytes) -> ProcessorResult
Expand description

The main processor of the RedStone payload.

+process_payload in redstone::core::processor - Rust

Function redstone::core::processor::process_payload

source ·
pub fn process_payload(config: Config, payload_bytes: Bytes) -> ProcessorResult
Expand description

The main processor of the RedStone payload.

§Arguments

  • config - Configuration of the payload processing.
  • diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/processor/index.html b/static/rust/redstone/crypto_radix,network_radix/redstone/core/processor/index.html similarity index 87% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/processor/index.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/core/processor/index.html index ccd25006..5b72173e 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/processor/index.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/core/processor/index.html @@ -1 +1 @@ -redstone::core::processor - Rust

    Module redstone::core::processor

    source ·

    Functions§

    \ No newline at end of file +redstone::core::processor - Rust

    Module redstone::core::processor

    source ·

    Functions§

    \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/processor/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/redstone/core/processor/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/processor/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/redstone/core/processor/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/processor_result/index.html b/static/rust/redstone/crypto_radix,network_radix/redstone/core/processor_result/index.html similarity index 88% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/processor_result/index.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/core/processor_result/index.html index 52eaf103..fb6292fd 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/processor_result/index.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/core/processor_result/index.html @@ -1 +1 @@ -redstone::core::processor_result - Rust

    Module redstone::core::processor_result

    source ·

    Structs§

    \ No newline at end of file +redstone::core::processor_result - Rust

    Module redstone::core::processor_result

    source ·

    Structs§

    \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/processor_result/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/redstone/core/processor_result/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/processor_result/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/redstone/core/processor_result/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/processor_result/struct.ProcessorResult.html b/static/rust/redstone/crypto_radix,network_radix/redstone/core/processor_result/struct.ProcessorResult.html similarity index 67% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/processor_result/struct.ProcessorResult.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/core/processor_result/struct.ProcessorResult.html index 185a34b7..08e2dcd0 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/processor_result/struct.ProcessorResult.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/core/processor_result/struct.ProcessorResult.html @@ -1,34 +1,42 @@ -ProcessorResult in redstone::core::processor_result - Rust

    Struct redstone::core::processor_result::ProcessorResult

    source ·
    pub struct ProcessorResult {
    -    pub min_timestamp: u64,
    -    pub values: Vec<U256>,
    +ProcessorResult in redstone::core::processor_result - Rust

    Struct redstone::core::processor_result::ProcessorResult

    source ·
    pub struct ProcessorResult {
    +    pub min_timestamp: u64,
    +    pub values: Vec<U256>,
     }
    Expand description

    Represents the result of processing the RedStone payload.

    This structure is used to encapsulate the outcome of a RedStone payload processing operation, particularly focusing on time-sensitive data and its associated values, according to the Config.

    -

    Fields§

    §min_timestamp: u64

    The minimum timestamp encountered during processing.

    +

Fields§

§min_timestamp: u64

The minimum timestamp encountered during processing.

This field captures the earliest time point (in milliseconds since the Unix epoch) among the processed data packages, indicating the starting boundary of the dataset’s time range.

-
§values: Vec<U256>

A collection of values processed during the operation.

+
§values: Vec<U256>

A collection of values processed during the operation.

Each element in this vector represents a processed value corresponding to the passed data_feed item in the Config.

-

Trait Implementations§

source§

impl Debug for ProcessorResult

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<ProcessorResult> for (u64, Vec<U256>)

source§

fn from(result: ProcessorResult) -> Self

Converts to this type from the input type.
source§

impl PartialEq for ProcessorResult

source§

fn eq(&self, other: &ProcessorResult) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Eq for ProcessorResult

source§

impl StructuralPartialEq for ProcessorResult

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<U> As for U

§

fn as_<T>(self) -> T
where +

Trait Implementations§

source§

impl Debug for ProcessorResult

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<ProcessorResult> for (u64, Vec<U256>)

source§

fn from(result: ProcessorResult) -> Self

Converts to this type from the input type.
source§

impl PartialEq for ProcessorResult

source§

fn eq(&self, other: &ProcessorResult) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for ProcessorResult

source§

impl StructuralPartialEq for ProcessorResult

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<U> As for U

§

fn as_<T>(self) -> T
where T: CastFrom<U>,

Casts self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read more
source§

impl<T, F> Assert<F> for T
where - T: Debug, - F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where - E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<Q, K> Equivalent<K> for Q
where - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for T
where - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+ T: Debug, + F: Fn(&T) -> bool,
source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where + E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T, U> ContextualTryInto<U> for T
where + U: ContextualTryFrom<T>,

§

type Error = <U as ContextualTryFrom<T>>::Error

§

type Context = <U as ContextualTryFrom<T>>::Context

§

fn contextual_try_into( + self, + context: &<U as ContextualTryFrom<T>>::Context, +) -> Result<U, <U as ContextualTryFrom<T>>::Error>

§

impl<Q, K> Equivalent<K> for Q
where + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where - V: MultiLane<T>,

§

fn vzip(self) -> V

\ No newline at end of file +From<T> for U chooses to do.

+
§

impl<X, Y> LabelledResolve<Y> for X
where + Y: LabelledResolveFrom<X>,

§

fn labelled_resolve( + self, + resolver: &impl LabelResolver<<Y as LabelledResolvable>::ResolverOutput>, +) -> Y

§

impl<X, Y> Resolve<Y> for X
where + Y: ResolveFrom<X>,

§

fn resolve(self) -> Y

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/redstone/core/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/redstone/core/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/validator/index.html b/static/rust/redstone/crypto_radix,network_radix/redstone/core/validator/index.html similarity index 87% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/validator/index.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/core/validator/index.html index 141d82cd..63c305f0 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/validator/index.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/core/validator/index.html @@ -1 +1 @@ -redstone::core::validator - Rust

Module redstone::core::validator

source ·

Traits§

  • Validator 🔒
    A trait defining validation operations for data feeds and signers.
\ No newline at end of file +redstone::core::validator - Rust

Module redstone::core::validator

source ·

Traits§

  • Validator 🔒
    A trait defining validation operations for data feeds and signers.
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/validator/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/redstone/core/validator/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/validator/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/redstone/core/validator/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/validator/trait.Validator.html b/static/rust/redstone/crypto_radix,network_radix/redstone/core/validator/trait.Validator.html similarity index 86% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/validator/trait.Validator.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/core/validator/trait.Validator.html index ffbec709..4ad4fa99 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/validator/trait.Validator.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/core/validator/trait.Validator.html @@ -1,19 +1,19 @@ -Validator in redstone::core::validator - Rust

Trait redstone::core::validator::Validator

source ·
pub(crate) trait Validator {
+Validator in redstone::core::validator - Rust

Trait redstone::core::validator::Validator

source ·
pub(crate) trait Validator {
     // Required methods
-    fn feed_index(&self, feed_id: U256) -> Option<usize>;
-    fn signer_index(&self, signer: &[u8]) -> Option<usize>;
+    fn feed_index(&self, feed_id: U256) -> Option<usize>;
+    fn signer_index(&self, signer: &[u8]) -> Option<usize>;
     fn validate_signer_count_threshold(
         &self,
-        index: usize,
-        values: &[Option<U256>],
-    ) -> Vec<U256>;
-    fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64;
+        index: usize,
+        values: &[Option<U256>],
+    ) -> Vec<U256>;
+    fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64;
 }
Expand description

A trait defining validation operations for data feeds and signers.

This trait specifies methods for validating aspects of data feeds and signers within a system that requires data integrity and authenticity checks. Implementations of this trait are responsible for defining the logic behind each validation step, ensuring that data conforms to expected rules and conditions.

-

Required Methods§

source

fn feed_index(&self, feed_id: U256) -> Option<usize>

Retrieves the index of a given data feed.

+

Required Methods§

source

fn feed_index(&self, feed_id: U256) -> Option<usize>

Retrieves the index of a given data feed.

This method takes a feed_id representing the unique identifier of a data feed and returns an Option<usize> indicating the index of the feed within a collection of feeds. If the feed does not exist, None is returned.

@@ -25,7 +25,7 @@
§Returns
  • Option<usize> - The index of the feed if it exists, or None if it does not.
-
source

fn signer_index(&self, signer: &[u8]) -> Option<usize>

Retrieves the index of a given signer.

+
source

fn signer_index(&self, signer: &[u8]) -> Option<usize>

Retrieves the index of a given signer.

This method accepts a signer identifier in the form of a byte slice and returns an Option<usize> indicating the signer’s index within a collection of signers. If the signer is not found, None is returned.

@@ -39,9 +39,9 @@
§Returns
source

fn validate_signer_count_threshold( &self, - index: usize, - values: &[Option<U256>], -) -> Vec<U256>

Validates the signer count threshold for a given index within a set of values.

+ index: usize, + values: &[Option<U256>], +) -> Vec<U256>

Validates the signer count threshold for a given index within a set of values.

This method is responsible for ensuring that the number of valid signers meets or exceeds a specified threshold necessary for a set of data values to be considered valid. It returns a vector of U256 if the values pass the validation, to be processed in other steps.

@@ -54,7 +54,7 @@
§Returns
  • Vec<U256> - A vector of U256 values that meet the validation criteria.
-
source

fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64

Validates the timestamp for a given index.

+
source

fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64

Validates the timestamp for a given index.

This method checks whether a timestamp associated with a data value at a given index meets specific conditions (e.g., being within an acceptable time range). It returns the validated timestamp if it’s valid, to be processed in other steps.

diff --git a/static/rust/redstone/crypto_radix,network_radix/redstone/crypto/index.html b/static/rust/redstone/crypto_radix,network_radix/redstone/crypto/index.html new file mode 100644 index 00000000..47b354db --- /dev/null +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/crypto/index.html @@ -0,0 +1 @@ +redstone::crypto - Rust

Module redstone::crypto

source ·

Modules§

Type Aliases§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/keccak256/fn.keccak256.html b/static/rust/redstone/crypto_radix,network_radix/redstone/crypto/keccak256/fn.keccak256.html similarity index 71% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/keccak256/fn.keccak256.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/crypto/keccak256/fn.keccak256.html index 2665643a..63420eda 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/keccak256/fn.keccak256.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/crypto/keccak256/fn.keccak256.html @@ -1 +1 @@ -keccak256 in redstone::crypto::keccak256 - Rust

Function redstone::crypto::keccak256::keccak256

source ·
pub fn keccak256(data: &[u8]) -> Box<[u8]>
\ No newline at end of file +keccak256 in redstone::crypto::keccak256 - Rust

Function redstone::crypto::keccak256::keccak256

source ·
pub fn keccak256(data: &[u8]) -> [u8; 32]
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/keccak256/index.html b/static/rust/redstone/crypto_radix,network_radix/redstone/crypto/keccak256/index.html similarity index 86% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/keccak256/index.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/crypto/keccak256/index.html index 96fe770a..e0b65a28 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/keccak256/index.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/crypto/keccak256/index.html @@ -1 +1 @@ -redstone::crypto::keccak256 - Rust

Module redstone::crypto::keccak256

source ·

Functions§

\ No newline at end of file +redstone::crypto::keccak256 - Rust

Module redstone::crypto::keccak256

source ·

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/keccak256/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/redstone/crypto/keccak256/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/keccak256/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/redstone/crypto/keccak256/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/recover/crypto256/fn.recover_public_key.html b/static/rust/redstone/crypto_radix,network_radix/redstone/crypto/recover/crypto256/fn.recover_public_key.html similarity index 66% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/recover/crypto256/fn.recover_public_key.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/crypto/recover/crypto256/fn.recover_public_key.html index ba2beac0..59407a08 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/recover/crypto256/fn.recover_public_key.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/crypto/recover/crypto256/fn.recover_public_key.html @@ -1,5 +1,5 @@ -recover_public_key in redstone::crypto::recover::crypto256 - Rust

Function redstone::crypto::recover::crypto256::recover_public_key

source ·
pub(crate) fn recover_public_key(
-    message_hash: Box<[u8]>,
-    signature_bytes: &[u8],
-    recovery_byte: u8,
-) -> Box<[u8]>
\ No newline at end of file +recover_public_key in redstone::crypto::recover::crypto256 - Rust

Function redstone::crypto::recover::crypto256::recover_public_key

source ·
pub(crate) fn recover_public_key(
+    _message_hash: [u8; 32],
+    _signature_bytes: [u8; 64],
+    _recovery_byte: u8,
+) -> [u8; 65]
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/recover/crypto256/index.html b/static/rust/redstone/crypto_radix,network_radix/redstone/crypto/recover/crypto256/index.html similarity index 76% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/recover/crypto256/index.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/crypto/recover/crypto256/index.html index b5563f5f..ba25059e 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/recover/crypto256/index.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/crypto/recover/crypto256/index.html @@ -1 +1 @@ -redstone::crypto::recover::crypto256 - Rust

Module redstone::crypto::recover::crypto256

source ·

Functions§

\ No newline at end of file +redstone::crypto::recover::crypto256 - Rust

Module redstone::crypto::recover::crypto256

source ·

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/recover/crypto256/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/redstone/crypto/recover/crypto256/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/recover/crypto256/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/redstone/crypto/recover/crypto256/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/recover/fn.recover_address.html b/static/rust/redstone/crypto_radix,network_radix/redstone/crypto/recover/fn.recover_address.html similarity index 73% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/recover/fn.recover_address.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/crypto/recover/fn.recover_address.html index aba3bde0..c38049cf 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/recover/fn.recover_address.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/crypto/recover/fn.recover_address.html @@ -1 +1 @@ -recover_address in redstone::crypto::recover - Rust

Function redstone::crypto::recover::recover_address

source ·
pub fn recover_address(message: Vec<u8>, signature: Vec<u8>) -> Vec<u8> 
\ No newline at end of file +recover_address in redstone::crypto::recover - Rust

Function redstone::crypto::recover::recover_address

source ·
pub fn recover_address(message: Vec<u8>, signature: Vec<u8>) -> Vec<u8> 
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/recover/index.html b/static/rust/redstone/crypto_radix,network_radix/redstone/crypto/recover/index.html similarity index 87% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/recover/index.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/crypto/recover/index.html index e7703e69..6165a1e8 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/recover/index.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/crypto/recover/index.html @@ -1 +1 @@ -redstone::crypto::recover - Rust

Module redstone::crypto::recover

source ·

Modules§

Functions§

\ No newline at end of file +redstone::crypto::recover - Rust

Module redstone::crypto::recover

source ·

Modules§

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/recover/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/redstone/crypto/recover/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/recover/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/redstone/crypto/recover/sidebar-items.js diff --git a/static/rust/redstone/crypto_radix,network_radix/redstone/crypto/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/redstone/crypto/sidebar-items.js new file mode 100644 index 00000000..41e67b75 --- /dev/null +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/crypto/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"mod":["keccak256","recover"],"type":["EcdsaUncompressedPublicKey","Keccak256Hash","Secp256SigRs"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_radix,network_radix/redstone/crypto/type.EcdsaUncompressedPublicKey.html b/static/rust/redstone/crypto_radix,network_radix/redstone/crypto/type.EcdsaUncompressedPublicKey.html new file mode 100644 index 00000000..5b852c97 --- /dev/null +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/crypto/type.EcdsaUncompressedPublicKey.html @@ -0,0 +1 @@ +EcdsaUncompressedPublicKey in redstone::crypto - Rust

Type Alias redstone::crypto::EcdsaUncompressedPublicKey

source ·
pub(crate) type EcdsaUncompressedPublicKey = [u8; 65];
\ No newline at end of file diff --git a/static/rust/redstone/crypto_radix,network_radix/redstone/crypto/type.Keccak256Hash.html b/static/rust/redstone/crypto_radix,network_radix/redstone/crypto/type.Keccak256Hash.html new file mode 100644 index 00000000..2f59bdeb --- /dev/null +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/crypto/type.Keccak256Hash.html @@ -0,0 +1 @@ +Keccak256Hash in redstone::crypto - Rust

Type Alias redstone::crypto::Keccak256Hash

source ·
pub(crate) type Keccak256Hash = [u8; 32];
\ No newline at end of file diff --git a/static/rust/redstone/crypto_radix,network_radix/redstone/crypto/type.Secp256SigRs.html b/static/rust/redstone/crypto_radix,network_radix/redstone/crypto/type.Secp256SigRs.html new file mode 100644 index 00000000..cbead115 --- /dev/null +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/crypto/type.Secp256SigRs.html @@ -0,0 +1 @@ +Secp256SigRs in redstone::crypto - Rust

Type Alias redstone::crypto::Secp256SigRs

source ·
pub(crate) type Secp256SigRs = [u8; 64];
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/index.html b/static/rust/redstone/crypto_radix,network_radix/redstone/index.html similarity index 91% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/index.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/index.html index ea091ee8..1c83a111 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/index.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/index.html @@ -1,4 +1,4 @@ -redstone - Rust

Crate redstone

source ·
Expand description

§RedStone

+redstone - Rust

Crate redstone

source ·
Expand description

§RedStone

redstone is a collection of utilities to make deserializing&decrypting RedStone payload. It includes a pure Rust implementation, along with extensions for certain networks.

Different crypto-mechanisms are easily injectable. diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/macro.print_and_panic!.html b/static/rust/redstone/crypto_radix,network_radix/redstone/macro.print_and_panic!.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/macro.print_and_panic!.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/macro.print_and_panic!.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/macro.print_and_panic.html b/static/rust/redstone/crypto_radix,network_radix/redstone/macro.print_and_panic.html similarity index 87% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/macro.print_and_panic.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/macro.print_and_panic.html index b308eb68..468e62fc 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/macro.print_and_panic.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/macro.print_and_panic.html @@ -1,4 +1,4 @@ -print_and_panic in redstone - Rust

Macro redstone::print_and_panic

source ·
macro_rules! print_and_panic {
+print_and_panic in redstone - Rust

Macro redstone::print_and_panic

source ·
macro_rules! print_and_panic {
     ($fmt:expr) => { ... };
     ($fmt:expr, $($args:tt)*) => { ... };
 }
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/macro.print_debug!.html b/static/rust/redstone/crypto_radix,network_radix/redstone/macro.print_debug!.html similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/macro.print_debug!.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/macro.print_debug!.html diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/macro.print_debug.html b/static/rust/redstone/crypto_radix,network_radix/redstone/macro.print_debug.html similarity index 87% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/macro.print_debug.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/macro.print_debug.html index 3cb863d6..a8847b09 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/macro.print_debug.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/macro.print_debug.html @@ -1,4 +1,4 @@ -print_debug in redstone - Rust

Macro redstone::print_debug

source ·
macro_rules! print_debug {
+print_debug in redstone - Rust

Macro redstone::print_debug

source ·
macro_rules! print_debug {
     ($fmt:expr) => { ... };
     ($fmt:expr, $($args:tt)*) => { ... };
 }
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/as_str/index.html b/static/rust/redstone/crypto_radix,network_radix/redstone/network/as_str/index.html similarity index 87% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/as_str/index.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/as_str/index.html index 9f63a8ad..05ce8ab0 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/as_str/index.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/network/as_str/index.html @@ -1 +1 @@ -redstone::network::as_str - Rust

Module redstone::network::as_str

source ·

Traits§

\ No newline at end of file +redstone::network::as_str - Rust

Module redstone::network::as_str

source ·

Traits§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/as_str/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/redstone/network/as_str/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/as_str/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/as_str/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/as_str/trait.AsAsciiStr.html b/static/rust/redstone/crypto_radix,network_radix/redstone/network/as_str/trait.AsAsciiStr.html similarity index 88% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/as_str/trait.AsAsciiStr.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/as_str/trait.AsAsciiStr.html index cdb84389..c5788d73 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/as_str/trait.AsAsciiStr.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/network/as_str/trait.AsAsciiStr.html @@ -1,4 +1,4 @@ -AsAsciiStr in redstone::network::as_str - Rust

Trait redstone::network::as_str::AsAsciiStr

source ·
pub trait AsAsciiStr {
+AsAsciiStr in redstone::network::as_str - Rust

Trait redstone::network::as_str::AsAsciiStr

source ·
pub trait AsAsciiStr {
     // Required method
-    fn as_ascii_str(&self) -> String;
-}

Required Methods§

Implementations on Foreign Types§

source§

impl AsAsciiStr for &[u8]

source§

impl AsAsciiStr for Vec<u8>

Implementors§

\ No newline at end of file + fn as_ascii_str(&self) -> String; +}

Required Methods§

Implementations on Foreign Types§

source§

impl AsAsciiStr for &[u8]

source§

impl AsAsciiStr for Vec<u8>

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/as_str/trait.AsHexStr.html b/static/rust/redstone/crypto_radix,network_radix/redstone/network/as_str/trait.AsHexStr.html similarity index 85% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/as_str/trait.AsHexStr.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/as_str/trait.AsHexStr.html index 59b9e783..2caab1be 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/as_str/trait.AsHexStr.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/network/as_str/trait.AsHexStr.html @@ -1,4 +1,4 @@ -AsHexStr in redstone::network::as_str - Rust

Trait redstone::network::as_str::AsHexStr

source ·
pub trait AsHexStr {
+AsHexStr in redstone::network::as_str - Rust

Trait redstone::network::as_str::AsHexStr

source ·
pub trait AsHexStr {
     // Required method
-    fn as_hex_str(&self) -> String;
-}

Required Methods§

Implementations on Foreign Types§

source§

impl AsHexStr for &[u8]

source§

impl AsHexStr for Box<[u8]>

source§

impl AsHexStr for Vec<u8>

Implementors§

\ No newline at end of file + fn as_hex_str(&self) -> String; +}

Required Methods§

Implementations on Foreign Types§

source§

impl AsHexStr for &[u8]

source§

impl AsHexStr for Box<[u8]>

source§

impl AsHexStr for Vec<u8>

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/assert/fn.assert_or_revert.html b/static/rust/redstone/crypto_radix,network_radix/redstone/network/assert/fn.assert_or_revert.html similarity index 80% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/assert/fn.assert_or_revert.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/assert/fn.assert_or_revert.html index 13078112..1c579f09 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/assert/fn.assert_or_revert.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/network/assert/fn.assert_or_revert.html @@ -1,7 +1,7 @@ -assert_or_revert in redstone::network::assert - Rust

Function redstone::network::assert::assert_or_revert

source ·
fn assert_or_revert<F, T, E: FnOnce(&T) -> Error>(
+assert_or_revert in redstone::network::assert - Rust

Function redstone::network::assert::assert_or_revert

source ·
fn assert_or_revert<F, T, E: FnOnce(&T) -> Error>(
     arg: T,
     check: F,
     error: E,
 ) -> T
where - F: Fn(&T) -> bool, - T: Debug,
\ No newline at end of file + F: Fn(&T) -> bool, + T: Debug,
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/assert/fn.assert_or_revert_bool_with.html b/static/rust/redstone/crypto_radix,network_radix/redstone/network/assert/fn.assert_or_revert_bool_with.html similarity index 85% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/assert/fn.assert_or_revert_bool_with.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/assert/fn.assert_or_revert_bool_with.html index 385fc71e..7fd4c914 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/assert/fn.assert_or_revert_bool_with.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/network/assert/fn.assert_or_revert_bool_with.html @@ -1 +1 @@ -assert_or_revert_bool_with in redstone::network::assert - Rust

Function redstone::network::assert::assert_or_revert_bool_with

source ·
fn assert_or_revert_bool_with<E: FnOnce() -> Error>(check: bool, error: E)
\ No newline at end of file +assert_or_revert_bool_with in redstone::network::assert - Rust

Function redstone::network::assert::assert_or_revert_bool_with

source ·
fn assert_or_revert_bool_with<E: FnOnce() -> Error>(check: bool, error: E)
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/assert/index.html b/static/rust/redstone/crypto_radix,network_radix/redstone/network/assert/index.html similarity index 89% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/assert/index.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/assert/index.html index 680c61a9..a573fd72 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/assert/index.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/network/assert/index.html @@ -1 +1 @@ -redstone::network::assert - Rust

Module redstone::network::assert

source ·

Traits§

Functions§

\ No newline at end of file +redstone::network::assert - Rust

Module redstone::network::assert

source ·

Traits§

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/assert/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/redstone/network/assert/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/assert/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/assert/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/assert/trait.Assert.html b/static/rust/redstone/crypto_radix,network_radix/redstone/network/assert/trait.Assert.html similarity index 84% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/assert/trait.Assert.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/assert/trait.Assert.html index e068a406..0a3d27da 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/assert/trait.Assert.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/network/assert/trait.Assert.html @@ -1,6 +1,6 @@ -Assert in redstone::network::assert - Rust

Trait redstone::network::assert::Assert

source ·
pub trait Assert<F> {
+Assert in redstone::network::assert - Rust

Trait redstone::network::assert::Assert

source ·
pub trait Assert<F> {
     // Required method
-    fn assert_or_revert<E: Fn(&Self) -> Error>(self, check: F, error: E) -> Self;
-}

Required Methods§

source

fn assert_or_revert<E: Fn(&Self) -> Error>(self, check: F, error: E) -> Self

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T, F> Assert<F> for T
where - T: Debug, - F: Fn(&Self) -> bool,

\ No newline at end of file + fn assert_or_revert<E: Fn(&Self) -> Error>(self, check: F, error: E) -> Self; +}

Required Methods§

source

fn assert_or_revert<E: Fn(&Self) -> Error>(self, check: F, error: E) -> Self

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T, F> Assert<F> for T
where + T: Debug, + F: Fn(&Self) -> bool,

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/assert/trait.Unwrap.html b/static/rust/redstone/crypto_radix,network_radix/redstone/network/assert/trait.Unwrap.html similarity index 89% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/assert/trait.Unwrap.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/assert/trait.Unwrap.html index db1ea7bc..b995f4cd 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/assert/trait.Unwrap.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/network/assert/trait.Unwrap.html @@ -1,9 +1,9 @@ -Unwrap in redstone::network::assert - Rust

Trait redstone::network::assert::Unwrap

source ·
pub trait Unwrap<R> {
+Unwrap in redstone::network::assert - Rust

Trait redstone::network::assert::Unwrap

source ·
pub trait Unwrap<R> {
     type ErrorArg;
 
     // Required method
-    fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> R;
-}

Required Associated Types§

Required Methods§

source

fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> R

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T> Unwrap<T> for Option<T>
where - T: Debug,

§

type ErrorArg = ()

source§

fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> T

source§

impl<T, Err> Unwrap<T> for Result<T, Err>
where - T: Debug, - Err: Debug,

§

type ErrorArg = Err

source§

fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> T

Implementors§

\ No newline at end of file + fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> R; +}

Required Associated Types§

Required Methods§

source

fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> R

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T> Unwrap<T> for Option<T>
where + T: Debug,

§

type ErrorArg = ()

source§

fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> T

source§

impl<T, Err> Unwrap<T> for Result<T, Err>
where + T: Debug, + Err: Debug,

§

type ErrorArg = Err

source§

fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> T

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/error/enum.Error.html b/static/rust/redstone/crypto_radix,network_radix/redstone/network/error/enum.Error.html similarity index 61% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/error/enum.Error.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/error/enum.Error.html index ebd30a78..7d802219 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/error/enum.Error.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/network/error/enum.Error.html @@ -1,19 +1,19 @@ -Error in redstone::network::error - Rust

Enum redstone::network::error::Error

source ·
pub enum Error {
-    ContractError(Box<dyn ContractErrorContent>),
+Error in redstone::network::error - Rust

Enum redstone::network::error::Error

source ·
pub enum Error {
+    ContractError(Box<dyn ContractErrorContent>),
     NumberOverflow(U256),
     ArrayIsEmpty,
-    CryptographicError(usize),
-    SizeNotSupported(usize),
-    WrongRedStoneMarker(Vec<u8>),
-    NonEmptyPayloadRemainder(Vec<u8>),
-    InsufficientSignerCount(usize, usize, U256),
-    TimestampTooOld(usize, u64),
-    TimestampTooFuture(usize, u64),
-    ClonedContractError(u8, String),
+    CryptographicError(usize),
+    SizeNotSupported(usize),
+    WrongRedStoneMarker(Vec<u8>),
+    NonEmptyPayloadRemainder(Vec<u8>),
+    InsufficientSignerCount(usize, usize, U256),
+    TimestampTooOld(usize, u64),
+    TimestampTooFuture(usize, u64),
+    ClonedContractError(u8, String),
 }
Expand description

Errors that can be encountered in the deserializing&decrypting the RedStone payload or just contract execution process.

These errors include issues with contract logic, data types, cryptographic operations, and conditions specific to the requirements.

-

Variants§

§

ContractError(Box<dyn ContractErrorContent>)

Represents errors that arise from the contract itself.

+

Variants§

§

ContractError(Box<dyn ContractErrorContent>)

Represents errors that arise from the contract itself.

This variant is used for encapsulating errors that are specific to the contract’s logic or execution conditions that aren’t covered by more specific error types.

§

NumberOverflow(U256)

Indicates an overflow error with U256 numbers.

@@ -22,45 +22,54 @@
§

ArrayIsEmpty

Used when an expected non-empty array or vector is found to be empty.

This could occur in scenarios where the contract logic requires a non-empty collection of items for the correct operation, for example, during aggregating the values.

-
§

CryptographicError(usize)

Represents errors related to cryptographic operations.

+
§

CryptographicError(usize)

Represents errors related to cryptographic operations.

This includes failures in signature verification, hashing, or other cryptographic processes, with the usize indicating the position or identifier of the failed operation.

-
§

SizeNotSupported(usize)

Signifies that an unsupported size was encountered.

+
§

SizeNotSupported(usize)

Signifies that an unsupported size was encountered.

This could be used when a data structure or input does not meet the expected size requirements for processing.

-
§

WrongRedStoneMarker(Vec<u8>)

Indicates that the marker bytes for RedStone are incorrect.

+
§

WrongRedStoneMarker(Vec<u8>)

Indicates that the marker bytes for RedStone are incorrect.

This error is specific to scenarios where marker or identifier bytes do not match expected values, potentially indicating corrupted or tampered data.

-
§

NonEmptyPayloadRemainder(Vec<u8>)

Used when there is leftover data in a payload that should have been empty.

+
§

NonEmptyPayloadRemainder(Vec<u8>)

Used when there is leftover data in a payload that should have been empty.

This could indicate an error in data parsing or that additional, unexpected data was included in a message or transaction.

-
§

InsufficientSignerCount(usize, usize, U256)

Indicates that the number of signers does not meet the required threshold.

+
§

InsufficientSignerCount(usize, usize, U256)

Indicates that the number of signers does not meet the required threshold.

This variant includes the current number of signers, the required threshold, and potentially a feed_id related to the operation that failed due to insufficient signers.

-
§

TimestampTooOld(usize, u64)

Used when a timestamp is older than allowed by the processor logic.

+
§

TimestampTooOld(usize, u64)

Used when a timestamp is older than allowed by the processor logic.

Includes the position or identifier of the timestamp and the threshold value, indicating that the provided timestamp is too far in the past.

-
§

TimestampTooFuture(usize, u64)

Indicates that a timestamp is further in the future than allowed.

+
§

TimestampTooFuture(usize, u64)

Indicates that a timestamp is further in the future than allowed.

Similar to TimestampTooOld, but for future timestamps exceeding the contract’s acceptance window.

-
§

ClonedContractError(u8, String)

Represents errors that need to clone ContractErrorContent, which is not supported by default.

+
§

ClonedContractError(u8, String)

Represents errors that need to clone ContractErrorContent, which is not supported by default.

This variant allows for the manual duplication of contract error information, including an error code and a descriptive message.

-

Implementations§

source§

impl Error

source

pub fn contract_error<T: ContractErrorContent + 'static>(value: T) -> Error

source

pub(crate) fn code(&self) -> u16

Trait Implementations§

source§

impl Clone for Error

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Error

§

impl !RefUnwindSafe for Error

§

impl !Send for Error

§

impl !Sync for Error

§

impl Unpin for Error

§

impl !UnwindSafe for Error

Blanket Implementations§

source§

impl<T> Any for T
where - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<U> As for U

§

fn as_<T>(self) -> T
where +

Implementations§

source§

impl Error

source

pub fn contract_error<T: ContractErrorContent + 'static>(value: T) -> Error

source

pub(crate) fn code(&self) -> u16

Trait Implementations§

source§

impl Clone for Error

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Error

§

impl !RefUnwindSafe for Error

§

impl !Send for Error

§

impl !Sync for Error

§

impl Unpin for Error

§

impl !UnwindSafe for Error

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<U> As for U

§

fn as_<T>(self) -> T
where T: CastFrom<U>,

Casts self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read more
source§

impl<T, F> Assert<F> for T
where - T: Debug, - F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where - E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for T
where - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+ T: Debug, + F: Fn(&T) -> bool,
source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where + E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where + T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<T, U> ContextualTryInto<U> for T
where + U: ContextualTryFrom<T>,

§

type Error = <U as ContextualTryFrom<T>>::Error

§

type Context = <U as ContextualTryFrom<T>>::Context

§

fn contextual_try_into( + self, + context: &<U as ContextualTryFrom<T>>::Context, +) -> Result<U, <U as ContextualTryFrom<T>>::Error>

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where - T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where - V: MultiLane<T>,

§

fn vzip(self) -> V

\ No newline at end of file +From<T> for U chooses to do.

+
§

impl<X, Y> LabelledResolve<Y> for X
where + Y: LabelledResolveFrom<X>,

§

fn labelled_resolve( + self, + resolver: &impl LabelResolver<<Y as LabelledResolvable>::ResolverOutput>, +) -> Y

§

impl<X, Y> Resolve<Y> for X
where + Y: ResolveFrom<X>,

§

fn resolve(self) -> Y

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/error/index.html b/static/rust/redstone/crypto_radix,network_radix/redstone/network/error/index.html similarity index 91% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/error/index.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/error/index.html index e083b3b4..96a07109 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/error/index.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/network/error/index.html @@ -1 +1 @@ -redstone::network::error - Rust

Module redstone::network::error

source ·

Enums§

  • Errors that can be encountered in the deserializing&decrypting the RedStone payload or just contract execution process.

Traits§

\ No newline at end of file +redstone::network::error - Rust

Module redstone::network::error

source ·

Enums§

  • Errors that can be encountered in the deserializing&decrypting the RedStone payload or just contract execution process.

Traits§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/error/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/redstone/network/error/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/error/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/error/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/error/trait.ContractErrorContent.html b/static/rust/redstone/crypto_radix,network_radix/redstone/network/error/trait.ContractErrorContent.html similarity index 86% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/error/trait.ContractErrorContent.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/error/trait.ContractErrorContent.html index 577c3a6f..03e752aa 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/error/trait.ContractErrorContent.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/network/error/trait.ContractErrorContent.html @@ -1,5 +1,5 @@ -ContractErrorContent in redstone::network::error - Rust

Trait redstone::network::error::ContractErrorContent

source ·
pub trait ContractErrorContent: Debug {
+ContractErrorContent in redstone::network::error - Rust

Trait redstone::network::error::ContractErrorContent

source ·
pub trait ContractErrorContent: Debug {
     // Required methods
-    fn code(&self) -> u8;
-    fn message(&self) -> String;
-}

Required Methods§

source

fn code(&self) -> u8

source

fn message(&self) -> String

Implementors§

\ No newline at end of file + fn code(&self) -> u8; + fn message(&self) -> String; +}

Required Methods§

source

fn code(&self) -> u8

source

fn message(&self) -> String

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/flattened/index.html b/static/rust/redstone/crypto_radix,network_radix/redstone/network/flattened/index.html similarity index 86% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/flattened/index.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/flattened/index.html index e62982d8..1c855537 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/flattened/index.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/network/flattened/index.html @@ -1 +1 @@ -redstone::network::flattened - Rust

Module redstone::network::flattened

source ·

Traits§

\ No newline at end of file +redstone::network::flattened - Rust

Module redstone::network::flattened

source ·

Traits§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/flattened/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/redstone/network/flattened/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/flattened/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/flattened/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/flattened/trait.Flattened.html b/static/rust/redstone/crypto_radix,network_radix/redstone/network/flattened/trait.Flattened.html similarity index 91% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/flattened/trait.Flattened.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/flattened/trait.Flattened.html index bbbf1554..f0220070 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/flattened/trait.Flattened.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/network/flattened/trait.Flattened.html @@ -1,4 +1,4 @@ -Flattened in redstone::network::flattened - Rust

Trait redstone::network::flattened::Flattened

source ·
pub trait Flattened<T> {
+Flattened in redstone::network::flattened - Rust

Trait redstone::network::flattened::Flattened

source ·
pub trait Flattened<T> {
     // Required method
     fn flattened(&self) -> T;
-}

Required Methods§

source

fn flattened(&self) -> T

Implementations on Foreign Types§

source§

impl Flattened<<Radix as NetworkSpecific>::BytesRepr> for Vec<Bytes>

Implementors§

\ No newline at end of file +}

Required Methods§

source

fn flattened(&self) -> T

Implementations on Foreign Types§

source§

impl Flattened<<Radix as NetworkSpecific>::BytesRepr> for Vec<Bytes>

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/from_bytes_repr/index.html b/static/rust/redstone/crypto_radix,network_radix/redstone/network/from_bytes_repr/index.html similarity index 85% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/from_bytes_repr/index.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/from_bytes_repr/index.html index 037b0f7e..3e91d071 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/from_bytes_repr/index.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/network/from_bytes_repr/index.html @@ -1 +1 @@ -redstone::network::from_bytes_repr - Rust

Module redstone::network::from_bytes_repr

source ·

Traits§

\ No newline at end of file +redstone::network::from_bytes_repr - Rust

Module redstone::network::from_bytes_repr

source ·

Traits§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/from_bytes_repr/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/redstone/network/from_bytes_repr/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/from_bytes_repr/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/from_bytes_repr/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/from_bytes_repr/trait.FromBytesRepr.html b/static/rust/redstone/crypto_radix,network_radix/redstone/network/from_bytes_repr/trait.FromBytesRepr.html similarity index 88% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/from_bytes_repr/trait.FromBytesRepr.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/from_bytes_repr/trait.FromBytesRepr.html index 4bcada1e..8ffb1ace 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/from_bytes_repr/trait.FromBytesRepr.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/network/from_bytes_repr/trait.FromBytesRepr.html @@ -1,4 +1,4 @@ -FromBytesRepr in redstone::network::from_bytes_repr - Rust

Trait redstone::network::from_bytes_repr::FromBytesRepr

source ·
pub trait FromBytesRepr<T> {
+FromBytesRepr in redstone::network::from_bytes_repr - Rust

Trait redstone::network::from_bytes_repr::FromBytesRepr

source ·
pub trait FromBytesRepr<T> {
     // Required method
     fn from_bytes_repr(bytes: T) -> Self;
-}

Required Methods§

source

fn from_bytes_repr(bytes: T) -> Self

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file +}

Required Methods§

source

fn from_bytes_repr(bytes: T) -> Self

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/from_bytes_repr/trait.Sanitized.html b/static/rust/redstone/crypto_radix,network_radix/redstone/network/from_bytes_repr/trait.Sanitized.html similarity index 90% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/from_bytes_repr/trait.Sanitized.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/from_bytes_repr/trait.Sanitized.html index 79baf865..564f236f 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/from_bytes_repr/trait.Sanitized.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/network/from_bytes_repr/trait.Sanitized.html @@ -1,4 +1,4 @@ -Sanitized in redstone::network::from_bytes_repr - Rust

Trait redstone::network::from_bytes_repr::Sanitized

source ·
pub trait Sanitized {
+Sanitized in redstone::network::from_bytes_repr - Rust

Trait redstone::network::from_bytes_repr::Sanitized

source ·
pub trait Sanitized {
     // Required method
     fn sanitized(self) -> Self;
-}

Required Methods§

source

fn sanitized(self) -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Sanitized for Vec<u8>

source§

fn sanitized(self) -> Self

Implementors§

\ No newline at end of file +}

Required Methods§

source

fn sanitized(self) -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Sanitized for Vec<u8>

source§

fn sanitized(self) -> Self

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/index.html b/static/rust/redstone/crypto_radix,network_radix/redstone/network/index.html similarity index 92% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/index.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/index.html index c1984fe4..ac96f561 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/index.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/network/index.html @@ -1 +1 @@ -redstone::network - Rust
\ No newline at end of file +redstone::network - Rust
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/print_debug/index.html b/static/rust/redstone/crypto_radix,network_radix/redstone/network/print_debug/index.html similarity index 87% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/print_debug/index.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/print_debug/index.html index ac53c72e..18bca892 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/print_debug/index.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/network/print_debug/index.html @@ -1 +1 @@ -redstone::network::print_debug - Rust

Module redstone::network::print_debug

source ·
\ No newline at end of file +redstone::network::print_debug - Rust

Module redstone::network::print_debug

source ·
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/print_debug/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/redstone/network/print_debug/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/print_debug/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/print_debug/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/radix/from_bytes_repr/index.html b/static/rust/redstone/crypto_radix,network_radix/redstone/network/radix/from_bytes_repr/index.html similarity index 87% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/radix/from_bytes_repr/index.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/radix/from_bytes_repr/index.html index f74ff884..b49c9dec 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/radix/from_bytes_repr/index.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/network/radix/from_bytes_repr/index.html @@ -1 +1 @@ -redstone::network::radix::from_bytes_repr - Rust

Module redstone::network::radix::from_bytes_repr

source ·
\ No newline at end of file +redstone::network::radix::from_bytes_repr - Rust

Module redstone::network::radix::from_bytes_repr

source ·
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/radix/from_bytes_repr/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/redstone/network/radix/from_bytes_repr/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/radix/from_bytes_repr/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/radix/from_bytes_repr/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/radix/index.html b/static/rust/redstone/crypto_radix,network_radix/redstone/network/radix/index.html similarity index 91% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/radix/index.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/radix/index.html index 3b436f13..574a1c17 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/radix/index.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/network/radix/index.html @@ -1 +1 @@ -redstone::network::radix - Rust

Module redstone::network::radix

source ·

Modules§

Structs§

\ No newline at end of file +redstone::network::radix - Rust

Module redstone::network::radix

source ·

Modules§

Structs§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/radix/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/redstone/network/radix/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/radix/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/radix/sidebar-items.js diff --git a/static/rust/redstone/crypto_radix,network_radix/redstone/network/radix/struct.Radix.html b/static/rust/redstone/crypto_radix,network_radix/redstone/network/radix/struct.Radix.html new file mode 100644 index 00000000..1d24954f --- /dev/null +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/network/radix/struct.Radix.html @@ -0,0 +1,21 @@ +Radix in redstone::network::radix - Rust

Struct redstone::network::radix::Radix

source ·
pub struct Radix;

Trait Implementations§

Auto Trait Implementations§

§

impl Freeze for Radix

§

impl RefUnwindSafe for Radix

§

impl Send for Radix

§

impl Sync for Radix

§

impl Unpin for Radix

§

impl UnwindSafe for Radix

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<U> As for U

§

fn as_<T>(self) -> T
where + T: CastFrom<U>,

Casts self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T, U> ContextualTryInto<U> for T
where + U: ContextualTryFrom<T>,

§

type Error = <U as ContextualTryFrom<T>>::Error

§

type Context = <U as ContextualTryFrom<T>>::Context

§

fn contextual_try_into( + self, + context: &<U as ContextualTryFrom<T>>::Context, +) -> Result<U, <U as ContextualTryFrom<T>>::Error>

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

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

+
§

impl<X, Y> LabelledResolve<Y> for X
where + Y: LabelledResolveFrom<X>,

§

fn labelled_resolve( + self, + resolver: &impl LabelResolver<<Y as LabelledResolvable>::ResolverOutput>, +) -> Y

§

impl<X, Y> Resolve<Y> for X
where + Y: ResolveFrom<X>,

§

fn resolve(self) -> Y

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/radix/u256_ext/index.html b/static/rust/redstone/crypto_radix,network_radix/redstone/network/radix/u256_ext/index.html similarity index 88% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/radix/u256_ext/index.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/radix/u256_ext/index.html index 4b1d935a..2ebcdcfc 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/radix/u256_ext/index.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/network/radix/u256_ext/index.html @@ -1 +1 @@ -redstone::network::radix::u256_ext - Rust

Module redstone::network::radix::u256_ext

source ·

Traits§

\ No newline at end of file +redstone::network::radix::u256_ext - Rust

Module redstone::network::radix::u256_ext

source ·

Traits§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/radix/u256_ext/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/redstone/network/radix/u256_ext/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/radix/u256_ext/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/radix/u256_ext/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/radix/u256_ext/trait.U256Ext.html b/static/rust/redstone/crypto_radix,network_radix/redstone/network/radix/u256_ext/trait.U256Ext.html similarity index 92% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/radix/u256_ext/trait.U256Ext.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/radix/u256_ext/trait.U256Ext.html index c8692cdf..7e67e597 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/radix/u256_ext/trait.U256Ext.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/network/radix/u256_ext/trait.U256Ext.html @@ -1,4 +1,4 @@ -U256Ext in redstone::network::radix::u256_ext - Rust

Trait redstone::network::radix::u256_ext::U256Ext

source ·
pub trait U256Ext {
+U256Ext in redstone::network::radix::u256_ext - Rust

Trait redstone::network::radix::u256_ext::U256Ext

source ·
pub trait U256Ext {
     // Required method
     fn max_value() -> Self;
-}

Required Methods§

source

fn max_value() -> Self

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file +}

Required Methods§

source

fn max_value() -> Self

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/redstone/network/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/constant.VALUE_SIZE.html b/static/rust/redstone/crypto_radix,network_radix/redstone/network/specific/constant.VALUE_SIZE.html similarity index 86% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/constant.VALUE_SIZE.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/specific/constant.VALUE_SIZE.html index 2e47400c..286c9ec3 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/constant.VALUE_SIZE.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/network/specific/constant.VALUE_SIZE.html @@ -1 +1 @@ -VALUE_SIZE in redstone::network::specific - Rust

Constant redstone::network::specific::VALUE_SIZE

source ·
pub const VALUE_SIZE: usize = <_Network as NetworkSpecific>::VALUE_SIZE; // 32usize
\ No newline at end of file +VALUE_SIZE in redstone::network::specific - Rust

Constant redstone::network::specific::VALUE_SIZE

source ·
pub const VALUE_SIZE: usize = <_Network as NetworkSpecific>::VALUE_SIZE; // 32usize
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/fn.print.html b/static/rust/redstone/crypto_radix,network_radix/redstone/network/specific/fn.print.html similarity index 85% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/fn.print.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/specific/fn.print.html index 414a9953..267b3a19 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/fn.print.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/network/specific/fn.print.html @@ -1 +1 @@ -print in redstone::network::specific - Rust

Function redstone::network::specific::print

source ·
pub fn print(_text: String)
\ No newline at end of file +print in redstone::network::specific - Rust

Function redstone::network::specific::print

source ·
pub fn print(_text: String)
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/fn.revert.html b/static/rust/redstone/crypto_radix,network_radix/redstone/network/specific/fn.revert.html similarity index 86% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/fn.revert.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/specific/fn.revert.html index 2e9edf89..b38daa81 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/fn.revert.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/network/specific/fn.revert.html @@ -1 +1 @@ -revert in redstone::network::specific - Rust

Function redstone::network::specific::revert

source ·
pub fn revert(error: Error) -> !
\ No newline at end of file +revert in redstone::network::specific - Rust

Function redstone::network::specific::revert

source ·
pub fn revert(error: Error) -> !
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/index.html b/static/rust/redstone/crypto_radix,network_radix/redstone/network/specific/index.html similarity index 91% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/index.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/specific/index.html index 1378d9dc..36a5939d 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/index.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/network/specific/index.html @@ -1 +1 @@ -redstone::network::specific - Rust

Module redstone::network::specific

source ·

Constants§

Traits§

Functions§

Type Aliases§

\ No newline at end of file +redstone::network::specific - Rust

Module redstone::network::specific

source ·

Constants§

Traits§

Functions§

Type Aliases§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/redstone/network/specific/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/specific/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/trait.NetworkSpecific.html b/static/rust/redstone/crypto_radix,network_radix/redstone/network/specific/trait.NetworkSpecific.html similarity index 83% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/trait.NetworkSpecific.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/specific/trait.NetworkSpecific.html index e13fc617..e8a0ef0a 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/trait.NetworkSpecific.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/network/specific/trait.NetworkSpecific.html @@ -1,11 +1,11 @@ -NetworkSpecific in redstone::network::specific - Rust

Trait redstone::network::specific::NetworkSpecific

source ·
pub trait NetworkSpecific {
-    type BytesRepr: From<Vec<u8>> + Into<Vec<u8>>;
-    type ValueRepr: FromBytesRepr<Vec<u8>>;
+NetworkSpecific in redstone::network::specific - Rust

Trait redstone::network::specific::NetworkSpecific

source ·
pub trait NetworkSpecific {
+    type BytesRepr: From<Vec<u8>> + Into<Vec<u8>>;
+    type ValueRepr: FromBytesRepr<Vec<u8>>;
     type _Self;
 
-    const VALUE_SIZE: usize;
+    const VALUE_SIZE: usize;
 
     // Required methods
-    fn print(_text: String);
-    fn revert(error: Error) -> !;
-}

Required Associated Types§

Required Associated Constants§

Required Methods§

source

fn print(_text: String)

source

fn revert(error: Error) -> !

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file + fn print(_text: String); + fn revert(error: Error) -> !; +}

Required Associated Types§

Required Associated Constants§

Required Methods§

source

fn print(_text: String)

source

fn revert(error: Error) -> !

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/type.Bytes.html b/static/rust/redstone/crypto_radix,network_radix/redstone/network/specific/type.Bytes.html similarity index 89% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/type.Bytes.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/specific/type.Bytes.html index 04a40a5a..4f99def8 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/type.Bytes.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/network/specific/type.Bytes.html @@ -1 +1 @@ -Bytes in redstone::network::specific - Rust

Type Alias redstone::network::specific::Bytes

source ·
pub type Bytes = <_Network as NetworkSpecific>::BytesRepr;
\ No newline at end of file +Bytes in redstone::network::specific - Rust

Type Alias redstone::network::specific::Bytes

source ·
pub type Bytes = <_Network as NetworkSpecific>::BytesRepr;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/type.Network.html b/static/rust/redstone/crypto_radix,network_radix/redstone/network/specific/type.Network.html similarity index 89% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/type.Network.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/specific/type.Network.html index 40e404c9..506ed82a 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/type.Network.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/network/specific/type.Network.html @@ -1 +1 @@ -Network in redstone::network::specific - Rust

Type Alias redstone::network::specific::Network

source ·
pub(crate) type Network = <_Network as NetworkSpecific>::_Self;
\ No newline at end of file +Network in redstone::network::specific - Rust

Type Alias redstone::network::specific::Network

source ·
pub(crate) type Network = <_Network as NetworkSpecific>::_Self;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/type.U256.html b/static/rust/redstone/crypto_radix,network_radix/redstone/network/specific/type.U256.html similarity index 92% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/type.U256.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/specific/type.U256.html index 19fa4bd4..804f121c 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/type.U256.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/network/specific/type.U256.html @@ -1 +1 @@ -U256 in redstone::network::specific - Rust

Type Alias redstone::network::specific::U256

source ·
pub type U256 = <_Network as NetworkSpecific>::ValueRepr;

Trait Implementations§

source§

impl AsAsciiStr for U256

source§

impl AsHexStr for U256

source§

impl Avg for U256

source§

fn avg(self, other: Self) -> Self

source§

impl FromBytesRepr<Vec<u8>> for U256

source§

fn from_bytes_repr(bytes: Vec<u8>) -> Self

source§

impl U256Ext for U256

source§

fn max_value() -> Self

\ No newline at end of file +U256 in redstone::network::specific - Rust

Type Alias redstone::network::specific::U256

source ·
pub type U256 = <_Network as NetworkSpecific>::ValueRepr;

Trait Implementations§

source§

impl AsAsciiStr for U256

source§

impl AsHexStr for U256

source§

impl Avg for U256

source§

fn avg(self, other: Self) -> Self

source§

impl FromBytesRepr<Vec<u8>> for U256

source§

fn from_bytes_repr(bytes: Vec<u8>) -> Self

source§

impl U256Ext for U256

source§

fn max_value() -> Self

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/type._Network.html b/static/rust/redstone/crypto_radix,network_radix/redstone/network/type._Network.html similarity index 90% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/type._Network.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/network/type._Network.html index b059c3a0..8c979cff 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/type._Network.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/network/type._Network.html @@ -1 +1 @@ -_Network in redstone::network - Rust

Type Alias redstone::network::_Network

source ·
pub type _Network = Radix;

Aliased Type§

struct _Network;
\ No newline at end of file +_Network in redstone::network - Rust

Type Alias redstone::network::_Network

source ·
pub type _Network = Radix;

Aliased Type§

struct _Network;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.DATA_FEED_ID_BS.html b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/constant.DATA_FEED_ID_BS.html similarity index 86% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.DATA_FEED_ID_BS.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/constant.DATA_FEED_ID_BS.html index 72b04b86..8a6e1da5 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.DATA_FEED_ID_BS.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/constant.DATA_FEED_ID_BS.html @@ -1 +1 @@ -DATA_FEED_ID_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::DATA_FEED_ID_BS

source ·
pub(crate) const DATA_FEED_ID_BS: usize = 32;
\ No newline at end of file +DATA_FEED_ID_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::DATA_FEED_ID_BS

source ·
pub(crate) const DATA_FEED_ID_BS: usize = 32;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.DATA_PACKAGES_COUNT_BS.html b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/constant.DATA_PACKAGES_COUNT_BS.html similarity index 88% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.DATA_PACKAGES_COUNT_BS.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/constant.DATA_PACKAGES_COUNT_BS.html index fed432b2..5785e972 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.DATA_PACKAGES_COUNT_BS.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/constant.DATA_PACKAGES_COUNT_BS.html @@ -1 +1 @@ -DATA_PACKAGES_COUNT_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::DATA_PACKAGES_COUNT_BS

source ·
pub(crate) const DATA_PACKAGES_COUNT_BS: usize = 2;
\ No newline at end of file +DATA_PACKAGES_COUNT_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::DATA_PACKAGES_COUNT_BS

source ·
pub(crate) const DATA_PACKAGES_COUNT_BS: usize = 2;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.DATA_POINTS_COUNT_BS.html b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/constant.DATA_POINTS_COUNT_BS.html similarity index 86% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.DATA_POINTS_COUNT_BS.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/constant.DATA_POINTS_COUNT_BS.html index f25ed2f5..dfe6f9fa 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.DATA_POINTS_COUNT_BS.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/constant.DATA_POINTS_COUNT_BS.html @@ -1 +1 @@ -DATA_POINTS_COUNT_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::DATA_POINTS_COUNT_BS

source ·
pub(crate) const DATA_POINTS_COUNT_BS: usize = 3;
\ No newline at end of file +DATA_POINTS_COUNT_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::DATA_POINTS_COUNT_BS

source ·
pub(crate) const DATA_POINTS_COUNT_BS: usize = 3;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.DATA_POINT_VALUE_BYTE_SIZE_BS.html b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/constant.DATA_POINT_VALUE_BYTE_SIZE_BS.html similarity index 86% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.DATA_POINT_VALUE_BYTE_SIZE_BS.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/constant.DATA_POINT_VALUE_BYTE_SIZE_BS.html index 95f9c3d5..2ac22658 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.DATA_POINT_VALUE_BYTE_SIZE_BS.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/constant.DATA_POINT_VALUE_BYTE_SIZE_BS.html @@ -1 +1 @@ -DATA_POINT_VALUE_BYTE_SIZE_BS in redstone::protocol::constants - Rust
pub(crate) const DATA_POINT_VALUE_BYTE_SIZE_BS: usize = 4;
\ No newline at end of file +DATA_POINT_VALUE_BYTE_SIZE_BS in redstone::protocol::constants - Rust
pub(crate) const DATA_POINT_VALUE_BYTE_SIZE_BS: usize = 4;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.MAX_TIMESTAMP_AHEAD_MS.html b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/constant.MAX_TIMESTAMP_AHEAD_MS.html similarity index 88% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.MAX_TIMESTAMP_AHEAD_MS.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/constant.MAX_TIMESTAMP_AHEAD_MS.html index 160a69a6..748a6718 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.MAX_TIMESTAMP_AHEAD_MS.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/constant.MAX_TIMESTAMP_AHEAD_MS.html @@ -1 +1 @@ -MAX_TIMESTAMP_AHEAD_MS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::MAX_TIMESTAMP_AHEAD_MS

source ·
pub(crate) const MAX_TIMESTAMP_AHEAD_MS: u64 = _; // 180_000u64
\ No newline at end of file +MAX_TIMESTAMP_AHEAD_MS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::MAX_TIMESTAMP_AHEAD_MS

source ·
pub(crate) const MAX_TIMESTAMP_AHEAD_MS: u64 = _; // 180_000u64
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.MAX_TIMESTAMP_DELAY_MS.html b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/constant.MAX_TIMESTAMP_DELAY_MS.html similarity index 88% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.MAX_TIMESTAMP_DELAY_MS.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/constant.MAX_TIMESTAMP_DELAY_MS.html index 47c72d3b..29966450 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.MAX_TIMESTAMP_DELAY_MS.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/constant.MAX_TIMESTAMP_DELAY_MS.html @@ -1 +1 @@ -MAX_TIMESTAMP_DELAY_MS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::MAX_TIMESTAMP_DELAY_MS

source ·
pub(crate) const MAX_TIMESTAMP_DELAY_MS: u64 = _; // 900_000u64
\ No newline at end of file +MAX_TIMESTAMP_DELAY_MS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::MAX_TIMESTAMP_DELAY_MS

source ·
pub(crate) const MAX_TIMESTAMP_DELAY_MS: u64 = _; // 900_000u64
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.REDSTONE_MARKER.html b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/constant.REDSTONE_MARKER.html similarity index 84% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.REDSTONE_MARKER.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/constant.REDSTONE_MARKER.html index 07258216..29b8c249 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.REDSTONE_MARKER.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/constant.REDSTONE_MARKER.html @@ -1 +1 @@ -REDSTONE_MARKER in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::REDSTONE_MARKER

source ·
pub(crate) const REDSTONE_MARKER: [u8; 9];
\ No newline at end of file +REDSTONE_MARKER in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::REDSTONE_MARKER

source ·
pub(crate) const REDSTONE_MARKER: [u8; 9];
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.REDSTONE_MARKER_BS.html b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/constant.REDSTONE_MARKER_BS.html similarity index 86% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.REDSTONE_MARKER_BS.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/constant.REDSTONE_MARKER_BS.html index 21ea69ca..6a9ebb32 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.REDSTONE_MARKER_BS.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/constant.REDSTONE_MARKER_BS.html @@ -1 +1 @@ -REDSTONE_MARKER_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::REDSTONE_MARKER_BS

source ·
pub(crate) const REDSTONE_MARKER_BS: usize = 9;
\ No newline at end of file +REDSTONE_MARKER_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::REDSTONE_MARKER_BS

source ·
pub(crate) const REDSTONE_MARKER_BS: usize = 9;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.SIGNATURE_BS.html b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/constant.SIGNATURE_BS.html similarity index 86% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.SIGNATURE_BS.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/constant.SIGNATURE_BS.html index 2a3a5b7f..ca094747 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.SIGNATURE_BS.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/constant.SIGNATURE_BS.html @@ -1 +1 @@ -SIGNATURE_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::SIGNATURE_BS

source ·
pub(crate) const SIGNATURE_BS: usize = 65;
\ No newline at end of file +SIGNATURE_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::SIGNATURE_BS

source ·
pub(crate) const SIGNATURE_BS: usize = 65;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.TIMESTAMP_BS.html b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/constant.TIMESTAMP_BS.html similarity index 85% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.TIMESTAMP_BS.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/constant.TIMESTAMP_BS.html index 1635207a..38d27451 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.TIMESTAMP_BS.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/constant.TIMESTAMP_BS.html @@ -1 +1 @@ -TIMESTAMP_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::TIMESTAMP_BS

source ·
pub(crate) const TIMESTAMP_BS: usize = 6;
\ No newline at end of file +TIMESTAMP_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::TIMESTAMP_BS

source ·
pub(crate) const TIMESTAMP_BS: usize = 6;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.UNSIGNED_METADATA_BYTE_SIZE_BS.html b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/constant.UNSIGNED_METADATA_BYTE_SIZE_BS.html similarity index 86% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.UNSIGNED_METADATA_BYTE_SIZE_BS.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/constant.UNSIGNED_METADATA_BYTE_SIZE_BS.html index a7ccdc60..3b0a9907 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.UNSIGNED_METADATA_BYTE_SIZE_BS.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/constant.UNSIGNED_METADATA_BYTE_SIZE_BS.html @@ -1 +1 @@ -UNSIGNED_METADATA_BYTE_SIZE_BS in redstone::protocol::constants - Rust
pub(crate) const UNSIGNED_METADATA_BYTE_SIZE_BS: usize = 3;
\ No newline at end of file +UNSIGNED_METADATA_BYTE_SIZE_BS in redstone::protocol::constants - Rust
pub(crate) const UNSIGNED_METADATA_BYTE_SIZE_BS: usize = 3;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/index.html b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/index.html similarity index 93% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/index.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/index.html index 0268cb89..2eb1f7cf 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/index.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/index.html @@ -1 +1 @@ -redstone::protocol::constants - Rust
\ No newline at end of file +redstone::protocol::constants - Rust
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/redstone/protocol/constants/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_package/fn.trim_data_package.html b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/data_package/fn.trim_data_package.html similarity index 85% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_package/fn.trim_data_package.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/protocol/data_package/fn.trim_data_package.html index f1456016..25bf7e05 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_package/fn.trim_data_package.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/data_package/fn.trim_data_package.html @@ -1 +1 @@ -trim_data_package in redstone::protocol::data_package - Rust

Function redstone::protocol::data_package::trim_data_package

source ·
fn trim_data_package(payload: &mut Vec<u8>) -> DataPackage
\ No newline at end of file +trim_data_package in redstone::protocol::data_package - Rust

Function redstone::protocol::data_package::trim_data_package

source ·
fn trim_data_package(payload: &mut Vec<u8>) -> DataPackage
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_package/fn.trim_data_packages.html b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/data_package/fn.trim_data_packages.html similarity index 83% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_package/fn.trim_data_packages.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/protocol/data_package/fn.trim_data_packages.html index 393e9998..7ae9270e 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_package/fn.trim_data_packages.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/data_package/fn.trim_data_packages.html @@ -1,4 +1,4 @@ -trim_data_packages in redstone::protocol::data_package - Rust

Function redstone::protocol::data_package::trim_data_packages

source ·
pub(crate) fn trim_data_packages(
-    payload: &mut Vec<u8>,
-    count: usize,
-) -> Vec<DataPackage>
\ No newline at end of file +trim_data_packages in redstone::protocol::data_package - Rust

Function redstone::protocol::data_package::trim_data_packages

source ·
pub(crate) fn trim_data_packages(
+    payload: &mut Vec<u8>,
+    count: usize,
+) -> Vec<DataPackage>
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_package/index.html b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/data_package/index.html similarity index 88% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_package/index.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/protocol/data_package/index.html index 4f7ef4c4..71e2a3df 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_package/index.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/data_package/index.html @@ -1 +1 @@ -redstone::protocol::data_package - Rust

Module redstone::protocol::data_package

source ·

Structs§

Functions§

\ No newline at end of file +redstone::protocol::data_package - Rust

Module redstone::protocol::data_package

source ·

Structs§

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_package/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/data_package/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_package/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/redstone/protocol/data_package/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_package/struct.DataPackage.html b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/data_package/struct.DataPackage.html similarity index 63% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_package/struct.DataPackage.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/protocol/data_package/struct.DataPackage.html index 8bbb2a1d..9dfbaf0a 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_package/struct.DataPackage.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/data_package/struct.DataPackage.html @@ -1,27 +1,36 @@ -DataPackage in redstone::protocol::data_package - Rust

Struct redstone::protocol::data_package::DataPackage

source ·
pub(crate) struct DataPackage {
-    pub(crate) signer_address: Vec<u8>,
-    pub(crate) timestamp: u64,
-    pub(crate) data_points: Vec<DataPoint>,
-}

Fields§

§signer_address: Vec<u8>§timestamp: u64§data_points: Vec<DataPoint>

Trait Implementations§

source§

impl Clone for DataPackage

source§

fn clone(&self) -> DataPackage

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DataPackage

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for DataPackage

source§

fn eq(&self, other: &DataPackage) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Eq for DataPackage

source§

impl StructuralPartialEq for DataPackage

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<U> As for U

§

fn as_<T>(self) -> T
where +DataPackage in redstone::protocol::data_package - Rust

Struct redstone::protocol::data_package::DataPackage

source ·
pub(crate) struct DataPackage {
+    pub(crate) signer_address: Vec<u8>,
+    pub(crate) timestamp: u64,
+    pub(crate) data_points: Vec<DataPoint>,
+}

Fields§

§signer_address: Vec<u8>§timestamp: u64§data_points: Vec<DataPoint>

Trait Implementations§

source§

impl Clone for DataPackage

source§

fn clone(&self) -> DataPackage

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DataPackage

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for DataPackage

source§

fn eq(&self, other: &DataPackage) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for DataPackage

source§

impl StructuralPartialEq for DataPackage

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<U> As for U

§

fn as_<T>(self) -> T
where T: CastFrom<U>,

Casts self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read more
source§

impl<T, F> Assert<F> for T
where - T: Debug, - F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where - E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<Q, K> Equivalent<K> for Q
where - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for T
where - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+ T: Debug, + F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where + E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where + T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<T, U> ContextualTryInto<U> for T
where + U: ContextualTryFrom<T>,

§

type Error = <U as ContextualTryFrom<T>>::Error

§

type Context = <U as ContextualTryFrom<T>>::Context

§

fn contextual_try_into( + self, + context: &<U as ContextualTryFrom<T>>::Context, +) -> Result<U, <U as ContextualTryFrom<T>>::Error>

§

impl<Q, K> Equivalent<K> for Q
where + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where - V: MultiLane<T>,

§

fn vzip(self) -> V

\ No newline at end of file +From<T> for U chooses to do.

+
§

impl<X, Y> LabelledResolve<Y> for X
where + Y: LabelledResolveFrom<X>,

§

fn labelled_resolve( + self, + resolver: &impl LabelResolver<<Y as LabelledResolvable>::ResolverOutput>, +) -> Y

§

impl<X, Y> Resolve<Y> for X
where + Y: ResolveFrom<X>,

§

fn resolve(self) -> Y

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_point/fn.trim_data_point.html b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/data_point/fn.trim_data_point.html similarity index 83% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_point/fn.trim_data_point.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/protocol/data_point/fn.trim_data_point.html index 10a3aa68..ef63a213 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_point/fn.trim_data_point.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/data_point/fn.trim_data_point.html @@ -1 +1 @@ -trim_data_point in redstone::protocol::data_point - Rust

Function redstone::protocol::data_point::trim_data_point

source ·
fn trim_data_point(payload: &mut Vec<u8>, value_size: usize) -> DataPoint
\ No newline at end of file +trim_data_point in redstone::protocol::data_point - Rust

Function redstone::protocol::data_point::trim_data_point

source ·
fn trim_data_point(payload: &mut Vec<u8>, value_size: usize) -> DataPoint
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_point/fn.trim_data_points.html b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/data_point/fn.trim_data_points.html similarity index 81% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_point/fn.trim_data_points.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/protocol/data_point/fn.trim_data_points.html index 4bc76a0f..6c2d70c3 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_point/fn.trim_data_points.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/data_point/fn.trim_data_points.html @@ -1,5 +1,5 @@ -trim_data_points in redstone::protocol::data_point - Rust

Function redstone::protocol::data_point::trim_data_points

source ·
pub(crate) fn trim_data_points(
-    payload: &mut Vec<u8>,
-    count: usize,
-    value_size: usize,
-) -> Vec<DataPoint>
\ No newline at end of file +trim_data_points in redstone::protocol::data_point - Rust

Function redstone::protocol::data_point::trim_data_points

source ·
pub(crate) fn trim_data_points(
+    payload: &mut Vec<u8>,
+    count: usize,
+    value_size: usize,
+) -> Vec<DataPoint>
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_point/index.html b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/data_point/index.html similarity index 88% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_point/index.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/protocol/data_point/index.html index 6ab1baf0..47323ad6 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_point/index.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/data_point/index.html @@ -1 +1 @@ -redstone::protocol::data_point - Rust

Module redstone::protocol::data_point

source ·

Structs§

Functions§

\ No newline at end of file +redstone::protocol::data_point - Rust

Module redstone::protocol::data_point

source ·

Structs§

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_point/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/data_point/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_point/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/redstone/protocol/data_point/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_point/struct.DataPoint.html b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/data_point/struct.DataPoint.html similarity index 63% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_point/struct.DataPoint.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/protocol/data_point/struct.DataPoint.html index 78e807ea..a5cee32b 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_point/struct.DataPoint.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/data_point/struct.DataPoint.html @@ -1,26 +1,35 @@ -DataPoint in redstone::protocol::data_point - Rust

Struct redstone::protocol::data_point::DataPoint

source ·
pub(crate) struct DataPoint {
+DataPoint in redstone::protocol::data_point - Rust

Struct redstone::protocol::data_point::DataPoint

source ·
pub(crate) struct DataPoint {
     pub(crate) feed_id: U256,
     pub(crate) value: U256,
-}

Fields§

§feed_id: U256§value: U256

Trait Implementations§

source§

impl Clone for DataPoint

source§

fn clone(&self) -> DataPoint

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DataPoint

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for DataPoint

source§

fn eq(&self, other: &DataPoint) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Eq for DataPoint

source§

impl StructuralPartialEq for DataPoint

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<U> As for U

§

fn as_<T>(self) -> T
where +}

Fields§

§feed_id: U256§value: U256

Trait Implementations§

source§

impl Clone for DataPoint

source§

fn clone(&self) -> DataPoint

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DataPoint

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for DataPoint

source§

fn eq(&self, other: &DataPoint) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for DataPoint

source§

impl StructuralPartialEq for DataPoint

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<U> As for U

§

fn as_<T>(self) -> T
where T: CastFrom<U>,

Casts self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read more
source§

impl<T, F> Assert<F> for T
where - T: Debug, - F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where - E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<Q, K> Equivalent<K> for Q
where - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for T
where - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+ T: Debug, + F: Fn(&T) -> bool,
source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where + E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where + T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<T, U> ContextualTryInto<U> for T
where + U: ContextualTryFrom<T>,

§

type Error = <U as ContextualTryFrom<T>>::Error

§

type Context = <U as ContextualTryFrom<T>>::Context

§

fn contextual_try_into( + self, + context: &<U as ContextualTryFrom<T>>::Context, +) -> Result<U, <U as ContextualTryFrom<T>>::Error>

§

impl<Q, K> Equivalent<K> for Q
where + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where - V: MultiLane<T>,

§

fn vzip(self) -> V

\ No newline at end of file +From<T> for U chooses to do.

+
§

impl<X, Y> LabelledResolve<Y> for X
where + Y: LabelledResolveFrom<X>,

§

fn labelled_resolve( + self, + resolver: &impl LabelResolver<<Y as LabelledResolvable>::ResolverOutput>, +) -> Y

§

impl<X, Y> Resolve<Y> for X
where + Y: ResolveFrom<X>,

§

fn resolve(self) -> Y

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/index.html b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/index.html similarity index 92% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/index.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/protocol/index.html index d221f7b2..933f37aa 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/index.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/index.html @@ -1 +1 @@ -redstone::protocol - Rust

Module redstone::protocol

source ·

Modules§

\ No newline at end of file +redstone::protocol - Rust

Module redstone::protocol

source ·

Modules§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/marker/fn.trim_redstone_marker.html b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/marker/fn.trim_redstone_marker.html similarity index 84% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/marker/fn.trim_redstone_marker.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/protocol/marker/fn.trim_redstone_marker.html index fb7c7144..01093e84 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/marker/fn.trim_redstone_marker.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/marker/fn.trim_redstone_marker.html @@ -1 +1 @@ -trim_redstone_marker in redstone::protocol::marker - Rust

Function redstone::protocol::marker::trim_redstone_marker

source ·
pub fn trim_redstone_marker(payload: &mut Vec<u8>)
\ No newline at end of file +trim_redstone_marker in redstone::protocol::marker - Rust

Function redstone::protocol::marker::trim_redstone_marker

source ·
pub fn trim_redstone_marker(payload: &mut Vec<u8>)
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/marker/index.html b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/marker/index.html similarity index 86% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/marker/index.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/protocol/marker/index.html index 9844daf7..0ac4ef1d 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/marker/index.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/marker/index.html @@ -1 +1 @@ -redstone::protocol::marker - Rust

Module redstone::protocol::marker

source ·

Functions§

\ No newline at end of file +redstone::protocol::marker - Rust

Module redstone::protocol::marker

source ·

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/marker/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/marker/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/marker/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/redstone/protocol/marker/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/payload/fn.trim_metadata.html b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/payload/fn.trim_metadata.html similarity index 83% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/payload/fn.trim_metadata.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/protocol/payload/fn.trim_metadata.html index b3e6350e..ce8dcf29 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/payload/fn.trim_metadata.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/payload/fn.trim_metadata.html @@ -1 +1 @@ -trim_metadata in redstone::protocol::payload - Rust

Function redstone::protocol::payload::trim_metadata

source ·
fn trim_metadata(payload: &mut Vec<u8>) -> usize
\ No newline at end of file +trim_metadata in redstone::protocol::payload - Rust

Function redstone::protocol::payload::trim_metadata

source ·
fn trim_metadata(payload: &mut Vec<u8>) -> usize
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/payload/fn.trim_payload.html b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/payload/fn.trim_payload.html similarity index 83% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/payload/fn.trim_payload.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/protocol/payload/fn.trim_payload.html index 9eae9fdd..9805f954 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/payload/fn.trim_payload.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/payload/fn.trim_payload.html @@ -1 +1 @@ -trim_payload in redstone::protocol::payload - Rust

Function redstone::protocol::payload::trim_payload

source ·
fn trim_payload(payload: &mut Vec<u8>) -> Payload
\ No newline at end of file +trim_payload in redstone::protocol::payload - Rust

Function redstone::protocol::payload::trim_payload

source ·
fn trim_payload(payload: &mut Vec<u8>) -> Payload
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/payload/index.html b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/payload/index.html similarity index 88% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/payload/index.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/protocol/payload/index.html index 7bedf304..7ef700d8 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/payload/index.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/payload/index.html @@ -1 +1 @@ -redstone::protocol::payload - Rust

Module redstone::protocol::payload

source ·

Structs§

Functions§

\ No newline at end of file +redstone::protocol::payload - Rust

Module redstone::protocol::payload

source ·

Structs§

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/payload/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/payload/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/payload/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/redstone/protocol/payload/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/payload/struct.Payload.html b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/payload/struct.Payload.html similarity index 59% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/payload/struct.Payload.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/protocol/payload/struct.Payload.html index 739030bf..73c6156e 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/payload/struct.Payload.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/payload/struct.Payload.html @@ -1,19 +1,28 @@ -Payload in redstone::protocol::payload - Rust

Struct redstone::protocol::payload::Payload

source ·
pub(crate) struct Payload {
-    pub(crate) data_packages: Vec<DataPackage>,
-}

Fields§

§data_packages: Vec<DataPackage>

Implementations§

source§

impl Payload

source

pub(crate) fn make(payload_bytes: &mut Vec<u8>) -> Payload

Trait Implementations§

source§

impl Clone for Payload

source§

fn clone(&self) -> Payload

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Payload

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<U> As for U

§

fn as_<T>(self) -> T
where +Payload in redstone::protocol::payload - Rust

Struct redstone::protocol::payload::Payload

source ·
pub(crate) struct Payload {
+    pub(crate) data_packages: Vec<DataPackage>,
+}

Fields§

§data_packages: Vec<DataPackage>

Implementations§

source§

impl Payload

source

pub(crate) fn make(payload_bytes: &mut Vec<u8>) -> Payload

Trait Implementations§

source§

impl Clone for Payload

source§

fn clone(&self) -> Payload

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Payload

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<U> As for U

§

fn as_<T>(self) -> T
where T: CastFrom<U>,

Casts self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read more
source§

impl<T, F> Assert<F> for T
where - T: Debug, - F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where - E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for T
where - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+ T: Debug, + F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where + E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where + T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<T, U> ContextualTryInto<U> for T
where + U: ContextualTryFrom<T>,

§

type Error = <U as ContextualTryFrom<T>>::Error

§

type Context = <U as ContextualTryFrom<T>>::Context

§

fn contextual_try_into( + self, + context: &<U as ContextualTryFrom<T>>::Context, +) -> Result<U, <U as ContextualTryFrom<T>>::Error>

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where - V: MultiLane<T>,

§

fn vzip(self) -> V

\ No newline at end of file +From<T> for U chooses to do.

+
§

impl<X, Y> LabelledResolve<Y> for X
where + Y: LabelledResolveFrom<X>,

§

fn labelled_resolve( + self, + resolver: &impl LabelResolver<<Y as LabelledResolvable>::ResolverOutput>, +) -> Y

§

impl<X, Y> Resolve<Y> for X
where + Y: ResolveFrom<X>,

§

fn resolve(self) -> Y

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/redstone/protocol/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/redstone/protocol/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/redstone/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/redstone/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/filter/index.html b/static/rust/redstone/crypto_radix,network_radix/redstone/utils/filter/index.html similarity index 88% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/filter/index.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/utils/filter/index.html index a153fc5f..fa4dd4df 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/filter/index.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/utils/filter/index.html @@ -1 +1 @@ -redstone::utils::filter - Rust

Module redstone::utils::filter

source ·

Traits§

\ No newline at end of file +redstone::utils::filter - Rust

Module redstone::utils::filter

source ·

Traits§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/filter/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/redstone/utils/filter/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/filter/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/redstone/utils/filter/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/filter/trait.FilterSome.html b/static/rust/redstone/crypto_radix,network_radix/redstone/utils/filter/trait.FilterSome.html similarity index 89% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/filter/trait.FilterSome.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/utils/filter/trait.FilterSome.html index 69bc1f28..d00cce8b 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/filter/trait.FilterSome.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/utils/filter/trait.FilterSome.html @@ -1,4 +1,4 @@ -FilterSome in redstone::utils::filter - Rust

Trait redstone::utils::filter::FilterSome

source ·
pub(crate) trait FilterSome<Output> {
+FilterSome in redstone::utils::filter - Rust

Trait redstone::utils::filter::FilterSome

source ·
pub(crate) trait FilterSome<Output> {
     // Required method
     fn filter_some(&self) -> Output;
-}

Required Methods§

source

fn filter_some(&self) -> Output

Implementations on Foreign Types§

source§

impl<T: Copy> FilterSome<Vec<T>> for [Option<T>]

source§

fn filter_some(&self) -> Vec<T>

Implementors§

\ No newline at end of file +}

Required Methods§

source

fn filter_some(&self) -> Output

Implementations on Foreign Types§

source§

impl<T: Copy> FilterSome<Vec<T>> for [Option<T>]

source§

fn filter_some(&self) -> Vec<T>

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/index.html b/static/rust/redstone/crypto_radix,network_radix/redstone/utils/index.html similarity index 88% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/index.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/utils/index.html index ef51ef17..d5ce81a0 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/index.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/utils/index.html @@ -1 +1 @@ -redstone::utils - Rust

Module redstone::utils

source ·

Modules§

\ No newline at end of file +redstone::utils - Rust

Module redstone::utils

source ·

Modules§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/median/fn.maybe_pick_median.html b/static/rust/redstone/crypto_radix,network_radix/redstone/utils/median/fn.maybe_pick_median.html similarity index 85% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/median/fn.maybe_pick_median.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/utils/median/fn.maybe_pick_median.html index ebb4b4a4..027bd4bd 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/median/fn.maybe_pick_median.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/utils/median/fn.maybe_pick_median.html @@ -1,2 +1,2 @@ -maybe_pick_median in redstone::utils::median - Rust

Function redstone::utils::median::maybe_pick_median

source ·
fn maybe_pick_median<T>(a: T, b: T, c: T) -> Option<T>
where - T: PartialOrd,
\ No newline at end of file +maybe_pick_median in redstone::utils::median - Rust

Function redstone::utils::median::maybe_pick_median

source ·
fn maybe_pick_median<T>(a: T, b: T, c: T) -> Option<T>
where + T: PartialOrd,
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/median/index.html b/static/rust/redstone/crypto_radix,network_radix/redstone/utils/median/index.html similarity index 90% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/median/index.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/utils/median/index.html index 9a4952c3..18678dad 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/median/index.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/utils/median/index.html @@ -1 +1 @@ -redstone::utils::median - Rust

Module redstone::utils::median

source ·

Traits§

Functions§

\ No newline at end of file +redstone::utils::median - Rust

Module redstone::utils::median

source ·

Traits§

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/median/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/redstone/utils/median/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/median/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/redstone/utils/median/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/median/trait.Averageable.html b/static/rust/redstone/crypto_radix,network_radix/redstone/utils/median/trait.Averageable.html similarity index 81% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/median/trait.Averageable.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/utils/median/trait.Averageable.html index 6ac8fd85..59d7b656 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/median/trait.Averageable.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/utils/median/trait.Averageable.html @@ -1 +1 @@ -Averageable in redstone::utils::median - Rust

Trait redstone::utils::median::Averageable

source ·
trait Averageable: Add<Output = Self> + Shr<Output = Self> + From<u8> + Rem<Output = Self> + Copy { }

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Averageable for i32

Implementors§

\ No newline at end of file +Averageable in redstone::utils::median - Rust

Trait redstone::utils::median::Averageable

source ·
trait Averageable: Add<Output = Self> + Shr<Output = Self> + From<u8> + Rem<Output = Self> + Copy { }

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Averageable for i32

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/median/trait.Avg.html b/static/rust/redstone/crypto_radix,network_radix/redstone/utils/median/trait.Avg.html similarity index 91% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/median/trait.Avg.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/utils/median/trait.Avg.html index 2cd8ef5a..25fe01ec 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/median/trait.Avg.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/utils/median/trait.Avg.html @@ -1,5 +1,5 @@ -Avg in redstone::utils::median - Rust

Trait redstone::utils::median::Avg

source ·
trait Avg {
+Avg in redstone::utils::median - Rust

Trait redstone::utils::median::Avg

source ·
trait Avg {
     // Required method
     fn avg(self, other: Self) -> Self;
-}

Required Methods§

source

fn avg(self, other: Self) -> Self

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Avg for U256

source§

impl<T> Avg for T
where +}

Required Methods§

source

fn avg(self, other: Self) -> Self

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Avg for U256

source§

impl<T> Avg for T
where T: Averageable,

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/median/trait.Median.html b/static/rust/redstone/crypto_radix,network_radix/redstone/utils/median/trait.Median.html similarity index 91% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/median/trait.Median.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/utils/median/trait.Median.html index 60047574..405ac93d 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/median/trait.Median.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/utils/median/trait.Median.html @@ -1,7 +1,7 @@ -Median in redstone::utils::median - Rust

Trait redstone::utils::median::Median

source ·
pub(crate) trait Median {
+Median in redstone::utils::median - Rust

Trait redstone::utils::median::Median

source ·
pub(crate) trait Median {
     type Item;
 
     // Required method
     fn median(self) -> Self::Item;
-}

Required Associated Types§

Required Methods§

source

fn median(self) -> Self::Item

Implementations on Foreign Types§

source§

impl<T> Median for Vec<T>
where - T: Copy + Ord + Avg,

§

type Item = T

source§

fn median(self) -> Self::Item

Implementors§

\ No newline at end of file +}

Required Associated Types§

Required Methods§

source

fn median(self) -> Self::Item

Implementations on Foreign Types§

source§

impl<T> Median for Vec<T>
where + T: Copy + Ord + Avg,

§

type Item = T

source§

fn median(self) -> Self::Item

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/redstone/utils/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/redstone/utils/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/trim/index.html b/static/rust/redstone/crypto_radix,network_radix/redstone/utils/trim/index.html similarity index 88% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/trim/index.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/utils/trim/index.html index e7e6608a..b4c2c47c 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/trim/index.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/utils/trim/index.html @@ -1 +1 @@ -redstone::utils::trim - Rust

Module redstone::utils::trim

source ·

Traits§

\ No newline at end of file +redstone::utils::trim - Rust

Module redstone::utils::trim

source ·

Traits§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/trim/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/redstone/utils/trim/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/trim/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/redstone/utils/trim/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/trim/trait.Trim.html b/static/rust/redstone/crypto_radix,network_radix/redstone/utils/trim/trait.Trim.html similarity index 81% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/trim/trait.Trim.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/utils/trim/trait.Trim.html index e6fa965e..f73bdebb 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/trim/trait.Trim.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/utils/trim/trait.Trim.html @@ -1,5 +1,5 @@ -Trim in redstone::utils::trim - Rust

Trait redstone::utils::trim::Trim

source ·
pub trait Trim<T>
where - Self: Sized,
{ +Trim in redstone::utils::trim - Rust

Trait redstone::utils::trim::Trim

source ·
pub trait Trim<T>
where + Self: Sized,
{ // Required method - fn trim_end(&mut self, len: usize) -> T; -}

Required Methods§

source

fn trim_end(&mut self, len: usize) -> T

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Trim<<Radix as NetworkSpecific>::ValueRepr> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> U256

source§

impl Trim<u64> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> u64

source§

impl Trim<usize> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> usize

source§

impl Trim<Vec<u8>> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> Self

Implementors§

\ No newline at end of file + fn trim_end(&mut self, len: usize) -> T; +}

Required Methods§

source

fn trim_end(&mut self, len: usize) -> T

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Trim<<Radix as NetworkSpecific>::ValueRepr> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> U256

source§

impl Trim<u64> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> u64

source§

impl Trim<usize> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> usize

source§

impl Trim<Vec<u8>> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> Self

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/trim_zeros/index.html b/static/rust/redstone/crypto_radix,network_radix/redstone/utils/trim_zeros/index.html similarity index 86% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/trim_zeros/index.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/utils/trim_zeros/index.html index 2a2fd9e0..9377f30d 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/trim_zeros/index.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/utils/trim_zeros/index.html @@ -1 +1 @@ -redstone::utils::trim_zeros - Rust

Module redstone::utils::trim_zeros

source ·

Traits§

\ No newline at end of file +redstone::utils::trim_zeros - Rust

Module redstone::utils::trim_zeros

source ·

Traits§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/trim_zeros/sidebar-items.js b/static/rust/redstone/crypto_radix,network_radix/redstone/utils/trim_zeros/sidebar-items.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/trim_zeros/sidebar-items.js rename to static/rust/redstone/crypto_radix,network_radix/redstone/utils/trim_zeros/sidebar-items.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/trim_zeros/trait.TrimZeros.html b/static/rust/redstone/crypto_radix,network_radix/redstone/utils/trim_zeros/trait.TrimZeros.html similarity index 89% rename from static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/trim_zeros/trait.TrimZeros.html rename to static/rust/redstone/crypto_radix,network_radix/redstone/utils/trim_zeros/trait.TrimZeros.html index f1299ca4..ae49a55d 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/trim_zeros/trait.TrimZeros.html +++ b/static/rust/redstone/crypto_radix,network_radix/redstone/utils/trim_zeros/trait.TrimZeros.html @@ -1,4 +1,4 @@ -TrimZeros in redstone::utils::trim_zeros - Rust

Trait redstone::utils::trim_zeros::TrimZeros

source ·
pub trait TrimZeros {
+TrimZeros in redstone::utils::trim_zeros - Rust

Trait redstone::utils::trim_zeros::TrimZeros

source ·
pub trait TrimZeros {
     // Required method
     fn trim_zeros(self) -> Self;
-}

Required Methods§

source

fn trim_zeros(self) -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl TrimZeros for Vec<u8>

source§

fn trim_zeros(self) -> Self

Implementors§

\ No newline at end of file +}

Required Methods§

source

fn trim_zeros(self) -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl TrimZeros for Vec<u8>

source§

fn trim_zeros(self) -> Self

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_radix,network_radix/search-index.js b/static/rust/redstone/crypto_radix,network_radix/search-index.js new file mode 100644 index 00000000..0ad28cbf --- /dev/null +++ b/static/rust/redstone/crypto_radix,network_radix/search-index.js @@ -0,0 +1,5 @@ +var searchIndex = new Map(JSON.parse('[\ +["redstone",{"t":"CCCQQCCCCCCCIHHHFNNONNNONNNNNNONONNNNNHHFNNNNNNNNNNNNNONNNNOKMMMMIIICCHCHHICCCCCCCCKKMMKRKHMHMPPPKPGPPPPPPPNNNNNNNMNNNNNNNNMNNNNNNKMKKMMFNNNNNCNNNNNNNNCKMIRIKISTRRNNNNNHMHMCCCCCSSSSSSSSSSSFNNNNNNNNONNNNNNNNNOONHHNNNFNNNNNNNNNNNNONNNNNNHHNNNOHFNNNNNNNNONNNNNNNHHNNNCCCCKMKKRKMHMKMKM","n":["core","crypto","network","print_and_panic","print_debug","protocol","utils","aggregator","config","processor","processor_result","validator","Matrix","aggregate_matrix","aggregate_values","make_value_signer_matrix","Config","as_","assert_or_revert","block_timestamp","borrow","borrow_mut","contextual_try_into","feed_ids","feed_index","fmt","from","into","labelled_resolve","resolve","signer_count_threshold","signer_index","signers","try_from","try_into","type_id","validate_signer_count_threshold","validate_timestamp","make_processor_result","process_payload","ProcessorResult","as_","assert_or_revert","borrow","borrow_mut","contextual_try_into","eq","equivalent","equivalent","equivalent","fmt","from","into","labelled_resolve","min_timestamp","resolve","try_from","try_into","type_id","values","Validator","feed_index","signer_index","validate_signer_count_threshold","validate_timestamp","EcdsaUncompressedPublicKey","Keccak256Hash","Secp256SigRs","keccak256","recover","keccak256","crypto256","recover_address","recover_public_key","_Network","as_str","assert","error","flattened","from_bytes_repr","print_debug","radix","specific","AsAsciiStr","AsHexStr","as_ascii_str","as_hex_str","Assert","ErrorArg","Unwrap","assert_or_revert","assert_or_revert","assert_or_revert_bool_with","unwrap_or_revert","ArrayIsEmpty","ClonedContractError","ContractError","ContractErrorContent","CryptographicError","Error","InsufficientSignerCount","NonEmptyPayloadRemainder","NumberOverflow","SizeNotSupported","TimestampTooFuture","TimestampTooOld","WrongRedStoneMarker","as_","assert_or_revert","borrow","borrow_mut","clone","clone_into","clone_to_uninit","code","code","contextual_try_into","contract_error","fmt","fmt","from","into","labelled_resolve","message","resolve","to_owned","to_string","try_from","try_into","type_id","Flattened","flattened","FromBytesRepr","Sanitized","from_bytes_repr","sanitized","Radix","as_","borrow","borrow_mut","contextual_try_into","from","from_bytes_repr","into","labelled_resolve","print","resolve","revert","try_from","try_into","type_id","u256_ext","U256Ext","max_value","Bytes","BytesRepr","Network","NetworkSpecific","U256","VALUE_SIZE","VALUE_SIZE","ValueRepr","_Self","as_ascii_str","as_hex_str","avg","from_bytes_repr","max_value","print","print","revert","revert","constants","data_package","data_point","marker","payload","DATA_FEED_ID_BS","DATA_PACKAGES_COUNT_BS","DATA_POINTS_COUNT_BS","DATA_POINT_VALUE_BYTE_SIZE_BS","MAX_TIMESTAMP_AHEAD_MS","MAX_TIMESTAMP_DELAY_MS","REDSTONE_MARKER","REDSTONE_MARKER_BS","SIGNATURE_BS","TIMESTAMP_BS","UNSIGNED_METADATA_BYTE_SIZE_BS","DataPackage","as_","assert_or_revert","borrow","borrow_mut","clone","clone_into","clone_to_uninit","contextual_try_into","data_points","eq","equivalent","equivalent","equivalent","fmt","from","into","labelled_resolve","resolve","signer_address","timestamp","to_owned","trim_data_package","trim_data_packages","try_from","try_into","type_id","DataPoint","as_","assert_or_revert","borrow","borrow_mut","clone","clone_into","clone_to_uninit","contextual_try_into","eq","equivalent","equivalent","equivalent","feed_id","fmt","from","into","labelled_resolve","resolve","to_owned","trim_data_point","trim_data_points","try_from","try_into","type_id","value","trim_redstone_marker","Payload","as_","assert_or_revert","borrow","borrow_mut","clone","clone_into","clone_to_uninit","contextual_try_into","data_packages","fmt","from","into","labelled_resolve","make","resolve","to_owned","trim_metadata","trim_payload","try_from","try_into","type_id","filter","median","trim","trim_zeros","FilterSome","filter_some","Averageable","Avg","Item","Median","avg","maybe_pick_median","median","Trim","trim_end","TrimZeros","trim_zeros"],"q":[[0,"redstone"],[7,"redstone::core"],[12,"redstone::core::aggregator"],[16,"redstone::core::config"],[38,"redstone::core::processor"],[40,"redstone::core::processor_result"],[60,"redstone::core::validator"],[65,"redstone::crypto"],[70,"redstone::crypto::keccak256"],[71,"redstone::crypto::recover"],[73,"redstone::crypto::recover::crypto256"],[74,"redstone::network"],[83,"redstone::network::as_str"],[87,"redstone::network::assert"],[94,"redstone::network::error"],[130,"redstone::network::flattened"],[132,"redstone::network::from_bytes_repr"],[136,"redstone::network::radix"],[152,"redstone::network::radix::u256_ext"],[154,"redstone::network::specific"],[172,"redstone::protocol"],[177,"redstone::protocol::constants"],[188,"redstone::protocol::data_package"],[215,"redstone::protocol::data_point"],[241,"redstone::protocol::marker"],[242,"redstone::protocol::payload"],[264,"redstone::utils"],[268,"redstone::utils::filter"],[270,"redstone::utils::median"],[277,"redstone::utils::trim"],[279,"redstone::utils::trim_zeros"],[281,"core::option"],[282,"alloc::vec"],[283,"bnum::cast"],[284,"core::ops::function"],[285,"core::result"],[286,"core::fmt"],[287,"radix_rust::resolve"],[288,"core::any"],[289,"alloc::string"],[290,"core::cmp"]],"i":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,0,25,25,25,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27,29,0,35,0,0,32,0,35,9,9,9,0,9,0,9,9,9,9,9,9,9,9,9,9,9,9,9,9,36,9,9,9,9,9,9,9,9,36,9,9,9,9,9,9,0,38,0,0,39,40,0,51,51,51,51,51,0,51,51,51,51,51,51,51,51,0,0,42,0,52,0,0,0,0,52,52,52,1,1,1,1,1,0,52,0,52,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,5,5,5,0,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,0,0,43,43,43,43,0,0,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,0,0,21,21,21,0,0,0,0,0,44,0,0,48,0,45,0,48,0,49,0,50],"f":"`````````````{{{f{{f{{d{b}}}}}}h}{{f{b}}}}{{h{f{j}}}{{f{b}}}}{{{l{h}}{f{j}}}{{f{{f{{d{b}}}}}}}}`{cg{}{}{{n{e}}}}{{cei}g{}{}{}{{Ad{{l{g}}}{{A`{Ab}}}}}}`{{{l{c}}}{{l{e}}}{}{}}{{{l{Afc}}}{{l{Afe}}}{}{}}{{cl}{{Ah{e}}}{}{}}`{{{l{h}}b}{{d{Aj}}}}{{{l{h}}{l{AfAl}}}An}{cc{}}{ce{}{}}{{c{l{e}}}g{}B`{}}1`{{{l{h}}{l{{Bd{Bb}}}}}{{d{Aj}}}}`{c{{Ah{e}}}{}{}}0{{{l{c}}}Bf{}}{{{l{h}}Aj{l{{Bd{{d{b}}}}}}}{{f{b}}}}{{{l{h}}AjBh}Bh}{{hBj}Bl}{{hBn}Bl}`{cg{}{}{{n{e}}}}{{cei}g{}{}{}{{Ad{{l{g}}}{{A`{Ab}}}}}}{{{l{c}}}{{l{e}}}{}{}}{{{l{Afc}}}{{l{Afe}}}{}{}}{{cl}{{Ah{e}}}{}{}}{{{l{Bl}}{l{Bl}}}C`}{{{l{c}}{l{e}}}C`{}{}}00{{{l{Bl}}{l{AfAl}}}An}{cc{}}{ce{}{}}{{c{l{e}}}g{}B`{}}`1{c{{Ah{e}}}{}{}}0{{{l{c}}}Bf{}}``{{{l{Cb}}b}{{d{Aj}}}}{{{l{Cb}}{l{{Bd{Bb}}}}}{{d{Aj}}}}{{{l{Cb}}Aj{l{{Bd{{d{b}}}}}}}{{f{b}}}}{{{l{Cb}}AjBh}Bh}`````{{{l{{Bd{Bb}}}}}{{Cd{Bb}}}}`{{{f{Bb}}{f{Bb}}}{{f{Bb}}}}{{{Cd{Bb}}{Cd{Bb}}Bb}{{Cd{Bb}}}}```````````{{{l{Cf}}}Ch}{{{l{Cj}}}Ch}```{{ceg}cCl{{Cn{{l{c}}}{{A`{C`}}}}}{{Ad{{l{c}}}{{A`{Ab}}}}}}{{D`ce}D`{}{{Cn{{l{D`}}}{{A`{Ab}}}}}}{{C`c}Db{{Ad{}{{A`{Ab}}}}}}{{{Df{}{{Dd{c}}}}e}g{}{{Cn{{l{c}}}{{A`{Ab}}}}}{}}`````````````{cg{}{}{{n{e}}}}{{cei}g{}{}{}{{Ad{{l{g}}}{{A`{Ab}}}}}}{{{l{c}}}{{l{e}}}{}{}}{{{l{Afc}}}{{l{Afe}}}{}{}}{{{l{Ab}}}Ab}{{{l{c}}{l{Afe}}}Db{}{}}{{{l{c}}}Db{}}{{{l{Dh}}}Bb}{{{l{Ab}}}Dj}{{cl}{{Ah{e}}}{}{}}{cAbDh}{{{l{Ab}}{l{AfAl}}}An}0{cc{}}{ce{}{}}{{c{l{e}}}g{}B`{}}{{{l{Dh}}}Ch}2{{{l{c}}}e{}{}}{{{l{c}}}Ch{}}{c{{Ah{e}}}{}{}}0{{{l{c}}}Bf{}}`{{{l{Dl}}}c{}}``{cDn{}}{E`E`}`{cg{}{}{{n{e}}}}{{{l{c}}}{{l{e}}}{}{}}{{{l{Afc}}}{{l{Afe}}}{}{}}{{cl}{{Ah{e}}}{}{}}>`=<{ChDb}>{AbEb}::9``{{}Ed}`````````{{{l{b}}}Ch}0{{bb}b}{{{f{Bb}}}b}{{}b}6655`````````````````:{{cei}g{}{}{}{{Ad{{l{g}}}{{A`{Ab}}}}}}:9{{{l{j}}}j}{{{l{c}}{l{Afe}}}Db{}{}}{{{l{c}}}Db{}};`{{{l{j}}{l{j}}}C`}{{{l{c}}{l{e}}}C`{}{}}00{{{l{j}}{l{AfAl}}}An}{cc{}}{ce{}{}}{{c{l{e}}}g{}B`{}}1``{{{l{c}}}e{}{}}{{{l{Af{f{Bb}}}}}j}{{{l{Af{f{Bb}}}}Aj}{{f{j}}}}{c{{Ah{e}}}{}{}}0{{{l{c}}}Bf{}}`{cg{}{}{{n{e}}}}?{{{l{c}}}{{l{e}}}{}{}}{{{l{Afc}}}{{l{Afe}}}{}{}}{{{l{Ef}}}Ef}{{{l{c}}{l{Afe}}}Db{}{}}{{{l{c}}}Db{}}{{cl}{{Ah{e}}}{}{}}{{{l{Ef}}{l{Ef}}}C`}{{{l{c}}{l{e}}}C`{}{}}00`{{{l{Ef}}{l{AfAl}}}An}{cc{}}{ce{}{}}{{c{l{e}}}g{}B`{}}1{{{l{c}}}e{}{}}{{{l{Af{f{Bb}}}}Aj}Ef}{{{l{Af{f{Bb}}}}AjAj}{{f{Ef}}}}{c{{Ah{e}}}{}{}}0{{{l{c}}}Bf{}}`{{{l{Af{f{Bb}}}}}Db}`{cg{}{}{{n{e}}}}{{cei}g{}{}{}{{Ad{{l{g}}}{{A`{Ab}}}}}}{{{l{c}}}{{l{e}}}{}{}}{{{l{Afc}}}{{l{Afe}}}{}{}}{{{l{Bj}}}Bj}{{{l{c}}{l{Afe}}}Db{}{}}{{{l{c}}}Db{}}{{cl}{{Ah{e}}}{}{}}`{{{l{Bj}}{l{AfAl}}}An}{cc{}}{ce{}{}}{{c{l{e}}}g{}B`{}}{{{l{Af{f{Bb}}}}}Bj}2{{{l{c}}}e{}{}}{{{l{Af{f{Bb}}}}}Aj}2{c{{Ah{e}}}{}{}}0{{{l{c}}}Bf{}}`````{{{l{Eh}}}c{}}````{{EjEj}Ej}{{ccc}{{d{c}}}El}{{{F`{}{{En{c}}}}}c{}}`{{{l{AfFb}}Aj}c{}}`{FdFd}","D":"Ed","p":[[8,"U256",154],[6,"Option",281],[5,"Vec",282],[5,"Config",16],[5,"DataPackage",188],[1,"reference"],[10,"CastFrom",283],[17,"Output"],[6,"Error",94],[10,"FnOnce",284],[0,"mut"],[6,"Result",285],[1,"usize"],[5,"Formatter",286],[8,"Result",286],[10,"LabelResolver",287],[1,"u8"],[1,"slice"],[5,"TypeId",288],[1,"u64"],[5,"Payload",242],[5,"ProcessorResult",40],[8,"Bytes",154],[1,"bool"],[10,"Validator",60],[1,"array"],[10,"AsAsciiStr",83],[5,"String",289],[10,"AsHexStr",83],[10,"Debug",286],[10,"Fn",284],[10,"Assert",87],[1,"unit"],[17,"ErrorArg"],[10,"Unwrap",87],[10,"ContractErrorContent",94],[1,"u16"],[10,"Flattened",130],[10,"FromBytesRepr",132],[10,"Sanitized",132],[1,"never"],[10,"U256Ext",152],[5,"DataPoint",215],[10,"FilterSome",268],[10,"Avg",270],[10,"PartialOrd",290],[17,"Item"],[10,"Median",270],[10,"Trim",277],[10,"TrimZeros",279],[5,"Radix",136],[10,"NetworkSpecific",154]],"r":[],"b":[[118,"impl-Display-for-Error"],[119,"impl-Debug-for-Error"]],"c":"OjAAAAAAAAA=","e":"OzAAAAEAAO8AFAABAA0AEAAAABIAAQAVAAIAGQABAB0AAQAgAAAAIgAFACoACQA2AAAAOAADAEIAHABiAAAAbAAMAHsAEgCPAAAAkQA6AM4AGADpABQAAAEZAA=="}]\ +]')); +if (typeof exports !== 'undefined') exports.searchIndex = searchIndex; +else if (window.initSearch) window.initSearch(searchIndex); diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/search.desc/redstone/redstone-desc-0-.js b/static/rust/redstone/crypto_radix,network_radix/search.desc/redstone/redstone-desc-0-.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/search.desc/redstone/redstone-desc-0-.js rename to static/rust/redstone/crypto_radix,network_radix/search.desc/redstone/redstone-desc-0-.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/settings.html b/static/rust/redstone/crypto_radix,network_radix/settings.html similarity index 82% rename from static/rust/redstone/crypto_secp256k1,network_radix/settings.html rename to static/rust/redstone/crypto_radix,network_radix/settings.html index 9631dcb2..6da7f2d5 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/settings.html +++ b/static/rust/redstone/crypto_radix,network_radix/settings.html @@ -1 +1 @@ -Settings

Rustdoc settings

Back
\ No newline at end of file +Settings

Rustdoc settings

Back
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src-files.js b/static/rust/redstone/crypto_radix,network_radix/src-files.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/src-files.js rename to static/rust/redstone/crypto_radix,network_radix/src-files.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/core/aggregator.rs.html b/static/rust/redstone/crypto_radix,network_radix/src/redstone/core/aggregator.rs.html similarity index 90% rename from static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/core/aggregator.rs.html rename to static/rust/redstone/crypto_radix,network_radix/src/redstone/core/aggregator.rs.html index e839b506..ed9efa50 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/core/aggregator.rs.html +++ b/static/rust/redstone/crypto_radix,network_radix/src/redstone/core/aggregator.rs.html @@ -1,4 +1,4 @@ -aggregator.rs - source
1
+aggregator.rs - source
1
 2
 3
 4
@@ -289,6 +289,12 @@
 289
 290
 291
+292
+293
+294
+295
+296
+297
 
use crate::{
     core::{config::Config, validator::Validator},
     network::specific::U256,
@@ -368,6 +374,9 @@
         helpers::iter_into::{IterInto, IterIntoOpt, OptIterIntoOpt},
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_aggregate_matrix() {
         let matrix = vec![
@@ -445,6 +454,9 @@
         protocol::data_package::DataPackage,
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_make_value_signer_matrix_empty() {
         let config = Config::test();
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/core/config.rs.html b/static/rust/redstone/crypto_radix,network_radix/src/redstone/core/config.rs.html
similarity index 56%
rename from static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/core/config.rs.html
rename to static/rust/redstone/crypto_radix,network_radix/src/redstone/core/config.rs.html
index 0b9ca7f7..a5b2ec60 100644
--- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/core/config.rs.html
+++ b/static/rust/redstone/crypto_radix,network_radix/src/redstone/core/config.rs.html
@@ -1,4 +1,4 @@
-config.rs - source
1
+config.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_radix,network_radix/src/redstone/core/mod.rs.html b/static/rust/redstone/crypto_radix,network_radix/src/redstone/core/mod.rs.html
new file mode 100644
index 00000000..3aa3fec4
--- /dev/null
+++ b/static/rust/redstone/crypto_radix,network_radix/src/redstone/core/mod.rs.html
@@ -0,0 +1,21 @@
+mod.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+
pub mod config;
+pub mod processor;
+pub mod processor_result;
+
+mod aggregator;
+mod validator;
+
+#[cfg(feature = "helpers")]
+#[cfg(test)]
+mod test_helpers;
+
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/core/processor.rs.html b/static/rust/redstone/crypto_radix,network_radix/src/redstone/core/processor.rs.html similarity index 74% rename from static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/core/processor.rs.html rename to static/rust/redstone/crypto_radix,network_radix/src/redstone/core/processor.rs.html index 2e92e10d..15860266 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/core/processor.rs.html +++ b/static/rust/redstone/crypto_radix,network_radix/src/redstone/core/processor.rs.html @@ -1,4 +1,4 @@ -processor.rs - source
1
+processor.rs - source
1
 2
 3
 4
@@ -99,6 +99,9 @@
 99
 100
 101
+102
+103
+104
 
use crate::{
     core::{
         aggregator::aggregate_values, config::Config, processor_result::ProcessorResult,
@@ -160,6 +163,9 @@
         protocol::{data_package::DataPackage, payload::Payload},
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_make_processor_result() {
         let data_packages = vec![
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/core/processor_result.rs.html b/static/rust/redstone/crypto_radix,network_radix/src/redstone/core/processor_result.rs.html
similarity index 52%
rename from static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/core/processor_result.rs.html
rename to static/rust/redstone/crypto_radix,network_radix/src/redstone/core/processor_result.rs.html
index ecdffb37..8352b915 100644
--- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/core/processor_result.rs.html
+++ b/static/rust/redstone/crypto_radix,network_radix/src/redstone/core/processor_result.rs.html
@@ -1,4 +1,4 @@
-processor_result.rs - source
1
+processor_result.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/core/validator.rs.html b/static/rust/redstone/crypto_radix,network_radix/src/redstone/core/validator.rs.html
similarity index 91%
rename from static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/core/validator.rs.html
rename to static/rust/redstone/crypto_radix,network_radix/src/redstone/core/validator.rs.html
index 1fed8ca0..30f7ee53 100644
--- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/core/validator.rs.html
+++ b/static/rust/redstone/crypto_radix,network_radix/src/redstone/core/validator.rs.html
@@ -1,4 +1,4 @@
-validator.rs - source
1
+validator.rs - source
1
 2
 3
 4
@@ -284,6 +284,9 @@
 284
 285
 286
+287
+288
+289
 
use crate::{
     core::config::Config,
     network::{
@@ -421,6 +424,9 @@
     };
     use itertools::Itertools;
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_feed_index() {
         let config = Config::test();
diff --git a/static/rust/redstone/crypto_radix,network_radix/src/redstone/crypto/keccak256.rs.html b/static/rust/redstone/crypto_radix,network_radix/src/redstone/crypto/keccak256.rs.html
new file mode 100644
index 00000000..aadbac5d
--- /dev/null
+++ b/static/rust/redstone/crypto_radix,network_radix/src/redstone/crypto/keccak256.rs.html
@@ -0,0 +1,99 @@
+keccak256.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+
use crate::crypto::Keccak256Hash;
+#[cfg(not(all(feature = "crypto_radix", target_arch = "wasm32")))]
+use sha3::Digest;
+
+#[cfg(not(all(feature = "crypto_radix", target_arch = "wasm32")))]
+pub fn keccak256(data: &[u8]) -> Keccak256Hash {
+    sha3::Keccak256::new_with_prefix(data)
+        .finalize()
+        .as_slice()
+        .try_into()
+        .unwrap()
+}
+
+#[cfg(all(feature = "crypto_radix", target_arch = "wasm32"))]
+pub fn keccak256(data: &[u8]) -> Keccak256Hash {
+    scrypto::prelude::CryptoUtils::keccak256_hash(data).0
+}
+
+#[cfg(not(all(feature = "crypto_radix", target_arch = "wasm32")))]
+#[cfg(feature = "helpers")]
+#[cfg(test)]
+mod tests {
+    use crate::{crypto::keccak256::keccak256, helpers::hex::hex_to_bytes};
+
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
+    const MESSAGE: &str = "415641580000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d394303d018d79bf0ba000000020000001";
+    const MESSAGE_HASH: &str = "f0805644755393876d0e917e553f0c206f8bc68b7ebfe73a79d2a9e7f5a4cea6";
+    const EMPTY_MESSAGE_HASH: &str =
+        "c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470";
+
+    #[test]
+    fn test_keccak256() {
+        let hash = keccak256(hex_to_bytes(MESSAGE.into()).as_slice());
+
+        assert_eq!(hash.as_ref(), hex_to_bytes(MESSAGE_HASH.into()).as_slice());
+    }
+
+    #[test]
+    fn test_keccak256_empty() {
+        let hash = keccak256(vec![].as_slice());
+
+        assert_eq!(
+            hash.as_ref(),
+            hex_to_bytes(EMPTY_MESSAGE_HASH.into()).as_slice()
+        );
+    }
+}
+
\ No newline at end of file diff --git a/static/rust/redstone/crypto_radix,network_radix/src/redstone/crypto/mod.rs.html b/static/rust/redstone/crypto_radix,network_radix/src/redstone/crypto/mod.rs.html new file mode 100644 index 00000000..c3470603 --- /dev/null +++ b/static/rust/redstone/crypto_radix,network_radix/src/redstone/crypto/mod.rs.html @@ -0,0 +1,13 @@ +mod.rs - source
1
+2
+3
+4
+5
+6
+
mod keccak256;
+pub(crate) mod recover;
+
+pub(crate) type Keccak256Hash = [u8; 32];
+pub(crate) type Secp256SigRs = [u8; 64];
+pub(crate) type EcdsaUncompressedPublicKey = [u8; 65];
+
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/crypto/recover.rs.html b/static/rust/redstone/crypto_radix,network_radix/src/redstone/crypto/recover.rs.html similarity index 58% rename from static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/crypto/recover.rs.html rename to static/rust/redstone/crypto_radix,network_radix/src/redstone/crypto/recover.rs.html index f03e84b0..3b917f5c 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/crypto/recover.rs.html +++ b/static/rust/redstone/crypto_radix,network_radix/src/redstone/crypto/recover.rs.html @@ -1,4 +1,4 @@ -recover.rs - source
1
+recover.rs - source
1
 2
 3
 4
@@ -131,14 +131,59 @@
 131
 132
 133
-
use crate::crypto::{keccak256, recover::crypto256::recover_public_key};
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+
use crate::crypto::{
+    keccak256, recover::crypto256::recover_public_key, EcdsaUncompressedPublicKey, Keccak256Hash,
+    Secp256SigRs,
+};
 
 pub fn recover_address(message: Vec<u8>, signature: Vec<u8>) -> Vec<u8> {
-    let recovery_byte = signature[64]; // 65-byte representation
+    //TODO: check malleability support by the libraries
+    let recovery_byte = signature[64]; // 65-byte representation
     let msg_hash = keccak256::keccak256(message.as_slice());
     let key = recover_public_key(
         msg_hash,
-        &signature[..64],
+        signature[..64].try_into().unwrap(),
         recovery_byte - (if recovery_byte >= 27 { 27 } else { 0 }),
     );
     let key_hash = keccak256::keccak256(&key[1..]); // skip first uncompressed-key byte
@@ -148,66 +193,100 @@
 
 #[cfg(feature = "crypto_secp256k1")]
 pub(crate) mod crypto256 {
+    use super::{EcdsaUncompressedPublicKey, Keccak256Hash, Secp256SigRs};
     use crate::network::{assert::Unwrap, error::Error};
     use secp256k1::{ecdsa::RecoverableSignature, Message, Secp256k1 as Secp256k1Curve};
 
     pub(crate) fn recover_public_key(
-        message_hash: Box<[u8]>,
-        signature_bytes: &[u8],
+        message_hash: Keccak256Hash,
+        signature_bytes: Secp256SigRs,
         recovery_byte: u8,
-    ) -> Box<[u8]> {
-        let msg = Message::from_digest_slice(message_hash.as_ref())
-            .unwrap_or_revert(|_| Error::CryptographicError(message_hash.len()));
+    ) -> EcdsaUncompressedPublicKey {
+        let msg = Message::from_digest(message_hash);
 
         let recovery_id = secp256k1::ecdsa::RecoveryId::from_i32(recovery_byte.into())
             .unwrap_or_revert(|_| Error::CryptographicError(recovery_byte.into()));
 
         let sig: RecoverableSignature =
-            RecoverableSignature::from_compact(signature_bytes, recovery_id)
+            RecoverableSignature::from_compact(signature_bytes.as_slice(), recovery_id)
                 .unwrap_or_revert(|_| Error::CryptographicError(signature_bytes.len()));
 
         let public_key = Secp256k1Curve::new().recover_ecdsa(&msg, &sig);
 
-        public_key.unwrap().serialize_uncompressed().into()
+        public_key.unwrap().serialize_uncompressed()
     }
 }
 
 #[cfg(feature = "crypto_k256")]
 pub(crate) mod crypto256 {
+    use super::{EcdsaUncompressedPublicKey, Keccak256Hash, Secp256SigRs};
     use crate::network::{assert::Unwrap, error::Error};
     use k256::ecdsa::{RecoveryId, Signature, VerifyingKey};
 
     pub(crate) fn recover_public_key(
-        message_hash: Box<[u8]>,
-        signature_bytes: &[u8],
+        message_hash: Keccak256Hash,
+        signature_bytes: Secp256SigRs,
         recovery_byte: u8,
-    ) -> Box<[u8]> {
+    ) -> EcdsaUncompressedPublicKey {
         let recovery_id = RecoveryId::from_byte(recovery_byte)
             .unwrap_or_revert(|_| Error::CryptographicError(recovery_byte.into()));
 
-        let signature = Signature::try_from(signature_bytes)
+        let signature = Signature::try_from(signature_bytes.as_slice())
             .unwrap_or_revert(|_| Error::CryptographicError(signature_bytes.len()));
 
         let recovered_key =
             VerifyingKey::recover_from_prehash(message_hash.as_ref(), &signature, recovery_id)
-                .map(|key| key.to_encoded_point(false).to_bytes());
+                .map(|key| key.to_encoded_point(false).to_bytes())
+                .unwrap_or_revert(|_| Error::CryptographicError(0));
 
-        recovered_key.unwrap()
+        recovered_key.as_ref().try_into().unwrap()
     }
 }
 
-#[cfg(all(not(feature = "crypto_k256"), not(feature = "crypto_secp256k1")))]
+#[cfg(all(feature = "crypto_radix", target_arch = "wasm32"))]
 pub(crate) mod crypto256 {
+    use super::{EcdsaUncompressedPublicKey, Keccak256Hash, Secp256SigRs};
+    use crate::network::assert::Unwrap;
+    use crate::network::error::Error;
+    use radix_common::crypto::{Hash, IsHash, Secp256k1Signature};
+    use scrypto::crypto_utils::CryptoUtils;
+
     pub(crate) fn recover_public_key(
-        _message_hash: Box<[u8]>,
-        _signature_bytes: &[u8],
+        message_hash: Keccak256Hash,
+        signature_bytes: Secp256SigRs,
+        recovery_byte: u8,
+    ) -> EcdsaUncompressedPublicKey {
+        let hash = Hash::from_bytes(message_hash);
+
+        let mut sig_vec = Vec::with_capacity(65);
+        sig_vec.push(recovery_byte);
+        sig_vec.extend(signature_bytes);
+        let signature = Secp256k1Signature::try_from(sig_vec.as_slice())
+            .unwrap_or_revert(|_| Error::CryptographicError(signature_bytes.len()));
+
+        CryptoUtils::secp256k1_ecdsa_verify_and_key_recover_uncompressed(hash, signature).0
+    }
+}
+
+#[cfg(all(
+    not(feature = "crypto_k256"),
+    not(feature = "crypto_secp256k1"),
+    not(all(feature = "crypto_radix", target_arch = "wasm32"))
+))]
+pub(crate) mod crypto256 {
+    use super::{EcdsaUncompressedPublicKey, Keccak256Hash, Secp256SigRs};
+
+    pub(crate) fn recover_public_key(
+        _message_hash: Keccak256Hash,
+        _signature_bytes: Secp256SigRs,
         _recovery_byte: u8,
-    ) -> Box<[u8]> {
+    ) -> EcdsaUncompressedPublicKey {
         panic!("Not implemented!")
     }
 }
 
-#[cfg(feature = "helpers")]
+#[cfg(not(all(feature = "crypto_radix", target_arch = "wasm32")))]
+#[cfg(feature = "helpers")]
 #[cfg(test)]
 mod tests {
     use crate::{
@@ -215,6 +294,9 @@
         helpers::hex::hex_to_bytes,
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const MESSAGE: &str = "415641580000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d394303d018d79bf0ba000000020000001";
     const MESSAGE_HASH: &str = "f0805644755393876d0e917e553f0c206f8bc68b7ebfe73a79d2a9e7f5a4cea6";
     const SIG_V27: &str = "475195641dae43318e194c3d9e5fc308773d6fdf5e197e02644dfd9ca3d19e3e2bd7d8656428f7f02e658a16b8f83722169c57126cc50bec8fad188b1bac6d19";
@@ -228,16 +310,16 @@
 
     #[test]
     fn test_recover_public_key_v27() {
-        let public_key = recover_public_key(u8_box(MESSAGE_HASH), &u8_box(SIG_V27), 0);
+        let public_key = recover_public_key(u8_slice(MESSAGE_HASH), u8_slice(SIG_V27), 0);
 
-        assert_eq!(u8_box(PUBLIC_KEY_V27), public_key);
+        assert_eq!(u8_slice(PUBLIC_KEY_V27), public_key);
     }
 
     #[test]
     fn test_recover_public_key_v28() {
-        let public_key = recover_public_key(u8_box(MESSAGE_HASH), &u8_box(SIG_V28), 1);
+        let public_key = recover_public_key(u8_slice(MESSAGE_HASH), u8_slice(SIG_V28), 1);
 
-        assert_eq!(u8_box(PUBLIC_KEY_V28), public_key);
+        assert_eq!(u8_slice(PUBLIC_KEY_V28), public_key);
     }
 
     #[test]
@@ -260,8 +342,8 @@
         assert_eq!(hex_to_bytes(ADDRESS_V28.into()), address);
     }
 
-    fn u8_box(str: &str) -> Box<[u8]> {
-        hex_to_bytes(str.into()).as_slice().into()
+    fn u8_slice<const N: usize>(str: &str) -> [u8; N] {
+        hex_to_bytes(str.into()).as_slice().try_into().unwrap()
     }
 }
 
\ No newline at end of file diff --git a/static/rust/redstone/crypto_radix,network_radix/src/redstone/lib.rs.html b/static/rust/redstone/crypto_radix,network_radix/src/redstone/lib.rs.html new file mode 100644 index 00000000..dc7e6ba2 --- /dev/null +++ b/static/rust/redstone/crypto_radix,network_radix/src/redstone/lib.rs.html @@ -0,0 +1,33 @@ +lib.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+
//! # RedStone
+//!
+//! `redstone` is a collection of utilities to make deserializing&decrypting RedStone payload.
+//! It includes a pure Rust implementation, along with extensions for certain networks.
+//!
+//! Different crypto-mechanisms are easily injectable.
+//! The current implementation contains `secp256k1`- and `k256`-based variants.
+
+pub mod core;
+mod crypto;
+pub mod network;
+mod protocol;
+mod utils;
+
+#[cfg(feature = "helpers")]
+pub mod helpers;
+
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/as_str.rs.html b/static/rust/redstone/crypto_radix,network_radix/src/redstone/network/as_str.rs.html similarity index 80% rename from static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/as_str.rs.html rename to static/rust/redstone/crypto_radix,network_radix/src/redstone/network/as_str.rs.html index f0b58bfb..95d88b4b 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/as_str.rs.html +++ b/static/rust/redstone/crypto_radix,network_radix/src/redstone/network/as_str.rs.html @@ -1,4 +1,4 @@ -as_str.rs - source
1
+as_str.rs - source
1
 2
 3
 4
@@ -115,6 +115,9 @@
 115
 116
 117
+118
+119
+120
 
extern crate alloc;
 
 use crate::network::specific::U256;
@@ -214,6 +217,9 @@
         specific::U256,
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const ETH: u32 = 4543560u32;
 
     #[test]
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/assert.rs.html b/static/rust/redstone/crypto_radix,network_radix/src/redstone/network/assert.rs.html
similarity index 80%
rename from static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/assert.rs.html
rename to static/rust/redstone/crypto_radix,network_radix/src/redstone/network/assert.rs.html
index cfd43818..c6e40334 100644
--- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/assert.rs.html
+++ b/static/rust/redstone/crypto_radix,network_radix/src/redstone/network/assert.rs.html
@@ -1,4 +1,4 @@
-assert.rs - source
1
+assert.rs - source
1
 2
 3
 4
@@ -134,6 +134,12 @@
 134
 135
 136
+137
+138
+139
+140
+141
+142
 
use crate::{
     network::{error::Error, specific::revert},
     print_debug,
@@ -217,6 +223,9 @@
         error::Error,
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_assert_or_revert_bool_with_true() {
         assert_or_revert_bool_with(true, || Error::ArrayIsEmpty);
@@ -244,6 +253,9 @@
 mod unwrap_or_revert_tests {
     use crate::network::{assert::Unwrap, error::Error};
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_unwrap_or_revert_some() {
         let result = Some(543).unwrap_or_revert(|_| Error::CryptographicError(333));
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/casper/error.rs.html b/static/rust/redstone/crypto_radix,network_radix/src/redstone/network/casper/error.rs.html
similarity index 100%
rename from static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/casper/error.rs.html
rename to static/rust/redstone/crypto_radix,network_radix/src/redstone/network/casper/error.rs.html
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/casper/from_bytes_repr.rs.html b/static/rust/redstone/crypto_radix,network_radix/src/redstone/network/casper/from_bytes_repr.rs.html
similarity index 100%
rename from static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/casper/from_bytes_repr.rs.html
rename to static/rust/redstone/crypto_radix,network_radix/src/redstone/network/casper/from_bytes_repr.rs.html
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/casper/mod.rs.html b/static/rust/redstone/crypto_radix,network_radix/src/redstone/network/casper/mod.rs.html
similarity index 100%
rename from static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/casper/mod.rs.html
rename to static/rust/redstone/crypto_radix,network_radix/src/redstone/network/casper/mod.rs.html
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/error.rs.html b/static/rust/redstone/crypto_radix,network_radix/src/redstone/network/error.rs.html
similarity index 88%
rename from static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/error.rs.html
rename to static/rust/redstone/crypto_radix,network_radix/src/redstone/network/error.rs.html
index 4c0588a6..e61e278d 100644
--- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/error.rs.html
+++ b/static/rust/redstone/crypto_radix,network_radix/src/redstone/network/error.rs.html
@@ -1,4 +1,4 @@
-error.rs - source
1
+error.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/flattened.rs.html b/static/rust/redstone/crypto_radix,network_radix/src/redstone/network/flattened.rs.html
similarity index 58%
rename from static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/flattened.rs.html
rename to static/rust/redstone/crypto_radix,network_radix/src/redstone/network/flattened.rs.html
index f8226f69..3dd50203 100644
--- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/flattened.rs.html
+++ b/static/rust/redstone/crypto_radix,network_radix/src/redstone/network/flattened.rs.html
@@ -1,4 +1,4 @@
-flattened.rs - source
1
+flattened.rs - source
1
 2
 3
 4
@@ -33,6 +33,9 @@
 33
 34
 35
+36
+37
+38
 
use crate::network::specific::Bytes;
 
 pub trait Flattened<T> {
@@ -50,6 +53,9 @@
 mod tests {
     use crate::network::{flattened::Flattened, specific::Bytes};
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_bytes_flattened() {
         #[allow(clippy::useless_conversion)]
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/from_bytes_repr.rs.html b/static/rust/redstone/crypto_radix,network_radix/src/redstone/network/from_bytes_repr.rs.html
similarity index 82%
rename from static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/from_bytes_repr.rs.html
rename to static/rust/redstone/crypto_radix,network_radix/src/redstone/network/from_bytes_repr.rs.html
index 0c7663c5..46079bf7 100644
--- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/from_bytes_repr.rs.html
+++ b/static/rust/redstone/crypto_radix,network_radix/src/redstone/network/from_bytes_repr.rs.html
@@ -1,4 +1,4 @@
-from_bytes_repr.rs - source
1
+from_bytes_repr.rs - source
1
 2
 3
 4
@@ -126,6 +126,9 @@
 126
 127
 128
+129
+130
+131
 
use crate::network::specific::VALUE_SIZE;
 
 pub trait FromBytesRepr<T> {
@@ -160,6 +163,9 @@
         specific::{U256, VALUE_SIZE},
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[cfg(feature = "network_radix")]
     use crate::network::radix::u256_ext::U256Ext;
 
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/mod.rs.html b/static/rust/redstone/crypto_radix,network_radix/src/redstone/network/mod.rs.html
similarity index 51%
rename from static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/mod.rs.html
rename to static/rust/redstone/crypto_radix,network_radix/src/redstone/network/mod.rs.html
index f79fb758..55e94cdf 100644
--- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/mod.rs.html
+++ b/static/rust/redstone/crypto_radix,network_radix/src/redstone/network/mod.rs.html
@@ -1,4 +1,4 @@
-mod.rs - source
1
+mod.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/print_debug.rs.html b/static/rust/redstone/crypto_radix,network_radix/src/redstone/network/print_debug.rs.html
similarity index 54%
rename from static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/print_debug.rs.html
rename to static/rust/redstone/crypto_radix,network_radix/src/redstone/network/print_debug.rs.html
index 1fca4faf..52808df8 100644
--- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/print_debug.rs.html
+++ b/static/rust/redstone/crypto_radix,network_radix/src/redstone/network/print_debug.rs.html
@@ -1,4 +1,4 @@
-print_debug.rs - source
1
+print_debug.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/pure/from_bytes_repr.rs.html b/static/rust/redstone/crypto_radix,network_radix/src/redstone/network/pure/from_bytes_repr.rs.html
similarity index 100%
rename from static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/pure/from_bytes_repr.rs.html
rename to static/rust/redstone/crypto_radix,network_radix/src/redstone/network/pure/from_bytes_repr.rs.html
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/pure/mod.rs.html b/static/rust/redstone/crypto_radix,network_radix/src/redstone/network/pure/mod.rs.html
similarity index 100%
rename from static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/pure/mod.rs.html
rename to static/rust/redstone/crypto_radix,network_radix/src/redstone/network/pure/mod.rs.html
diff --git a/static/rust/redstone/crypto_radix,network_radix/src/redstone/network/radix/from_bytes_repr.rs.html b/static/rust/redstone/crypto_radix,network_radix/src/redstone/network/radix/from_bytes_repr.rs.html
new file mode 100644
index 00000000..27c8f686
--- /dev/null
+++ b/static/rust/redstone/crypto_radix,network_radix/src/redstone/network/radix/from_bytes_repr.rs.html
@@ -0,0 +1,41 @@
+from_bytes_repr.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+
use crate::network::{
+    from_bytes_repr::{FromBytesRepr, Sanitized},
+    specific::U256,
+};
+
+impl FromBytesRepr<Vec<u8>> for U256 {
+    fn from_bytes_repr(bytes: Vec<u8>) -> Self {
+        match bytes.len() {
+            0 => U256::ZERO,
+            1 => U256::from(bytes[0]),
+            _ => {
+                // TODO: make it cheaper
+                let mut bytes_le = bytes.sanitized();
+                bytes_le.reverse();
+
+                U256::from_le_bytes(bytes_le.as_slice())
+            }
+        }
+    }
+}
+
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/radix/mod.rs.html b/static/rust/redstone/crypto_radix,network_radix/src/redstone/network/radix/mod.rs.html similarity index 56% rename from static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/radix/mod.rs.html rename to static/rust/redstone/crypto_radix,network_radix/src/redstone/network/radix/mod.rs.html index 63716f28..dfb01387 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/radix/mod.rs.html +++ b/static/rust/redstone/crypto_radix,network_radix/src/redstone/network/radix/mod.rs.html @@ -1,4 +1,4 @@ -mod.rs - source
1
+mod.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_radix,network_radix/src/redstone/network/radix/u256_ext.rs.html b/static/rust/redstone/crypto_radix,network_radix/src/redstone/network/radix/u256_ext.rs.html
new file mode 100644
index 00000000..71dc2f4c
--- /dev/null
+++ b/static/rust/redstone/crypto_radix,network_radix/src/redstone/network/radix/u256_ext.rs.html
@@ -0,0 +1,23 @@
+u256_ext.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+
use crate::network::specific::U256;
+
+pub trait U256Ext {
+    fn max_value() -> Self;
+}
+
+impl U256Ext for U256 {
+    fn max_value() -> Self {
+        Self::MAX
+    }
+}
+
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/specific.rs.html b/static/rust/redstone/crypto_radix,network_radix/src/redstone/network/specific.rs.html similarity index 51% rename from static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/specific.rs.html rename to static/rust/redstone/crypto_radix,network_radix/src/redstone/network/specific.rs.html index 8d698709..33830b2a 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/specific.rs.html +++ b/static/rust/redstone/crypto_radix,network_radix/src/redstone/network/specific.rs.html @@ -1,4 +1,4 @@ -specific.rs - source
1
+specific.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/protocol/constants.rs.html b/static/rust/redstone/crypto_radix,network_radix/src/redstone/protocol/constants.rs.html
similarity index 56%
rename from static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/protocol/constants.rs.html
rename to static/rust/redstone/crypto_radix,network_radix/src/redstone/protocol/constants.rs.html
index 3e2f4fd5..7b1e4887 100644
--- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/protocol/constants.rs.html
+++ b/static/rust/redstone/crypto_radix,network_radix/src/redstone/protocol/constants.rs.html
@@ -1,4 +1,4 @@
-constants.rs - source
1
+constants.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/protocol/data_package.rs.html b/static/rust/redstone/crypto_radix,network_radix/src/redstone/protocol/data_package.rs.html
similarity index 87%
rename from static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/protocol/data_package.rs.html
rename to static/rust/redstone/crypto_radix,network_radix/src/redstone/protocol/data_package.rs.html
index a1d603e6..f3e8cc32 100644
--- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/protocol/data_package.rs.html
+++ b/static/rust/redstone/crypto_radix,network_radix/src/redstone/protocol/data_package.rs.html
@@ -1,4 +1,4 @@
-data_package.rs - source
1
+data_package.rs - source
1
 2
 3
 4
@@ -213,6 +213,10 @@
 213
 214
 215
+216
+217
+218
+219
 
use crate::{
     crypto::recover::recover_address,
     network::as_str::AsHexStr,
@@ -281,7 +285,8 @@
     }
 }
 
-#[cfg(feature = "helpers")]
+#[cfg(not(all(feature = "crypto_radix", target_arch = "wasm32")))]
+#[cfg(feature = "helpers")]
 #[cfg(test)]
 mod tests {
     use crate::{
@@ -297,6 +302,9 @@
         },
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const DATA_PACKAGE_BYTES_1: &str = "4554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000360cafc94e018d79bf0ba00000002000000151afa8c5c3caf6004b42c0fb17723e524f993b9ecbad3b9bce5ec74930fa436a3660e8edef10e96ee5f222de7ef5787c02ca467c0ec18daa2907b43ac20c63c11c";
     const DATA_PACKAGE_BYTES_2: &str = "4554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000360cdd851e018d79bf0ba000000020000001473fd9dc72e6814a7de719b403cf4c9eba08934a643fd0666c433b806b31e69904f2226ffd3c8ef75861b11b5e32a1fda4b1458e0da4605a772dfba2a812f3ee1b";
 
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/protocol/data_point.rs.html b/static/rust/redstone/crypto_radix,network_radix/src/redstone/protocol/data_point.rs.html
similarity index 83%
rename from static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/protocol/data_point.rs.html
rename to static/rust/redstone/crypto_radix,network_radix/src/redstone/protocol/data_point.rs.html
index e643085a..b9e92d43 100644
--- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/protocol/data_point.rs.html
+++ b/static/rust/redstone/crypto_radix,network_radix/src/redstone/protocol/data_point.rs.html
@@ -1,4 +1,4 @@
-data_point.rs - source
1
+data_point.rs - source
1
 2
 3
 4
@@ -155,6 +155,9 @@
 155
 156
 157
+158
+159
+160
 
use crate::{
     network::{
         as_str::{AsAsciiStr, AsHexStr},
@@ -229,6 +232,9 @@
     };
     use std::ops::Shr;
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const DATA_POINT_BYTES_TAIL: &str = "4554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000360cafc94e";
     const VALUE: u128 = 232141080910;
 
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/protocol/marker.rs.html b/static/rust/redstone/crypto_radix,network_radix/src/redstone/protocol/marker.rs.html
similarity index 69%
rename from static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/protocol/marker.rs.html
rename to static/rust/redstone/crypto_radix,network_radix/src/redstone/protocol/marker.rs.html
index 15b31817..7646024c 100644
--- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/protocol/marker.rs.html
+++ b/static/rust/redstone/crypto_radix,network_radix/src/redstone/protocol/marker.rs.html
@@ -1,4 +1,4 @@
-marker.rs - source
1
+marker.rs - source
1
 2
 3
 4
@@ -64,6 +64,9 @@
 64
 65
 66
+67
+68
+69
 
use crate::{
     network::{assert::Assert, error::Error},
     protocol::constants::{REDSTONE_MARKER, REDSTONE_MARKER_BS},
@@ -87,6 +90,9 @@
         protocol::{constants::REDSTONE_MARKER_BS, marker::trim_redstone_marker},
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const PAYLOAD_TAIL: &str = "1c000f000000000002ed57011e0000";
 
     #[test]
diff --git a/static/rust/redstone/crypto_radix,network_radix/src/redstone/protocol/mod.rs.html b/static/rust/redstone/crypto_radix,network_radix/src/redstone/protocol/mod.rs.html
new file mode 100644
index 00000000..e7d0b176
--- /dev/null
+++ b/static/rust/redstone/crypto_radix,network_radix/src/redstone/protocol/mod.rs.html
@@ -0,0 +1,11 @@
+mod.rs - source
1
+2
+3
+4
+5
+
pub(crate) mod constants;
+pub(crate) mod data_package;
+pub(crate) mod data_point;
+pub(crate) mod marker;
+pub(crate) mod payload;
+
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/protocol/payload.rs.html b/static/rust/redstone/crypto_radix,network_radix/src/redstone/protocol/payload.rs.html similarity index 76% rename from static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/protocol/payload.rs.html rename to static/rust/redstone/crypto_radix,network_radix/src/redstone/protocol/payload.rs.html index 1cd14131..bfb8b9b0 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/protocol/payload.rs.html +++ b/static/rust/redstone/crypto_radix,network_radix/src/redstone/protocol/payload.rs.html @@ -1,4 +1,4 @@ -payload.rs - source
1
+payload.rs - source
1
 2
 3
 4
@@ -102,6 +102,10 @@
 102
 103
 104
+105
+106
+107
+108
 
use crate::{
     network::{assert::Assert, error::Error},
     protocol::{
@@ -145,7 +149,8 @@
     payload.trim_end(DATA_PACKAGES_COUNT_BS)
 }
 
-#[cfg(feature = "helpers")]
+#[cfg(not(all(feature = "crypto_radix", target_arch = "wasm32")))]
+#[cfg(feature = "helpers")]
 #[cfg(test)]
 mod tests {
     use crate::{
@@ -156,6 +161,9 @@
         },
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const PAYLOAD_METADATA_BYTES: &str = "000f000000";
     const PAYLOAD_METADATA_WITH_UNSIGNED_BYTE: &str = "000f55000001";
     const PAYLOAD_METADATA_WITH_UNSIGNED_BYTES: &str = "000f11223344556677889900aabbccddeeff000010";
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/utils/filter.rs.html b/static/rust/redstone/crypto_radix,network_radix/src/redstone/utils/filter.rs.html
similarity index 50%
rename from static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/utils/filter.rs.html
rename to static/rust/redstone/crypto_radix,network_radix/src/redstone/utils/filter.rs.html
index f28b29ef..7043d176 100644
--- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/utils/filter.rs.html
+++ b/static/rust/redstone/crypto_radix,network_radix/src/redstone/utils/filter.rs.html
@@ -1,4 +1,4 @@
-filter.rs - source
1
+filter.rs - source
1
 2
 3
 4
@@ -19,6 +19,9 @@
 19
 20
 21
+22
+23
+24
 
pub(crate) trait FilterSome<Output> {
     fn filter_some(&self) -> Output;
 }
@@ -33,6 +36,9 @@
 mod filter_some_tests {
     use crate::utils::filter::FilterSome;
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_filter_some() {
         let values = [None, Some(23u64), None, Some(12), Some(12), None, Some(23)];
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/utils/median.rs.html b/static/rust/redstone/crypto_radix,network_radix/src/redstone/utils/median.rs.html
similarity index 89%
rename from static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/utils/median.rs.html
rename to static/rust/redstone/crypto_radix,network_radix/src/redstone/utils/median.rs.html
index c329ff3b..62b2749e 100644
--- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/utils/median.rs.html
+++ b/static/rust/redstone/crypto_radix,network_radix/src/redstone/utils/median.rs.html
@@ -1,4 +1,4 @@
-median.rs - source
1
+median.rs - source
1
 2
 3
 4
@@ -185,6 +185,9 @@
 185
 186
 187
+188
+189
+190
 
use crate::network::{assert::Assert, error::Error::ArrayIsEmpty, specific::U256};
 use std::ops::{Add, Rem, Shr};
 
@@ -281,6 +284,9 @@
     use itertools::Itertools;
     use std::fmt::Debug;
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[cfg(feature = "network_radix")]
     use crate::network::radix::u256_ext::U256Ext;
 
diff --git a/static/rust/redstone/crypto_radix,network_radix/src/redstone/utils/mod.rs.html b/static/rust/redstone/crypto_radix,network_radix/src/redstone/utils/mod.rs.html
new file mode 100644
index 00000000..a99c109d
--- /dev/null
+++ b/static/rust/redstone/crypto_radix,network_radix/src/redstone/utils/mod.rs.html
@@ -0,0 +1,9 @@
+mod.rs - source
1
+2
+3
+4
+
pub(crate) mod filter;
+pub(crate) mod median;
+pub(crate) mod trim;
+pub(crate) mod trim_zeros;
+
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/utils/trim.rs.html b/static/rust/redstone/crypto_radix,network_radix/src/redstone/utils/trim.rs.html similarity index 79% rename from static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/utils/trim.rs.html rename to static/rust/redstone/crypto_radix,network_radix/src/redstone/utils/trim.rs.html index 551a41a8..63a6ae2c 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/utils/trim.rs.html +++ b/static/rust/redstone/crypto_radix,network_radix/src/redstone/utils/trim.rs.html @@ -1,4 +1,4 @@ -trim.rs - source
1
+trim.rs - source
1
 2
 3
 4
@@ -147,6 +147,19 @@
 147
 148
 149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
 
use crate::network::{
     assert::Unwrap, error::Error, from_bytes_repr::FromBytesRepr, specific::U256,
 };
@@ -196,6 +209,9 @@
         utils::trim::Trim,
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const MARKER_DECIMAL: u64 = 823907890102272;
 
     fn redstone_marker_bytes() -> Vec<u8> {
@@ -253,8 +269,11 @@
         let (_, result): (_, u64) = test_trim_end(size);
         assert_eq!(result, MARKER_DECIMAL);
 
-        let (_, result): (_, usize) = test_trim_end(size);
-        assert_eq!(result, 823907890102272usize);
+        #[cfg(not(target_arch = "wasm32"))]
+        {
+            let (_, result): (_, usize) = test_trim_end(size);
+            assert_eq!(result, 823907890102272usize);
+        }
 
         let (_rest, result): (_, Vec<u8>) = test_trim_end(size);
         assert_eq!(result.as_slice().len(), size.min(REDSTONE_MARKER_BS));
@@ -271,9 +290,16 @@
         assert_eq!(x, 18446744073709551615);
     }
 
+    #[cfg(target_arch = "wasm32")]
+    #[should_panic(expected = "Number overflow: 823907890102272")]
+    #[test]
+    fn test_trim_end_u64_overflow_usize_wasm32() {
+        let (_, _): (_, usize) = test_trim_end(REDSTONE_MARKER_BS);
+    }
+
     #[should_panic(expected = "Number overflow: 18591708106338011145")]
     #[test]
-    fn test_trim_end_u64_overflow() {
+    fn test_trim_end_u64_overflow_u64() {
         let mut bytes = vec![1u8, 2, 3, 4, 5, 6, 7, 8, 9];
 
         let _: u64 = bytes.trim_end(9);
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/utils/trim_zeros.rs.html b/static/rust/redstone/crypto_radix,network_radix/src/redstone/utils/trim_zeros.rs.html
similarity index 60%
rename from static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/utils/trim_zeros.rs.html
rename to static/rust/redstone/crypto_radix,network_radix/src/redstone/utils/trim_zeros.rs.html
index 0d223de1..9be0496f 100644
--- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/utils/trim_zeros.rs.html
+++ b/static/rust/redstone/crypto_radix,network_radix/src/redstone/utils/trim_zeros.rs.html
@@ -1,4 +1,4 @@
-trim_zeros.rs - source
1
+trim_zeros.rs - source
1
 2
 3
 4
@@ -43,6 +43,9 @@
 43
 44
 45
+46
+47
+48
 
pub trait TrimZeros {
     fn trim_zeros(self) -> Self;
 }
@@ -69,6 +72,9 @@
 mod tests {
     use crate::{protocol::constants::REDSTONE_MARKER, utils::trim_zeros::TrimZeros};
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     fn redstone_marker_bytes() -> Vec<u8> {
         REDSTONE_MARKER.as_slice().into()
     }
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/COPYRIGHT-23e9bde6c69aea69.txt b/static/rust/redstone/crypto_radix,network_radix/static.files/COPYRIGHT-23e9bde6c69aea69.txt
similarity index 100%
rename from static/rust/redstone/crypto_secp256k1,network_radix/static.files/COPYRIGHT-23e9bde6c69aea69.txt
rename to static/rust/redstone/crypto_radix,network_radix/static.files/COPYRIGHT-23e9bde6c69aea69.txt
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/FiraSans-LICENSE-db4b642586e02d97.txt b/static/rust/redstone/crypto_radix,network_radix/static.files/FiraSans-LICENSE-db4b642586e02d97.txt
similarity index 100%
rename from static/rust/redstone/crypto_secp256k1,network_radix/static.files/FiraSans-LICENSE-db4b642586e02d97.txt
rename to static/rust/redstone/crypto_radix,network_radix/static.files/FiraSans-LICENSE-db4b642586e02d97.txt
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 b/static/rust/redstone/crypto_radix,network_radix/static.files/FiraSans-Medium-8f9a781e4970d388.woff2
similarity index 100%
rename from static/rust/redstone/crypto_secp256k1,network_radix/static.files/FiraSans-Medium-8f9a781e4970d388.woff2
rename to static/rust/redstone/crypto_radix,network_radix/static.files/FiraSans-Medium-8f9a781e4970d388.woff2
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 b/static/rust/redstone/crypto_radix,network_radix/static.files/FiraSans-Regular-018c141bf0843ffd.woff2
similarity index 100%
rename from static/rust/redstone/crypto_secp256k1,network_radix/static.files/FiraSans-Regular-018c141bf0843ffd.woff2
rename to static/rust/redstone/crypto_radix,network_radix/static.files/FiraSans-Regular-018c141bf0843ffd.woff2
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt b/static/rust/redstone/crypto_radix,network_radix/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt
similarity index 100%
rename from static/rust/redstone/crypto_secp256k1,network_radix/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt
rename to static/rust/redstone/crypto_radix,network_radix/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/LICENSE-MIT-65090b722b3f6c56.txt b/static/rust/redstone/crypto_radix,network_radix/static.files/LICENSE-MIT-65090b722b3f6c56.txt
similarity index 100%
rename from static/rust/redstone/crypto_secp256k1,network_radix/static.files/LICENSE-MIT-65090b722b3f6c56.txt
rename to static/rust/redstone/crypto_radix,network_radix/static.files/LICENSE-MIT-65090b722b3f6c56.txt
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 b/static/rust/redstone/crypto_radix,network_radix/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2
similarity index 100%
rename from static/rust/redstone/crypto_secp256k1,network_radix/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2
rename to static/rust/redstone/crypto_radix,network_radix/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt b/static/rust/redstone/crypto_radix,network_radix/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt
similarity index 100%
rename from static/rust/redstone/crypto_secp256k1,network_radix/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt
rename to static/rust/redstone/crypto_radix,network_radix/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 b/static/rust/redstone/crypto_radix,network_radix/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2
similarity index 100%
rename from static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2
rename to static/rust/redstone/crypto_radix,network_radix/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt b/static/rust/redstone/crypto_radix,network_radix/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt
similarity index 100%
rename from static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt
rename to static/rust/redstone/crypto_radix,network_radix/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 b/static/rust/redstone/crypto_radix,network_radix/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2
similarity index 100%
rename from static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2
rename to static/rust/redstone/crypto_radix,network_radix/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 b/static/rust/redstone/crypto_radix,network_radix/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2
similarity index 100%
rename from static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2
rename to static/rust/redstone/crypto_radix,network_radix/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 b/static/rust/redstone/crypto_radix,network_radix/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2
similarity index 100%
rename from static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2
rename to static/rust/redstone/crypto_radix,network_radix/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 b/static/rust/redstone/crypto_radix,network_radix/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2
similarity index 100%
rename from static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2
rename to static/rust/redstone/crypto_radix,network_radix/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md b/static/rust/redstone/crypto_radix,network_radix/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md
similarity index 100%
rename from static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md
rename to static/rust/redstone/crypto_radix,network_radix/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 b/static/rust/redstone/crypto_radix,network_radix/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2
similarity index 100%
rename from static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2
rename to static/rust/redstone/crypto_radix,network_radix/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/favicon-2c020d218678b618.svg b/static/rust/redstone/crypto_radix,network_radix/static.files/favicon-2c020d218678b618.svg
similarity index 100%
rename from static/rust/redstone/crypto_secp256k1,network_radix/static.files/favicon-2c020d218678b618.svg
rename to static/rust/redstone/crypto_radix,network_radix/static.files/favicon-2c020d218678b618.svg
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/favicon-32x32-422f7d1d52889060.png b/static/rust/redstone/crypto_radix,network_radix/static.files/favicon-32x32-422f7d1d52889060.png
similarity index 100%
rename from static/rust/redstone/crypto_secp256k1,network_radix/static.files/favicon-32x32-422f7d1d52889060.png
rename to static/rust/redstone/crypto_radix,network_radix/static.files/favicon-32x32-422f7d1d52889060.png
diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/main-20a3ad099b048cf2.js b/static/rust/redstone/crypto_radix,network_radix/static.files/main-20a3ad099b048cf2.js
similarity index 100%
rename from static/rust/redstone/crypto_secp256k1,network_radix/static.files/main-20a3ad099b048cf2.js
rename to static/rust/redstone/crypto_radix,network_radix/static.files/main-20a3ad099b048cf2.js
diff --git a/static/rust/redstone/crypto_radix,network_radix/static.files/main-d2fab2bf619172d3.js b/static/rust/redstone/crypto_radix,network_radix/static.files/main-d2fab2bf619172d3.js
new file mode 100644
index 00000000..8fc48ede
--- /dev/null
+++ b/static/rust/redstone/crypto_radix,network_radix/static.files/main-d2fab2bf619172d3.js
@@ -0,0 +1,11 @@
+"use strict";window.RUSTDOC_TOOLTIP_HOVER_MS=300;window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS=450;function resourcePath(basename,extension){return getVar("root-path")+basename+getVar("resource-suffix")+extension}function hideMain(){addClass(document.getElementById(MAIN_ID),"hidden")}function showMain(){removeClass(document.getElementById(MAIN_ID),"hidden")}function blurHandler(event,parentElem,hideCallback){if(!parentElem.contains(document.activeElement)&&!parentElem.contains(event.relatedTarget)){hideCallback()}}window.rootPath=getVar("root-path");window.currentCrate=getVar("current-crate");function setMobileTopbar(){const mobileTopbar=document.querySelector(".mobile-topbar");const locationTitle=document.querySelector(".sidebar h2.location");if(mobileTopbar){const mobileTitle=document.createElement("h2");mobileTitle.className="location";if(hasClass(document.querySelector(".rustdoc"),"crate")){mobileTitle.innerHTML=`Crate ${window.currentCrate}`}else if(locationTitle){mobileTitle.innerHTML=locationTitle.innerHTML}mobileTopbar.appendChild(mobileTitle)}}function getVirtualKey(ev){if("key"in ev&&typeof ev.key!=="undefined"){return ev.key}const c=ev.charCode||ev.keyCode;if(c===27){return"Escape"}return String.fromCharCode(c)}const MAIN_ID="main-content";const SETTINGS_BUTTON_ID="settings-menu";const ALTERNATIVE_DISPLAY_ID="alternative-display";const NOT_DISPLAYED_ID="not-displayed";const HELP_BUTTON_ID="help-button";function getSettingsButton(){return document.getElementById(SETTINGS_BUTTON_ID)}function getHelpButton(){return document.getElementById(HELP_BUTTON_ID)}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}function insertAfter(newNode,referenceNode){referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling)}function getOrCreateSection(id,classes){let el=document.getElementById(id);if(!el){el=document.createElement("section");el.id=id;el.className=classes;insertAfter(el,document.getElementById(MAIN_ID))}return el}function getAlternativeDisplayElem(){return getOrCreateSection(ALTERNATIVE_DISPLAY_ID,"content hidden")}function getNotDisplayedElem(){return getOrCreateSection(NOT_DISPLAYED_ID,"hidden")}function switchDisplayedElement(elemToDisplay){const el=getAlternativeDisplayElem();if(el.children.length>0){getNotDisplayedElem().appendChild(el.firstElementChild)}if(elemToDisplay===null){addClass(el,"hidden");showMain();return}el.appendChild(elemToDisplay);hideMain();removeClass(el,"hidden")}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}function preLoadCss(cssUrl){const link=document.createElement("link");link.href=cssUrl;link.rel="preload";link.as="style";document.getElementsByTagName("head")[0].appendChild(link)}(function(){const isHelpPage=window.location.pathname.endsWith("/help.html");function loadScript(url,errorCallback){const script=document.createElement("script");script.src=url;if(errorCallback!==undefined){script.onerror=errorCallback}document.head.append(script)}getSettingsButton().onclick=event=>{if(event.ctrlKey||event.altKey||event.metaKey){return}window.hideAllModals(false);addClass(getSettingsButton(),"rotate");event.preventDefault();loadScript(getVar("static-root-path")+getVar("settings-js"));setTimeout(()=>{const themes=getVar("themes").split(",");for(const theme of themes){if(theme!==""){preLoadCss(getVar("root-path")+theme+".css")}}},0)};window.searchState={loadingText:"Loading search results...",input:document.getElementsByClassName("search-input")[0],outputElement:()=>{let el=document.getElementById("search");if(!el){el=document.createElement("section");el.id="search";getNotDisplayedElem().appendChild(el)}return el},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:()=>{if(searchState.timeout!==null){clearTimeout(searchState.timeout);searchState.timeout=null}},isDisplayed:()=>searchState.outputElement().parentElement.id===ALTERNATIVE_DISPLAY_ID,focus:()=>{searchState.input.focus()},defocus:()=>{searchState.input.blur()},showResults:search=>{if(search===null||typeof search==="undefined"){search=searchState.outputElement()}switchDisplayedElement(search);searchState.mouseMovedAfterSearch=false;document.title=searchState.title},removeQueryParameters:()=>{document.title=searchState.titleBeforeSearch;if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.hash)}},hideResults:()=>{switchDisplayedElement(null);searchState.removeQueryParameters()},getQueryStringParams:()=>{const params={};window.location.search.substring(1).split("&").map(s=>{const pair=s.split("=").map(x=>x.replace(/\+/g," "));params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params},setup:()=>{const search_input=searchState.input;if(!searchState.input){return}let searchLoaded=false;function sendSearchForm(){document.getElementsByClassName("search-form")[0].submit()}function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(getVar("static-root-path")+getVar("search-js"),sendSearchForm);loadScript(resourcePath("search-index",".js"),sendSearchForm)}}search_input.addEventListener("focus",()=>{search_input.origPlaceholder=search_input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});if(search_input.value!==""){loadSearch()}const params=searchState.getQueryStringParams();if(params.search!==undefined){searchState.setLoadingSearch();loadSearch()}},setLoadingSearch:()=>{const search=searchState.outputElement();search.innerHTML="

"+searchState.loadingText+"

";searchState.showResults(search)},descShards:new Map(),loadDesc:async function({descShard,descIndex}){if(descShard.promise===null){descShard.promise=new Promise((resolve,reject)=>{descShard.resolve=resolve;const ds=descShard;const fname=`${ds.crate}-desc-${ds.shard}-`;const url=resourcePath(`search.desc/${descShard.crate}/${fname}`,".js",);loadScript(url,reject)})}const list=await descShard.promise;return list[descIndex]},loadedDescShard:function(crate,shard,data){this.descShards.get(crate)[shard].resolve(data.split("\n"))},};const toggleAllDocsId="toggle-all-docs";let savedHash="";function handleHashes(ev){if(ev!==null&&searchState.isDisplayed()&&ev.newURL){switchDisplayedElement(null);const hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.search+"#"+hash)}const elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}const pageId=window.location.hash.replace(/^#/,"");if(savedHash!==pageId){savedHash=pageId;if(pageId!==""){expandSection(pageId)}}if(savedHash.startsWith("impl-")){const splitAt=savedHash.indexOf("/");if(splitAt!==-1){const implId=savedHash.slice(0,splitAt);const assocId=savedHash.slice(splitAt+1);const implElem=document.getElementById(implId);if(implElem&&implElem.parentElement.tagName==="SUMMARY"&&implElem.parentElement.parentElement.tagName==="DETAILS"){onEachLazy(implElem.parentElement.parentElement.querySelectorAll(`[id^="${assocId}"]`),item=>{const numbered=/([^-]+)-([0-9]+)/.exec(item.id);if(item.id===assocId||(numbered&&numbered[1]===assocId)){openParentDetails(item);item.scrollIntoView();setTimeout(()=>{window.location.replace("#"+item.id)},0)}},)}}}}function onHashChange(ev){hideSidebar();handleHashes(ev)}function openParentDetails(elem){while(elem){if(elem.tagName==="DETAILS"){elem.open=true}elem=elem.parentNode}}function expandSection(id){openParentDetails(document.getElementById(id))}function handleEscape(ev){searchState.clearInputTimeout();searchState.hideResults();ev.preventDefault();searchState.defocus();window.hideAllModals(true)}function handleShortcut(ev){const disableShortcuts=getSettingValue("disable-shortcuts")==="true";if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts){return}if(document.activeElement.tagName==="INPUT"&&document.activeElement.type!=="checkbox"&&document.activeElement.type!=="radio"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":case"/":ev.preventDefault();searchState.focus();break;case"+":ev.preventDefault();expandAllDocs();break;case"-":ev.preventDefault();collapseAllDocs();break;case"?":showHelp();break;default:break}}}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);function addSidebarItems(){if(!window.SIDEBAR_ITEMS){return}const sidebar=document.getElementsByClassName("sidebar-elems")[0];function block(shortty,id,longty){const filtered=window.SIDEBAR_ITEMS[shortty];if(!filtered){return}const modpath=hasClass(document.querySelector(".rustdoc"),"mod")?"../":"";const h3=document.createElement("h3");h3.innerHTML=`${longty}`;const ul=document.createElement("ul");ul.className="block "+shortty;for(const name of filtered){let path;if(shortty==="mod"){path=`${modpath}${name}/index.html`}else{path=`${modpath}${shortty}.${name}.html`}let current_page=document.location.href.toString();if(current_page.endsWith("/")){current_page+="index.html"}const link=document.createElement("a");link.href=path;link.textContent=name;const li=document.createElement("li");if(link.href===current_page){li.classList.add("current")}li.appendChild(link);ul.appendChild(li)}sidebar.appendChild(h3);sidebar.appendChild(ul)}if(sidebar){block("primitive","primitives","Primitive Types");block("mod","modules","Modules");block("macro","macros","Macros");block("struct","structs","Structs");block("enum","enums","Enums");block("constant","constants","Constants");block("static","static","Statics");block("trait","traits","Traits");block("fn","functions","Functions");block("type","types","Type Aliases");block("union","unions","Unions");block("foreigntype","foreign-types","Foreign Types");block("keyword","keywords","Keywords");block("opaque","opaque-types","Opaque Types");block("attr","attributes","Attribute Macros");block("derive","derives","Derive Macros");block("traitalias","trait-aliases","Trait Aliases")}}window.register_implementors=imp=>{const implementors=document.getElementById("implementors-list");const synthetic_implementors=document.getElementById("synthetic-implementors-list");const inlined_types=new Set();const TEXT_IDX=0;const SYNTHETIC_IDX=1;const TYPES_IDX=2;if(synthetic_implementors){onEachLazy(synthetic_implementors.getElementsByClassName("impl"),el=>{const aliases=el.getAttribute("data-aliases");if(!aliases){return}aliases.split(",").forEach(alias=>{inlined_types.add(alias)})})}let currentNbImpls=implementors.getElementsByClassName("impl").length;const traitName=document.querySelector(".main-heading h1 > .trait").textContent;const baseIdName="impl-"+traitName+"-";const libs=Object.getOwnPropertyNames(imp);const script=document.querySelector("script[data-ignore-extern-crates]");const ignoreExternCrates=new Set((script?script.getAttribute("data-ignore-extern-crates"):"").split(","),);for(const lib of libs){if(lib===window.currentCrate||ignoreExternCrates.has(lib)){continue}const structs=imp[lib];struct_loop:for(const struct of structs){const list=struct[SYNTHETIC_IDX]?synthetic_implementors:implementors;if(struct[SYNTHETIC_IDX]){for(const struct_type of struct[TYPES_IDX]){if(inlined_types.has(struct_type)){continue struct_loop}inlined_types.add(struct_type)}}const code=document.createElement("h3");code.innerHTML=struct[TEXT_IDX];addClass(code,"code-header");onEachLazy(code.getElementsByTagName("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});const currentId=baseIdName+currentNbImpls;const anchor=document.createElement("a");anchor.href="#"+currentId;addClass(anchor,"anchor");const display=document.createElement("div");display.id=currentId;addClass(display,"impl");display.appendChild(anchor);display.appendChild(code);list.appendChild(display);currentNbImpls+=1}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}window.register_type_impls=imp=>{if(!imp||!imp[window.currentCrate]){return}window.pending_type_impls=null;const idMap=new Map();let implementations=document.getElementById("implementations-list");let trait_implementations=document.getElementById("trait-implementations-list");let trait_implementations_header=document.getElementById("trait-implementations");const script=document.querySelector("script[data-self-path]");const selfPath=script?script.getAttribute("data-self-path"):null;const mainContent=document.querySelector("#main-content");const sidebarSection=document.querySelector(".sidebar section");let methods=document.querySelector(".sidebar .block.method");let associatedTypes=document.querySelector(".sidebar .block.associatedtype");let associatedConstants=document.querySelector(".sidebar .block.associatedconstant");let sidebarTraitList=document.querySelector(".sidebar .block.trait-implementation");for(const impList of imp[window.currentCrate]){const types=impList.slice(2);const text=impList[0];const isTrait=impList[1]!==0;const traitName=impList[1];if(types.indexOf(selfPath)===-1){continue}let outputList=isTrait?trait_implementations:implementations;if(outputList===null){const outputListName=isTrait?"Trait Implementations":"Implementations";const outputListId=isTrait?"trait-implementations-list":"implementations-list";const outputListHeaderId=isTrait?"trait-implementations":"implementations";const outputListHeader=document.createElement("h2");outputListHeader.id=outputListHeaderId;outputListHeader.innerText=outputListName;outputList=document.createElement("div");outputList.id=outputListId;if(isTrait){const link=document.createElement("a");link.href=`#${outputListHeaderId}`;link.innerText="Trait Implementations";const h=document.createElement("h3");h.appendChild(link);trait_implementations=outputList;trait_implementations_header=outputListHeader;sidebarSection.appendChild(h);sidebarTraitList=document.createElement("ul");sidebarTraitList.className="block trait-implementation";sidebarSection.appendChild(sidebarTraitList);mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList)}else{implementations=outputList;if(trait_implementations){mainContent.insertBefore(outputListHeader,trait_implementations_header);mainContent.insertBefore(outputList,trait_implementations_header)}else{const mainContent=document.querySelector("#main-content");mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList)}}}const template=document.createElement("template");template.innerHTML=text;onEachLazy(template.content.querySelectorAll("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});onEachLazy(template.content.querySelectorAll("[id]"),el=>{let i=0;if(idMap.has(el.id)){i=idMap.get(el.id)}else if(document.getElementById(el.id)){i=1;while(document.getElementById(`${el.id}-${2 * i}`)){i=2*i}while(document.getElementById(`${el.id}-${i}`)){i+=1}}if(i!==0){const oldHref=`#${el.id}`;const newHref=`#${el.id}-${i}`;el.id=`${el.id}-${i}`;onEachLazy(template.content.querySelectorAll("a[href]"),link=>{if(link.getAttribute("href")===oldHref){link.href=newHref}})}idMap.set(el.id,i+1)});const templateAssocItems=template.content.querySelectorAll("section.tymethod, "+"section.method, section.associatedtype, section.associatedconstant");if(isTrait){const li=document.createElement("li");const a=document.createElement("a");a.href=`#${template.content.querySelector(".impl").id}`;a.textContent=traitName;li.appendChild(a);sidebarTraitList.append(li)}else{onEachLazy(templateAssocItems,item=>{let block=hasClass(item,"associatedtype")?associatedTypes:(hasClass(item,"associatedconstant")?associatedConstants:(methods));if(!block){const blockTitle=hasClass(item,"associatedtype")?"Associated Types":(hasClass(item,"associatedconstant")?"Associated Constants":("Methods"));const blockClass=hasClass(item,"associatedtype")?"associatedtype":(hasClass(item,"associatedconstant")?"associatedconstant":("method"));const blockHeader=document.createElement("h3");const blockLink=document.createElement("a");blockLink.href="#implementations";blockLink.innerText=blockTitle;blockHeader.appendChild(blockLink);block=document.createElement("ul");block.className=`block ${blockClass}`;const insertionReference=methods||sidebarTraitList;if(insertionReference){const insertionReferenceH=insertionReference.previousElementSibling;sidebarSection.insertBefore(blockHeader,insertionReferenceH);sidebarSection.insertBefore(block,insertionReferenceH)}else{sidebarSection.appendChild(blockHeader);sidebarSection.appendChild(block)}if(hasClass(item,"associatedtype")){associatedTypes=block}else if(hasClass(item,"associatedconstant")){associatedConstants=block}else{methods=block}}const li=document.createElement("li");const a=document.createElement("a");a.innerText=item.id.split("-")[0].split(".")[1];a.href=`#${item.id}`;li.appendChild(a);block.appendChild(li)})}outputList.appendChild(template.content)}for(const list of[methods,associatedTypes,associatedConstants,sidebarTraitList]){if(!list){continue}const newChildren=Array.prototype.slice.call(list.children);newChildren.sort((a,b)=>{const aI=a.innerText;const bI=b.innerText;return aIbI?1:0});list.replaceChildren(...newChildren)}};if(window.pending_type_impls){window.register_type_impls(window.pending_type_impls)}function addSidebarCrates(){if(!window.ALL_CRATES){return}const sidebarElems=document.getElementsByClassName("sidebar-elems")[0];if(!sidebarElems){return}const h3=document.createElement("h3");h3.innerHTML="Crates";const ul=document.createElement("ul");ul.className="block crate";for(const crate of window.ALL_CRATES){const link=document.createElement("a");link.href=window.rootPath+crate+"/index.html";link.textContent=crate;const li=document.createElement("li");if(window.rootPath!=="./"&&crate===window.currentCrate){li.className="current"}li.appendChild(link);ul.appendChild(li)}sidebarElems.appendChild(h3);sidebarElems.appendChild(ul)}function expandAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);removeClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hasClass(e,"type-contents-toggle")&&!hasClass(e,"more-examples-toggle")){e.open=true}});innerToggle.title="collapse all docs";innerToggle.children[0].innerText="\u2212"}function collapseAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);addClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(e.parentNode.id!=="implementations-list"||(!hasClass(e,"implementors-toggle")&&!hasClass(e,"type-contents-toggle"))){e.open=false}});innerToggle.title="expand all docs";innerToggle.children[0].innerText="+"}function toggleAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);if(!innerToggle){return}if(hasClass(innerToggle,"will-expand")){expandAllDocs()}else{collapseAllDocs()}}(function(){const toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}const hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";const hideImplementations=getSettingValue("auto-hide-trait-implementations")==="true";const hideLargeItemContents=getSettingValue("auto-hide-large-items")!=="false";function setImplementorsTogglesOpen(id,open){const list=document.getElementById(id);if(list!==null){onEachLazy(list.getElementsByClassName("implementors-toggle"),e=>{e.open=open})}}if(hideImplementations){setImplementorsTogglesOpen("trait-implementations-list",false);setImplementorsTogglesOpen("blanket-implementations-list",false)}onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hideLargeItemContents&&hasClass(e,"type-contents-toggle")){e.open=true}if(hideMethodDocs&&hasClass(e,"method-toggle")){e.open=false}})}());window.rustdoc_add_line_numbers_to_examples=()=>{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");if(line_numbers.length>0){return}const count=x.textContent.split("\n").length;const elems=[];for(let i=0;i{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");for(const node of line_numbers){parent.removeChild(node)}})};if(getSettingValue("line-numbers")==="true"){window.rustdoc_add_line_numbers_to_examples()}function showSidebar(){window.hideAllModals(false);const sidebar=document.getElementsByClassName("sidebar")[0];addClass(sidebar,"shown")}function hideSidebar(){const sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"shown")}window.addEventListener("resize",()=>{if(window.CURRENT_TOOLTIP_ELEMENT){const base=window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE;const force_visible=base.TOOLTIP_FORCE_VISIBLE;hideTooltip(false);if(force_visible){showTooltip(base);base.TOOLTIP_FORCE_VISIBLE=true}}});const mainElem=document.getElementById(MAIN_ID);if(mainElem){mainElem.addEventListener("click",hideSidebar)}onEachLazy(document.querySelectorAll("a[href^='#']"),el=>{el.addEventListener("click",()=>{expandSection(el.hash.slice(1));hideSidebar()})});onEachLazy(document.querySelectorAll(".toggle > summary:not(.hideme)"),el=>{el.addEventListener("click",e=>{if(e.target.tagName!=="SUMMARY"&&e.target.tagName!=="A"){e.preventDefault()}})});function showTooltip(e){const notable_ty=e.getAttribute("data-notable-ty");if(!window.NOTABLE_TRAITS&¬able_ty){const data=document.getElementById("notable-traits-data");if(data){window.NOTABLE_TRAITS=JSON.parse(data.innerText)}else{throw new Error("showTooltip() called with notable without any notable traits!")}}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE===e){clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);return}window.hideAllModals(false);const wrapper=document.createElement("div");if(notable_ty){wrapper.innerHTML="
"+window.NOTABLE_TRAITS[notable_ty]+"
"}else{if(e.getAttribute("title")!==null){e.setAttribute("data-title",e.getAttribute("title"));e.removeAttribute("title")}if(e.getAttribute("data-title")!==null){const titleContent=document.createElement("div");titleContent.className="content";titleContent.appendChild(document.createTextNode(e.getAttribute("data-title")));wrapper.appendChild(titleContent)}}wrapper.className="tooltip popover";const focusCatcher=document.createElement("div");focusCatcher.setAttribute("tabindex","0");focusCatcher.onfocus=hideTooltip;wrapper.appendChild(focusCatcher);const pos=e.getBoundingClientRect();wrapper.style.top=(pos.top+window.scrollY+pos.height)+"px";wrapper.style.left=0;wrapper.style.right="auto";wrapper.style.visibility="hidden";const body=document.getElementsByTagName("body")[0];body.appendChild(wrapper);const wrapperPos=wrapper.getBoundingClientRect();const finalPos=pos.left+window.scrollX-wrapperPos.width+24;if(finalPos>0){wrapper.style.left=finalPos+"px"}else{wrapper.style.setProperty("--popover-arrow-offset",(wrapperPos.right-pos.right+4)+"px",)}wrapper.style.visibility="";window.CURRENT_TOOLTIP_ELEMENT=wrapper;window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE=e;clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);wrapper.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}clearTooltipHoverTimeout(e)};wrapper.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&!e.contains(ev.relatedTarget)){setTooltipHoverTimeout(e,false);addClass(wrapper,"fade-out")}}}function setTooltipHoverTimeout(element,show){clearTooltipHoverTimeout(element);if(!show&&!window.CURRENT_TOOLTIP_ELEMENT){return}if(show&&window.CURRENT_TOOLTIP_ELEMENT){return}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE!==element){return}element.TOOLTIP_HOVER_TIMEOUT=setTimeout(()=>{if(show){showTooltip(element)}else if(!element.TOOLTIP_FORCE_VISIBLE){hideTooltip(false)}},show?window.RUSTDOC_TOOLTIP_HOVER_MS:window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS)}function clearTooltipHoverTimeout(element){if(element.TOOLTIP_HOVER_TIMEOUT!==undefined){removeClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out");clearTimeout(element.TOOLTIP_HOVER_TIMEOUT);delete element.TOOLTIP_HOVER_TIMEOUT}}function tooltipBlurHandler(event){if(window.CURRENT_TOOLTIP_ELEMENT&&!window.CURRENT_TOOLTIP_ELEMENT.contains(document.activeElement)&&!window.CURRENT_TOOLTIP_ELEMENT.contains(event.relatedTarget)&&!window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.contains(document.activeElement)&&!window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.contains(event.relatedTarget)){setTimeout(()=>hideTooltip(false),0)}}function hideTooltip(focus){if(window.CURRENT_TOOLTIP_ELEMENT){if(window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE){if(focus){window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.focus()}window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE=false}const body=document.getElementsByTagName("body")[0];body.removeChild(window.CURRENT_TOOLTIP_ELEMENT);clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);window.CURRENT_TOOLTIP_ELEMENT=null}}onEachLazy(document.getElementsByClassName("tooltip"),e=>{e.onclick=()=>{e.TOOLTIP_FORCE_VISIBLE=e.TOOLTIP_FORCE_VISIBLE?false:true;if(window.CURRENT_TOOLTIP_ELEMENT&&!e.TOOLTIP_FORCE_VISIBLE){hideTooltip(true)}else{showTooltip(e);window.CURRENT_TOOLTIP_ELEMENT.setAttribute("tabindex","0");window.CURRENT_TOOLTIP_ELEMENT.focus();window.CURRENT_TOOLTIP_ELEMENT.onblur=tooltipBlurHandler}return false};e.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointermove=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&window.CURRENT_TOOLTIP_ELEMENT&&!window.CURRENT_TOOLTIP_ELEMENT.contains(ev.relatedTarget)){setTooltipHoverTimeout(e,false);addClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out")}}});const sidebar_menu_toggle=document.getElementsByClassName("sidebar-menu-toggle")[0];if(sidebar_menu_toggle){sidebar_menu_toggle.addEventListener("click",()=>{const sidebar=document.getElementsByClassName("sidebar")[0];if(!hasClass(sidebar,"shown")){showSidebar()}else{hideSidebar()}})}function helpBlurHandler(event){blurHandler(event,getHelpButton(),window.hidePopoverMenus)}function buildHelpMenu(){const book_info=document.createElement("span");const channel=getVar("channel");book_info.className="top";book_info.innerHTML=`You can find more information in \ +the rustdoc book.`;const shortcuts=[["?","Show this help dialog"],["S / /","Focus the search field"],["↑","Move up in search results"],["↓","Move down in search results"],["← / →","Switch result tab (when results focused)"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(x=>"
"+x[0].split(" ").map((y,index)=>((index&1)===0?""+y+"":" "+y+" ")).join("")+"
"+x[1]+"
").join("");const div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

"+shortcuts+"
";const infos=[`For a full list of all search features, take a look here.`,"Prefix searches with a type followed by a colon (e.g., fn:) to \ + restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ + enum, trait, type, macro, \ + and const.","Search functions by type signature (e.g., vec -> usize or \ + -> vec or String, enum:Cow -> bool)","You can look for items with an exact name by putting double quotes around \ + your request: \"string\"","Look for functions that accept or return \ + slices and \ + arrays by writing \ + square brackets (e.g., -> [u8] or [] -> Option)","Look for items inside another one by searching for a path: vec::Vec",].map(x=>"

"+x+"

").join("");const div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="

Search Tricks

"+infos;const rustdoc_version=document.createElement("span");rustdoc_version.className="bottom";const rustdoc_version_code=document.createElement("code");rustdoc_version_code.innerText="rustdoc "+getVar("rustdoc-version");rustdoc_version.appendChild(rustdoc_version_code);const container=document.createElement("div");if(!isHelpPage){container.className="popover"}container.id="help";container.style.display="none";const side_by_side=document.createElement("div");side_by_side.className="side-by-side";side_by_side.appendChild(div_shortcuts);side_by_side.appendChild(div_infos);container.appendChild(book_info);container.appendChild(side_by_side);container.appendChild(rustdoc_version);if(isHelpPage){const help_section=document.createElement("section");help_section.appendChild(container);document.getElementById("main-content").appendChild(help_section);container.style.display="block"}else{const help_button=getHelpButton();help_button.appendChild(container);container.onblur=helpBlurHandler;help_button.onblur=helpBlurHandler;help_button.children[0].onblur=helpBlurHandler}return container}window.hideAllModals=switchFocus=>{hideSidebar();window.hidePopoverMenus();hideTooltip(switchFocus)};window.hidePopoverMenus=()=>{onEachLazy(document.querySelectorAll(".search-form .popover"),elem=>{elem.style.display="none"})};function getHelpMenu(buildNeeded){let menu=getHelpButton().querySelector(".popover");if(!menu&&buildNeeded){menu=buildHelpMenu()}return menu}function showHelp(){getHelpButton().querySelector("a").focus();const menu=getHelpMenu(true);if(menu.style.display==="none"){window.hideAllModals();menu.style.display=""}}if(isHelpPage){showHelp();document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault()})}else{document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault();const menu=getHelpMenu(true);const shouldShowHelp=menu.style.display==="none";if(shouldShowHelp){showHelp()}else{window.hidePopoverMenus()}})}setMobileTopbar();addSidebarItems();addSidebarCrates();onHashChange(null);window.addEventListener("hashchange",onHashChange);searchState.setup()}());(function(){const SIDEBAR_MIN=100;const SIDEBAR_MAX=500;const RUSTDOC_MOBILE_BREAKPOINT=700;const BODY_MIN=400;const SIDEBAR_VANISH_THRESHOLD=SIDEBAR_MIN/2;const sidebarButton=document.getElementById("sidebar-button");if(sidebarButton){sidebarButton.addEventListener("click",e=>{removeClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","false");if(document.querySelector(".rustdoc.src")){window.rustdocToggleSrcSidebar()}e.preventDefault()})}let currentPointerId=null;let desiredSidebarSize=null;let pendingSidebarResizingFrame=false;const resizer=document.querySelector(".sidebar-resizer");const sidebar=document.querySelector(".sidebar");if(!resizer||!sidebar){return}const isSrcPage=hasClass(document.body,"src");function hideSidebar(){if(isSrcPage){window.rustdocCloseSourceSidebar();updateLocalStorage("src-sidebar-width",null);document.documentElement.style.removeProperty("--src-sidebar-width");sidebar.style.removeProperty("--src-sidebar-width");resizer.style.removeProperty("--src-sidebar-width")}else{addClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","true");updateLocalStorage("desktop-sidebar-width",null);document.documentElement.style.removeProperty("--desktop-sidebar-width");sidebar.style.removeProperty("--desktop-sidebar-width");resizer.style.removeProperty("--desktop-sidebar-width")}}function showSidebar(){if(isSrcPage){window.rustdocShowSourceSidebar()}else{removeClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","false")}}function changeSidebarSize(size){if(isSrcPage){updateLocalStorage("src-sidebar-width",size);sidebar.style.setProperty("--src-sidebar-width",size+"px");resizer.style.setProperty("--src-sidebar-width",size+"px")}else{updateLocalStorage("desktop-sidebar-width",size);sidebar.style.setProperty("--desktop-sidebar-width",size+"px");resizer.style.setProperty("--desktop-sidebar-width",size+"px")}}function isSidebarHidden(){return isSrcPage?!hasClass(document.documentElement,"src-sidebar-expanded"):hasClass(document.documentElement,"hide-sidebar")}function resize(e){if(currentPointerId===null||currentPointerId!==e.pointerId){return}e.preventDefault();const pos=e.clientX-3;if(pos=SIDEBAR_MIN){if(isSidebarHidden()){showSidebar()}const constrainedPos=Math.min(pos,window.innerWidth-BODY_MIN,SIDEBAR_MAX);changeSidebarSize(constrainedPos);desiredSidebarSize=constrainedPos;if(pendingSidebarResizingFrame!==false){clearTimeout(pendingSidebarResizingFrame)}pendingSidebarResizingFrame=setTimeout(()=>{if(currentPointerId===null||pendingSidebarResizingFrame===false){return}pendingSidebarResizingFrame=false;document.documentElement.style.setProperty("--resizing-sidebar-width",desiredSidebarSize+"px",)},100)}}window.addEventListener("resize",()=>{if(window.innerWidth=(window.innerWidth-BODY_MIN)){changeSidebarSize(window.innerWidth-BODY_MIN)}else if(desiredSidebarSize!==null&&desiredSidebarSize>SIDEBAR_MIN){changeSidebarSize(desiredSidebarSize)}});function stopResize(e){if(currentPointerId===null){return}if(e){e.preventDefault()}desiredSidebarSize=sidebar.getBoundingClientRect().width;removeClass(resizer,"active");window.removeEventListener("pointermove",resize,false);window.removeEventListener("pointerup",stopResize,false);removeClass(document.documentElement,"sidebar-resizing");document.documentElement.style.removeProperty("--resizing-sidebar-width");if(resizer.releasePointerCapture){resizer.releasePointerCapture(currentPointerId);currentPointerId=null}}function initResize(e){if(currentPointerId!==null||e.altKey||e.ctrlKey||e.metaKey||e.button!==0){return}if(resizer.setPointerCapture){resizer.setPointerCapture(e.pointerId);if(!resizer.hasPointerCapture(e.pointerId)){resizer.releasePointerCapture(e.pointerId);return}currentPointerId=e.pointerId}window.hideAllModals(false);e.preventDefault();window.addEventListener("pointermove",resize,false);window.addEventListener("pointercancel",stopResize,false);window.addEventListener("pointerup",stopResize,false);addClass(resizer,"active");addClass(document.documentElement,"sidebar-resizing");const pos=e.clientX-sidebar.offsetLeft-3;document.documentElement.style.setProperty("--resizing-sidebar-width",pos+"px");desiredSidebarSize=null}resizer.addEventListener("pointerdown",initResize,false)}());(function(){let reset_button_timeout=null;const but=document.getElementById("copy-path");if(!but){return}but.onclick=()=>{const parent=but.parentElement;const path=[];onEach(parent.childNodes,child=>{if(child.tagName==="A"){path.push(child.textContent)}});const el=document.createElement("textarea");el.value=path.join("::");el.setAttribute("readonly","");el.style.position="absolute";el.style.left="-9999px";document.body.appendChild(el);el.select();document.execCommand("copy");document.body.removeChild(el);but.classList.add("clicked");if(reset_button_timeout!==null){window.clearTimeout(reset_button_timeout)}function reset_button(){reset_button_timeout=null;but.classList.remove("clicked")}reset_button_timeout=window.setTimeout(reset_button,1000)}}()) \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/normalize-76eba96aa4d2e634.css b/static/rust/redstone/crypto_radix,network_radix/static.files/normalize-76eba96aa4d2e634.css similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/static.files/normalize-76eba96aa4d2e634.css rename to static/rust/redstone/crypto_radix,network_radix/static.files/normalize-76eba96aa4d2e634.css diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/noscript-df360f571f6edeae.css b/static/rust/redstone/crypto_radix,network_radix/static.files/noscript-df360f571f6edeae.css similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/static.files/noscript-df360f571f6edeae.css rename to static/rust/redstone/crypto_radix,network_radix/static.files/noscript-df360f571f6edeae.css diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/rust-logo-151179464ae7ed46.svg b/static/rust/redstone/crypto_radix,network_radix/static.files/rust-logo-151179464ae7ed46.svg similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/static.files/rust-logo-151179464ae7ed46.svg rename to static/rust/redstone/crypto_radix,network_radix/static.files/rust-logo-151179464ae7ed46.svg diff --git a/static/rust/redstone/crypto_radix,network_radix/static.files/rustdoc-c5d6553a23f1e5a6.css b/static/rust/redstone/crypto_radix,network_radix/static.files/rustdoc-c5d6553a23f1e5a6.css new file mode 100644 index 00000000..9f64990b --- /dev/null +++ b/static/rust/redstone/crypto_radix,network_radix/static.files/rustdoc-c5d6553a23f1e5a6.css @@ -0,0 +1,46 @@ + :root{--nav-sub-mobile-padding:8px;--search-typename-width:6.75rem;--desktop-sidebar-width:200px;--src-sidebar-width:300px;--desktop-sidebar-z-index:100;--sidebar-elems-left-padding:24px;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular-018c141bf0843ffd.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium-8f9a781e4970d388.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular-46f98efaafac5295.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:italic;font-weight:400;src:local('Source Serif 4 Italic'),url("SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:700;src:local('Source Serif 4 Bold'),url("SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'NanumBarunGothic';src:url("NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2") format("woff2");font-display:swap;unicode-range:U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF;}*{box-sizing:border-box;}body{font:1rem/1.5 "Source Serif 4",NanumBarunGothic,serif;margin:0;position:relative;overflow-wrap:break-word;overflow-wrap:anywhere;font-feature-settings:"kern","liga";background-color:var(--main-background-color);color:var(--main-color);}h1{font-size:1.5rem;}h2{font-size:1.375rem;}h3{font-size:1.25rem;}h1,h2,h3,h4,h5,h6{font-weight:500;}h1,h2,h3,h4{margin:25px 0 15px 0;padding-bottom:6px;}.docblock h3,.docblock h4,h5,h6{margin:15px 0 5px 0;}.docblock>h2:first-child,.docblock>h3:first-child,.docblock>h4:first-child,.docblock>h5:first-child,.docblock>h6:first-child{margin-top:0;}.main-heading h1{margin:0;padding:0;flex-grow:1;overflow-wrap:break-word;overflow-wrap:anywhere;}.main-heading{display:flex;flex-wrap:wrap;padding-bottom:6px;margin-bottom:15px;}.content h2,.top-doc .docblock>h3,.top-doc .docblock>h4{border-bottom:1px solid var(--headings-border-bottom-color);}h1,h2{line-height:1.25;padding-top:3px;padding-bottom:9px;}h3.code-header{font-size:1.125rem;}h4.code-header{font-size:1rem;}.code-header{font-weight:600;margin:0;padding:0;white-space:pre-wrap;}#crate-search,h1,h2,h3,h4,h5,h6,.sidebar,.mobile-topbar,.search-input,.search-results .result-name,.item-name>a,.out-of-band,span.since,a.src,#help-button>a,summary.hideme,.scraped-example-list,ul.all-items{font-family:"Fira Sans",Arial,NanumBarunGothic,sans-serif;}#toggle-all-docs,a.anchor,.section-header a,#src-sidebar a,.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,h1 a,.search-results a,.stab,.result-name i{color:var(--main-color);}span.enum,a.enum,span.struct,a.struct,span.union,a.union,span.primitive,a.primitive,span.type,a.type,span.foreigntype,a.foreigntype{color:var(--type-link-color);}span.trait,a.trait,span.traitalias,a.traitalias{color:var(--trait-link-color);}span.associatedtype,a.associatedtype,span.constant,a.constant,span.static,a.static{color:var(--assoc-item-link-color);}span.fn,a.fn,span.method,a.method,span.tymethod,a.tymethod{color:var(--function-link-color);}span.attr,a.attr,span.derive,a.derive,span.macro,a.macro{color:var(--macro-link-color);}span.mod,a.mod{color:var(--mod-link-color);}span.keyword,a.keyword{color:var(--keyword-link-color);}a{color:var(--link-color);text-decoration:none;}ol,ul{padding-left:24px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.625em;}p,.docblock>.warning{margin:0 0 .75em 0;}p:last-child,.docblock>.warning:last-child{margin:0;}button{padding:1px 6px;cursor:pointer;}button#toggle-all-docs{padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.rustdoc{display:flex;flex-direction:row;flex-wrap:nowrap;}main{position:relative;flex-grow:1;padding:10px 15px 40px 45px;min-width:0;}.src main{padding:15px;}.width-limiter{max-width:960px;margin-right:auto;}details:not(.toggle) summary{margin-bottom:.6em;}code,pre,a.test-arrow,.code-header{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.125em;}.docblock pre code,.docblock-short pre code{padding:0;}pre{padding:14px;line-height:1.5;}pre.item-decl{overflow-x:auto;}.item-decl .type-contents-toggle{contain:initial;}.src .content pre{padding:20px;}.rustdoc.src .example-wrap pre.src-line-numbers{padding:20px 0 20px 4px;}img{max-width:100%;}.logo-container{line-height:0;display:block;}.rust-logo{filter:var(--rust-logo-filter);}.sidebar{font-size:0.875rem;flex:0 0 var(--desktop-sidebar-width);width:var(--desktop-sidebar-width);overflow-y:scroll;overscroll-behavior:contain;position:sticky;height:100vh;top:0;left:0;z-index:var(--desktop-sidebar-z-index);}.rustdoc.src .sidebar{flex-basis:50px;width:50px;border-right:1px solid;overflow-x:hidden;overflow-y:hidden;}.hide-sidebar .sidebar,.hide-sidebar .sidebar-resizer{display:none;}.sidebar-resizer{touch-action:none;width:9px;cursor:col-resize;z-index:calc(var(--desktop-sidebar-z-index) + 1);position:fixed;height:100%;left:calc(var(--desktop-sidebar-width) + 1px);}.rustdoc.src .sidebar-resizer{left:49px;}.src-sidebar-expanded .src .sidebar-resizer{left:var(--src-sidebar-width);}.sidebar-resizing{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;}.sidebar-resizing*{cursor:col-resize !important;}.sidebar-resizing .sidebar{position:fixed;}.sidebar-resizing>body{padding-left:var(--resizing-sidebar-width);}.sidebar-resizer:hover,.sidebar-resizer:active,.sidebar-resizer:focus,.sidebar-resizer.active{width:10px;margin:0;left:var(--desktop-sidebar-width);border-left:solid 1px var(--sidebar-resizer-hover);}.src-sidebar-expanded .rustdoc.src .sidebar-resizer:hover,.src-sidebar-expanded .rustdoc.src .sidebar-resizer:active,.src-sidebar-expanded .rustdoc.src .sidebar-resizer:focus,.src-sidebar-expanded .rustdoc.src .sidebar-resizer.active{left:calc(var(--src-sidebar-width) - 1px);}@media (pointer:coarse){.sidebar-resizer{display:none !important;}}.sidebar-resizer.active{padding:0 140px;width:2px;margin-left:-140px;border-left:none;}.sidebar-resizer.active:before{border-left:solid 2px var(--sidebar-resizer-active);display:block;height:100%;content:"";}.sidebar,.mobile-topbar,.sidebar-menu-toggle,#src-sidebar{background-color:var(--sidebar-background-color);}.src .sidebar>*{visibility:hidden;}.src-sidebar-expanded .src .sidebar{overflow-y:auto;flex-basis:var(--src-sidebar-width);width:var(--src-sidebar-width);}.src-sidebar-expanded .src .sidebar>*{visibility:visible;}#all-types{margin-top:1em;}*{scrollbar-width:initial;scrollbar-color:var(--scrollbar-color);}.sidebar{scrollbar-width:thin;scrollbar-color:var(--scrollbar-color);}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;background-color:var(--scrollbar-track-background-color);}.sidebar::-webkit-scrollbar-track{background-color:var(--scrollbar-track-background-color);}::-webkit-scrollbar-thumb,.sidebar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-background-color);}.hidden{display:none !important;}.logo-container>img{height:48px;width:48px;}ul.block,.block li{padding:0;margin:0;list-style:none;}.sidebar-elems a,.sidebar>h2 a{display:block;padding:0.25rem;margin-right:0.25rem;border-left:solid var(--sidebar-elems-left-padding) transparent;margin-left:calc(-0.25rem - var(--sidebar-elems-left-padding));background-clip:border-box;}.sidebar h2{overflow-wrap:anywhere;padding:0;margin:0.7rem 0;}.sidebar h3{font-size:1.125rem;padding:0;margin:0;}.sidebar-elems,.sidebar>.version,.sidebar>h2{padding-left:var(--sidebar-elems-left-padding);}.sidebar a{color:var(--sidebar-link-color);}.sidebar .current,.sidebar .current a,.sidebar-crate a.logo-container:hover+h2 a,.sidebar a:hover:not(.logo-container){background-color:var(--sidebar-current-link-background-color);}.sidebar-elems .block{margin-bottom:2em;}.sidebar-elems .block li a{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}.sidebar-crate{display:flex;align-items:center;justify-content:center;margin:14px 32px 1rem;row-gap:10px;column-gap:32px;flex-wrap:wrap;}.sidebar-crate h2{flex-grow:1;margin:0 -8px;align-self:start;}.sidebar-crate .logo-container{margin:0 calc(-16px - var(--sidebar-elems-left-padding));padding:0 var(--sidebar-elems-left-padding);text-align:center;}.sidebar-crate .logo-container img{margin-top:-16px;border-top:solid 16px transparent;box-sizing:content-box;position:relative;background-clip:border-box;z-index:1;}.sidebar-crate h2 a{display:block;border-left:solid var(--sidebar-elems-left-padding) transparent;background-clip:border-box;margin:0 calc(-24px + 0.25rem) 0 calc(-0.2rem - var(--sidebar-elems-left-padding));padding:calc((16px - 0.57rem ) / 2 ) 0.25rem;padding-left:0.2rem;}.sidebar-crate h2 .version{display:block;font-weight:normal;font-size:1rem;overflow-wrap:break-word;}.sidebar-crate+.version{margin-top:-1rem;margin-bottom:1rem;}.mobile-topbar{display:none;}.rustdoc .example-wrap{display:flex;position:relative;margin-bottom:10px;}.rustdoc .example-wrap:last-child{margin-bottom:0px;}.rustdoc .example-wrap pre{margin:0;flex-grow:1;}.rustdoc:not(.src) .example-wrap pre{overflow:auto hidden;}.rustdoc .example-wrap pre.example-line-numbers,.rustdoc .example-wrap pre.src-line-numbers{flex-grow:0;min-width:fit-content;overflow:initial;text-align:right;-webkit-user-select:none;user-select:none;padding:14px 8px;color:var(--src-line-numbers-span-color);}.rustdoc .example-wrap pre.src-line-numbers{padding:14px 0;}.src-line-numbers a,.src-line-numbers span{color:var(--src-line-numbers-span-color);padding:0 8px;}.src-line-numbers :target{background-color:transparent;border-right:none;padding:0 8px;}.src-line-numbers .line-highlighted{background-color:var(--src-line-number-highlighted-background-color);}.search-loading{text-align:center;}.docblock-short{overflow-wrap:break-word;overflow-wrap:anywhere;}.docblock :not(pre)>code,.docblock-short code{white-space:pre-wrap;}.top-doc .docblock h2{font-size:1.375rem;}.top-doc .docblock h3{font-size:1.25rem;}.top-doc .docblock h4,.top-doc .docblock h5{font-size:1.125rem;}.top-doc .docblock h6{font-size:1rem;}.docblock h5{font-size:1rem;}.docblock h6{font-size:0.875rem;}.docblock{margin-left:24px;position:relative;}.docblock>:not(.more-examples-toggle):not(.example-wrap){max-width:100%;overflow-x:auto;}.out-of-band{flex-grow:0;font-size:1.125rem;}.docblock code,.docblock-short code,pre,.rustdoc.src .example-wrap{background-color:var(--code-block-background-color);}#main-content{position:relative;}.docblock table{margin:.5em 0;border-collapse:collapse;}.docblock table td,.docblock table th{padding:.5em;border:1px solid var(--border-color);}.docblock table tbody tr:nth-child(2n){background:var(--table-alt-row-background-color);}div.where{white-space:pre-wrap;font-size:0.875rem;}.item-info{display:block;margin-left:24px;}.item-info code{font-size:0.875rem;}#main-content>.item-info{margin-left:0;}nav.sub{flex-grow:1;flex-flow:row nowrap;margin:4px 0 25px 0;display:flex;align-items:center;}.search-form{position:relative;display:flex;height:34px;flex-grow:1;}.src nav.sub{margin:0 0 15px 0;}.section-header{display:block;position:relative;}.section-header:hover>.anchor,.impl:hover>.anchor,.trait-impl:hover>.anchor,.variant:hover>.anchor{display:initial;}.anchor{display:none;position:absolute;left:-0.5em;background:none !important;}.anchor.field{left:-5px;}.section-header>.anchor{left:-15px;padding-right:8px;}h2.section-header>.anchor{padding-right:6px;}a.doc-anchor{color:var(--main-color);display:none;position:absolute;left:-17px;padding-right:5px;padding-left:3px;}*:hover>.doc-anchor{display:block;}.top-doc>.docblock>*:first-child>.doc-anchor{display:none !important;}.main-heading a:hover,.example-wrap .rust a:hover,.all-items a:hover,.docblock a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover:not(.doc-anchor),.docblock-short a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover,.item-info a{text-decoration:underline;}.crate.block li.current a{font-weight:500;}table,.item-table{overflow-wrap:break-word;}.item-table{display:table;padding:0;margin:0;}.item-table>li{display:table-row;}.item-table>li>div{display:table-cell;}.item-table>li>.item-name{padding-right:1.25rem;}.search-results-title{margin-top:0;white-space:nowrap;display:flex;align-items:baseline;}#crate-search-div{position:relative;min-width:5em;}#crate-search{min-width:115px;padding:0 23px 0 4px;max-width:100%;text-overflow:ellipsis;border:1px solid var(--border-color);border-radius:4px;outline:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;background-color:var(--main-background-color);color:inherit;line-height:1.5;font-weight:500;}#crate-search:hover,#crate-search:focus{border-color:var(--crate-search-hover-border);}#crate-search-div::after{pointer-events:none;width:100%;height:100%;position:absolute;top:0;left:0;content:"";background-repeat:no-repeat;background-size:20px;background-position:calc(100% - 2px) 56%;background-image:url('data:image/svg+xml, \ + ');filter:var(--crate-search-div-filter);}#crate-search-div:hover::after,#crate-search-div:focus-within::after{filter:var(--crate-search-div-hover-filter);}#crate-search>option{font-size:1rem;}.search-input{-webkit-appearance:none;outline:none;border:1px solid var(--border-color);border-radius:2px;padding:8px;font-size:1rem;flex-grow:1;background-color:var(--button-background-color);color:var(--search-color);}.search-input:focus{border-color:var(--search-input-focused-border-color);}.search-results{display:none;}.search-results.active{display:block;}.search-results>a{display:flex;margin-left:2px;margin-right:2px;border-bottom:1px solid var(--search-result-border-color);gap:1em;}.search-results>a>div.desc{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex:2;}.search-results a:hover,.search-results a:focus{background-color:var(--search-result-link-focus-background-color);}.search-results .result-name{display:flex;align-items:center;justify-content:start;flex:3;}.search-results .result-name .alias{color:var(--search-results-alias-color);}.search-results .result-name .grey{color:var(--search-results-grey-color);}.search-results .result-name .typename{color:var(--search-results-grey-color);font-size:0.875rem;width:var(--search-typename-width);}.search-results .result-name .path{word-break:break-all;max-width:calc(100% - var(--search-typename-width));display:inline-block;}.search-results .result-name .path>*{display:inline;}.popover{position:absolute;top:100%;right:0;z-index:calc(var(--desktop-sidebar-z-index) + 1);margin-top:7px;border-radius:3px;border:1px solid var(--border-color);background-color:var(--main-background-color);color:var(--main-color);--popover-arrow-offset:11px;}.popover::before{content:'';position:absolute;right:var(--popover-arrow-offset);border:solid var(--border-color);border-width:1px 1px 0 0;background-color:var(--main-background-color);padding:4px;transform:rotate(-45deg);top:-5px;}.setting-line{margin:1.2em 0.6em;}.setting-radio input,.setting-check input{margin-right:0.3em;height:1.2rem;width:1.2rem;border:2px solid var(--settings-input-border-color);outline:none;-webkit-appearance:none;cursor:pointer;}.setting-radio input{border-radius:50%;}.setting-radio span,.setting-check span{padding-bottom:1px;}.setting-radio{margin-top:0.1em;margin-bottom:0.1em;min-width:3.8em;padding:0.3em;display:inline-flex;align-items:center;cursor:pointer;}.setting-radio+.setting-radio{margin-left:0.5em;}.setting-check{margin-right:20px;display:flex;align-items:center;cursor:pointer;}.setting-radio input:checked{box-shadow:inset 0 0 0 3px var(--main-background-color);background-color:var(--settings-input-color);}.setting-check input:checked{background-color:var(--settings-input-color);border-width:1px;content:url('data:image/svg+xml,\ + \ + ');}.setting-radio input:focus,.setting-check input:focus{box-shadow:0 0 1px 1px var(--settings-input-color);}.setting-radio input:checked:focus{box-shadow:inset 0 0 0 3px var(--main-background-color),0 0 2px 2px var(--settings-input-color);}.setting-radio input:hover,.setting-check input:hover{border-color:var(--settings-input-color) !important;}#help.popover{max-width:600px;--popover-arrow-offset:48px;}#help dt{float:left;clear:left;margin-right:0.5rem;}#help span.top,#help span.bottom{text-align:center;display:block;font-size:1.125rem;}#help span.top{margin:10px 0;border-bottom:1px solid var(--border-color);padding-bottom:4px;margin-bottom:6px;}#help span.bottom{clear:both;border-top:1px solid var(--border-color);}.side-by-side>div{width:50%;float:left;padding:0 20px 20px 17px;}.item-info .stab{display:block;padding:3px;margin-bottom:5px;}.item-name .stab{margin-left:0.3125em;}.stab{padding:0 2px;font-size:0.875rem;font-weight:normal;color:var(--main-color);background-color:var(--stab-background-color);width:fit-content;white-space:pre-wrap;border-radius:3px;display:inline;vertical-align:baseline;}.stab.portability>code{background:none;color:var(--stab-code-color);}.stab .emoji,.item-info .stab::before{font-size:1.25rem;}.stab .emoji{margin-right:0.3rem;}.item-info .stab::before{content:"\0";width:0;display:inline-block;color:transparent;}.emoji{text-shadow:1px 0 0 black,-1px 0 0 black,0 1px 0 black,0 -1px 0 black;}.since{font-weight:normal;font-size:initial;}.rightside{padding-left:12px;float:right;}.rightside:not(a),.out-of-band{color:var(--right-side-color);}pre.rust{tab-size:4;-moz-tab-size:4;}pre.rust .kw{color:var(--code-highlight-kw-color);}pre.rust .kw-2{color:var(--code-highlight-kw-2-color);}pre.rust .lifetime{color:var(--code-highlight-lifetime-color);}pre.rust .prelude-ty{color:var(--code-highlight-prelude-color);}pre.rust .prelude-val{color:var(--code-highlight-prelude-val-color);}pre.rust .string{color:var(--code-highlight-string-color);}pre.rust .number{color:var(--code-highlight-number-color);}pre.rust .bool-val{color:var(--code-highlight-literal-color);}pre.rust .self{color:var(--code-highlight-self-color);}pre.rust .attr{color:var(--code-highlight-attribute-color);}pre.rust .macro,pre.rust .macro-nonterminal{color:var(--code-highlight-macro-color);}pre.rust .question-mark{font-weight:bold;color:var(--code-highlight-question-mark-color);}pre.rust .comment{color:var(--code-highlight-comment-color);}pre.rust .doccomment{color:var(--code-highlight-doc-comment-color);}.rustdoc.src .example-wrap pre.rust a{background:var(--codeblock-link-background);}.example-wrap.compile_fail,.example-wrap.should_panic{border-left:2px solid var(--codeblock-error-color);}.ignore.example-wrap{border-left:2px solid var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover,.example-wrap.should_panic:hover{border-left:2px solid var(--codeblock-error-hover-color);}.example-wrap.ignore:hover{border-left:2px solid var(--codeblock-ignore-hover-color);}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip{color:var(--codeblock-error-color);}.example-wrap.ignore .tooltip{color:var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover .tooltip,.example-wrap.should_panic:hover .tooltip{color:var(--codeblock-error-hover-color);}.example-wrap.ignore:hover .tooltip{color:var(--codeblock-ignore-hover-color);}.example-wrap .tooltip{position:absolute;display:block;left:-25px;top:5px;margin:0;line-height:1;}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip,.example-wrap.ignore .tooltip{font-weight:bold;font-size:1.25rem;}.content .docblock .warning{border-left:2px solid var(--warning-border-color);padding:14px;position:relative;overflow-x:visible !important;}.content .docblock .warning::before{color:var(--warning-border-color);content:"ⓘ";position:absolute;left:-25px;top:5px;font-weight:bold;font-size:1.25rem;}.top-doc>.docblock>.warning:first-child::before{top:20px;}a.test-arrow{visibility:hidden;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:1.375rem;top:5px;right:5px;z-index:1;color:var(--test-arrow-color);background-color:var(--test-arrow-background-color);}a.test-arrow:hover{color:var(--test-arrow-hover-color);background-color:var(--test-arrow-hover-background-color);}.example-wrap:hover .test-arrow{visibility:visible;}.code-attribute{font-weight:300;color:var(--code-attribute-color);}.item-spacer{width:100%;height:12px;display:block;}.out-of-band>span.since{font-size:1.25rem;}.sub-variant h4{font-size:1rem;font-weight:400;margin-top:0;margin-bottom:0;}.sub-variant{margin-left:24px;margin-bottom:40px;}.sub-variant>.sub-variant-field{margin-left:24px;}:target{padding-right:3px;background-color:var(--target-background-color);border-right:3px solid var(--target-border-color);}.code-header a.tooltip{color:inherit;margin-right:15px;position:relative;}.code-header a.tooltip:hover{color:var(--link-color);}a.tooltip:hover::after{position:absolute;top:calc(100% - 10px);left:-15px;right:-15px;height:20px;content:"\00a0";}.fade-out{opacity:0;transition:opacity 0.45s cubic-bezier(0,0,0.1,1.0);}.popover.tooltip .content{margin:0.25em 0.5em;}.popover.tooltip .content pre,.popover.tooltip .content code{background:transparent;margin:0;padding:0;font-size:1.25rem;white-space:pre-wrap;}.popover.tooltip .content>h3:first-child{margin:0 0 5px 0;}.search-failed{text-align:center;margin-top:20px;display:none;}.search-failed.active{display:block;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#search-tabs{display:flex;flex-direction:row;gap:1px;margin-bottom:4px;}#search-tabs button{text-align:center;font-size:1.125rem;border:0;border-top:2px solid;flex:1;line-height:1.5;color:inherit;}#search-tabs button:not(.selected){background-color:var(--search-tab-button-not-selected-background);border-top-color:var(--search-tab-button-not-selected-border-top-color);}#search-tabs button:hover,#search-tabs button.selected{background-color:var(--search-tab-button-selected-background);border-top-color:var(--search-tab-button-selected-border-top-color);}#search-tabs .count{font-size:1rem;font-variant-numeric:tabular-nums;color:var(--search-tab-title-count-color);}#search .error code{border-radius:3px;background-color:var(--search-error-code-background-color);}.search-corrections{font-weight:normal;}#src-sidebar{width:100%;overflow:auto;}#src-sidebar div.files>a:hover,details.dir-entry summary:hover,#src-sidebar div.files>a:focus,details.dir-entry summary:focus{background-color:var(--src-sidebar-background-hover);}#src-sidebar div.files>a.selected{background-color:var(--src-sidebar-background-selected);}.src-sidebar-title{position:sticky;top:0;display:flex;padding:8px 8px 0 48px;margin-bottom:7px;background:var(--sidebar-background-color);border-bottom:1px solid var(--border-color);}#settings-menu,#help-button{margin-left:4px;display:flex;}#sidebar-button{display:none;line-height:0;}.hide-sidebar #sidebar-button,.src #sidebar-button{display:flex;margin-right:4px;position:fixed;left:6px;height:34px;width:34px;background-color:var(--main-background-color);z-index:1;}.src #sidebar-button{left:8px;z-index:calc(var(--desktop-sidebar-z-index) + 1);}.hide-sidebar .src #sidebar-button{position:static;}#settings-menu>a,#help-button>a,#sidebar-button>a{display:flex;align-items:center;justify-content:center;background-color:var(--button-background-color);border:1px solid var(--border-color);border-radius:2px;color:var(--settings-button-color);font-size:20px;width:33px;}#settings-menu>a:hover,#settings-menu>a:focus,#help-button>a:hover,#help-button>a:focus,#sidebar-button>a:hover,#sidebar-button>a:focus{border-color:var(--settings-button-border-focus);}#settings-menu>a{line-height:0;font-size:0;}#settings-menu>a:before{content:url('data:image/svg+xml,\ + ');width:22px;height:22px;filter:var(--settings-menu-filter);}#sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');width:22px;height:22px;}#copy-path{color:var(--copy-path-button-color);background:var(--main-background-color);height:34px;width:33px;margin-left:10px;padding:0;padding-left:2px;border:0;font-size:0;}#copy-path::before{filter:var(--copy-path-img-filter);content:url('data:image/svg+xml,\ +\ +\ +');width:19px;height:18px;}#copy-path:hover::before{filter:var(--copy-path-img-hover-filter);}#copy-path.clicked::before{content:url('data:image/svg+xml,\ + \ + ');}@keyframes rotating{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}#settings-menu.rotate>a img{animation:rotating 2s linear infinite;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px var(--border-color);border-radius:3px;color:var(--kbd-color);background-color:var(--kbd-background);box-shadow:inset 0 -1px 0 var(--kbd-box-shadow-color);}ul.all-items>li{list-style:none;}details.dir-entry{padding-left:4px;}details.dir-entry>summary{margin:0 0 0 -4px;padding:0 0 0 4px;cursor:pointer;}details.dir-entry div.folders,details.dir-entry div.files{padding-left:23px;}details.dir-entry a{display:block;}details.toggle{contain:layout;position:relative;}details.toggle>summary.hideme{cursor:pointer;font-size:1rem;}details.toggle>summary{list-style:none;outline:none;}details.toggle>summary::-webkit-details-marker,details.toggle>summary::marker{display:none;}details.toggle>summary.hideme>span{margin-left:9px;}details.toggle>summary::before{background:url('data:image/svg+xml,') no-repeat top left;content:"";cursor:pointer;width:16px;height:16px;display:inline-block;vertical-align:middle;opacity:.5;filter:var(--toggle-filter);}details.toggle>summary.hideme>span,.more-examples-toggle summary,.more-examples-toggle .hide-more{color:var(--toggles-color);}details.toggle>summary::after{content:"Expand";overflow:hidden;width:0;height:0;position:absolute;}details.toggle>summary.hideme::after{content:"";}details.toggle>summary:focus::before,details.toggle>summary:hover::before{opacity:1;}details.toggle>summary:focus-visible::before{outline:1px dotted #000;outline-offset:1px;}details.non-exhaustive{margin-bottom:8px;}details.toggle>summary.hideme::before{position:relative;}details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;top:4px;}.impl-items>details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;}details.toggle[open] >summary.hideme{position:absolute;}details.toggle[open] >summary.hideme>span{display:none;}details.toggle[open] >summary::before{background:url('data:image/svg+xml,') no-repeat top left;}details.toggle[open] >summary::after{content:"Collapse";}.docblock summary>*{display:inline-block;}.docblock>.example-wrap:first-child .tooltip{margin-top:16px;}.src #sidebar-button>a:before,.sidebar-menu-toggle:before{content:url('data:image/svg+xml,\ + ');opacity:0.75;}.sidebar-menu-toggle:hover:before,.sidebar-menu-toggle:active:before,.sidebar-menu-toggle:focus:before{opacity:1;}.src #sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');opacity:0.75;}@media (max-width:850px){#search-tabs .count{display:block;}}@media (max-width:700px){*[id]{scroll-margin-top:45px;}.rustdoc{display:block;}main{padding-left:15px;padding-top:0px;}.main-heading{flex-direction:column;}.out-of-band{text-align:left;margin-left:initial;padding:initial;}.out-of-band .since::before{content:"Since ";}.sidebar .logo-container,.sidebar .location,.sidebar-resizer{display:none;}.sidebar{position:fixed;top:45px;left:-1000px;z-index:11;height:calc(100vh - 45px);width:200px;}.src main,.rustdoc.src .sidebar{top:0;padding:0;height:100vh;border:0;}.src .search-form{margin-left:40px;}.hide-sidebar .search-form{margin-left:32px;}.hide-sidebar .src .search-form{margin-left:0;}.sidebar.shown,.src-sidebar-expanded .src .sidebar,.rustdoc:not(.src) .sidebar:focus-within{left:0;}.mobile-topbar h2{padding-bottom:0;margin:auto 0.5em auto auto;overflow:hidden;font-size:24px;white-space:nowrap;text-overflow:ellipsis;}.mobile-topbar .logo-container>img{max-width:35px;max-height:35px;margin:5px 0 5px 20px;}.mobile-topbar{display:flex;flex-direction:row;position:sticky;z-index:10;font-size:2rem;height:45px;width:100%;left:0;top:0;}.hide-sidebar .mobile-topbar{display:none;}.sidebar-menu-toggle{width:45px;border:none;line-height:0;}.hide-sidebar .sidebar-menu-toggle{display:none;}.sidebar-elems{margin-top:1em;}.anchor{display:none !important;}#main-content>details.toggle>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}#copy-path,#help-button{display:none;}#sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');width:22px;height:22px;}.sidebar-menu-toggle:before{filter:var(--mobile-sidebar-menu-filter);}.sidebar-menu-toggle:hover{background:var(--main-background-color);}.item-table,.item-row,.item-table>li,.item-table>li>div,.search-results>a,.search-results>a>div{display:block;}.search-results>a{padding:5px 0px;}.search-results>a>div.desc,.item-table>li>div.desc{padding-left:2em;}.search-results .result-name{display:block;}.search-results .result-name .typename{width:initial;margin-right:0;}.search-results .result-name .typename,.search-results .result-name .path{display:inline;}.src-sidebar-expanded .src .sidebar{position:fixed;max-width:100vw;width:100vw;}.src .src-sidebar-title{padding-top:0;}details.toggle:not(.top-doc)>summary{margin-left:10px;}.impl-items>details.toggle>summary:not(.hideme)::before,#main-content>details.toggle:not(.top-doc)>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}.impl-items>.item-info{margin-left:34px;}.src nav.sub{margin:0;padding:var(--nav-sub-mobile-padding);}}@media (min-width:701px){.scraped-example-title{position:absolute;z-index:10;background:var(--main-background-color);bottom:8px;right:5px;padding:2px 4px;box-shadow:0 0 4px var(--main-background-color);}.item-table>li>.item-name{width:33%;}.item-table>li>div{padding-bottom:5px;word-break:break-all;}}@media print{nav.sidebar,nav.sub,.out-of-band,a.src,#copy-path,details.toggle[open] >summary::before,details.toggle>summary::before,details.toggle.top-doc>summary{display:none;}.docblock{margin-left:0;}main{padding:10px;}}@media (max-width:464px){.docblock{margin-left:12px;}.docblock code{overflow-wrap:break-word;overflow-wrap:anywhere;}nav.sub{flex-direction:column;}.search-form{align-self:stretch;}}.variant,.implementors-toggle>summary,.impl,#implementors-list>.docblock,.impl-items>section,.impl-items>.toggle>summary,.methods>section,.methods>.toggle>summary{margin-bottom:0.75em;}.variants>.docblock,.implementors-toggle>.docblock,.impl-items>.toggle[open]:not(:last-child),.methods>.toggle[open]:not(:last-child),.implementors-toggle[open]:not(:last-child){margin-bottom:2em;}#trait-implementations-list .impl-items>.toggle:not(:last-child),#synthetic-implementations-list .impl-items>.toggle:not(:last-child),#blanket-implementations-list .impl-items>.toggle:not(:last-child){margin-bottom:1em;}.scraped-example-list .scrape-help{margin-left:10px;padding:0 4px;font-weight:normal;font-size:12px;position:relative;bottom:1px;border:1px solid var(--scrape-example-help-border-color);border-radius:50px;color:var(--scrape-example-help-color);}.scraped-example-list .scrape-help:hover{border-color:var(--scrape-example-help-hover-border-color);color:var(--scrape-example-help-hover-color);}.scraped-example{position:relative;}.scraped-example .code-wrapper{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;}.scraped-example:not(.expanded) .code-wrapper{max-height:calc(1.5em * 5 + 10px);}.scraped-example:not(.expanded) .code-wrapper pre{overflow-y:hidden;padding-bottom:0;max-height:calc(1.5em * 5 + 10px);}.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper,.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper pre{max-height:calc(1.5em * 10 + 10px);}.scraped-example .code-wrapper .next,.scraped-example .code-wrapper .prev,.scraped-example .code-wrapper .expand{color:var(--main-color);position:absolute;top:0.25em;z-index:1;padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.scraped-example .code-wrapper .prev{right:2.25em;}.scraped-example .code-wrapper .next{right:1.25em;}.scraped-example .code-wrapper .expand{right:0.25em;}.scraped-example:not(.expanded) .code-wrapper::before,.scraped-example:not(.expanded) .code-wrapper::after{content:" ";width:100%;height:5px;position:absolute;z-index:1;}.scraped-example:not(.expanded) .code-wrapper::before{top:0;background:linear-gradient(to bottom,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example:not(.expanded) .code-wrapper::after{bottom:0;background:linear-gradient(to top,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example .code-wrapper .example-wrap{width:100%;overflow-y:hidden;margin-bottom:0;}.scraped-example:not(.expanded) .code-wrapper .example-wrap{overflow-x:hidden;}.scraped-example .example-wrap .rust span.highlight{background:var(--scrape-example-code-line-highlight);}.scraped-example .example-wrap .rust span.highlight.focus{background:var(--scrape-example-code-line-highlight-focus);}.more-examples-toggle{max-width:calc(100% + 25px);margin-top:10px;margin-left:-25px;}.more-examples-toggle .hide-more{margin-left:25px;cursor:pointer;}.more-scraped-examples{margin-left:25px;position:relative;}.toggle-line{position:absolute;top:5px;bottom:0;right:calc(100% + 10px);padding:0 4px;cursor:pointer;}.toggle-line-inner{min-width:2px;height:100%;background:var(--scrape-example-toggle-line-background);}.toggle-line:hover .toggle-line-inner{background:var(--scrape-example-toggle-line-hover-background);}.more-scraped-examples .scraped-example,.example-links{margin-top:20px;}.more-scraped-examples .scraped-example:first-child{margin-top:5px;}.example-links ul{margin-bottom:0;}:root[data-theme="light"],:root:not([data-theme]){--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#f5f5f5;--sidebar-background-color-hover:#e0e0e0;--code-block-background-color:#f5f5f5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--mobile-sidebar-menu-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#fff;--settings-menu-filter:none;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--test-arrow-color:#f5f5f5;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#f5f5f5;--test-arrow-hover-background-color:rgb(78,139,202);--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#f5f5f5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);--sidebar-resizer-hover:hsl(207,90%,66%);--sidebar-resizer-active:hsl(207,90%,54%);}:root[data-theme="dark"]{--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--mobile-sidebar-menu-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--settings-menu-filter:none;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--test-arrow-color:#dedede;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#dedede;--test-arrow-hover-background-color:#4e8bca;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2a2a2a;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);--sidebar-resizer-hover:hsl(207,30%,54%);--sidebar-resizer-active:hsl(207,90%,54%);}:root[data-theme="ayu"]{--main-background-color:#0f1419;--main-color:#c5c5c5;--settings-input-color:#ffb454;--settings-input-border-color:#999;--settings-button-color:#fff;--settings-button-border-focus:#e0e0e0;--sidebar-background-color:#14191f;--sidebar-background-color-hover:rgba(70,70,70,0.33);--code-block-background-color:#191f26;--scrollbar-track-background-color:transparent;--scrollbar-thumb-background-color:#5c6773;--scrollbar-color:#5c6773 #24292f;--headings-border-bottom-color:#5c6773;--border-color:#5c6773;--button-background-color:#141920;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--mobile-sidebar-menu-filter:invert(100%);--search-input-focused-border-color:#5c6773;--copy-path-button-color:#fff;--copy-path-img-filter:invert(70%);--copy-path-img-hover-filter:invert(100%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ffa0a5;--trait-link-color:#39afd7;--assoc-item-link-color:#39afd7;--function-link-color:#fdd687;--macro-link-color:#a37acc;--keyword-link-color:#39afd7;--mod-link-color:#39afd7;--link-color:#39afd7;--sidebar-link-color:#53b1db;--sidebar-current-link-background-color:transparent;--search-result-link-focus-background-color:#3c3c3c;--search-result-border-color:#aaa3;--search-color:#fff;--search-error-code-background-color:#4f4c4c;--search-results-alias-color:#c5c5c5;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:none;--search-tab-button-not-selected-background:transparent !important;--search-tab-button-selected-border-top-color:none;--search-tab-button-selected-background:#141920 !important;--settings-menu-filter:invert(100%);--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ff7733;--code-highlight-kw-2-color:#ff7733;--code-highlight-lifetime-color:#ff7733;--code-highlight-prelude-color:#69f2df;--code-highlight-prelude-val-color:#ff7733;--code-highlight-number-color:#b8cc52;--code-highlight-string-color:#b8cc52;--code-highlight-literal-color:#ff7733;--code-highlight-attribute-color:#e6e1cf;--code-highlight-self-color:#36a3d9;--code-highlight-macro-color:#a37acc;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#788797;--code-highlight-doc-comment-color:#a1ac88;--src-line-numbers-span-color:#5c6773;--src-line-number-highlighted-background-color:rgba(255,236,164,0.06);--test-arrow-color:#788797;--test-arrow-background-color:rgba(57,175,215,0.09);--test-arrow-hover-color:#c5c5c5;--test-arrow-hover-background-color:rgba(57,175,215,0.368);--target-background-color:rgba(255,236,164,0.06);--target-border-color:rgba(255,180,76,0.85);--kbd-color:#c5c5c5;--kbd-background:#314559;--kbd-box-shadow-color:#5c6773;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(41%) sepia(12%) saturate(487%) hue-rotate(171deg) brightness(94%) contrast(94%);--crate-search-div-hover-filter:invert(98%) sepia(12%) saturate(81%) hue-rotate(343deg) brightness(113%) contrast(76%);--crate-search-hover-border:#e0e0e0;--src-sidebar-background-selected:#14191f;--src-sidebar-background-hover:#14191f;--table-alt-row-background-color:#191f26;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(15,20,25,1);--scrape-example-code-wrapper-background-end:rgba(15,20,25,0);--sidebar-resizer-hover:hsl(34,50%,33%);--sidebar-resizer-active:hsl(34,100%,66%);}:root[data-theme="ayu"] h1,:root[data-theme="ayu"] h2,:root[data-theme="ayu"] h3,:root[data-theme="ayu"] h4,:where(:root[data-theme="ayu"]) h1 a,:root[data-theme="ayu"] .sidebar h2 a,:root[data-theme="ayu"] .sidebar h3 a{color:#fff;}:root[data-theme="ayu"] .docblock code{color:#ffb454;}:root[data-theme="ayu"] .docblock a>code{color:#39AFD7 !important;}:root[data-theme="ayu"] .code-header,:root[data-theme="ayu"] .docblock pre>code,:root[data-theme="ayu"] pre,:root[data-theme="ayu"] pre>code,:root[data-theme="ayu"] .item-info code,:root[data-theme="ayu"] .rustdoc.source .example-wrap{color:#e6e1cf;}:root[data-theme="ayu"] .sidebar .current,:root[data-theme="ayu"] .sidebar .current a,:root[data-theme="ayu"] .sidebar a:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:hover,:root[data-theme="ayu"] details.dir-entry summary:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:focus,:root[data-theme="ayu"] details.dir-entry summary:focus,:root[data-theme="ayu"] #src-sidebar div.files>a.selected{color:#ffb44c;}:root[data-theme="ayu"] .sidebar-elems .location{color:#ff7733;}:root[data-theme="ayu"] .src-line-numbers .line-highlighted{color:#708090;padding-right:7px;border-right:1px solid #ffb44c;}:root[data-theme="ayu"] .search-results a:hover,:root[data-theme="ayu"] .search-results a:focus{color:#fff !important;background-color:#3c3c3c;}:root[data-theme="ayu"] .search-results a{color:#0096cf;}:root[data-theme="ayu"] .search-results a div.desc{color:#c5c5c5;}:root[data-theme="ayu"] .result-name .primitive>i,:root[data-theme="ayu"] .result-name .keyword>i{color:#788797;}:root[data-theme="ayu"] #search-tabs>button.selected{border-bottom:1px solid #ffb44c !important;border-top:none;}:root[data-theme="ayu"] #search-tabs>button:not(.selected){border:none;background-color:transparent !important;}:root[data-theme="ayu"] #search-tabs>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}:root[data-theme="ayu"] #settings-menu>a img,:root[data-theme="ayu"] #sidebar-button>a:before{filter:invert(100);} \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/rustdoc-dd39b87e5fcfba68.css b/static/rust/redstone/crypto_radix,network_radix/static.files/rustdoc-dd39b87e5fcfba68.css similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/static.files/rustdoc-dd39b87e5fcfba68.css rename to static/rust/redstone/crypto_radix,network_radix/static.files/rustdoc-dd39b87e5fcfba68.css diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/scrape-examples-ef1e698c1d417c0c.js b/static/rust/redstone/crypto_radix,network_radix/static.files/scrape-examples-ef1e698c1d417c0c.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/static.files/scrape-examples-ef1e698c1d417c0c.js rename to static/rust/redstone/crypto_radix,network_radix/static.files/scrape-examples-ef1e698c1d417c0c.js diff --git a/static/rust/redstone/crypto_radix,network_radix/static.files/search-d234aafac6c221dd.js b/static/rust/redstone/crypto_radix,network_radix/static.files/search-d234aafac6c221dd.js new file mode 100644 index 00000000..3f587f65 --- /dev/null +++ b/static/rust/redstone/crypto_radix,network_radix/static.files/search-d234aafac6c221dd.js @@ -0,0 +1,5 @@ +"use strict";if(!Array.prototype.toSpliced){Array.prototype.toSpliced=function(){const me=this.slice();Array.prototype.splice.apply(me,arguments);return me}}(function(){const itemTypes=["keyword","primitive","mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","associatedtype","constant","associatedconstant","union","foreigntype","existential","attr","derive","traitalias","generic",];const longItemTypes=["keyword","primitive type","module","extern crate","re-export","struct","enum","function","type alias","static","trait","","trait method","method","struct field","enum variant","macro","assoc type","constant","assoc const","union","foreign type","existential type","attribute macro","derive macro","trait alias",];const TY_GENERIC=itemTypes.indexOf("generic");const TY_IMPORT=itemTypes.indexOf("import");const ROOT_PATH=typeof window!=="undefined"?window.rootPath:"../";const UNBOXING_LIMIT=5;const REGEX_IDENT=/\p{ID_Start}\p{ID_Continue}*|_\p{ID_Continue}+/uy;const REGEX_INVALID_TYPE_FILTER=/[^a-z]/ui;function printTab(nb){let iter=0;let foundCurrentTab=false;let foundCurrentResultSet=false;onEachLazy(document.getElementById("search-tabs").childNodes,elem=>{if(nb===iter){addClass(elem,"selected");foundCurrentTab=true}else{removeClass(elem,"selected")}iter+=1});const isTypeSearch=(nb>0||iter===1);iter=0;onEachLazy(document.getElementById("results").childNodes,elem=>{if(nb===iter){addClass(elem,"active");foundCurrentResultSet=true}else{removeClass(elem,"active")}iter+=1});if(foundCurrentTab&&foundCurrentResultSet){searchState.currentTab=nb;const correctionsElem=document.getElementsByClassName("search-corrections");if(isTypeSearch){removeClass(correctionsElem[0],"hidden")}else{addClass(correctionsElem[0],"hidden")}}else if(nb!==0){printTab(0)}}const editDistanceState={current:[],prev:[],prevPrev:[],calculate:function calculate(a,b,limit){if(a.lengthlimit){return limit+1}while(b.length>0&&b[0]===a[0]){a=a.substring(1);b=b.substring(1)}while(b.length>0&&b[b.length-1]===a[a.length-1]){a=a.substring(0,a.length-1);b=b.substring(0,b.length-1)}if(b.length===0){return minDist}const aLength=a.length;const bLength=b.length;for(let i=0;i<=bLength;++i){this.current[i]=0;this.prev[i]=i;this.prevPrev[i]=Number.MAX_VALUE}for(let i=1;i<=aLength;++i){this.current[0]=i;const aIdx=i-1;for(let j=1;j<=bLength;++j){const bIdx=j-1;const substitutionCost=a[aIdx]===b[bIdx]?0:1;this.current[j]=Math.min(this.prev[j]+1,this.current[j-1]+1,this.prev[j-1]+substitutionCost,);if((i>1)&&(j>1)&&(a[aIdx]===b[bIdx-1])&&(a[aIdx-1]===b[bIdx])){this.current[j]=Math.min(this.current[j],this.prevPrev[j-2]+1,)}}const prevPrevTmp=this.prevPrev;this.prevPrev=this.prev;this.prev=this.current;this.current=prevPrevTmp}const distance=this.prev[bLength];return distance<=limit?distance:(limit+1)},};function editDistance(a,b,limit){return editDistanceState.calculate(a,b,limit)}function initSearch(rawSearchIndex){const MAX_RESULTS=200;const NO_TYPE_FILTER=-1;let searchIndex;let searchIndexDeprecated;let searchIndexEmptyDesc;let functionTypeFingerprint;let currentResults;const typeNameIdMap=new Map();const ALIASES=new Map();const typeNameIdOfArray=buildTypeMapIndex("array");const typeNameIdOfSlice=buildTypeMapIndex("slice");const typeNameIdOfArrayOrSlice=buildTypeMapIndex("[]");const typeNameIdOfTuple=buildTypeMapIndex("tuple");const typeNameIdOfUnit=buildTypeMapIndex("unit");const typeNameIdOfTupleOrUnit=buildTypeMapIndex("()");const typeNameIdOfFn=buildTypeMapIndex("fn");const typeNameIdOfFnMut=buildTypeMapIndex("fnmut");const typeNameIdOfFnOnce=buildTypeMapIndex("fnonce");const typeNameIdOfHof=buildTypeMapIndex("->");function buildTypeMapIndex(name,isAssocType){if(name===""||name===null){return null}if(typeNameIdMap.has(name)){const obj=typeNameIdMap.get(name);obj.assocOnly=isAssocType&&obj.assocOnly;return obj.id}else{const id=typeNameIdMap.size;typeNameIdMap.set(name,{id,assocOnly:isAssocType});return id}}function isSpecialStartCharacter(c){return"<\"".indexOf(c)!==-1}function isEndCharacter(c){return"=,>-])".indexOf(c)!==-1}function itemTypeFromName(typename){const index=itemTypes.findIndex(i=>i===typename);if(index<0){throw["Unknown type filter ",typename]}return index}function getStringElem(query,parserState,isInGenerics){if(isInGenerics){throw["Unexpected ","\""," in generics"]}else if(query.literalSearch){throw["Cannot have more than one literal search element"]}else if(parserState.totalElems-parserState.genericsElems>0){throw["Cannot use literal search when there is more than one element"]}parserState.pos+=1;const start=parserState.pos;const end=getIdentEndPosition(parserState);if(parserState.pos>=parserState.length){throw["Unclosed ","\""]}else if(parserState.userQuery[end]!=="\""){throw["Unexpected ",parserState.userQuery[end]," in a string element"]}else if(start===end){throw["Cannot have empty string element"]}parserState.pos+=1;query.literalSearch=true}function isPathStart(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="::"}function isReturnArrow(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="->"}function consumeIdent(parserState){REGEX_IDENT.lastIndex=parserState.pos;const match=parserState.userQuery.match(REGEX_IDENT);if(match){parserState.pos+=match[0].length;return true}return false}function isSeparatorCharacter(c){return c===","||c==="="}function isPathSeparator(c){return c===":"||c===" "}function prevIs(parserState,lookingFor){let pos=parserState.pos;while(pos>0){const c=parserState.userQuery[pos-1];if(c===lookingFor){return true}else if(c!==" "){break}pos-=1}return false}function isLastElemGeneric(elems,parserState){return(elems.length>0&&elems[elems.length-1].generics.length>0)||prevIs(parserState,">")}function skipWhitespace(parserState){while(parserState.pos0){throw["Cannot have more than one element if you use quotes"]}const typeFilter=parserState.typeFilter;parserState.typeFilter=null;if(name==="!"){if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive never type ","!"," and ",typeFilter," both specified",]}if(generics.length!==0){throw["Never type ","!"," does not accept generic parameters",]}const bindingName=parserState.isInBinding;parserState.isInBinding=null;return makePrimitiveElement("never",{bindingName})}const quadcolon=/::\s*::/.exec(path);if(path.startsWith("::")){throw["Paths cannot start with ","::"]}else if(path.endsWith("::")){throw["Paths cannot end with ","::"]}else if(quadcolon!==null){throw["Unexpected ",quadcolon[0]]}const pathSegments=path.split(/(?:::\s*)|(?:\s+(?:::\s*)?)/);if(pathSegments.length===0||(pathSegments.length===1&&pathSegments[0]==="")){if(generics.length>0||prevIs(parserState,">")){throw["Found generics without a path"]}else{throw["Unexpected ",parserState.userQuery[parserState.pos]]}}for(const[i,pathSegment]of pathSegments.entries()){if(pathSegment==="!"){if(i!==0){throw["Never type ","!"," is not associated item"]}pathSegments[i]="never"}}parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1}const bindingName=parserState.isInBinding;parserState.isInBinding=null;const bindings=new Map();const pathLast=pathSegments[pathSegments.length-1];return{name:name.trim(),id:null,fullPath:pathSegments,pathWithoutLast:pathSegments.slice(0,pathSegments.length-1),pathLast,normalizedPathLast:pathLast.replace(/_/g,""),generics:generics.filter(gen=>{if(gen.bindingName!==null){if(gen.name!==null){gen.bindingName.generics.unshift(gen)}bindings.set(gen.bindingName.name,gen.bindingName.generics);return false}return true}),bindings,typeFilter,bindingName,}}function getIdentEndPosition(parserState){let afterIdent=consumeIdent(parserState);let end=parserState.pos;let macroExclamation=-1;while(parserState.pos0){throw["Unexpected ",c," after ",parserState.userQuery[parserState.pos-1]," (not a valid identifier)"]}else{throw["Unexpected ",c," (not a valid identifier)"]}parserState.pos+=1;afterIdent=consumeIdent(parserState);end=parserState.pos}if(macroExclamation!==-1){if(parserState.typeFilter===null){parserState.typeFilter="macro"}else if(parserState.typeFilter!=="macro"){throw["Invalid search type: macro ","!"," and ",parserState.typeFilter," both specified",]}end=macroExclamation}return end}function getFilteredNextElem(query,parserState,elems,isInGenerics){const start=parserState.pos;if(parserState.userQuery[parserState.pos]===":"&&!isPathStart(parserState)){throw["Expected type filter before ",":"]}getNextElem(query,parserState,elems,isInGenerics);if(parserState.userQuery[parserState.pos]===":"&&!isPathStart(parserState)){if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}if(elems.length===0){throw["Expected type filter before ",":"]}else if(query.literalSearch){throw["Cannot use quotes on type filter"]}const typeFilterElem=elems.pop();checkExtraTypeFilterCharacters(start,parserState);parserState.typeFilter=typeFilterElem.name;parserState.pos+=1;parserState.totalElems-=1;query.literalSearch=false;getNextElem(query,parserState,elems,isInGenerics)}}function getNextElem(query,parserState,elems,isInGenerics){const generics=[];skipWhitespace(parserState);let start=parserState.pos;let end;if("[(".indexOf(parserState.userQuery[parserState.pos])!==-1){let endChar=")";let name="()";let friendlyName="tuple";if(parserState.userQuery[parserState.pos]==="["){endChar="]";name="[]";friendlyName="slice"}parserState.pos+=1;const{foundSeparator}=getItemsBefore(query,parserState,generics,endChar);const typeFilter=parserState.typeFilter;const bindingName=parserState.isInBinding;parserState.typeFilter=null;parserState.isInBinding=null;for(const gen of generics){if(gen.bindingName!==null){throw["Type parameter ","=",` cannot be within ${friendlyName} `,name]}}if(name==="()"&&!foundSeparator&&generics.length===1&&typeFilter===null){elems.push(generics[0])}else if(name==="()"&&generics.length===1&&generics[0].name==="->"){generics[0].typeFilter=typeFilter;elems.push(generics[0])}else{if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive ",name," and ",typeFilter," both specified",]}parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1}elems.push(makePrimitiveElement(name,{bindingName,generics}))}}else if(parserState.userQuery[parserState.pos]==="&"){if(parserState.typeFilter!==null&&parserState.typeFilter!=="primitive"){throw["Invalid search type: primitive ","&"," and ",parserState.typeFilter," both specified",]}parserState.typeFilter=null;parserState.pos+=1;let c=parserState.userQuery[parserState.pos];while(c===" "&&parserState.pos=end){throw["Found generics without a path"]}parserState.pos+=1;getItemsBefore(query,parserState,generics,">")}else if(parserState.pos=end){throw["Found generics without a path"]}if(parserState.isInBinding){throw["Unexpected ","("," after ","="]}parserState.pos+=1;const typeFilter=parserState.typeFilter;parserState.typeFilter=null;getItemsBefore(query,parserState,generics,")");skipWhitespace(parserState);if(isReturnArrow(parserState)){parserState.pos+=2;skipWhitespace(parserState);getFilteredNextElem(query,parserState,generics,isInGenerics);generics[generics.length-1].bindingName=makePrimitiveElement("output")}else{generics.push(makePrimitiveElement(null,{bindingName:makePrimitiveElement("output"),typeFilter:null,}))}parserState.typeFilter=typeFilter}if(isStringElem){skipWhitespace(parserState)}if(start>=end&&generics.length===0){return}if(parserState.userQuery[parserState.pos]==="="){if(parserState.isInBinding){throw["Cannot write ","="," twice in a binding"]}if(!isInGenerics){throw["Type parameter ","="," must be within generics list"]}const name=parserState.userQuery.slice(start,end).trim();if(name==="!"){throw["Type parameter ","="," key cannot be ","!"," never type"]}if(name.includes("!")){throw["Type parameter ","="," key cannot be ","!"," macro"]}if(name.includes("::")){throw["Type parameter ","="," key cannot contain ","::"," path"]}if(name.includes(":")){throw["Type parameter ","="," key cannot contain ",":"," type"]}parserState.isInBinding={name,generics}}else{elems.push(createQueryElement(query,parserState,parserState.userQuery.slice(start,end),generics,isInGenerics,),)}}}function getItemsBefore(query,parserState,elems,endChar){let foundStopChar=true;let foundSeparator=false;const oldTypeFilter=parserState.typeFilter;parserState.typeFilter=null;const oldIsInBinding=parserState.isInBinding;parserState.isInBinding=null;let hofParameters=null;let extra="";if(endChar===">"){extra="<"}else if(endChar==="]"){extra="["}else if(endChar===")"){extra="("}else if(endChar===""){extra="->"}else{extra=endChar}while(parserState.pos"," after ","="]}hofParameters=[...elems];elems.length=0;parserState.pos+=2;foundStopChar=true;foundSeparator=false;continue}else if(c===" "){parserState.pos+=1;continue}else if(isSeparatorCharacter(c)){parserState.pos+=1;foundStopChar=true;foundSeparator=true;continue}else if(c===":"&&isPathStart(parserState)){throw["Unexpected ","::",": paths cannot start with ","::"]}else if(isEndCharacter(c)){throw["Unexpected ",c," after ",extra]}if(!foundStopChar){let extra=[];if(isLastElemGeneric(query.elems,parserState)){extra=[" after ",">"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(endChar!==""){throw["Expected ",",",", ","=",", or ",endChar,...extra,", found ",c,]}throw["Expected ",","," or ","=",...extra,", found ",c,]}const posBefore=parserState.pos;getFilteredNextElem(query,parserState,elems,endChar!=="");if(endChar!==""&&parserState.pos>=parserState.length){throw["Unclosed ",extra]}if(posBefore===parserState.pos){parserState.pos+=1}foundStopChar=false}if(parserState.pos>=parserState.length&&endChar!==""){throw["Unclosed ",extra]}parserState.pos+=1;if(hofParameters){foundSeparator=false;if([...elems,...hofParameters].some(x=>x.bindingName)||parserState.isInBinding){throw["Unexpected ","="," within ","->"]}const hofElem=makePrimitiveElement("->",{generics:hofParameters,bindings:new Map([["output",[...elems]]]),typeFilter:null,});elems.length=0;elems[0]=hofElem}parserState.typeFilter=oldTypeFilter;parserState.isInBinding=oldIsInBinding;return{foundSeparator}}function checkExtraTypeFilterCharacters(start,parserState){const query=parserState.userQuery.slice(start,parserState.pos).trim();const match=query.match(REGEX_INVALID_TYPE_FILTER);if(match){throw["Unexpected ",match[0]," in type filter (before ",":",")",]}}function parseInput(query,parserState){let foundStopChar=true;while(parserState.pos"){if(isReturnArrow(parserState)){break}throw["Unexpected ",c," (did you mean ","->","?)"]}else if(parserState.pos>0){throw["Unexpected ",c," after ",parserState.userQuery[parserState.pos-1]]}throw["Unexpected ",c]}else if(c===" "){skipWhitespace(parserState);continue}if(!foundStopChar){let extra="";if(isLastElemGeneric(query.elems,parserState)){extra=[" after ",">"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(parserState.typeFilter!==null){throw["Expected ",","," or ","->",...extra,", found ",c,]}throw["Expected ",",",", ",":"," or ","->",...extra,", found ",c,]}const before=query.elems.length;getFilteredNextElem(query,parserState,query.elems,false);if(query.elems.length===before){parserState.pos+=1}foundStopChar=false}if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}while(parserState.pos"]}break}else{parserState.pos+=1}}}function newParsedQuery(userQuery){return{original:userQuery,userQuery:userQuery.toLowerCase(),elems:[],returned:[],foundElems:0,totalElems:0,literalSearch:false,error:null,correction:null,proposeCorrectionFrom:null,proposeCorrectionTo:null,typeFingerprint:new Uint32Array(4),}}function buildUrl(search,filterCrates){let extra="?search="+encodeURIComponent(search);if(filterCrates!==null){extra+="&filter-crate="+encodeURIComponent(filterCrates)}return getNakedUrl()+extra+window.location.hash}function getFilterCrates(){const elem=document.getElementById("crate-search");if(elem&&elem.value!=="all crates"&&rawSearchIndex.has(elem.value)){return elem.value}return null}function parseQuery(userQuery){function convertTypeFilterOnElem(elem){if(elem.typeFilter!==null){let typeFilter=elem.typeFilter;if(typeFilter==="const"){typeFilter="constant"}elem.typeFilter=itemTypeFromName(typeFilter)}else{elem.typeFilter=NO_TYPE_FILTER}for(const elem2 of elem.generics){convertTypeFilterOnElem(elem2)}for(const constraints of elem.bindings.values()){for(const constraint of constraints){convertTypeFilterOnElem(constraint)}}}userQuery=userQuery.trim().replace(/\r|\n|\t/g," ");const parserState={length:userQuery.length,pos:0,totalElems:0,genericsElems:0,typeFilter:null,isInBinding:null,userQuery:userQuery.toLowerCase(),};let query=newParsedQuery(userQuery);try{parseInput(query,parserState);for(const elem of query.elems){convertTypeFilterOnElem(elem)}for(const elem of query.returned){convertTypeFilterOnElem(elem)}}catch(err){query=newParsedQuery(userQuery);query.error=err;return query}if(!query.literalSearch){query.literalSearch=parserState.totalElems>1}query.foundElems=query.elems.length+query.returned.length;query.totalElems=parserState.totalElems;return query}function createQueryResults(results_in_args,results_returned,results_others,parsedQuery){return{"in_args":results_in_args,"returned":results_returned,"others":results_others,"query":parsedQuery,}}async function execQuery(parsedQuery,filterCrates,currentCrate){const results_others=new Map(),results_in_args=new Map(),results_returned=new Map();function transformResults(results){const duplicates=new Set();const out=[];for(const result of results){if(result.id!==-1){const obj=searchIndex[result.id];obj.dist=result.dist;const res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=res[2]+"|"+obj.ty;if(duplicates.has(obj.fullPath)){continue}if(obj.ty===TY_IMPORT&&duplicates.has(res[2])){continue}if(duplicates.has(res[2]+"|"+TY_IMPORT)){continue}duplicates.add(obj.fullPath);duplicates.add(res[2]);obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}return out}async function sortResults(results,isType,preferredCrate){const userQuery=parsedQuery.userQuery;const result_list=[];for(const result of results.values()){result.item=searchIndex[result.id];result.word=searchIndex[result.id].word;result_list.push(result)}result_list.sort((aaa,bbb)=>{let a,b;a=(aaa.word!==userQuery);b=(bbb.word!==userQuery);if(a!==b){return a-b}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.path_dist;b=bbb.path_dist;if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}a=(aaa.dist);b=(bbb.dist);if(a!==b){return a-b}a=searchIndexDeprecated.get(aaa.item.crate).contains(aaa.item.bitIndex);b=searchIndexDeprecated.get(bbb.item.crate).contains(bbb.item.bitIndex);if(a!==b){return a-b}a=(aaa.item.crate!==preferredCrate);b=(bbb.item.crate!==preferredCrate);if(a!==b){return a-b}a=aaa.word.length;b=bbb.word.length;if(a!==b){return a-b}a=aaa.word;b=bbb.word;if(a!==b){return(a>b?+1:-1)}a=searchIndexEmptyDesc.get(aaa.item.crate).contains(aaa.item.bitIndex);b=searchIndexEmptyDesc.get(bbb.item.crate).contains(bbb.item.bitIndex);if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});return transformResults(result_list)}function unifyFunctionTypes(fnTypesIn,queryElems,whereClause,mgensIn,solutionCb,unboxingDepth,){if(unboxingDepth>=UNBOXING_LIMIT){return false}const mgens=mgensIn===null?null:new Map(mgensIn);if(queryElems.length===0){return!solutionCb||solutionCb(mgens)}if(!fnTypesIn||fnTypesIn.length===0){return false}const ql=queryElems.length;const fl=fnTypesIn.length;if(ql===1&&queryElems[0].generics.length===0&&queryElems[0].bindings.size===0){const queryElem=queryElems[0];for(const fnType of fnTypesIn){if(!unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgens)){continue}if(fnType.id<0&&queryElem.id<0){if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==queryElem.id){continue}const mgensScratch=new Map(mgens);mgensScratch.set(fnType.id,queryElem.id);if(!solutionCb||solutionCb(mgensScratch)){return true}}else if(!solutionCb||solutionCb(mgens?new Map(mgens):null)){return true}}for(const fnType of fnTypesIn){if(!unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth+1,)){continue}if(fnType.id<0){if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==0){continue}const mgensScratch=new Map(mgens);mgensScratch.set(fnType.id,0);if(unifyFunctionTypes(whereClause[(-fnType.id)-1],queryElems,whereClause,mgensScratch,solutionCb,unboxingDepth+1,)){return true}}else if(unifyFunctionTypes([...fnType.generics,...Array.from(fnType.bindings.values()).flat()],queryElems,whereClause,mgens?new Map(mgens):null,solutionCb,unboxingDepth+1,)){return true}}return false}const fnTypes=fnTypesIn.slice();const flast=fl-1;const qlast=ql-1;const queryElem=queryElems[qlast];let queryElemsTmp=null;for(let i=flast;i>=0;i-=1){const fnType=fnTypes[i];if(!unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgens)){continue}let mgensScratch;if(fnType.id<0){mgensScratch=new Map(mgens);if(mgensScratch.has(fnType.id)&&mgensScratch.get(fnType.id)!==queryElem.id){continue}mgensScratch.set(fnType.id,queryElem.id)}else{mgensScratch=mgens}fnTypes[i]=fnTypes[flast];fnTypes.length=flast;if(!queryElemsTmp){queryElemsTmp=queryElems.slice(0,qlast)}const passesUnification=unifyFunctionTypes(fnTypes,queryElemsTmp,whereClause,mgensScratch,mgensScratch=>{if(fnType.generics.length===0&&queryElem.generics.length===0&&fnType.bindings.size===0&&queryElem.bindings.size===0){return!solutionCb||solutionCb(mgensScratch)}const solution=unifyFunctionTypeCheckBindings(fnType,queryElem,whereClause,mgensScratch,unboxingDepth,);if(!solution){return false}const simplifiedGenerics=solution.simplifiedGenerics;for(const simplifiedMgens of solution.mgens){const passesUnification=unifyFunctionTypes(simplifiedGenerics,queryElem.generics,whereClause,simplifiedMgens,solutionCb,unboxingDepth,);if(passesUnification){return true}}return false},unboxingDepth,);if(passesUnification){return true}fnTypes[flast]=fnTypes[i];fnTypes[i]=fnType;fnTypes.length=fl}for(let i=flast;i>=0;i-=1){const fnType=fnTypes[i];if(!unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth+1,)){continue}let mgensScratch;if(fnType.id<0){mgensScratch=new Map(mgens);if(mgensScratch.has(fnType.id)&&mgensScratch.get(fnType.id)!==0){continue}mgensScratch.set(fnType.id,0)}else{mgensScratch=mgens}const generics=fnType.id<0?whereClause[(-fnType.id)-1]:fnType.generics;const bindings=fnType.bindings?Array.from(fnType.bindings.values()).flat():[];const passesUnification=unifyFunctionTypes(fnTypes.toSpliced(i,1,...generics,...bindings),queryElems,whereClause,mgensScratch,solutionCb,unboxingDepth+1,);if(passesUnification){return true}}return false}function unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgensIn){if(!typePassesFilter(queryElem.typeFilter,fnType.ty)){return false}if(fnType.id<0&&queryElem.id<0){if(mgensIn){if(mgensIn.has(fnType.id)&&mgensIn.get(fnType.id)!==queryElem.id){return false}for(const[fid,qid]of mgensIn.entries()){if(fnType.id!==fid&&queryElem.id===qid){return false}if(fnType.id===fid&&queryElem.id!==qid){return false}}}return true}else{if(queryElem.id===typeNameIdOfArrayOrSlice&&(fnType.id===typeNameIdOfSlice||fnType.id===typeNameIdOfArray)){}else if(queryElem.id===typeNameIdOfTupleOrUnit&&(fnType.id===typeNameIdOfTuple||fnType.id===typeNameIdOfUnit)){}else if(queryElem.id===typeNameIdOfHof&&(fnType.id===typeNameIdOfFn||fnType.id===typeNameIdOfFnMut||fnType.id===typeNameIdOfFnOnce)){}else if(fnType.id!==queryElem.id||queryElem.id===null){return false}if((fnType.generics.length+fnType.bindings.size)===0&&queryElem.generics.length!==0){return false}if(fnType.bindings.size0){const fnTypePath=fnType.path!==undefined&&fnType.path!==null?fnType.path.split("::"):[];if(queryElemPathLength>fnTypePath.length){return false}let i=0;for(const path of fnTypePath){if(path===queryElem.pathWithoutLast[i]){i+=1;if(i>=queryElemPathLength){break}}}if(i0){let mgensSolutionSet=[mgensIn];for(const[name,constraints]of queryElem.bindings.entries()){if(mgensSolutionSet.length===0){return false}if(!fnType.bindings.has(name)){return false}const fnTypeBindings=fnType.bindings.get(name);mgensSolutionSet=mgensSolutionSet.flatMap(mgens=>{const newSolutions=[];unifyFunctionTypes(fnTypeBindings,constraints,whereClause,mgens,newMgens=>{newSolutions.push(newMgens);return false},unboxingDepth,);return newSolutions})}if(mgensSolutionSet.length===0){return false}const binds=Array.from(fnType.bindings.entries()).flatMap(entry=>{const[name,constraints]=entry;if(queryElem.bindings.has(name)){return[]}else{return constraints}});if(simplifiedGenerics.length>0){simplifiedGenerics=[...simplifiedGenerics,...binds]}else{simplifiedGenerics=binds}return{simplifiedGenerics,mgens:mgensSolutionSet}}return{simplifiedGenerics,mgens:[mgensIn]}}function unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth,){if(unboxingDepth>=UNBOXING_LIMIT){return false}if(fnType.id<0&&queryElem.id>=0){if(!whereClause){return false}if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==0){return false}const mgensTmp=new Map(mgens);mgensTmp.set(fnType.id,null);return checkIfInList(whereClause[(-fnType.id)-1],queryElem,whereClause,mgensTmp,unboxingDepth,)}else if(fnType.generics.length>0||fnType.bindings.size>0){const simplifiedGenerics=[...fnType.generics,...Array.from(fnType.bindings.values()).flat(),];return checkIfInList(simplifiedGenerics,queryElem,whereClause,mgens,unboxingDepth,)}return false}function checkIfInList(list,elem,whereClause,mgens,unboxingDepth){for(const entry of list){if(checkType(entry,elem,whereClause,mgens,unboxingDepth)){return true}}return false}function checkType(row,elem,whereClause,mgens,unboxingDepth){if(unboxingDepth>=UNBOXING_LIMIT){return false}if(row.bindings.size===0&&elem.bindings.size===0){if(elem.id<0&&mgens===null){return row.id<0||checkIfInList(row.generics,elem,whereClause,mgens,unboxingDepth+1,)}if(row.id>0&&elem.id>0&&elem.pathWithoutLast.length===0&&typePassesFilter(elem.typeFilter,row.ty)&&elem.generics.length===0&&elem.id!==typeNameIdOfArrayOrSlice&&elem.id!==typeNameIdOfTupleOrUnit&&elem.id!==typeNameIdOfHof){return row.id===elem.id||checkIfInList(row.generics,elem,whereClause,mgens,unboxingDepth,)}}return unifyFunctionTypes([row],[elem],whereClause,mgens,null,unboxingDepth)}function checkPath(contains,ty){if(contains.length===0){return 0}const maxPathEditDistance=Math.floor(contains.reduce((acc,next)=>acc+next.length,0)/3,);let ret_dist=maxPathEditDistance+1;const path=ty.path.split("::");if(ty.parent&&ty.parent.name){path.push(ty.parent.name.toLowerCase())}const length=path.length;const clength=contains.length;pathiter:for(let i=length-clength;i>=0;i-=1){let dist_total=0;for(let x=0;xmaxPathEditDistance){continue pathiter}dist_total+=dist}}ret_dist=Math.min(ret_dist,Math.round(dist_total/clength))}return ret_dist>maxPathEditDistance?null:ret_dist}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER||filter===type)return true;const name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,descShard:item.descShard,descIndex:item.descIndex,exactPath:item.exactPath,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,bitIndex:item.bitIndex,implDisambiguator:item.implDisambiguator,}}async function handleAliases(ret,query,filterCrates,currentCrate){const lowerQuery=query.toLowerCase();const aliases=[];const crateAliases=[];if(filterCrates!==null){if(ALIASES.has(filterCrates)&&ALIASES.get(filterCrates).has(lowerQuery)){const query_aliases=ALIASES.get(filterCrates).get(lowerQuery);for(const alias of query_aliases){aliases.push(createAliasFromItem(searchIndex[alias]))}}}else{for(const[crate,crateAliasesIndex]of ALIASES){if(crateAliasesIndex.has(lowerQuery)){const pushTo=crate===currentCrate?crateAliases:aliases;const query_aliases=crateAliasesIndex.get(lowerQuery);for(const alias of query_aliases){pushTo.push(createAliasFromItem(searchIndex[alias]))}}}}const sortFunc=(aaa,bbb)=>{if(aaa.path{return searchIndexEmptyDesc.get(alias.crate).contains(alias.bitIndex)?"":searchState.loadDesc(alias)};const[crateDescs,descs]=await Promise.all([Promise.all(crateAliases.map(fetchDesc)),Promise.all(aliases.map(fetchDesc)),]);const pushFunc=alias=>{alias.alias=query;const res=buildHrefAndPath(alias);alias.displayPath=pathSplitter(res[0]);alias.fullPath=alias.displayPath+alias.name;alias.href=res[1];ret.others.unshift(alias);if(ret.others.length>MAX_RESULTS){ret.others.pop()}};aliases.forEach((alias,i)=>{alias.desc=descs[i]});aliases.forEach(pushFunc);crateAliases.forEach((alias,i)=>{alias.desc=crateDescs[i]});crateAliases.forEach(pushFunc)}function addIntoResults(results,fullId,id,index,dist,path_dist,maxEditDistance){if(dist<=maxEditDistance||index!==-1){if(results.has(fullId)){const result=results.get(fullId);if(result.dontValidate||result.dist<=dist){return}}results.set(fullId,{id:id,index:index,dontValidate:parsedQuery.literalSearch,dist:dist,path_dist:path_dist,})}}function handleSingleArg(row,pos,elem,results_others,results_in_args,results_returned,maxEditDistance,){if(!row||(filterCrates!==null&&row.crate!==filterCrates)){return}let path_dist=0;const fullId=row.id;const tfpDist=compareTypeFingerprints(fullId,parsedQuery.typeFingerprint,);if(tfpDist!==null){const in_args=row.type&&row.type.inputs&&checkIfInList(row.type.inputs,elem,row.type.where_clause,null,0);const returned=row.type&&row.type.output&&checkIfInList(row.type.output,elem,row.type.where_clause,null,0);if(in_args){results_in_args.max_dist=Math.max(results_in_args.max_dist||0,tfpDist);const maxDist=results_in_args.sizenormalizedIndex&&normalizedIndex!==-1)){index=normalizedIndex}if(elem.fullPath.length>1){path_dist=checkPath(elem.pathWithoutLast,row);if(path_dist===null){return}}if(parsedQuery.literalSearch){if(row.word===elem.pathLast){addIntoResults(results_others,fullId,pos,index,0,path_dist)}return}const dist=editDistance(row.normalizedName,elem.normalizedPathLast,maxEditDistance);if(index===-1&&dist>maxEditDistance){return}addIntoResults(results_others,fullId,pos,index,dist,path_dist,maxEditDistance)}function handleArgs(row,pos,results){if(!row||(filterCrates!==null&&row.crate!==filterCrates)||!row.type){return}const tfpDist=compareTypeFingerprints(row.id,parsedQuery.typeFingerprint,);if(tfpDist===null){return}if(results.size>=MAX_RESULTS&&tfpDist>results.max_dist){return}if(!unifyFunctionTypes(row.type.inputs,parsedQuery.elems,row.type.where_clause,null,mgens=>{return unifyFunctionTypes(row.type.output,parsedQuery.returned,row.type.where_clause,mgens,null,0,)},0,)){return}results.max_dist=Math.max(results.max_dist||0,tfpDist);addIntoResults(results,row.id,pos,0,tfpDist,0,Number.MAX_VALUE)}function innerRunQuery(){const queryLen=parsedQuery.elems.reduce((acc,next)=>acc+next.pathLast.length,0)+parsedQuery.returned.reduce((acc,next)=>acc+next.pathLast.length,0);const maxEditDistance=Math.floor(queryLen/3);const genericSymbols=new Map();function convertNameToId(elem,isAssocType){const loweredName=elem.pathLast.toLowerCase();if(typeNameIdMap.has(loweredName)&&(isAssocType||!typeNameIdMap.get(loweredName).assocOnly)){elem.id=typeNameIdMap.get(loweredName).id}else if(!parsedQuery.literalSearch){let match=null;let matchDist=maxEditDistance+1;let matchName="";for(const[name,{id,assocOnly}]of typeNameIdMap){const dist=Math.min(editDistance(name,loweredName,maxEditDistance),editDistance(name,elem.normalizedPathLast,maxEditDistance),);if(dist<=matchDist&&dist<=maxEditDistance&&(isAssocType||!assocOnly)){if(dist===matchDist&&matchName>name){continue}match=id;matchDist=dist;matchName=name}}if(match!==null){parsedQuery.correction=matchName}elem.id=match}if((elem.id===null&&parsedQuery.totalElems>1&&elem.typeFilter===-1&&elem.generics.length===0&&elem.bindings.size===0)||elem.typeFilter===TY_GENERIC){if(genericSymbols.has(elem.name)){elem.id=genericSymbols.get(elem.name)}else{elem.id=-(genericSymbols.size+1);genericSymbols.set(elem.name,elem.id)}if(elem.typeFilter===-1&&elem.name.length>=3){const maxPartDistance=Math.floor(elem.name.length/3);let matchDist=maxPartDistance+1;let matchName="";for(const name of typeNameIdMap.keys()){const dist=editDistance(name,elem.name,maxPartDistance);if(dist<=matchDist&&dist<=maxPartDistance){if(dist===matchDist&&matchName>name){continue}matchDist=dist;matchName=name}}if(matchName!==""){parsedQuery.proposeCorrectionFrom=elem.name;parsedQuery.proposeCorrectionTo=matchName}}elem.typeFilter=TY_GENERIC}if(elem.generics.length>0&&elem.typeFilter===TY_GENERIC){parsedQuery.error=["Generic type parameter ",elem.name," does not accept generic parameters",]}for(const elem2 of elem.generics){convertNameToId(elem2)}elem.bindings=new Map(Array.from(elem.bindings.entries()).map(entry=>{const[name,constraints]=entry;if(!typeNameIdMap.has(name)){parsedQuery.error=["Type parameter ",name," does not exist",];return[null,[]]}for(const elem2 of constraints){convertNameToId(elem2)}return[typeNameIdMap.get(name).id,constraints]}),)}const fps=new Set();for(const elem of parsedQuery.elems){convertNameToId(elem);buildFunctionTypeFingerprint(elem,parsedQuery.typeFingerprint,fps)}for(const elem of parsedQuery.returned){convertNameToId(elem);buildFunctionTypeFingerprint(elem,parsedQuery.typeFingerprint,fps)}if(parsedQuery.foundElems===1&&parsedQuery.returned.length===0){if(parsedQuery.elems.length===1){const elem=parsedQuery.elems[0];for(let i=0,nSearchIndex=searchIndex.length;i0){const sortQ=(a,b)=>{const ag=a.generics.length===0&&a.bindings.size===0;const bg=b.generics.length===0&&b.bindings.size===0;if(ag!==bg){return ag-bg}const ai=a.id>0;const bi=b.id>0;return ai-bi};parsedQuery.elems.sort(sortQ);parsedQuery.returned.sort(sortQ);for(let i=0,nSearchIndex=searchIndex.length;i{const descs=await Promise.all(list.map(result=>{return searchIndexEmptyDesc.get(result.crate).contains(result.bitIndex)?"":searchState.loadDesc(result)}));for(const[i,result]of list.entries()){result.desc=descs[i]}}));if(parsedQuery.error!==null&&ret.others.length!==0){ret.query.error=null}return ret}function nextTab(direction){const next=(searchState.currentTab+direction+3)%searchState.focusedByTab.length;searchState.focusedByTab[searchState.currentTab]=document.activeElement;printTab(next);focusSearchResult()}function focusSearchResult(){const target=searchState.focusedByTab[searchState.currentTab]||document.querySelectorAll(".search-results.active a").item(0)||document.querySelectorAll("#search-tabs button").item(searchState.currentTab);searchState.focusedByTab[searchState.currentTab]=null;if(target){target.focus()}}function buildHrefAndPath(item){let displayPath;let href;const type=itemTypes[item.ty];const name=item.name;let path=item.path;let exactPath=item.exactPath;if(type==="mod"){displayPath=path+"::";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="import"){displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/index.html#reexport."+name}else if(type==="primitive"||type==="keyword"){displayPath="";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=ROOT_PATH+name+"/index.html"}else if(item.parent!==undefined){const myparent=item.parent;let anchor=type+"."+name;const parentType=itemTypes[myparent.ty];let pageType=parentType;let pageName=myparent.name;exactPath=`${myparent.exactPath}::${myparent.name}`;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){const enumNameIdx=item.path.lastIndexOf("::");const enumName=item.path.substr(enumNameIdx+2);path=item.path.substr(0,enumNameIdx);displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}if(item.implDisambiguator!==null){anchor=item.implDisambiguator+"/"+anchor}href=ROOT_PATH+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html#"+anchor}else{displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href,`${exactPath}::${name}`]}function pathSplitter(path){const tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}async function addTab(array,query,display){const extraClass=display?" active":"";const output=document.createElement("div");if(array.length>0){output.className="search-results "+extraClass;for(const item of array){const name=item.name;const type=itemTypes[item.ty];const longType=longItemTypes[item.ty];const typeName=longType.length!==0?`${longType}`:"?";const link=document.createElement("a");link.className="result-"+type;link.href=item.href;const resultName=document.createElement("div");resultName.className="result-name";resultName.insertAdjacentHTML("beforeend",`${typeName}`);link.appendChild(resultName);let alias=" ";if(item.is_alias){alias=`
\ +${item.alias} - see \ +
`}resultName.insertAdjacentHTML("beforeend",`
${alias}\ +${item.displayPath}${name}\ +
`);const description=document.createElement("div");description.className="desc";description.insertAdjacentHTML("beforeend",item.desc);link.appendChild(description);output.appendChild(link)}}else if(query.error===null){output.className="search-failed"+extraClass;output.innerHTML="No results :(
"+"Try on DuckDuckGo?

"+"Or try looking in one of these:"}return[output,array.length]}function makeTabHeader(tabNb,text,nbElems){const fmtNbElems=nbElems<10?`\u{2007}(${nbElems})\u{2007}\u{2007}`:nbElems<100?`\u{2007}(${nbElems})\u{2007}`:`\u{2007}(${nbElems})`;if(searchState.currentTab===tabNb){return""}return""}async function showResults(results,go_to_first,filterCrates){const search=searchState.outputElement();if(go_to_first||(results.others.length===1&&getSettingValue("go-to-only-result")==="true")){window.onunload=()=>{};searchState.removeQueryParameters();const elem=document.createElement("a");elem.href=results.others[0].href;removeClass(elem,"active");document.body.appendChild(elem);elem.click();return}if(results.query===undefined){results.query=parseQuery(searchState.input.value)}currentResults=results.query.userQuery;const[ret_others,ret_in_args,ret_returned]=await Promise.all([addTab(results.others,results.query,true),addTab(results.in_args,results.query,false),addTab(results.returned,results.query,false),]);let currentTab=searchState.currentTab;if((currentTab===0&&ret_others[1]===0)||(currentTab===1&&ret_in_args[1]===0)||(currentTab===2&&ret_returned[1]===0)){if(ret_others[1]!==0){currentTab=0}else if(ret_in_args[1]!==0){currentTab=1}else if(ret_returned[1]!==0){currentTab=2}}let crates="";if(rawSearchIndex.size>1){crates=" in 
"}let output=`

Results${crates}

`;if(results.query.error!==null){const error=results.query.error;error.forEach((value,index)=>{value=value.split("<").join("<").split(">").join(">");if(index%2!==0){error[index]=`${value.replaceAll(" ", " ")}`}else{error[index]=value}});output+=`

Query parser error: "${error.join("")}".

`;output+="
"+makeTabHeader(0,"In Names",ret_others[1])+"
";currentTab=0}else if(results.query.foundElems<=1&&results.query.returned.length===0){output+="
"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
"}else{const signatureTabTitle=results.query.elems.length===0?"In Function Return Types":results.query.returned.length===0?"In Function Parameters":"In Function Signatures";output+="
"+makeTabHeader(0,signatureTabTitle,ret_others[1])+"
";currentTab=0}if(results.query.correction!==null){const orig=results.query.returned.length>0?results.query.returned[0].name:results.query.elems[0].name;output+="

"+`Type "${orig}" not found. `+"Showing results for closest type name "+`"${results.query.correction}" instead.

`}if(results.query.proposeCorrectionFrom!==null){const orig=results.query.proposeCorrectionFrom;const targ=results.query.proposeCorrectionTo;output+="

"+`Type "${orig}" not found and used as generic parameter. `+`Consider searching for "${targ}" instead.

`}const resultsElem=document.createElement("div");resultsElem.id="results";resultsElem.appendChild(ret_others[0]);resultsElem.appendChild(ret_in_args[0]);resultsElem.appendChild(ret_returned[0]);search.innerHTML=output;const crateSearch=document.getElementById("crate-search");if(crateSearch){crateSearch.addEventListener("input",updateCrate)}search.appendChild(resultsElem);searchState.showResults(search);const elems=document.getElementById("search-tabs").childNodes;searchState.focusedByTab=[];let i=0;for(const elem of elems){const j=i;elem.onclick=()=>printTab(j);searchState.focusedByTab.push(null);i+=1}printTab(currentTab)}function updateSearchHistory(url){if(!browserSupportsHistoryApi()){return}const params=searchState.getQueryStringParams();if(!history.state&&!params.search){history.pushState(null,"",url)}else{history.replaceState(null,"",url)}}async function search(forced){const query=parseQuery(searchState.input.value.trim());let filterCrates=getFilterCrates();if(!forced&&query.userQuery===currentResults){if(query.userQuery.length>0){putBackSearch()}return}searchState.setLoadingSearch();const params=searchState.getQueryStringParams();if(filterCrates===null&¶ms["filter-crate"]!==undefined){filterCrates=params["filter-crate"]}searchState.title="Results for "+query.original+" - Rust";updateSearchHistory(buildUrl(query.original,filterCrates));await showResults(await execQuery(query,filterCrates,window.currentCrate),params.go_to_first,filterCrates)}function buildItemSearchTypeAll(types,lowercasePaths){return types.length>0?types.map(type=>buildItemSearchType(type,lowercasePaths)):EMPTY_GENERICS_ARRAY}const EMPTY_BINDINGS_MAP=new Map();const EMPTY_GENERICS_ARRAY=[];let TYPES_POOL=new Map();function buildItemSearchType(type,lowercasePaths,isAssocType){const PATH_INDEX_DATA=0;const GENERICS_DATA=1;const BINDINGS_DATA=2;let pathIndex,generics,bindings;if(typeof type==="number"){pathIndex=type;generics=EMPTY_GENERICS_ARRAY;bindings=EMPTY_BINDINGS_MAP}else{pathIndex=type[PATH_INDEX_DATA];generics=buildItemSearchTypeAll(type[GENERICS_DATA],lowercasePaths,);if(type.length>BINDINGS_DATA&&type[BINDINGS_DATA].length>0){bindings=new Map(type[BINDINGS_DATA].map(binding=>{const[assocType,constraints]=binding;return[buildItemSearchType(assocType,lowercasePaths,true).id,buildItemSearchTypeAll(constraints,lowercasePaths),]}))}else{bindings=EMPTY_BINDINGS_MAP}}let result;if(pathIndex<0){result={id:pathIndex,ty:TY_GENERIC,path:null,exactPath:null,generics,bindings,}}else if(pathIndex===0){result={id:null,ty:null,path:null,exactPath:null,generics,bindings,}}else{const item=lowercasePaths[pathIndex-1];result={id:buildTypeMapIndex(item.name,isAssocType),ty:item.ty,path:item.path,exactPath:item.exactPath,generics,bindings,}}const cr=TYPES_POOL.get(result.id);if(cr){if(cr.generics.length===result.generics.length&&cr.generics!==result.generics&&cr.generics.every((x,i)=>result.generics[i]===x)){result.generics=cr.generics}if(cr.bindings.size===result.bindings.size&&cr.bindings!==result.bindings){let ok=true;for(const[k,v]of cr.bindings.entries()){const v2=result.bindings.get(v);if(!v2){ok=false;break}if(v!==v2&&v.length===v2.length&&v.every((x,i)=>v2[i]===x)){result.bindings.set(k,v)}else if(v!==v2){ok=false;break}}if(ok){result.bindings=cr.bindings}}if(cr.ty===result.ty&&cr.path===result.path&&cr.bindings===result.bindings&&cr.generics===result.generics&&cr.ty===result.ty){return cr}}TYPES_POOL.set(result.id,result);return result}function buildFunctionSearchTypeCallback(lowercasePaths){return functionSearchType=>{if(functionSearchType===0){return null}const INPUTS_DATA=0;const OUTPUT_DATA=1;let inputs,output;if(typeof functionSearchType[INPUTS_DATA]==="number"){inputs=[buildItemSearchType(functionSearchType[INPUTS_DATA],lowercasePaths)]}else{inputs=buildItemSearchTypeAll(functionSearchType[INPUTS_DATA],lowercasePaths,)}if(functionSearchType.length>1){if(typeof functionSearchType[OUTPUT_DATA]==="number"){output=[buildItemSearchType(functionSearchType[OUTPUT_DATA],lowercasePaths)]}else{output=buildItemSearchTypeAll(functionSearchType[OUTPUT_DATA],lowercasePaths,)}}else{output=[]}const where_clause=[];const l=functionSearchType.length;for(let i=2;i{k=(~~k+0x7ed55d16)+(k<<12);k=(k ^ 0xc761c23c)^(k>>>19);k=(~~k+0x165667b1)+(k<<5);k=(~~k+0xd3a2646c)^(k<<9);k=(~~k+0xfd7046c5)+(k<<3);return(k ^ 0xb55a4f09)^(k>>>16)};const hashint2=k=>{k=~k+(k<<15);k ^=k>>>12;k+=k<<2;k ^=k>>>4;k=Math.imul(k,2057);return k ^(k>>16)};if(input!==null){const h0a=hashint1(input);const h0b=hashint2(input);const h1a=~~(h0a+Math.imul(h0b,2));const h1b=~~(h0a+Math.imul(h0b,3));const h2a=~~(h0a+Math.imul(h0b,4));const h2b=~~(h0a+Math.imul(h0b,5));output[0]|=(1<<(h0a%32))|(1<<(h1b%32));output[1]|=(1<<(h1a%32))|(1<<(h2b%32));output[2]|=(1<<(h2a%32))|(1<<(h0b%32));fps.add(input)}for(const g of type.generics){buildFunctionTypeFingerprint(g,output,fps)}const fb={id:null,ty:0,generics:EMPTY_GENERICS_ARRAY,bindings:EMPTY_BINDINGS_MAP,};for(const[k,v]of type.bindings.entries()){fb.id=k;fb.generics=v;buildFunctionTypeFingerprint(fb,output,fps)}output[3]=fps.size}function compareTypeFingerprints(fullId,queryFingerprint){const fh0=functionTypeFingerprint[fullId*4];const fh1=functionTypeFingerprint[(fullId*4)+1];const fh2=functionTypeFingerprint[(fullId*4)+2];const[qh0,qh1,qh2]=queryFingerprint;const[in0,in1,in2]=[fh0&qh0,fh1&qh1,fh2&qh2];if((in0 ^ qh0)||(in1 ^ qh1)||(in2 ^ qh2)){return null}return functionTypeFingerprint[(fullId*4)+3]}class VlqHexDecoder{constructor(string,cons){this.string=string;this.cons=cons;this.offset=0;this.backrefQueue=[]}decodeList(){let c=this.string.charCodeAt(this.offset);const ret=[];while(c!==125){ret.push(this.decode());c=this.string.charCodeAt(this.offset)}this.offset+=1;return ret}decode(){let n=0;let c=this.string.charCodeAt(this.offset);if(c===123){this.offset+=1;return this.decodeList()}while(c<96){n=(n<<4)|(c&0xF);this.offset+=1;c=this.string.charCodeAt(this.offset)}n=(n<<4)|(c&0xF);const[sign,value]=[n&1,n>>1];this.offset+=1;return sign?-value:value}next(){const c=this.string.charCodeAt(this.offset);if(c>=48&&c<64){this.offset+=1;return this.backrefQueue[c-48]}if(c===96){this.offset+=1;return this.cons(0)}const result=this.cons(this.decode());this.backrefQueue.unshift(result);if(this.backrefQueue.length>16){this.backrefQueue.pop()}return result}}class RoaringBitmap{constructor(str){const strdecoded=atob(str);const u8array=new Uint8Array(strdecoded.length);for(let j=0;j=4){offsets=[];for(let j=0;j>3]&(1<<(j&0x7))){const runcount=(u8array[i]|(u8array[i+1]<<8));i+=2;this.containers.push(new RoaringBitmapRun(runcount,u8array.slice(i,i+(runcount*4)),));i+=runcount*4}else if(this.cardinalities[j]>=4096){this.containers.push(new RoaringBitmapBits(u8array.slice(i,i+8192)));i+=8192}else{const end=this.cardinalities[j]*2;this.containers.push(new RoaringBitmapArray(this.cardinalities[j],u8array.slice(i,i+end),));i+=end}}}contains(keyvalue){const key=keyvalue>>16;const value=keyvalue&0xFFFF;for(let i=0;i=start&&value<=(start+lenm1)){return true}}return false}}class RoaringBitmapArray{constructor(cardinality,array){this.cardinality=cardinality;this.array=array}contains(value){const l=this.cardinality*2;for(let i=0;i>3]&(1<<(value&7)))}}function buildIndex(rawSearchIndex){searchIndex=[];searchIndexDeprecated=new Map();searchIndexEmptyDesc=new Map();let currentIndex=0;let id=0;for(const crate of rawSearchIndex.values()){id+=crate.t.length+1}functionTypeFingerprint=new Uint32Array((id+1)*4);id=0;for(const[crate,crateCorpus]of rawSearchIndex){const itemDescShardDecoder=new VlqHexDecoder(crateCorpus.D,noop=>noop);let descShard={crate,shard:0,start:0,len:itemDescShardDecoder.next(),promise:null,resolve:null,};const descShardList=[descShard];searchIndexDeprecated.set(crate,new RoaringBitmap(crateCorpus.c));searchIndexEmptyDesc.set(crate,new RoaringBitmap(crateCorpus.e));let descIndex=0;const crateRow={crate,ty:3,name:crate,path:"",descShard,descIndex,exactPath:"",desc:crateCorpus.doc,parent:undefined,type:null,id,word:crate,normalizedName:crate.indexOf("_")===-1?crate:crate.replace(/_/g,""),bitIndex:0,implDisambiguator:null,};id+=1;searchIndex.push(crateRow);currentIndex+=1;if(!searchIndexEmptyDesc.get(crate).contains(0)){descIndex+=1}const itemTypes=crateCorpus.t;const itemNames=crateCorpus.n;const itemPaths=new Map(crateCorpus.q);const itemReexports=new Map(crateCorpus.r);const itemParentIdxs=crateCorpus.i;const implDisambiguator=new Map(crateCorpus.b);const paths=crateCorpus.p;const aliases=crateCorpus.a;const lowercasePaths=[];const itemFunctionDecoder=new VlqHexDecoder(crateCorpus.f,buildFunctionSearchTypeCallback(lowercasePaths),);let len=paths.length;let lastPath=itemPaths.get(0);for(let i=0;i2){path=itemPaths.has(elem[2])?itemPaths.get(elem[2]):lastPath;lastPath=path}const exactPath=elem.length>3?itemPaths.get(elem[3]):path;lowercasePaths.push({ty,name:name.toLowerCase(),path,exactPath});paths[i]={ty,name,path,exactPath}}lastPath="";len=itemTypes.length;for(let i=0;i=descShard.len&&!searchIndexEmptyDesc.get(crate).contains(bitIndex)){descShard={crate,shard:descShard.shard+1,start:descShard.start+descShard.len,len:itemDescShardDecoder.next(),promise:null,resolve:null,};descIndex=0;descShardList.push(descShard)}let word="";if(typeof itemNames[i]==="string"){word=itemNames[i].toLowerCase()}const path=itemPaths.has(i)?itemPaths.get(i):lastPath;const type=itemFunctionDecoder.next();if(type!==null){if(type){const fp=functionTypeFingerprint.subarray(id*4,(id+1)*4);const fps=new Set();for(const t of type.inputs){buildFunctionTypeFingerprint(t,fp,fps)}for(const t of type.output){buildFunctionTypeFingerprint(t,fp,fps)}for(const w of type.where_clause){for(const t of w){buildFunctionTypeFingerprint(t,fp,fps)}}}}const row={crate,ty:itemTypes.charCodeAt(i)-65,name:itemNames[i],path,descShard,descIndex,exactPath:itemReexports.has(i)?itemPaths.get(itemReexports.get(i)):path,parent:itemParentIdxs[i]>0?paths[itemParentIdxs[i]-1]:undefined,type,id,word,normalizedName:word.indexOf("_")===-1?word:word.replace(/_/g,""),bitIndex,implDisambiguator:implDisambiguator.has(i)?implDisambiguator.get(i):null,};id+=1;searchIndex.push(row);lastPath=row.path;if(!searchIndexEmptyDesc.get(crate).contains(bitIndex)){descIndex+=1}}if(aliases){const currentCrateAliases=new Map();ALIASES.set(crate,currentCrateAliases);for(const alias_name in aliases){if(!Object.prototype.hasOwnProperty.call(aliases,alias_name)){continue}let currentNameAliases;if(currentCrateAliases.has(alias_name)){currentNameAliases=currentCrateAliases.get(alias_name)}else{currentNameAliases=[];currentCrateAliases.set(alias_name,currentNameAliases)}for(const local_alias of aliases[alias_name]){currentNameAliases.push(local_alias+currentIndex)}}}currentIndex+=itemTypes.length;searchState.descShards.set(crate,descShardList)}TYPES_POOL=new Map()}function onSearchSubmit(e){e.preventDefault();searchState.clearInputTimeout();search()}function putBackSearch(){const search_input=searchState.input;if(!searchState.input){return}if(search_input.value!==""&&!searchState.isDisplayed()){searchState.showResults();if(browserSupportsHistoryApi()){history.replaceState(null,"",buildUrl(search_input.value,getFilterCrates()))}document.title=searchState.title}}function registerSearchEvents(){const params=searchState.getQueryStringParams();if(searchState.input.value===""){searchState.input.value=params.search||""}const searchAfter500ms=()=>{searchState.clearInputTimeout();if(searchState.input.value.length===0){searchState.hideResults()}else{searchState.timeout=setTimeout(search,500)}};searchState.input.onkeyup=searchAfter500ms;searchState.input.oninput=searchAfter500ms;document.getElementsByClassName("search-form")[0].onsubmit=onSearchSubmit;searchState.input.onchange=e=>{if(e.target!==document.activeElement){return}searchState.clearInputTimeout();setTimeout(search,0)};searchState.input.onpaste=searchState.input.onchange;searchState.outputElement().addEventListener("keydown",e=>{if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey){return}if(e.which===38){const previous=document.activeElement.previousElementSibling;if(previous){previous.focus()}else{searchState.focus()}e.preventDefault()}else if(e.which===40){const next=document.activeElement.nextElementSibling;if(next){next.focus()}const rect=document.activeElement.getBoundingClientRect();if(window.innerHeight-rect.bottom{if(e.which===40){focusSearchResult();e.preventDefault()}});searchState.input.addEventListener("focus",()=>{putBackSearch()});searchState.input.addEventListener("blur",()=>{searchState.input.placeholder=searchState.input.origPlaceholder});if(browserSupportsHistoryApi()){const previousTitle=document.title;window.addEventListener("popstate",e=>{const params=searchState.getQueryStringParams();document.title=previousTitle;currentResults=null;if(params.search&¶ms.search.length>0){searchState.input.value=params.search;e.preventDefault();search()}else{searchState.input.value="";searchState.hideResults()}})}window.onpageshow=()=>{const qSearch=searchState.getQueryStringParams().search;if(searchState.input.value===""&&qSearch){searchState.input.value=qSearch}search()}}function updateCrate(ev){if(ev.target.value==="all crates"){const query=searchState.input.value.trim();updateSearchHistory(buildUrl(query,null))}currentResults=null;search(true)}buildIndex(rawSearchIndex);if(typeof window!=="undefined"){registerSearchEvents();if(window.searchState.getQueryStringParams().search){search()}}if(typeof exports!=="undefined"){exports.initSearch=initSearch;exports.execQuery=execQuery;exports.parseQuery=parseQuery}}if(typeof window!=="undefined"){window.initSearch=initSearch;if(window.searchIndex!==undefined){initSearch(window.searchIndex)}}else{initSearch(new Map())}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/search-d52510db62a78183.js b/static/rust/redstone/crypto_radix,network_radix/static.files/search-d52510db62a78183.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/static.files/search-d52510db62a78183.js rename to static/rust/redstone/crypto_radix,network_radix/static.files/search-d52510db62a78183.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/settings-4313503d2e1961c2.js b/static/rust/redstone/crypto_radix,network_radix/static.files/settings-4313503d2e1961c2.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/static.files/settings-4313503d2e1961c2.js rename to static/rust/redstone/crypto_radix,network_radix/static.files/settings-4313503d2e1961c2.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/src-script-e66d777a5a92e9b2.js b/static/rust/redstone/crypto_radix,network_radix/static.files/src-script-e66d777a5a92e9b2.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/static.files/src-script-e66d777a5a92e9b2.js rename to static/rust/redstone/crypto_radix,network_radix/static.files/src-script-e66d777a5a92e9b2.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/storage-118b08c4c78b968e.js b/static/rust/redstone/crypto_radix,network_radix/static.files/storage-118b08c4c78b968e.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/static.files/storage-118b08c4c78b968e.js rename to static/rust/redstone/crypto_radix,network_radix/static.files/storage-118b08c4c78b968e.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/clone/trait.Clone.js b/static/rust/redstone/crypto_radix,network_radix/trait.impl/core/clone/trait.Clone.js similarity index 81% rename from static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/clone/trait.Clone.js rename to static/rust/redstone/crypto_radix,network_radix/trait.impl/core/clone/trait.Clone.js index 270a1587..f3493485 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/clone/trait.Clone.js +++ b/static/rust/redstone/crypto_radix,network_radix/trait.impl/core/clone/trait.Clone.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl Clone for Error"],["impl Clone for DataPackage"],["impl Clone for DataPoint"],["impl Clone for Payload"]] +"redstone":[["impl Clone for Error"],["impl Clone for DataPackage"],["impl Clone for DataPoint"],["impl Clone for Payload"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/cmp/trait.Eq.js b/static/rust/redstone/crypto_radix,network_radix/trait.impl/core/cmp/trait.Eq.js similarity index 76% rename from static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/cmp/trait.Eq.js rename to static/rust/redstone/crypto_radix,network_radix/trait.impl/core/cmp/trait.Eq.js index a573550b..65c9074b 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/cmp/trait.Eq.js +++ b/static/rust/redstone/crypto_radix,network_radix/trait.impl/core/cmp/trait.Eq.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl Eq for ProcessorResult"],["impl Eq for DataPackage"],["impl Eq for DataPoint"]] +"redstone":[["impl Eq for ProcessorResult"],["impl Eq for DataPackage"],["impl Eq for DataPoint"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/cmp/trait.PartialEq.js b/static/rust/redstone/crypto_radix,network_radix/trait.impl/core/cmp/trait.PartialEq.js similarity index 83% rename from static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/cmp/trait.PartialEq.js rename to static/rust/redstone/crypto_radix,network_radix/trait.impl/core/cmp/trait.PartialEq.js index 695eda8f..694c39aa 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/cmp/trait.PartialEq.js +++ b/static/rust/redstone/crypto_radix,network_radix/trait.impl/core/cmp/trait.PartialEq.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl PartialEq for ProcessorResult"],["impl PartialEq for DataPackage"],["impl PartialEq for DataPoint"]] +"redstone":[["impl PartialEq for ProcessorResult"],["impl PartialEq for DataPackage"],["impl PartialEq for DataPoint"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/convert/trait.From.js b/static/rust/redstone/crypto_radix,network_radix/trait.impl/core/convert/trait.From.js similarity index 78% rename from static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/convert/trait.From.js rename to static/rust/redstone/crypto_radix,network_radix/trait.impl/core/convert/trait.From.js index 92afa7bb..1ca779a8 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/convert/trait.From.js +++ b/static/rust/redstone/crypto_radix,network_radix/trait.impl/core/convert/trait.From.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl From<ProcessorResult> for (u64, Vec<U256>)"]] +"redstone":[["impl From<ProcessorResult> for (u64, Vec<U256>)"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/fmt/trait.Debug.js b/static/rust/redstone/crypto_radix,network_radix/trait.impl/core/fmt/trait.Debug.js similarity index 80% rename from static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/fmt/trait.Debug.js rename to static/rust/redstone/crypto_radix,network_radix/trait.impl/core/fmt/trait.Debug.js index f544c767..00b02dec 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/fmt/trait.Debug.js +++ b/static/rust/redstone/crypto_radix,network_radix/trait.impl/core/fmt/trait.Debug.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl Debug for Error"],["impl Debug for Config"],["impl Debug for ProcessorResult"],["impl Debug for DataPackage"],["impl Debug for DataPoint"],["impl Debug for Payload"]] +"redstone":[["impl Debug for Error"],["impl Debug for Config"],["impl Debug for ProcessorResult"],["impl Debug for DataPackage"],["impl Debug for DataPoint"],["impl Debug for Payload"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/fmt/trait.Display.js b/static/rust/redstone/crypto_radix,network_radix/trait.impl/core/fmt/trait.Display.js similarity index 85% rename from static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/fmt/trait.Display.js rename to static/rust/redstone/crypto_radix,network_radix/trait.impl/core/fmt/trait.Display.js index 899cd7d8..99ad5f7c 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/fmt/trait.Display.js +++ b/static/rust/redstone/crypto_radix,network_radix/trait.impl/core/fmt/trait.Display.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl Display for Error"]] +"redstone":[["impl Display for Error"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/marker/trait.Freeze.js b/static/rust/redstone/crypto_radix,network_radix/trait.impl/core/marker/trait.Freeze.js similarity index 77% rename from static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/marker/trait.Freeze.js rename to static/rust/redstone/crypto_radix,network_radix/trait.impl/core/marker/trait.Freeze.js index 2ec0218e..bc80785a 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/marker/trait.Freeze.js +++ b/static/rust/redstone/crypto_radix,network_radix/trait.impl/core/marker/trait.Freeze.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl Freeze for Error",1,["redstone::network::error::Error"]],["impl Freeze for Config",1,["redstone::core::config::Config"]],["impl Freeze for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Freeze for Radix",1,["redstone::network::radix::Radix"]],["impl Freeze for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Freeze for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Freeze for Payload",1,["redstone::protocol::payload::Payload"]]] +"redstone":[["impl Freeze for Error",1,["redstone::network::error::Error"]],["impl Freeze for Config",1,["redstone::core::config::Config"]],["impl Freeze for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Freeze for Radix",1,["redstone::network::radix::Radix"]],["impl Freeze for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Freeze for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Freeze for Payload",1,["redstone::protocol::payload::Payload"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/marker/trait.Send.js b/static/rust/redstone/crypto_radix,network_radix/trait.impl/core/marker/trait.Send.js similarity index 79% rename from static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/marker/trait.Send.js rename to static/rust/redstone/crypto_radix,network_radix/trait.impl/core/marker/trait.Send.js index e17567a7..9446af07 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/marker/trait.Send.js +++ b/static/rust/redstone/crypto_radix,network_radix/trait.impl/core/marker/trait.Send.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl !Send for Error",1,["redstone::network::error::Error"]],["impl Send for Config",1,["redstone::core::config::Config"]],["impl Send for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Send for Radix",1,["redstone::network::radix::Radix"]],["impl Send for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Send for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Send for Payload",1,["redstone::protocol::payload::Payload"]]] +"redstone":[["impl !Send for Error",1,["redstone::network::error::Error"]],["impl Send for Config",1,["redstone::core::config::Config"]],["impl Send for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Send for Radix",1,["redstone::network::radix::Radix"]],["impl Send for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Send for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Send for Payload",1,["redstone::protocol::payload::Payload"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/marker/trait.StructuralPartialEq.js b/static/rust/redstone/crypto_radix,network_radix/trait.impl/core/marker/trait.StructuralPartialEq.js similarity index 84% rename from static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/marker/trait.StructuralPartialEq.js rename to static/rust/redstone/crypto_radix,network_radix/trait.impl/core/marker/trait.StructuralPartialEq.js index 19408b71..e4ec763f 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/marker/trait.StructuralPartialEq.js +++ b/static/rust/redstone/crypto_radix,network_radix/trait.impl/core/marker/trait.StructuralPartialEq.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl StructuralPartialEq for ProcessorResult"],["impl StructuralPartialEq for DataPackage"],["impl StructuralPartialEq for DataPoint"]] +"redstone":[["impl StructuralPartialEq for ProcessorResult"],["impl StructuralPartialEq for DataPackage"],["impl StructuralPartialEq for DataPoint"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/marker/trait.Sync.js b/static/rust/redstone/crypto_radix,network_radix/trait.impl/core/marker/trait.Sync.js similarity index 79% rename from static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/marker/trait.Sync.js rename to static/rust/redstone/crypto_radix,network_radix/trait.impl/core/marker/trait.Sync.js index 8fba0265..1abf1ada 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/marker/trait.Sync.js +++ b/static/rust/redstone/crypto_radix,network_radix/trait.impl/core/marker/trait.Sync.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl !Sync for Error",1,["redstone::network::error::Error"]],["impl Sync for Config",1,["redstone::core::config::Config"]],["impl Sync for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Sync for Radix",1,["redstone::network::radix::Radix"]],["impl Sync for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Sync for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Sync for Payload",1,["redstone::protocol::payload::Payload"]]] +"redstone":[["impl !Sync for Error",1,["redstone::network::error::Error"]],["impl Sync for Config",1,["redstone::core::config::Config"]],["impl Sync for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Sync for Radix",1,["redstone::network::radix::Radix"]],["impl Sync for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Sync for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Sync for Payload",1,["redstone::protocol::payload::Payload"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/marker/trait.Unpin.js b/static/rust/redstone/crypto_radix,network_radix/trait.impl/core/marker/trait.Unpin.js similarity index 82% rename from static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/marker/trait.Unpin.js rename to static/rust/redstone/crypto_radix,network_radix/trait.impl/core/marker/trait.Unpin.js index fdff3b25..f11170dc 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/marker/trait.Unpin.js +++ b/static/rust/redstone/crypto_radix,network_radix/trait.impl/core/marker/trait.Unpin.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl Unpin for Error",1,["redstone::network::error::Error"]],["impl Unpin for Config",1,["redstone::core::config::Config"]],["impl Unpin for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Unpin for Radix",1,["redstone::network::radix::Radix"]],["impl Unpin for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Unpin for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Unpin for Payload",1,["redstone::protocol::payload::Payload"]]] +"redstone":[["impl Unpin for Error",1,["redstone::network::error::Error"]],["impl Unpin for Config",1,["redstone::core::config::Config"]],["impl Unpin for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Unpin for Radix",1,["redstone::network::radix::Radix"]],["impl Unpin for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Unpin for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Unpin for Payload",1,["redstone::protocol::payload::Payload"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js b/static/rust/redstone/crypto_radix,network_radix/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js similarity index 84% rename from static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js rename to static/rust/redstone/crypto_radix,network_radix/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js index 8adf6221..2ecbde78 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js +++ b/static/rust/redstone/crypto_radix,network_radix/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl !RefUnwindSafe for Error",1,["redstone::network::error::Error"]],["impl RefUnwindSafe for Config",1,["redstone::core::config::Config"]],["impl RefUnwindSafe for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl RefUnwindSafe for Radix",1,["redstone::network::radix::Radix"]],["impl RefUnwindSafe for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl RefUnwindSafe for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl RefUnwindSafe for Payload",1,["redstone::protocol::payload::Payload"]]] +"redstone":[["impl !RefUnwindSafe for Error",1,["redstone::network::error::Error"]],["impl RefUnwindSafe for Config",1,["redstone::core::config::Config"]],["impl RefUnwindSafe for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl RefUnwindSafe for Radix",1,["redstone::network::radix::Radix"]],["impl RefUnwindSafe for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl RefUnwindSafe for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl RefUnwindSafe for Payload",1,["redstone::protocol::payload::Payload"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js b/static/rust/redstone/crypto_radix,network_radix/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js similarity index 84% rename from static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js rename to static/rust/redstone/crypto_radix,network_radix/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js index a69fc799..e11b45e0 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js +++ b/static/rust/redstone/crypto_radix,network_radix/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl !UnwindSafe for Error",1,["redstone::network::error::Error"]],["impl UnwindSafe for Config",1,["redstone::core::config::Config"]],["impl UnwindSafe for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl UnwindSafe for Radix",1,["redstone::network::radix::Radix"]],["impl UnwindSafe for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl UnwindSafe for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl UnwindSafe for Payload",1,["redstone::protocol::payload::Payload"]]] +"redstone":[["impl !UnwindSafe for Error",1,["redstone::network::error::Error"]],["impl UnwindSafe for Config",1,["redstone::core::config::Config"]],["impl UnwindSafe for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl UnwindSafe for Radix",1,["redstone::network::radix::Radix"]],["impl UnwindSafe for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl UnwindSafe for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl UnwindSafe for Payload",1,["redstone::protocol::payload::Payload"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/core/validator/trait.Validator.js b/static/rust/redstone/crypto_radix,network_radix/trait.impl/redstone/core/validator/trait.Validator.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/core/validator/trait.Validator.js rename to static/rust/redstone/crypto_radix,network_radix/trait.impl/redstone/core/validator/trait.Validator.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/network/as_str/trait.AsAsciiStr.js b/static/rust/redstone/crypto_radix,network_radix/trait.impl/redstone/network/as_str/trait.AsAsciiStr.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/network/as_str/trait.AsAsciiStr.js rename to static/rust/redstone/crypto_radix,network_radix/trait.impl/redstone/network/as_str/trait.AsAsciiStr.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/network/as_str/trait.AsHexStr.js b/static/rust/redstone/crypto_radix,network_radix/trait.impl/redstone/network/as_str/trait.AsHexStr.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/network/as_str/trait.AsHexStr.js rename to static/rust/redstone/crypto_radix,network_radix/trait.impl/redstone/network/as_str/trait.AsHexStr.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/network/assert/trait.Assert.js b/static/rust/redstone/crypto_radix,network_radix/trait.impl/redstone/network/assert/trait.Assert.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/network/assert/trait.Assert.js rename to static/rust/redstone/crypto_radix,network_radix/trait.impl/redstone/network/assert/trait.Assert.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/network/assert/trait.Unwrap.js b/static/rust/redstone/crypto_radix,network_radix/trait.impl/redstone/network/assert/trait.Unwrap.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/network/assert/trait.Unwrap.js rename to static/rust/redstone/crypto_radix,network_radix/trait.impl/redstone/network/assert/trait.Unwrap.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/network/flattened/trait.Flattened.js b/static/rust/redstone/crypto_radix,network_radix/trait.impl/redstone/network/flattened/trait.Flattened.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/network/flattened/trait.Flattened.js rename to static/rust/redstone/crypto_radix,network_radix/trait.impl/redstone/network/flattened/trait.Flattened.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/network/from_bytes_repr/trait.FromBytesRepr.js b/static/rust/redstone/crypto_radix,network_radix/trait.impl/redstone/network/from_bytes_repr/trait.FromBytesRepr.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/network/from_bytes_repr/trait.FromBytesRepr.js rename to static/rust/redstone/crypto_radix,network_radix/trait.impl/redstone/network/from_bytes_repr/trait.FromBytesRepr.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/network/from_bytes_repr/trait.Sanitized.js b/static/rust/redstone/crypto_radix,network_radix/trait.impl/redstone/network/from_bytes_repr/trait.Sanitized.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/network/from_bytes_repr/trait.Sanitized.js rename to static/rust/redstone/crypto_radix,network_radix/trait.impl/redstone/network/from_bytes_repr/trait.Sanitized.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/network/radix/u256_ext/trait.U256Ext.js b/static/rust/redstone/crypto_radix,network_radix/trait.impl/redstone/network/radix/u256_ext/trait.U256Ext.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/network/radix/u256_ext/trait.U256Ext.js rename to static/rust/redstone/crypto_radix,network_radix/trait.impl/redstone/network/radix/u256_ext/trait.U256Ext.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/network/specific/trait.NetworkSpecific.js b/static/rust/redstone/crypto_radix,network_radix/trait.impl/redstone/network/specific/trait.NetworkSpecific.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/network/specific/trait.NetworkSpecific.js rename to static/rust/redstone/crypto_radix,network_radix/trait.impl/redstone/network/specific/trait.NetworkSpecific.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/utils/filter/trait.FilterSome.js b/static/rust/redstone/crypto_radix,network_radix/trait.impl/redstone/utils/filter/trait.FilterSome.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/utils/filter/trait.FilterSome.js rename to static/rust/redstone/crypto_radix,network_radix/trait.impl/redstone/utils/filter/trait.FilterSome.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/utils/median/trait.Averageable.js b/static/rust/redstone/crypto_radix,network_radix/trait.impl/redstone/utils/median/trait.Averageable.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/utils/median/trait.Averageable.js rename to static/rust/redstone/crypto_radix,network_radix/trait.impl/redstone/utils/median/trait.Averageable.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/utils/median/trait.Avg.js b/static/rust/redstone/crypto_radix,network_radix/trait.impl/redstone/utils/median/trait.Avg.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/utils/median/trait.Avg.js rename to static/rust/redstone/crypto_radix,network_radix/trait.impl/redstone/utils/median/trait.Avg.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/utils/median/trait.Median.js b/static/rust/redstone/crypto_radix,network_radix/trait.impl/redstone/utils/median/trait.Median.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/utils/median/trait.Median.js rename to static/rust/redstone/crypto_radix,network_radix/trait.impl/redstone/utils/median/trait.Median.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/utils/trim/trait.Trim.js b/static/rust/redstone/crypto_radix,network_radix/trait.impl/redstone/utils/trim/trait.Trim.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/utils/trim/trait.Trim.js rename to static/rust/redstone/crypto_radix,network_radix/trait.impl/redstone/utils/trim/trait.Trim.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/utils/trim_zeros/trait.TrimZeros.js b/static/rust/redstone/crypto_radix,network_radix/trait.impl/redstone/utils/trim_zeros/trait.TrimZeros.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/utils/trim_zeros/trait.TrimZeros.js rename to static/rust/redstone/crypto_radix,network_radix/trait.impl/redstone/utils/trim_zeros/trait.TrimZeros.js diff --git a/static/rust/redstone/crypto_radix,network_radix/type.impl/alloc/vec/struct.Vec.js b/static/rust/redstone/crypto_radix,network_radix/type.impl/alloc/vec/struct.Vec.js new file mode 100644 index 00000000..096e7507 --- /dev/null +++ b/static/rust/redstone/crypto_radix,network_radix/type.impl/alloc/vec/struct.Vec.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"redstone":[["
1.5.0 · source§

impl<T, A> AsMut<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn as_mut(&mut self) -> &mut [T]

Converts this type into a mutable reference of the (usually inferred) input type.
","AsMut<[T]>","redstone::core::aggregator::Matrix"],["
1.5.0 · source§

impl<T, A> AsMut<Vec<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn as_mut(&mut self) -> &mut Vec<T, A>

Converts this type into a mutable reference of the (usually inferred) input type.
","AsMut>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> AsRef<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn as_ref(&self) -> &[T]

Converts this type into a shared reference of the (usually inferred) input type.
","AsRef<[T]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> AsRef<Vec<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn as_ref(&self) -> &Vec<T, A>

Converts this type into a shared reference of the (usually inferred) input type.
","AsRef>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Borrow<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn borrow(&self) -> &[T]

Immutably borrows from an owned value. Read more
","Borrow<[T]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> BorrowMut<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn borrow_mut(&mut self) -> &mut [T]

Mutably borrows from an owned value. Read more
","BorrowMut<[T]>","redstone::core::aggregator::Matrix"],["
§

impl<X, T> Categorize<X> for Vec<T>
where\n X: CustomValueKind,

§

fn value_kind() -> ValueKind<X>

","Categorize","redstone::core::aggregator::Matrix"],["
§

impl<T> CheckBase32<Vec<u5>> for T
where\n T: AsRef<[u8]>,

§

type Err = Error

Error type if conversion fails
§

fn check_base32(self) -> Result<Vec<u5>, <T as CheckBase32<Vec<u5>>>::Err>

Check if all values are in range and return array-like struct of u5 values
","CheckBase32>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Clone for Vec<T, A>
where\n T: Clone,\n A: Allocator + Clone,

source§

fn clone_from(&mut self, source: &Vec<T, A>)

Overwrites the contents of self with a clone of the contents of source.

\n

This method is preferred over simply assigning source.clone() to self,\nas it avoids reallocation if possible. Additionally, if the element type\nT overrides clone_from(), this will reuse the resources of self’s\nelements as well.

\n
§Examples
\n
let x = vec![5, 6, 7];\nlet mut y = vec![8, 9, 10];\nlet yp: *const i32 = y.as_ptr();\n\ny.clone_from(&x);\n\n// The value is the same\nassert_eq!(x, y);\n\n// And no reallocation occurred\nassert_eq!(yp, y.as_ptr());
\n
source§

fn clone(&self) -> Vec<T, A>

Returns a copy of the value. Read more
","Clone","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Debug for Vec<T, A>
where\n T: Debug,\n A: Allocator,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","redstone::core::aggregator::Matrix"],["
§

impl<X, D, T> Decode<X, D> for Vec<T>
where\n X: CustomValueKind,\n D: Decoder<X>,\n T: Decode<X, D> + Categorize<X>,

§

fn decode_body_with_value_kind(\n decoder: &mut D,\n value_kind: ValueKind<X>,\n) -> Result<Vec<T>, DecodeError>

Decodes the type from the decoder, which should match a preloaded value kind. Read more
","Decode","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T> Default for Vec<T>

source§

fn default() -> Vec<T>

Creates an empty Vec<T>.

\n

The vector will not allocate until elements are pushed onto it.

\n
","Default","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Deref for Vec<T, A>
where\n A: Allocator,

§

type Target = [T]

The resulting type after dereferencing.
source§

fn deref(&self) -> &[T]

Dereferences the value.
","Deref","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> DerefMut for Vec<T, A>
where\n A: Allocator,

source§

fn deref_mut(&mut self) -> &mut [T]

Mutably dereferences the value.
","DerefMut","redstone::core::aggregator::Matrix"],["
§

impl<C, T> Describe<C> for Vec<T>
where\n C: CustomTypeKind<RustTypeId>,\n T: Describe<C>,

§

const TYPE_ID: RustTypeId = <[T]>::TYPE_ID

The TYPE_ID should give a unique identifier for its SBOR schema type.\nAn SBOR schema type capture details about the SBOR payload, how it should be interpreted, validated and displayed. Read more
§

fn type_data() -> TypeData<C, RustTypeId>

Returns the local schema for the given type. Read more
§

fn add_all_dependencies(aggregator: &mut TypeAggregator<C>)

For each type referenced in get_local_type_data, we need to ensure that the type and all of its own references\nget added to the aggregator. Read more
","Describe","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Drop for Vec<T, A>
where\n A: Allocator,

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
","Drop","redstone::core::aggregator::Matrix"],["
§

impl<X, E, T> Encode<X, E> for Vec<T>
where\n X: CustomValueKind,\n E: Encoder<X>,\n T: Encode<X, E> + Categorize<X>,

§

fn encode_value_kind(&self, encoder: &mut E) -> Result<(), EncodeError>

Encodes the SBOR value’s kind to the encoder
§

fn encode_body(&self, encoder: &mut E) -> Result<(), EncodeError>

Encodes the SBOR body of the type to the encoder. Read more
","Encode","redstone::core::aggregator::Matrix"],["
1.2.0 · source§

impl<'a, T, A> Extend<&'a T> for Vec<T, A>
where\n T: Copy + 'a,\n A: Allocator,

Extend implementation that copies elements out of references before pushing them onto the Vec.

\n

This implementation is specialized for slice iterators, where it uses copy_from_slice to\nappend the entire slice at once.

\n
source§

fn extend<I>(&mut self, iter: I)
where\n I: IntoIterator<Item = &'a T>,

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, _: &'a T)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
","Extend<&'a T>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Extend<T> for Vec<T, A>
where\n A: Allocator,

source§

fn extend<I>(&mut self, iter: I)
where\n I: IntoIterator<Item = T>,

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: T)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
","Extend","redstone::core::aggregator::Matrix"],["
source§

impl Flattened<<Radix as NetworkSpecific>::BytesRepr> for Vec<Bytes>

","Flattened<::BytesRepr>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T> From<&[T]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &[T]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&[1, 2, 3][..]), vec![1, 2, 3]);
\n
","From<&[T]>","redstone::core::aggregator::Matrix"],["
1.74.0 · source§

impl<T, const N: usize> From<&[T; N]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &[T; N]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&[1, 2, 3]), vec![1, 2, 3]);
\n
","From<&[T; N]>","redstone::core::aggregator::Matrix"],["
1.19.0 · source§

impl<T> From<&mut [T]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &mut [T]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&mut [1, 2, 3][..]), vec![1, 2, 3]);
\n
","From<&mut [T]>","redstone::core::aggregator::Matrix"],["
1.74.0 · source§

impl<T, const N: usize> From<&mut [T; N]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &mut [T; N]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&mut [1, 2, 3]), vec![1, 2, 3]);
\n
","From<&mut [T; N]>","redstone::core::aggregator::Matrix"],["
1.44.0 · source§

impl<T, const N: usize> From<[T; N]> for Vec<T>

source§

fn from(s: [T; N]) -> Vec<T>

Allocate a Vec<T> and move s’s items into it.

\n
§Examples
\n
assert_eq!(Vec::from([1, 2, 3]), vec![1, 2, 3]);
\n
","From<[T; N]>","redstone::core::aggregator::Matrix"],["
1.5.0 · source§

impl<T, A> From<BinaryHeap<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn from(heap: BinaryHeap<T, A>) -> Vec<T, A>

Converts a BinaryHeap<T> into a Vec<T>.

\n

This conversion requires no data movement or allocation, and has\nconstant time complexity.

\n
","From>","redstone::core::aggregator::Matrix"],["
1.18.0 · source§

impl<T, A> From<Box<[T], A>> for Vec<T, A>
where\n A: Allocator,

source§

fn from(s: Box<[T], A>) -> Vec<T, A>

Convert a boxed slice into a vector by transferring ownership of\nthe existing heap allocation.

\n
§Examples
\n
let b: Box<[i32]> = vec![1, 2, 3].into_boxed_slice();\nassert_eq!(Vec::from(b), vec![1, 2, 3]);
\n
","From>","redstone::core::aggregator::Matrix"],["
1.14.0 · source§

impl<'a, T> From<Cow<'a, [T]>> for Vec<T>
where\n [T]: ToOwned<Owned = Vec<T>>,

source§

fn from(s: Cow<'a, [T]>) -> Vec<T>

Convert a clone-on-write slice into a vector.

\n

If s already owns a Vec<T>, it will be returned directly.\nIf s is borrowing a slice, a new Vec<T> will be allocated and\nfilled by cloning s’s items into it.

\n
§Examples
\n
let o: Cow<'_, [i32]> = Cow::Owned(vec![1, 2, 3]);\nlet b: Cow<'_, [i32]> = Cow::Borrowed(&[1, 2, 3]);\nassert_eq!(Vec::from(o), Vec::from(b));
\n
","From>","redstone::core::aggregator::Matrix"],["
1.10.0 · source§

impl<T, A> From<VecDeque<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn from(other: VecDeque<T, A>) -> Vec<T, A>

Turn a VecDeque<T> into a Vec<T>.

\n

This never needs to re-allocate, but does need to do O(n) data movement if\nthe circular buffer doesn’t happen to be at the beginning of the allocation.

\n
§Examples
\n
use std::collections::VecDeque;\n\n// This one is *O*(1).\nlet deque: VecDeque<_> = (1..5).collect();\nlet ptr = deque.as_slices().0.as_ptr();\nlet vec = Vec::from(deque);\nassert_eq!(vec, [1, 2, 3, 4]);\nassert_eq!(vec.as_ptr(), ptr);\n\n// This one needs data rearranging.\nlet mut deque: VecDeque<_> = (1..5).collect();\ndeque.push_front(9);\ndeque.push_front(8);\nlet ptr = deque.as_slices().1.as_ptr();\nlet vec = Vec::from(deque);\nassert_eq!(vec, [8, 9, 1, 2, 3, 4]);\nassert_eq!(vec.as_ptr(), ptr);
\n
","From>","redstone::core::aggregator::Matrix"],["
source§

impl FromBytesRepr<Vec<u8>> for U256

source§

fn from_bytes_repr(bytes: Vec<u8>) -> Self

","FromBytesRepr>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T> FromIterator<T> for Vec<T>

Collects an iterator into a Vec, commonly called via Iterator::collect()

\n

§Allocation behavior

\n

In general Vec does not guarantee any particular growth or allocation strategy.\nThat also applies to this trait impl.

\n

Note: This section covers implementation details and is therefore exempt from\nstability guarantees.

\n

Vec may use any or none of the following strategies,\ndepending on the supplied iterator:

\n
    \n
  • preallocate based on Iterator::size_hint()\n
      \n
    • and panic if the number of items is outside the provided lower/upper bounds
    • \n
    \n
  • \n
  • use an amortized growth strategy similar to pushing one item at a time
  • \n
  • perform the iteration in-place on the original allocation backing the iterator
  • \n
\n

The last case warrants some attention. It is an optimization that in many cases reduces peak memory\nconsumption and improves cache locality. But when big, short-lived allocations are created,\nonly a small fraction of their items get collected, no further use is made of the spare capacity\nand the resulting Vec is moved into a longer-lived structure, then this can lead to the large\nallocations having their lifetimes unnecessarily extended which can result in increased memory\nfootprint.

\n

In cases where this is an issue, the excess capacity can be discarded with Vec::shrink_to(),\nVec::shrink_to_fit() or by collecting into Box<[T]> instead, which additionally reduces\nthe size of the long-lived struct.

\n\n
static LONG_LIVED: Mutex<Vec<Vec<u16>>> = Mutex::new(Vec::new());\n\nfor i in 0..10 {\n    let big_temporary: Vec<u16> = (0..1024).collect();\n    // discard most items\n    let mut result: Vec<_> = big_temporary.into_iter().filter(|i| i % 100 == 0).collect();\n    // without this a lot of unused capacity might be moved into the global\n    result.shrink_to_fit();\n    LONG_LIVED.lock().unwrap().push(result);\n}
\n
source§

fn from_iter<I>(iter: I) -> Vec<T>
where\n I: IntoIterator<Item = T>,

Creates a value from an iterator. Read more
","FromIterator","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Hash for Vec<T, A>
where\n T: Hash,\n A: Allocator,

The hash of a vector is the same as that of the corresponding slice,\nas required by the core::borrow::Borrow implementation.

\n\n
use std::hash::BuildHasher;\n\nlet b = std::hash::RandomState::new();\nlet v: Vec<u8> = vec![0xa8, 0x3c, 0x09];\nlet s: &[u8] = &[0xa8, 0x3c, 0x09];\nassert_eq!(b.hash_one(v), b.hash_one(s));
\n
source§

fn hash<H>(&self, state: &mut H)
where\n H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, I, A> Index<I> for Vec<T, A>
where\n I: SliceIndex<[T]>,\n A: Allocator,

§

type Output = <I as SliceIndex<[T]>>::Output

The returned type after indexing.
source§

fn index(&self, index: I) -> &<Vec<T, A> as Index<I>>::Output

Performs the indexing (container[index]) operation. Read more
","Index","redstone::core::aggregator::Matrix"],["
§

impl<T> Index<PatternID> for Vec<T>

§

type Output = T

The returned type after indexing.
§

fn index(&self, index: PatternID) -> &T

Performs the indexing (container[index]) operation. Read more
","Index","redstone::core::aggregator::Matrix"],["
§

impl<T> Index<SmallIndex> for Vec<T>

§

type Output = T

The returned type after indexing.
§

fn index(&self, index: SmallIndex) -> &T

Performs the indexing (container[index]) operation. Read more
","Index","redstone::core::aggregator::Matrix"],["
§

impl<T> Index<StateID> for Vec<T>

§

type Output = T

The returned type after indexing.
§

fn index(&self, index: StateID) -> &T

Performs the indexing (container[index]) operation. Read more
","Index","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, I, A> IndexMut<I> for Vec<T, A>
where\n I: SliceIndex<[T]>,\n A: Allocator,

source§

fn index_mut(&mut self, index: I) -> &mut <Vec<T, A> as Index<I>>::Output

Performs the mutable indexing (container[index]) operation. Read more
","IndexMut","redstone::core::aggregator::Matrix"],["
§

impl<T> IndexMut<PatternID> for Vec<T>

§

fn index_mut(&mut self, index: PatternID) -> &mut T

Performs the mutable indexing (container[index]) operation. Read more
","IndexMut","redstone::core::aggregator::Matrix"],["
§

impl<T> IndexMut<SmallIndex> for Vec<T>

§

fn index_mut(&mut self, index: SmallIndex) -> &mut T

Performs the mutable indexing (container[index]) operation. Read more
","IndexMut","redstone::core::aggregator::Matrix"],["
§

impl<T> IndexMut<StateID> for Vec<T>

§

fn index_mut(&mut self, index: StateID) -> &mut T

Performs the mutable indexing (container[index]) operation. Read more
","IndexMut","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> IntoIterator for Vec<T, A>
where\n A: Allocator,

source§

fn into_iter(self) -> <Vec<T, A> as IntoIterator>::IntoIter

Creates a consuming iterator, that is, one that moves each value out of\nthe vector (from start to end). The vector cannot be used after calling\nthis.

\n
§Examples
\n
let v = vec![\"a\".to_string(), \"b\".to_string()];\nlet mut v_iter = v.into_iter();\n\nlet first_element: Option<String> = v_iter.next();\n\nassert_eq!(first_element, Some(\"a\".to_string()));\nassert_eq!(v_iter.next(), Some(\"b\".to_string()));\nassert_eq!(v_iter.next(), None);
\n
§

type Item = T

The type of the elements being iterated over.
§

type IntoIter = IntoIter<T, A>

Which kind of iterator are we turning this into?
","IntoIterator","redstone::core::aggregator::Matrix"],["
§

impl<X> LabelledResolvable for Vec<X>
where\n X: LabelledResolvable,

§

type ResolverOutput = X

You’ll be passed a resolver, what will the resolver output?\nOften this will be Self, but sometimes it will be another type which you will\nneed to map into Self.
","LabelledResolvable","redstone::core::aggregator::Matrix"],["
§

impl<T, X> LabelledResolveFrom<T> for Vec<X>
where\n T: IntoIterator,\n <T as IntoIterator>::Item: LabelledResolve<X>,\n X: LabelledResolvable<ResolverOutput = X>,

§

fn labelled_resolve_from(value: T, resolver: &impl LabelResolver<X>) -> Vec<X>

","LabelledResolveFrom","redstone::core::aggregator::Matrix"],["
source§

impl<T> Median for Vec<T>
where\n T: Copy + Ord + Avg,

§

type Item = T

source§

fn median(self) -> Self::Item

","Median","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Ord for Vec<T, A>
where\n T: Ord,\n A: Allocator,

Implements ordering of vectors, lexicographically.

\n
source§

fn cmp(&self, other: &Vec<T, A>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
","Ord","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A> PartialEq<&[U]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &&[U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&[U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&[U]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A, const N: usize> PartialEq<&[U; N]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &&[U; N]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&[U; N]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&[U; N]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A> PartialEq<&mut [U]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &&mut [U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&mut [U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&mut [U]>","redstone::core::aggregator::Matrix"],["
1.48.0 · source§

impl<T, U, A> PartialEq<[U]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &[U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &[U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<[U]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A, const N: usize> PartialEq<[U; N]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &[U; N]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &[U; N]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<[U; N]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A1, A2> PartialEq<Vec<U, A2>> for Vec<T, A1>
where\n A1: Allocator,\n A2: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &Vec<U, A2>) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &Vec<U, A2>) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A1, A2> PartialOrd<Vec<T, A2>> for Vec<T, A1>
where\n T: PartialOrd,\n A1: Allocator,\n A2: Allocator,

Implements comparison of vectors, lexicographically.

\n
source§

fn partial_cmp(&self, other: &Vec<T, A2>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <=\noperator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >=\noperator. Read more
","PartialOrd>","redstone::core::aggregator::Matrix"],["
source§

impl<T> Vec<T>

1.0.0 (const: 1.39.0) · source

pub const fn new() -> Vec<T>

Constructs a new, empty Vec<T>.

\n

The vector will not allocate until elements are pushed onto it.

\n
§Examples
\n
let mut vec: Vec<i32> = Vec::new();
\n
1.0.0 · source

pub fn with_capacity(capacity: usize) -> Vec<T>

Constructs a new, empty Vec<T> with at least the specified capacity.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n

It is important to note that although the returned vector has the\nminimum capacity specified, the vector will have a zero length. For\nan explanation of the difference between length and capacity, see\nCapacity and reallocation.

\n

If it is important to know the exact allocated capacity of a Vec,\nalways use the capacity method after construction.

\n

For Vec<T> where T is a zero-sized type, there will be no allocation\nand the capacity will always be usize::MAX.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = Vec::with_capacity(10);\n\n// The vector contains no items, even though it has capacity for more\nassert_eq!(vec.len(), 0);\nassert!(vec.capacity() >= 10);\n\n// These are all done without reallocating...\nfor i in 0..10 {\n    vec.push(i);\n}\nassert_eq!(vec.len(), 10);\nassert!(vec.capacity() >= 10);\n\n// ...but this may make the vector reallocate\nvec.push(11);\nassert_eq!(vec.len(), 11);\nassert!(vec.capacity() >= 11);\n\n// A vector of a zero-sized type will always over-allocate, since no\n// allocation is necessary\nlet vec_units = Vec::<()>::with_capacity(10);\nassert_eq!(vec_units.capacity(), usize::MAX);
\n
source

pub fn try_with_capacity(capacity: usize) -> Result<Vec<T>, TryReserveError>

🔬This is a nightly-only experimental API. (try_with_capacity)

Constructs a new, empty Vec<T> with at least the specified capacity.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n
§Errors
\n

Returns an error if the capacity exceeds isize::MAX bytes,\nor if the allocator reports allocation failure.

\n
1.0.0 · source

pub unsafe fn from_raw_parts(\n ptr: *mut T,\n length: usize,\n capacity: usize,\n) -> Vec<T>

Creates a Vec<T> directly from a pointer, a length, and a capacity.

\n
§Safety
\n

This is highly unsafe, due to the number of invariants that aren’t\nchecked:

\n
    \n
  • ptr must have been allocated using the global allocator, such as via\nthe alloc::alloc function.
  • \n
  • T needs to have the same alignment as what ptr was allocated with.\n(T having a less strict alignment is not sufficient, the alignment really\nneeds to be equal to satisfy the dealloc requirement that memory must be\nallocated and deallocated with the same layout.)
  • \n
  • The size of T times the capacity (ie. the allocated size in bytes) needs\nto be the same size as the pointer was allocated with. (Because similar to\nalignment, dealloc must be called with the same layout size.)
  • \n
  • length needs to be less than or equal to capacity.
  • \n
  • The first length values must be properly initialized values of type T.
  • \n
  • capacity needs to be the capacity that the pointer was allocated with.
  • \n
  • The allocated size in bytes must be no larger than isize::MAX.\nSee the safety documentation of pointer::offset.
  • \n
\n

These requirements are always upheld by any ptr that has been allocated\nvia Vec<T>. Other allocation sources are allowed if the invariants are\nupheld.

\n

Violating these may cause problems like corrupting the allocator’s\ninternal data structures. For example it is normally not safe\nto build a Vec<u8> from a pointer to a C char array with length\nsize_t, doing so is only safe if the array was initially allocated by\na Vec or String.\nIt’s also not safe to build one from a Vec<u16> and its length, because\nthe allocator cares about the alignment, and these two types have different\nalignments. The buffer was allocated with alignment 2 (for u16), but after\nturning it into a Vec<u8> it’ll be deallocated with alignment 1. To avoid\nthese issues, it is often preferable to do casting/transmuting using\nslice::from_raw_parts instead.

\n

The ownership of ptr is effectively transferred to the\nVec<T> which may then deallocate, reallocate or change the\ncontents of memory pointed to by the pointer at will. Ensure\nthat nothing else uses the pointer after calling this\nfunction.

\n
§Examples
\n
use std::ptr;\nuse std::mem;\n\nlet v = vec![1, 2, 3];\n\n// Prevent running `v`'s destructor so we are in complete control\n// of the allocation.\nlet mut v = mem::ManuallyDrop::new(v);\n\n// Pull out the various important pieces of information about `v`\nlet p = v.as_mut_ptr();\nlet len = v.len();\nlet cap = v.capacity();\n\nunsafe {\n    // Overwrite memory with 4, 5, 6\n    for i in 0..len {\n        ptr::write(p.add(i), 4 + i);\n    }\n\n    // Put everything back together into a Vec\n    let rebuilt = Vec::from_raw_parts(p, len, cap);\n    assert_eq!(rebuilt, [4, 5, 6]);\n}
\n

Using memory that was allocated elsewhere:

\n\n
use std::alloc::{alloc, Layout};\n\nfn main() {\n    let layout = Layout::array::<u32>(16).expect(\"overflow cannot happen\");\n\n    let vec = unsafe {\n        let mem = alloc(layout).cast::<u32>();\n        if mem.is_null() {\n            return;\n        }\n\n        mem.write(1_000_000);\n\n        Vec::from_raw_parts(mem, 1, 16)\n    };\n\n    assert_eq!(vec, &[1_000_000]);\n    assert_eq!(vec.capacity(), 16);\n}
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n T: Clone,\n A: Allocator,

1.5.0 · source

pub fn resize(&mut self, new_len: usize, value: T)

Resizes the Vec in-place so that len is equal to new_len.

\n

If new_len is greater than len, the Vec is extended by the\ndifference, with each additional slot filled with value.\nIf new_len is less than len, the Vec is simply truncated.

\n

This method requires T to implement Clone,\nin order to be able to clone the passed value.\nIf you need more flexibility (or want to rely on Default instead of\nClone), use Vec::resize_with.\nIf you only need to resize to a smaller size, use Vec::truncate.

\n
§Examples
\n
let mut vec = vec![\"hello\"];\nvec.resize(3, \"world\");\nassert_eq!(vec, [\"hello\", \"world\", \"world\"]);\n\nlet mut vec = vec![1, 2, 3, 4];\nvec.resize(2, 0);\nassert_eq!(vec, [1, 2]);
\n
1.6.0 · source

pub fn extend_from_slice(&mut self, other: &[T])

Clones and appends all elements in a slice to the Vec.

\n

Iterates over the slice other, clones each element, and then appends\nit to this Vec. The other slice is traversed in-order.

\n

Note that this function is same as extend except that it is\nspecialized to work with slices instead. If and when Rust gets\nspecialization this function will likely be deprecated (but still\navailable).

\n
§Examples
\n
let mut vec = vec![1];\nvec.extend_from_slice(&[2, 3, 4]);\nassert_eq!(vec, [1, 2, 3, 4]);
\n
1.53.0 · source

pub fn extend_from_within<R>(&mut self, src: R)
where\n R: RangeBounds<usize>,

Copies elements from src range to the end of the vector.

\n
§Panics
\n

Panics if the starting point is greater than the end point or if\nthe end point is greater than the length of the vector.

\n
§Examples
\n
let mut vec = vec![0, 1, 2, 3, 4];\n\nvec.extend_from_within(2..);\nassert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4]);\n\nvec.extend_from_within(..2);\nassert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4, 0, 1]);\n\nvec.extend_from_within(4..8);\nassert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4, 0, 1, 4, 2, 3, 4]);
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n T: PartialEq,\n A: Allocator,

1.0.0 · source

pub fn dedup(&mut self)

Removes consecutive repeated elements in the vector according to the\nPartialEq trait implementation.

\n

If the vector is sorted, this removes all duplicates.

\n
§Examples
\n
let mut vec = vec![1, 2, 2, 3, 2];\n\nvec.dedup();\n\nassert_eq!(vec, [1, 2, 3, 2]);
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n A: Allocator,

1.21.0 · source

pub fn splice<R, I>(\n &mut self,\n range: R,\n replace_with: I,\n) -> Splice<'_, <I as IntoIterator>::IntoIter, A>
where\n R: RangeBounds<usize>,\n I: IntoIterator<Item = T>,

Creates a splicing iterator that replaces the specified range in the vector\nwith the given replace_with iterator and yields the removed items.\nreplace_with does not need to be the same length as range.

\n

range is removed even if the iterator is not consumed until the end.

\n

It is unspecified how many elements are removed from the vector\nif the Splice value is leaked.

\n

The input iterator replace_with is only consumed when the Splice value is dropped.

\n

This is optimal if:

\n
    \n
  • The tail (elements in the vector after range) is empty,
  • \n
  • or replace_with yields fewer or equal elements than range’s length
  • \n
  • or the lower bound of its size_hint() is exact.
  • \n
\n

Otherwise, a temporary vector is allocated and the tail is moved twice.

\n
§Panics
\n

Panics if the starting point is greater than the end point or if\nthe end point is greater than the length of the vector.

\n
§Examples
\n
let mut v = vec![1, 2, 3, 4];\nlet new = [7, 8, 9];\nlet u: Vec<_> = v.splice(1..3, new).collect();\nassert_eq!(v, &[1, 7, 8, 9, 4]);\nassert_eq!(u, &[2, 3]);
\n
source

pub fn extract_if<F>(&mut self, filter: F) -> ExtractIf<'_, T, F, A>
where\n F: FnMut(&mut T) -> bool,

🔬This is a nightly-only experimental API. (extract_if)

Creates an iterator which uses a closure to determine if an element should be removed.

\n

If the closure returns true, then the element is removed and yielded.\nIf the closure returns false, the element will remain in the vector and will not be yielded\nby the iterator.

\n

If the returned ExtractIf is not exhausted, e.g. because it is dropped without iterating\nor the iteration short-circuits, then the remaining elements will be retained.\nUse retain with a negated predicate if you do not need the returned iterator.

\n

Using this method is equivalent to the following code:

\n\n
let mut i = 0;\nwhile i < vec.len() {\n    if some_predicate(&mut vec[i]) {\n        let val = vec.remove(i);\n        // your code here\n    } else {\n        i += 1;\n    }\n}\n
\n

But extract_if is easier to use. extract_if is also more efficient,\nbecause it can backshift the elements of the array in bulk.

\n

Note that extract_if also lets you mutate every element in the filter closure,\nregardless of whether you choose to keep or remove it.

\n
§Examples
\n

Splitting an array into evens and odds, reusing the original allocation:

\n\n
#![feature(extract_if)]\nlet mut numbers = vec![1, 2, 3, 4, 5, 6, 8, 9, 11, 13, 14, 15];\n\nlet evens = numbers.extract_if(|x| *x % 2 == 0).collect::<Vec<_>>();\nlet odds = numbers;\n\nassert_eq!(evens, vec![2, 4, 6, 8, 14]);\nassert_eq!(odds, vec![1, 3, 5, 9, 11, 13, 15]);
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n A: Allocator,

source

pub const fn new_in(alloc: A) -> Vec<T, A>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new, empty Vec<T, A>.

\n

The vector will not allocate until elements are pushed onto it.

\n
§Examples
\n
#![feature(allocator_api)]\n\nuse std::alloc::System;\n\nlet mut vec: Vec<i32, _> = Vec::new_in(System);
\n
source

pub fn with_capacity_in(capacity: usize, alloc: A) -> Vec<T, A>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new, empty Vec<T, A> with at least the specified capacity\nwith the provided allocator.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n

It is important to note that although the returned vector has the\nminimum capacity specified, the vector will have a zero length. For\nan explanation of the difference between length and capacity, see\nCapacity and reallocation.

\n

If it is important to know the exact allocated capacity of a Vec,\nalways use the capacity method after construction.

\n

For Vec<T, A> where T is a zero-sized type, there will be no allocation\nand the capacity will always be usize::MAX.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
#![feature(allocator_api)]\n\nuse std::alloc::System;\n\nlet mut vec = Vec::with_capacity_in(10, System);\n\n// The vector contains no items, even though it has capacity for more\nassert_eq!(vec.len(), 0);\nassert!(vec.capacity() >= 10);\n\n// These are all done without reallocating...\nfor i in 0..10 {\n    vec.push(i);\n}\nassert_eq!(vec.len(), 10);\nassert!(vec.capacity() >= 10);\n\n// ...but this may make the vector reallocate\nvec.push(11);\nassert_eq!(vec.len(), 11);\nassert!(vec.capacity() >= 11);\n\n// A vector of a zero-sized type will always over-allocate, since no\n// allocation is necessary\nlet vec_units = Vec::<(), System>::with_capacity_in(10, System);\nassert_eq!(vec_units.capacity(), usize::MAX);
\n
source

pub fn try_with_capacity_in(\n capacity: usize,\n alloc: A,\n) -> Result<Vec<T, A>, TryReserveError>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new, empty Vec<T, A> with at least the specified capacity\nwith the provided allocator.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n
§Errors
\n

Returns an error if the capacity exceeds isize::MAX bytes,\nor if the allocator reports allocation failure.

\n
source

pub unsafe fn from_raw_parts_in(\n ptr: *mut T,\n length: usize,\n capacity: usize,\n alloc: A,\n) -> Vec<T, A>

🔬This is a nightly-only experimental API. (allocator_api)

Creates a Vec<T, A> directly from a pointer, a length, a capacity,\nand an allocator.

\n
§Safety
\n

This is highly unsafe, due to the number of invariants that aren’t\nchecked:

\n
    \n
  • ptr must be currently allocated via the given allocator alloc.
  • \n
  • T needs to have the same alignment as what ptr was allocated with.\n(T having a less strict alignment is not sufficient, the alignment really\nneeds to be equal to satisfy the dealloc requirement that memory must be\nallocated and deallocated with the same layout.)
  • \n
  • The size of T times the capacity (ie. the allocated size in bytes) needs\nto be the same size as the pointer was allocated with. (Because similar to\nalignment, dealloc must be called with the same layout size.)
  • \n
  • length needs to be less than or equal to capacity.
  • \n
  • The first length values must be properly initialized values of type T.
  • \n
  • capacity needs to fit the layout size that the pointer was allocated with.
  • \n
  • The allocated size in bytes must be no larger than isize::MAX.\nSee the safety documentation of pointer::offset.
  • \n
\n

These requirements are always upheld by any ptr that has been allocated\nvia Vec<T, A>. Other allocation sources are allowed if the invariants are\nupheld.

\n

Violating these may cause problems like corrupting the allocator’s\ninternal data structures. For example it is not safe\nto build a Vec<u8> from a pointer to a C char array with length size_t.\nIt’s also not safe to build one from a Vec<u16> and its length, because\nthe allocator cares about the alignment, and these two types have different\nalignments. The buffer was allocated with alignment 2 (for u16), but after\nturning it into a Vec<u8> it’ll be deallocated with alignment 1.

\n

The ownership of ptr is effectively transferred to the\nVec<T> which may then deallocate, reallocate or change the\ncontents of memory pointed to by the pointer at will. Ensure\nthat nothing else uses the pointer after calling this\nfunction.

\n
§Examples
\n
#![feature(allocator_api)]\n\nuse std::alloc::System;\n\nuse std::ptr;\nuse std::mem;\n\nlet mut v = Vec::with_capacity_in(3, System);\nv.push(1);\nv.push(2);\nv.push(3);\n\n// Prevent running `v`'s destructor so we are in complete control\n// of the allocation.\nlet mut v = mem::ManuallyDrop::new(v);\n\n// Pull out the various important pieces of information about `v`\nlet p = v.as_mut_ptr();\nlet len = v.len();\nlet cap = v.capacity();\nlet alloc = v.allocator();\n\nunsafe {\n    // Overwrite memory with 4, 5, 6\n    for i in 0..len {\n        ptr::write(p.add(i), 4 + i);\n    }\n\n    // Put everything back together into a Vec\n    let rebuilt = Vec::from_raw_parts_in(p, len, cap, alloc.clone());\n    assert_eq!(rebuilt, [4, 5, 6]);\n}
\n

Using memory that was allocated elsewhere:

\n\n
#![feature(allocator_api)]\n\nuse std::alloc::{AllocError, Allocator, Global, Layout};\n\nfn main() {\n    let layout = Layout::array::<u32>(16).expect(\"overflow cannot happen\");\n\n    let vec = unsafe {\n        let mem = match Global.allocate(layout) {\n            Ok(mem) => mem.cast::<u32>().as_ptr(),\n            Err(AllocError) => return,\n        };\n\n        mem.write(1_000_000);\n\n        Vec::from_raw_parts_in(mem, 1, 16, Global)\n    };\n\n    assert_eq!(vec, &[1_000_000]);\n    assert_eq!(vec.capacity(), 16);\n}
\n
source

pub fn into_raw_parts(self) -> (*mut T, usize, usize)

🔬This is a nightly-only experimental API. (vec_into_raw_parts)

Decomposes a Vec<T> into its raw components: (pointer, length, capacity).

\n

Returns the raw pointer to the underlying data, the length of\nthe vector (in elements), and the allocated capacity of the\ndata (in elements). These are the same arguments in the same\norder as the arguments to from_raw_parts.

\n

After calling this function, the caller is responsible for the\nmemory previously managed by the Vec. The only way to do\nthis is to convert the raw pointer, length, and capacity back\ninto a Vec with the from_raw_parts function, allowing\nthe destructor to perform the cleanup.

\n
§Examples
\n
#![feature(vec_into_raw_parts)]\nlet v: Vec<i32> = vec![-1, 0, 1];\n\nlet (ptr, len, cap) = v.into_raw_parts();\n\nlet rebuilt = unsafe {\n    // We can now make changes to the components, such as\n    // transmuting the raw pointer to a compatible type.\n    let ptr = ptr as *mut u32;\n\n    Vec::from_raw_parts(ptr, len, cap)\n};\nassert_eq!(rebuilt, [4294967295, 0, 1]);
\n
source

pub fn into_raw_parts_with_alloc(self) -> (*mut T, usize, usize, A)

🔬This is a nightly-only experimental API. (allocator_api)

Decomposes a Vec<T> into its raw components: (pointer, length, capacity, allocator).

\n

Returns the raw pointer to the underlying data, the length of the vector (in elements),\nthe allocated capacity of the data (in elements), and the allocator. These are the same\narguments in the same order as the arguments to from_raw_parts_in.

\n

After calling this function, the caller is responsible for the\nmemory previously managed by the Vec. The only way to do\nthis is to convert the raw pointer, length, and capacity back\ninto a Vec with the from_raw_parts_in function, allowing\nthe destructor to perform the cleanup.

\n
§Examples
\n
#![feature(allocator_api, vec_into_raw_parts)]\n\nuse std::alloc::System;\n\nlet mut v: Vec<i32, System> = Vec::new_in(System);\nv.push(-1);\nv.push(0);\nv.push(1);\n\nlet (ptr, len, cap, alloc) = v.into_raw_parts_with_alloc();\n\nlet rebuilt = unsafe {\n    // We can now make changes to the components, such as\n    // transmuting the raw pointer to a compatible type.\n    let ptr = ptr as *mut u32;\n\n    Vec::from_raw_parts_in(ptr, len, cap, alloc)\n};\nassert_eq!(rebuilt, [4294967295, 0, 1]);
\n
1.0.0 · source

pub fn capacity(&self) -> usize

Returns the total number of elements the vector can hold without\nreallocating.

\n
§Examples
\n
let mut vec: Vec<i32> = Vec::with_capacity(10);\nvec.push(42);\nassert!(vec.capacity() >= 10);
\n
1.0.0 · source

pub fn reserve(&mut self, additional: usize)

Reserves capacity for at least additional more elements to be inserted\nin the given Vec<T>. The collection may reserve more space to\nspeculatively avoid frequent reallocations. After calling reserve,\ncapacity will be greater than or equal to self.len() + additional.\nDoes nothing if capacity is already sufficient.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1];\nvec.reserve(10);\nassert!(vec.capacity() >= 11);
\n
1.0.0 · source

pub fn reserve_exact(&mut self, additional: usize)

Reserves the minimum capacity for at least additional more elements to\nbe inserted in the given Vec<T>. Unlike reserve, this will not\ndeliberately over-allocate to speculatively avoid frequent allocations.\nAfter calling reserve_exact, capacity will be greater than or equal to\nself.len() + additional. Does nothing if the capacity is already\nsufficient.

\n

Note that the allocator may give the collection more space than it\nrequests. Therefore, capacity can not be relied upon to be precisely\nminimal. Prefer reserve if future insertions are expected.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1];\nvec.reserve_exact(10);\nassert!(vec.capacity() >= 11);
\n
1.57.0 · source

pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>

Tries to reserve capacity for at least additional more elements to be inserted\nin the given Vec<T>. The collection may reserve more space to speculatively avoid\nfrequent reallocations. After calling try_reserve, capacity will be\ngreater than or equal to self.len() + additional if it returns\nOk(()). Does nothing if capacity is already sufficient. This method\npreserves the contents even if an error occurs.

\n
§Errors
\n

If the capacity overflows, or the allocator reports a failure, then an error\nis returned.

\n
§Examples
\n
use std::collections::TryReserveError;\n\nfn process_data(data: &[u32]) -> Result<Vec<u32>, TryReserveError> {\n    let mut output = Vec::new();\n\n    // Pre-reserve the memory, exiting if we can't\n    output.try_reserve(data.len())?;\n\n    // Now we know this can't OOM in the middle of our complex work\n    output.extend(data.iter().map(|&val| {\n        val * 2 + 5 // very complicated\n    }));\n\n    Ok(output)\n}
\n
1.57.0 · source

pub fn try_reserve_exact(\n &mut self,\n additional: usize,\n) -> Result<(), TryReserveError>

Tries to reserve the minimum capacity for at least additional\nelements to be inserted in the given Vec<T>. Unlike try_reserve,\nthis will not deliberately over-allocate to speculatively avoid frequent\nallocations. After calling try_reserve_exact, capacity will be greater\nthan or equal to self.len() + additional if it returns Ok(()).\nDoes nothing if the capacity is already sufficient.

\n

Note that the allocator may give the collection more space than it\nrequests. Therefore, capacity can not be relied upon to be precisely\nminimal. Prefer try_reserve if future insertions are expected.

\n
§Errors
\n

If the capacity overflows, or the allocator reports a failure, then an error\nis returned.

\n
§Examples
\n
use std::collections::TryReserveError;\n\nfn process_data(data: &[u32]) -> Result<Vec<u32>, TryReserveError> {\n    let mut output = Vec::new();\n\n    // Pre-reserve the memory, exiting if we can't\n    output.try_reserve_exact(data.len())?;\n\n    // Now we know this can't OOM in the middle of our complex work\n    output.extend(data.iter().map(|&val| {\n        val * 2 + 5 // very complicated\n    }));\n\n    Ok(output)\n}
\n
1.0.0 · source

pub fn shrink_to_fit(&mut self)

Shrinks the capacity of the vector as much as possible.

\n

The behavior of this method depends on the allocator, which may either shrink the vector\nin-place or reallocate. The resulting vector might still have some excess capacity, just as\nis the case for with_capacity. See Allocator::shrink for more details.

\n
§Examples
\n
let mut vec = Vec::with_capacity(10);\nvec.extend([1, 2, 3]);\nassert!(vec.capacity() >= 10);\nvec.shrink_to_fit();\nassert!(vec.capacity() >= 3);
\n
1.56.0 · source

pub fn shrink_to(&mut self, min_capacity: usize)

Shrinks the capacity of the vector with a lower bound.

\n

The capacity will remain at least as large as both the length\nand the supplied value.

\n

If the current capacity is less than the lower limit, this is a no-op.

\n
§Examples
\n
let mut vec = Vec::with_capacity(10);\nvec.extend([1, 2, 3]);\nassert!(vec.capacity() >= 10);\nvec.shrink_to(4);\nassert!(vec.capacity() >= 4);\nvec.shrink_to(0);\nassert!(vec.capacity() >= 3);
\n
1.0.0 · source

pub fn into_boxed_slice(self) -> Box<[T], A>

Converts the vector into Box<[T]>.

\n

Before doing the conversion, this method discards excess capacity like shrink_to_fit.

\n
§Examples
\n
let v = vec![1, 2, 3];\n\nlet slice = v.into_boxed_slice();
\n

Any excess capacity is removed:

\n\n
let mut vec = Vec::with_capacity(10);\nvec.extend([1, 2, 3]);\n\nassert!(vec.capacity() >= 10);\nlet slice = vec.into_boxed_slice();\nassert_eq!(slice.into_vec().capacity(), 3);
\n
1.0.0 · source

pub fn truncate(&mut self, len: usize)

Shortens the vector, keeping the first len elements and dropping\nthe rest.

\n

If len is greater or equal to the vector’s current length, this has\nno effect.

\n

The drain method can emulate truncate, but causes the excess\nelements to be returned instead of dropped.

\n

Note that this method has no effect on the allocated capacity\nof the vector.

\n
§Examples
\n

Truncating a five element vector to two elements:

\n\n
let mut vec = vec![1, 2, 3, 4, 5];\nvec.truncate(2);\nassert_eq!(vec, [1, 2]);
\n

No truncation occurs when len is greater than the vector’s current\nlength:

\n\n
let mut vec = vec![1, 2, 3];\nvec.truncate(8);\nassert_eq!(vec, [1, 2, 3]);
\n

Truncating when len == 0 is equivalent to calling the clear\nmethod.

\n\n
let mut vec = vec![1, 2, 3];\nvec.truncate(0);\nassert_eq!(vec, []);
\n
1.7.0 · source

pub fn as_slice(&self) -> &[T]

Extracts a slice containing the entire vector.

\n

Equivalent to &s[..].

\n
§Examples
\n
use std::io::{self, Write};\nlet buffer = vec![1, 2, 3, 5, 8];\nio::sink().write(buffer.as_slice()).unwrap();
\n
1.7.0 · source

pub fn as_mut_slice(&mut self) -> &mut [T]

Extracts a mutable slice of the entire vector.

\n

Equivalent to &mut s[..].

\n
§Examples
\n
use std::io::{self, Read};\nlet mut buffer = vec![0; 3];\nio::repeat(0b101).read_exact(buffer.as_mut_slice()).unwrap();
\n
1.37.0 · source

pub fn as_ptr(&self) -> *const T

Returns a raw pointer to the vector’s buffer, or a dangling raw pointer\nvalid for zero sized reads if the vector didn’t allocate.

\n

The caller must ensure that the vector outlives the pointer this\nfunction returns, or else it will end up pointing to garbage.\nModifying the vector may cause its buffer to be reallocated,\nwhich would also make any pointers to it invalid.

\n

The caller must also ensure that the memory the pointer (non-transitively) points to\nis never written to (except inside an UnsafeCell) using this pointer or any pointer\nderived from it. If you need to mutate the contents of the slice, use as_mut_ptr.

\n

This method guarantees that for the purpose of the aliasing model, this method\ndoes not materialize a reference to the underlying slice, and thus the returned pointer\nwill remain valid when mixed with other calls to as_ptr and as_mut_ptr.\nNote that calling other methods that materialize mutable references to the slice,\nor mutable references to specific elements you are planning on accessing through this pointer,\nas well as writing to those elements, may still invalidate this pointer.\nSee the second example below for how this guarantee can be used.

\n
§Examples
\n
let x = vec![1, 2, 4];\nlet x_ptr = x.as_ptr();\n\nunsafe {\n    for i in 0..x.len() {\n        assert_eq!(*x_ptr.add(i), 1 << i);\n    }\n}
\n

Due to the aliasing guarantee, the following code is legal:

\n\n
unsafe {\n    let mut v = vec![0, 1, 2];\n    let ptr1 = v.as_ptr();\n    let _ = ptr1.read();\n    let ptr2 = v.as_mut_ptr().offset(2);\n    ptr2.write(2);\n    // Notably, the write to `ptr2` did *not* invalidate `ptr1`\n    // because it mutated a different element:\n    let _ = ptr1.read();\n}
\n
1.37.0 · source

pub fn as_mut_ptr(&mut self) -> *mut T

Returns an unsafe mutable pointer to the vector’s buffer, or a dangling\nraw pointer valid for zero sized reads if the vector didn’t allocate.

\n

The caller must ensure that the vector outlives the pointer this\nfunction returns, or else it will end up pointing to garbage.\nModifying the vector may cause its buffer to be reallocated,\nwhich would also make any pointers to it invalid.

\n

This method guarantees that for the purpose of the aliasing model, this method\ndoes not materialize a reference to the underlying slice, and thus the returned pointer\nwill remain valid when mixed with other calls to as_ptr and as_mut_ptr.\nNote that calling other methods that materialize references to the slice,\nor references to specific elements you are planning on accessing through this pointer,\nmay still invalidate this pointer.\nSee the second example below for how this guarantee can be used.

\n
§Examples
\n
// Allocate vector big enough for 4 elements.\nlet size = 4;\nlet mut x: Vec<i32> = Vec::with_capacity(size);\nlet x_ptr = x.as_mut_ptr();\n\n// Initialize elements via raw pointer writes, then set length.\nunsafe {\n    for i in 0..size {\n        *x_ptr.add(i) = i as i32;\n    }\n    x.set_len(size);\n}\nassert_eq!(&*x, &[0, 1, 2, 3]);
\n

Due to the aliasing guarantee, the following code is legal:

\n\n
unsafe {\n    let mut v = vec![0];\n    let ptr1 = v.as_mut_ptr();\n    ptr1.write(1);\n    let ptr2 = v.as_mut_ptr();\n    ptr2.write(2);\n    // Notably, the write to `ptr2` did *not* invalidate `ptr1`:\n    ptr1.write(3);\n}
\n
source

pub fn allocator(&self) -> &A

🔬This is a nightly-only experimental API. (allocator_api)

Returns a reference to the underlying allocator.

\n
1.0.0 · source

pub unsafe fn set_len(&mut self, new_len: usize)

Forces the length of the vector to new_len.

\n

This is a low-level operation that maintains none of the normal\ninvariants of the type. Normally changing the length of a vector\nis done using one of the safe operations instead, such as\ntruncate, resize, extend, or clear.

\n
§Safety
\n
    \n
  • new_len must be less than or equal to capacity().
  • \n
  • The elements at old_len..new_len must be initialized.
  • \n
\n
§Examples
\n

This method can be useful for situations in which the vector\nis serving as a buffer for other code, particularly over FFI:

\n\n
pub fn get_dictionary(&self) -> Option<Vec<u8>> {\n    // Per the FFI method's docs, \"32768 bytes is always enough\".\n    let mut dict = Vec::with_capacity(32_768);\n    let mut dict_length = 0;\n    // SAFETY: When `deflateGetDictionary` returns `Z_OK`, it holds that:\n    // 1. `dict_length` elements were initialized.\n    // 2. `dict_length` <= the capacity (32_768)\n    // which makes `set_len` safe to call.\n    unsafe {\n        // Make the FFI call...\n        let r = deflateGetDictionary(self.strm, dict.as_mut_ptr(), &mut dict_length);\n        if r == Z_OK {\n            // ...and update the length to what was initialized.\n            dict.set_len(dict_length);\n            Some(dict)\n        } else {\n            None\n        }\n    }\n}
\n

While the following example is sound, there is a memory leak since\nthe inner vectors were not freed prior to the set_len call:

\n\n
let mut vec = vec![vec![1, 0, 0],\n                   vec![0, 1, 0],\n                   vec![0, 0, 1]];\n// SAFETY:\n// 1. `old_len..0` is empty so no elements need to be initialized.\n// 2. `0 <= capacity` always holds whatever `capacity` is.\nunsafe {\n    vec.set_len(0);\n}
\n

Normally, here, one would use clear instead to correctly drop\nthe contents and thus not leak memory.

\n
1.0.0 · source

pub fn swap_remove(&mut self, index: usize) -> T

Removes an element from the vector and returns it.

\n

The removed element is replaced by the last element of the vector.

\n

This does not preserve ordering of the remaining elements, but is O(1).\nIf you need to preserve the element order, use remove instead.

\n
§Panics
\n

Panics if index is out of bounds.

\n
§Examples
\n
let mut v = vec![\"foo\", \"bar\", \"baz\", \"qux\"];\n\nassert_eq!(v.swap_remove(1), \"bar\");\nassert_eq!(v, [\"foo\", \"qux\", \"baz\"]);\n\nassert_eq!(v.swap_remove(0), \"foo\");\nassert_eq!(v, [\"baz\", \"qux\"]);
\n
1.0.0 · source

pub fn insert(&mut self, index: usize, element: T)

Inserts an element at position index within the vector, shifting all\nelements after it to the right.

\n
§Panics
\n

Panics if index > len.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nvec.insert(1, 4);\nassert_eq!(vec, [1, 4, 2, 3]);\nvec.insert(4, 5);\nassert_eq!(vec, [1, 4, 2, 3, 5]);
\n
§Time complexity
\n

Takes O(Vec::len) time. All items after the insertion index must be\nshifted to the right. In the worst case, all elements are shifted when\nthe insertion index is 0.

\n
1.0.0 · source

pub fn remove(&mut self, index: usize) -> T

Removes and returns the element at position index within the vector,\nshifting all elements after it to the left.

\n

Note: Because this shifts over the remaining elements, it has a\nworst-case performance of O(n). If you don’t need the order of elements\nto be preserved, use swap_remove instead. If you’d like to remove\nelements from the beginning of the Vec, consider using\nVecDeque::pop_front instead.

\n
§Panics
\n

Panics if index is out of bounds.

\n
§Examples
\n
let mut v = vec![1, 2, 3];\nassert_eq!(v.remove(1), 2);\nassert_eq!(v, [1, 3]);
\n
1.0.0 · source

pub fn retain<F>(&mut self, f: F)
where\n F: FnMut(&T) -> bool,

Retains only the elements specified by the predicate.

\n

In other words, remove all elements e for which f(&e) returns false.\nThis method operates in place, visiting each element exactly once in the\noriginal order, and preserves the order of the retained elements.

\n
§Examples
\n
let mut vec = vec![1, 2, 3, 4];\nvec.retain(|&x| x % 2 == 0);\nassert_eq!(vec, [2, 4]);
\n

Because the elements are visited exactly once in the original order,\nexternal state may be used to decide which elements to keep.

\n\n
let mut vec = vec![1, 2, 3, 4, 5];\nlet keep = [false, true, true, false, true];\nlet mut iter = keep.iter();\nvec.retain(|_| *iter.next().unwrap());\nassert_eq!(vec, [2, 3, 5]);
\n
1.61.0 · source

pub fn retain_mut<F>(&mut self, f: F)
where\n F: FnMut(&mut T) -> bool,

Retains only the elements specified by the predicate, passing a mutable reference to it.

\n

In other words, remove all elements e such that f(&mut e) returns false.\nThis method operates in place, visiting each element exactly once in the\noriginal order, and preserves the order of the retained elements.

\n
§Examples
\n
let mut vec = vec![1, 2, 3, 4];\nvec.retain_mut(|x| if *x <= 3 {\n    *x += 1;\n    true\n} else {\n    false\n});\nassert_eq!(vec, [2, 3, 4]);
\n
1.16.0 · source

pub fn dedup_by_key<F, K>(&mut self, key: F)
where\n F: FnMut(&mut T) -> K,\n K: PartialEq,

Removes all but the first of consecutive elements in the vector that resolve to the same\nkey.

\n

If the vector is sorted, this removes all duplicates.

\n
§Examples
\n
let mut vec = vec![10, 20, 21, 30, 20];\n\nvec.dedup_by_key(|i| *i / 10);\n\nassert_eq!(vec, [10, 20, 30, 20]);
\n
1.16.0 · source

pub fn dedup_by<F>(&mut self, same_bucket: F)
where\n F: FnMut(&mut T, &mut T) -> bool,

Removes all but the first of consecutive elements in the vector satisfying a given equality\nrelation.

\n

The same_bucket function is passed references to two elements from the vector and\nmust determine if the elements compare equal. The elements are passed in opposite order\nfrom their order in the slice, so if same_bucket(a, b) returns true, a is removed.

\n

If the vector is sorted, this removes all duplicates.

\n
§Examples
\n
let mut vec = vec![\"foo\", \"bar\", \"Bar\", \"baz\", \"bar\"];\n\nvec.dedup_by(|a, b| a.eq_ignore_ascii_case(b));\n\nassert_eq!(vec, [\"foo\", \"bar\", \"baz\", \"bar\"]);
\n
1.0.0 · source

pub fn push(&mut self, value: T)

Appends an element to the back of a collection.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1, 2];\nvec.push(3);\nassert_eq!(vec, [1, 2, 3]);
\n
§Time complexity
\n

Takes amortized O(1) time. If the vector’s length would exceed its\ncapacity after the push, O(capacity) time is taken to copy the\nvector’s elements to a larger allocation. This expensive operation is\noffset by the capacity O(1) insertions it allows.

\n
source

pub fn push_within_capacity(&mut self, value: T) -> Result<(), T>

🔬This is a nightly-only experimental API. (vec_push_within_capacity)

Appends an element if there is sufficient spare capacity, otherwise an error is returned\nwith the element.

\n

Unlike push this method will not reallocate when there’s insufficient capacity.\nThe caller should use reserve or try_reserve to ensure that there is enough capacity.

\n
§Examples
\n

A manual, panic-free alternative to FromIterator:

\n\n
#![feature(vec_push_within_capacity)]\n\nuse std::collections::TryReserveError;\nfn from_iter_fallible<T>(iter: impl Iterator<Item=T>) -> Result<Vec<T>, TryReserveError> {\n    let mut vec = Vec::new();\n    for value in iter {\n        if let Err(value) = vec.push_within_capacity(value) {\n            vec.try_reserve(1)?;\n            // this cannot fail, the previous line either returned or added at least 1 free slot\n            let _ = vec.push_within_capacity(value);\n        }\n    }\n    Ok(vec)\n}\nassert_eq!(from_iter_fallible(0..100), Ok(Vec::from_iter(0..100)));
\n
§Time complexity
\n

Takes O(1) time.

\n
1.0.0 · source

pub fn pop(&mut self) -> Option<T>

Removes the last element from a vector and returns it, or None if it\nis empty.

\n

If you’d like to pop the first element, consider using\nVecDeque::pop_front instead.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nassert_eq!(vec.pop(), Some(3));\nassert_eq!(vec, [1, 2]);
\n
§Time complexity
\n

Takes O(1) time.

\n
source

pub fn pop_if<F>(&mut self, f: F) -> Option<T>
where\n F: FnOnce(&mut T) -> bool,

🔬This is a nightly-only experimental API. (vec_pop_if)

Removes and returns the last element in a vector if the predicate\nreturns true, or None if the predicate returns false or the vector\nis empty.

\n
§Examples
\n
#![feature(vec_pop_if)]\n\nlet mut vec = vec![1, 2, 3, 4];\nlet pred = |x: &mut i32| *x % 2 == 0;\n\nassert_eq!(vec.pop_if(pred), Some(4));\nassert_eq!(vec, [1, 2, 3]);\nassert_eq!(vec.pop_if(pred), None);
\n
1.4.0 · source

pub fn append(&mut self, other: &mut Vec<T, A>)

Moves all the elements of other into self, leaving other empty.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nlet mut vec2 = vec![4, 5, 6];\nvec.append(&mut vec2);\nassert_eq!(vec, [1, 2, 3, 4, 5, 6]);\nassert_eq!(vec2, []);
\n
1.6.0 · source

pub fn drain<R>(&mut self, range: R) -> Drain<'_, T, A>
where\n R: RangeBounds<usize>,

Removes the specified range from the vector in bulk, returning all\nremoved elements as an iterator. If the iterator is dropped before\nbeing fully consumed, it drops the remaining removed elements.

\n

The returned iterator keeps a mutable borrow on the vector to optimize\nits implementation.

\n
§Panics
\n

Panics if the starting point is greater than the end point or if\nthe end point is greater than the length of the vector.

\n
§Leaking
\n

If the returned iterator goes out of scope without being dropped (due to\nmem::forget, for example), the vector may have lost and leaked\nelements arbitrarily, including elements outside the range.

\n
§Examples
\n
let mut v = vec![1, 2, 3];\nlet u: Vec<_> = v.drain(1..).collect();\nassert_eq!(v, &[1]);\nassert_eq!(u, &[2, 3]);\n\n// A full range clears the vector, like `clear()` does\nv.drain(..);\nassert_eq!(v, &[]);
\n
1.0.0 · source

pub fn clear(&mut self)

Clears the vector, removing all values.

\n

Note that this method has no effect on the allocated capacity\nof the vector.

\n
§Examples
\n
let mut v = vec![1, 2, 3];\n\nv.clear();\n\nassert!(v.is_empty());
\n
1.0.0 · source

pub fn len(&self) -> usize

Returns the number of elements in the vector, also referred to\nas its ‘length’.

\n
§Examples
\n
let a = vec![1, 2, 3];\nassert_eq!(a.len(), 3);
\n
1.0.0 · source

pub fn is_empty(&self) -> bool

Returns true if the vector contains no elements.

\n
§Examples
\n
let mut v = Vec::new();\nassert!(v.is_empty());\n\nv.push(1);\nassert!(!v.is_empty());
\n
1.4.0 · source

pub fn split_off(&mut self, at: usize) -> Vec<T, A>
where\n A: Clone,

Splits the collection into two at the given index.

\n

Returns a newly allocated vector containing the elements in the range\n[at, len). After the call, the original vector will be left containing\nthe elements [0, at) with its previous capacity unchanged.

\n
    \n
  • If you want to take ownership of the entire contents and capacity of\nthe vector, see mem::take or mem::replace.
  • \n
  • If you don’t need the returned vector at all, see Vec::truncate.
  • \n
  • If you want to take ownership of an arbitrary subslice, or you don’t\nnecessarily want to store the removed items in a vector, see Vec::drain.
  • \n
\n
§Panics
\n

Panics if at > len.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nlet vec2 = vec.split_off(1);\nassert_eq!(vec, [1]);\nassert_eq!(vec2, [2, 3]);
\n
1.33.0 · source

pub fn resize_with<F>(&mut self, new_len: usize, f: F)
where\n F: FnMut() -> T,

Resizes the Vec in-place so that len is equal to new_len.

\n

If new_len is greater than len, the Vec is extended by the\ndifference, with each additional slot filled with the result of\ncalling the closure f. The return values from f will end up\nin the Vec in the order they have been generated.

\n

If new_len is less than len, the Vec is simply truncated.

\n

This method uses a closure to create new values on every push. If\nyou’d rather Clone a given value, use Vec::resize. If you\nwant to use the Default trait to generate values, you can\npass Default::default as the second argument.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nvec.resize_with(5, Default::default);\nassert_eq!(vec, [1, 2, 3, 0, 0]);\n\nlet mut vec = vec![];\nlet mut p = 1;\nvec.resize_with(4, || { p *= 2; p });\nassert_eq!(vec, [2, 4, 8, 16]);
\n
1.47.0 · source

pub fn leak<'a>(self) -> &'a mut [T]
where\n A: 'a,

Consumes and leaks the Vec, returning a mutable reference to the contents,\n&'a mut [T]. Note that the type T must outlive the chosen lifetime\n'a. If the type has only static references, or none at all, then this\nmay be chosen to be 'static.

\n

As of Rust 1.57, this method does not reallocate or shrink the Vec,\nso the leaked allocation may include unused capacity that is not part\nof the returned slice.

\n

This function is mainly useful for data that lives for the remainder of\nthe program’s life. Dropping the returned reference will cause a memory\nleak.

\n
§Examples
\n

Simple usage:

\n\n
let x = vec![1, 2, 3];\nlet static_ref: &'static mut [usize] = x.leak();\nstatic_ref[0] += 1;\nassert_eq!(static_ref, &[2, 2, 3]);
\n
1.60.0 · source

pub fn spare_capacity_mut(&mut self) -> &mut [MaybeUninit<T>]

Returns the remaining spare capacity of the vector as a slice of\nMaybeUninit<T>.

\n

The returned slice can be used to fill the vector with data (e.g. by\nreading from a file) before marking the data as initialized using the\nset_len method.

\n
§Examples
\n
// Allocate vector big enough for 10 elements.\nlet mut v = Vec::with_capacity(10);\n\n// Fill in the first 3 elements.\nlet uninit = v.spare_capacity_mut();\nuninit[0].write(0);\nuninit[1].write(1);\nuninit[2].write(2);\n\n// Mark the first 3 elements of the vector as being initialized.\nunsafe {\n    v.set_len(3);\n}\n\nassert_eq!(&v, &[0, 1, 2]);
\n
source

pub fn split_at_spare_mut(&mut self) -> (&mut [T], &mut [MaybeUninit<T>])

🔬This is a nightly-only experimental API. (vec_split_at_spare)

Returns vector content as a slice of T, along with the remaining spare\ncapacity of the vector as a slice of MaybeUninit<T>.

\n

The returned spare capacity slice can be used to fill the vector with data\n(e.g. by reading from a file) before marking the data as initialized using\nthe set_len method.

\n

Note that this is a low-level API, which should be used with care for\noptimization purposes. If you need to append data to a Vec\nyou can use push, extend, extend_from_slice,\nextend_from_within, insert, append, resize or\nresize_with, depending on your exact needs.

\n
§Examples
\n
#![feature(vec_split_at_spare)]\n\nlet mut v = vec![1, 1, 2];\n\n// Reserve additional space big enough for 10 elements.\nv.reserve(10);\n\nlet (init, uninit) = v.split_at_spare_mut();\nlet sum = init.iter().copied().sum::<u32>();\n\n// Fill in the next 4 elements.\nuninit[0].write(sum);\nuninit[1].write(sum * 2);\nuninit[2].write(sum * 3);\nuninit[3].write(sum * 4);\n\n// Mark the 4 elements of the vector as being initialized.\nunsafe {\n    let len = v.len();\n    v.set_len(len + 4);\n}\n\nassert_eq!(&v, &[1, 1, 2, 4, 8, 12, 16]);
\n
",0,"redstone::core::aggregator::Matrix"],["
§

impl<Z> Zeroize for Vec<Z>
where\n Z: Zeroize,

§

fn zeroize(&mut self)

“Best effort” zeroization for Vec.

\n

Ensures the entire capacity of the Vec is zeroed. Cannot ensure that\nprevious reallocations did not leave values on the heap.

\n
","Zeroize","redstone::core::aggregator::Matrix"],["
source§

impl<T, A> DerefPure for Vec<T, A>
where\n A: Allocator,

","DerefPure","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Eq for Vec<T, A>
where\n T: Eq,\n A: Allocator,

","Eq","redstone::core::aggregator::Matrix"],["
§

impl<Z> ZeroizeOnDrop for Vec<Z>
where\n Z: ZeroizeOnDrop,

","ZeroizeOnDrop","redstone::core::aggregator::Matrix"]] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/type.impl/redstone/network/casper/struct.Casper.js b/static/rust/redstone/crypto_radix,network_radix/type.impl/redstone/network/casper/struct.Casper.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/type.impl/redstone/network/casper/struct.Casper.js rename to static/rust/redstone/crypto_radix,network_radix/type.impl/redstone/network/casper/struct.Casper.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/type.impl/redstone/network/pure/struct.Std.js b/static/rust/redstone/crypto_radix,network_radix/type.impl/redstone/network/pure/struct.Std.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/type.impl/redstone/network/pure/struct.Std.js rename to static/rust/redstone/crypto_radix,network_radix/type.impl/redstone/network/pure/struct.Std.js diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/type.impl/redstone/network/radix/struct.Radix.js b/static/rust/redstone/crypto_radix,network_radix/type.impl/redstone/network/radix/struct.Radix.js similarity index 91% rename from static/rust/redstone/crypto_secp256k1,network_radix/type.impl/redstone/network/radix/struct.Radix.js rename to static/rust/redstone/crypto_radix,network_radix/type.impl/redstone/network/radix/struct.Radix.js index f8bbe727..4f21ebab 100644 --- a/static/rust/redstone/crypto_secp256k1,network_radix/type.impl/redstone/network/radix/struct.Radix.js +++ b/static/rust/redstone/crypto_radix,network_radix/type.impl/redstone/network/radix/struct.Radix.js @@ -1,3 +1,3 @@ (function() {var type_impls = { -"redstone":[["
source§

impl NetworkSpecific for Radix

§

type BytesRepr = Vec<u8>

§

type ValueRepr = U256

§

type _Self = Radix

source§

const VALUE_SIZE: usize = 32usize

source§

fn print(_text: String)

source§

fn revert(error: Error) -> !

","NetworkSpecific","redstone::network::_Network"]] +"redstone":[["
source§

impl NetworkSpecific for Radix

§

type BytesRepr = Vec<u8>

§

type ValueRepr = U256

§

type _Self = Radix

source§

const VALUE_SIZE: usize = 32usize

source§

fn print(_text: String)

source§

fn revert(error: Error) -> !

","NetworkSpecific","redstone::network::_Network"]] };if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/type.impl/redstone/network/type._Network.js b/static/rust/redstone/crypto_radix,network_radix/type.impl/redstone/network/type._Network.js similarity index 100% rename from static/rust/redstone/crypto_secp256k1,network_radix/type.impl/redstone/network/type._Network.js rename to static/rust/redstone/crypto_radix,network_radix/type.impl/redstone/network/type._Network.js diff --git a/static/rust/redstone/crypto_radix,network_radix/type.impl/std/primitive.array.js b/static/rust/redstone/crypto_radix,network_radix/type.impl/std/primitive.array.js new file mode 100644 index 00000000..53f96772 --- /dev/null +++ b/static/rust/redstone/crypto_radix,network_radix/type.impl/std/primitive.array.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"redstone":[] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/help.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/help.html index f173d86a..616df0e4 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/help.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/help.html @@ -1 +1 @@ -Help

Rustdoc help

Back
\ No newline at end of file +Help

Rustdoc help

Back
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/all.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/all.html index d76b13f5..2bdc6695 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/all.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/all.html @@ -1 +1 @@ -List of all items in this crate

List of all items

Structs

Enums

Traits

Macros

Functions

Type Aliases

Constants

\ No newline at end of file +List of all items in this crate

List of all items

Structs

Enums

Traits

Macros

Functions

Type Aliases

Constants

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/aggregator/fn.aggregate_matrix.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/aggregator/fn.aggregate_matrix.html index 0792edbc..218d36be 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/aggregator/fn.aggregate_matrix.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/aggregator/fn.aggregate_matrix.html @@ -1 +1 @@ -aggregate_matrix in redstone::core::aggregator - Rust

Function redstone::core::aggregator::aggregate_matrix

source ·
fn aggregate_matrix(matrix: Vec<Vec<Option<U256>>>, config: Config) -> Vec<U256>
\ No newline at end of file +aggregate_matrix in redstone::core::aggregator - Rust

Function redstone::core::aggregator::aggregate_matrix

source ·
fn aggregate_matrix(matrix: Vec<Vec<Option<U256>>>, config: Config) -> Vec<U256>
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/aggregator/fn.aggregate_values.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/aggregator/fn.aggregate_values.html index 15726f8e..56391872 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/aggregator/fn.aggregate_values.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/aggregator/fn.aggregate_values.html @@ -1,7 +1,7 @@ -aggregate_values in redstone::core::aggregator - Rust

Function redstone::core::aggregator::aggregate_values

source ·
pub(crate) fn aggregate_values(
+aggregate_values in redstone::core::aggregator - Rust

Function redstone::core::aggregator::aggregate_values

source ·
pub(crate) fn aggregate_values(
     config: Config,
-    data_packages: Vec<DataPackage>,
-) -> Vec<U256>
Expand description

Aggregates values from a collection of data packages according to the provided configuration.

+ data_packages: Vec<DataPackage>, +) -> Vec<U256>
Expand description

Aggregates values from a collection of data packages according to the provided configuration.

This function takes a configuration and a vector of data packages, constructs a matrix of values and their corresponding signers, and then aggregates these values based on the aggregation logic defined in the provided configuration. The aggregation strategy could vary, for example, by taking diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/aggregator/fn.make_value_signer_matrix.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/aggregator/fn.make_value_signer_matrix.html index f3dc8819..f3c03b87 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/aggregator/fn.make_value_signer_matrix.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/aggregator/fn.make_value_signer_matrix.html @@ -1,4 +1,4 @@ -make_value_signer_matrix in redstone::core::aggregator - Rust

Function redstone::core::aggregator::make_value_signer_matrix

source ·
fn make_value_signer_matrix(
+make_value_signer_matrix in redstone::core::aggregator - Rust

Function redstone::core::aggregator::make_value_signer_matrix

source ·
fn make_value_signer_matrix(
     config: &Config,
-    data_packages: Vec<DataPackage>,
-) -> Vec<Vec<Option<U256>>>
\ No newline at end of file + data_packages: Vec<DataPackage>, +) -> Vec<Vec<Option<U256>>>
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/aggregator/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/aggregator/index.html index 7aa39374..d9b656ee 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/aggregator/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/aggregator/index.html @@ -1 +1 @@ -redstone::core::aggregator - Rust

Module redstone::core::aggregator

source ·

Functions§

Type Aliases§

\ No newline at end of file +redstone::core::aggregator - Rust

Module redstone::core::aggregator

source ·

Functions§

Type Aliases§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/aggregator/type.Matrix.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/aggregator/type.Matrix.html index 61c3f974..5fadd5eb 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/aggregator/type.Matrix.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/aggregator/type.Matrix.html @@ -1 +1 @@ -Matrix in redstone::core::aggregator - Rust

Type Alias redstone::core::aggregator::Matrix

source ·
type Matrix = Vec<Vec<Option<U256>>>;

Aliased Type§

struct Matrix { /* private fields */ }
\ No newline at end of file +Matrix in redstone::core::aggregator - Rust

Type Alias redstone::core::aggregator::Matrix

source ·
type Matrix = Vec<Vec<Option<U256>>>;

Aliased Type§

struct Matrix { /* private fields */ }
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/config/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/config/index.html index 32a77abc..5badc729 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/config/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/config/index.html @@ -1 +1 @@ -redstone::core::config - Rust

Module redstone::core::config

source ·

Structs§

  • Configuration for a RedStone payload processor.
\ No newline at end of file +redstone::core::config - Rust

Module redstone::core::config

source ·

Structs§

  • Configuration for a RedStone payload processor.
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/config/struct.Config.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/config/struct.Config.html index 5f859175..f80ce0c8 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/config/struct.Config.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/config/struct.Config.html @@ -1,38 +1,38 @@ -Config in redstone::core::config - Rust

Struct redstone::core::config::Config

source ·
pub struct Config {
-    pub signer_count_threshold: u8,
-    pub signers: Vec<Bytes>,
-    pub feed_ids: Vec<U256>,
-    pub block_timestamp: u64,
+Config in redstone::core::config - Rust

Struct redstone::core::config::Config

source ·
pub struct Config {
+    pub signer_count_threshold: u8,
+    pub signers: Vec<Bytes>,
+    pub feed_ids: Vec<U256>,
+    pub block_timestamp: u64,
 }
Expand description

Configuration for a RedStone payload processor.

Specifies the parameters necessary for the verification and aggregation of values from various data points passed by the RedStone payload.

-

Fields§

§signer_count_threshold: u8

The minimum number of signers required validating the data.

+

Fields§

§signer_count_threshold: u8

The minimum number of signers required validating the data.

Specifies how many unique signers (from different addresses) are required for the data to be considered valid and trustworthy.

-
§signers: Vec<Bytes>

List of identifiers for signers authorized to sign the data.

+
§signers: Vec<Bytes>

List of identifiers for signers authorized to sign the data.

Each signer is identified by a unique, network-specific byte string (Bytes), which represents their address.

-
§feed_ids: Vec<U256>

Identifiers for the data feeds from which values are aggregated.

+
§feed_ids: Vec<U256>

Identifiers for the data feeds from which values are aggregated.

Each data feed id is represented by the network-specific U256 type.

-
§block_timestamp: u64

The current block time in timestamp format, used for verifying data timeliness.

+
§block_timestamp: u64

The current block time in timestamp format, used for verifying data timeliness.

The value’s been expressed in milliseconds since the Unix epoch (January 1, 1970) and allows for determining whether the data is current in the context of blockchain time.

-

Trait Implementations§

source§

impl Debug for Config

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Validator for Config

source§

fn feed_index(&self, feed_id: U256) -> Option<usize>

Retrieves the index of a given data feed. Read more
source§

fn signer_index(&self, signer: &[u8]) -> Option<usize>

Retrieves the index of a given signer. Read more
source§

fn validate_signer_count_threshold( +

Trait Implementations§

source§

impl Debug for Config

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Validator for Config

source§

fn feed_index(&self, feed_id: U256) -> Option<usize>

Retrieves the index of a given data feed. Read more
source§

fn signer_index(&self, signer: &[u8]) -> Option<usize>

Retrieves the index of a given signer. Read more
source§

fn validate_signer_count_threshold( &self, - index: usize, - values: &[Option<U256>], -) -> Vec<U256>

Validates the signer count threshold for a given index within a set of values. Read more
source§

fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64

Validates the timestamp for a given index. Read more

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

Blanket Implementations§

source§

impl<T> Any for T
where - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where - T: Debug, - F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where - E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for T
where - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+ index: usize, + values: &[Option<U256>], +) -> Vec<U256>
Validates the signer count threshold for a given index within a set of values. Read more
source§

fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64

Validates the timestamp for a given index. Read more

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where + T: Debug, + F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where + E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where +From<T> for U chooses to do.

+

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/index.html index e427a2e8..e5c1246b 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/index.html @@ -1 +1 @@ -redstone::core - Rust

Module redstone::core

source ·

Modules§

\ No newline at end of file +redstone::core - Rust

Module redstone::core

source ·

Modules§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/processor/fn.make_processor_result.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/processor/fn.make_processor_result.html index d15046f1..33203759 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/processor/fn.make_processor_result.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/processor/fn.make_processor_result.html @@ -1 +1 @@ -make_processor_result in redstone::core::processor - Rust

Function redstone::core::processor::make_processor_result

source ·
fn make_processor_result(config: Config, payload: Payload) -> ProcessorResult
\ No newline at end of file +make_processor_result in redstone::core::processor - Rust

Function redstone::core::processor::make_processor_result

source ·
fn make_processor_result(config: Config, payload: Payload) -> ProcessorResult
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/processor/fn.process_payload.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/processor/fn.process_payload.html index b1ad0b84..6a5eb34e 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/processor/fn.process_payload.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/processor/fn.process_payload.html @@ -1,4 +1,4 @@ -process_payload in redstone::core::processor - Rust

Function redstone::core::processor::process_payload

source ·
pub fn process_payload(config: Config, payload_bytes: Bytes) -> ProcessorResult
Expand description

The main processor of the RedStone payload.

+process_payload in redstone::core::processor - Rust

Function redstone::core::processor::process_payload

source ·
pub fn process_payload(config: Config, payload_bytes: Bytes) -> ProcessorResult
Expand description

The main processor of the RedStone payload.

§Arguments

  • config - Configuration of the payload processing.
  • diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/processor/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/processor/index.html index ccd25006..5b72173e 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/processor/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/processor/index.html @@ -1 +1 @@ -redstone::core::processor - Rust

    Module redstone::core::processor

    source ·

    Functions§

    \ No newline at end of file +redstone::core::processor - Rust

    Module redstone::core::processor

    source ·

    Functions§

    \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/processor_result/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/processor_result/index.html index 52eaf103..fb6292fd 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/processor_result/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/processor_result/index.html @@ -1 +1 @@ -redstone::core::processor_result - Rust

    Module redstone::core::processor_result

    source ·

    Structs§

    \ No newline at end of file +redstone::core::processor_result - Rust

    Module redstone::core::processor_result

    source ·

    Structs§

    \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/processor_result/struct.ProcessorResult.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/processor_result/struct.ProcessorResult.html index 788c8b93..7c37d7b6 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/processor_result/struct.ProcessorResult.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/processor_result/struct.ProcessorResult.html @@ -1,29 +1,29 @@ -ProcessorResult in redstone::core::processor_result - Rust

    Struct redstone::core::processor_result::ProcessorResult

    source ·
    pub struct ProcessorResult {
    -    pub min_timestamp: u64,
    -    pub values: Vec<U256>,
    +ProcessorResult in redstone::core::processor_result - Rust

    Struct redstone::core::processor_result::ProcessorResult

    source ·
    pub struct ProcessorResult {
    +    pub min_timestamp: u64,
    +    pub values: Vec<U256>,
     }
    Expand description

    Represents the result of processing the RedStone payload.

    This structure is used to encapsulate the outcome of a RedStone payload processing operation, particularly focusing on time-sensitive data and its associated values, according to the Config.

    -

    Fields§

    §min_timestamp: u64

    The minimum timestamp encountered during processing.

    +

Fields§

§min_timestamp: u64

The minimum timestamp encountered during processing.

This field captures the earliest time point (in milliseconds since the Unix epoch) among the processed data packages, indicating the starting boundary of the dataset’s time range.

-
§values: Vec<U256>

A collection of values processed during the operation.

+
§values: Vec<U256>

A collection of values processed during the operation.

Each element in this vector represents a processed value corresponding to the passed data_feed item in the Config.

-

Trait Implementations§

source§

impl Debug for ProcessorResult

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<ProcessorResult> for (u64, Vec<U256>)

source§

fn from(result: ProcessorResult) -> Self

Converts to this type from the input type.
source§

impl PartialEq for ProcessorResult

source§

fn eq(&self, other: &ProcessorResult) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Eq for ProcessorResult

source§

impl StructuralPartialEq for ProcessorResult

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where - T: Debug, - F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where - E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for T
where - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

source§

impl Debug for ProcessorResult

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<ProcessorResult> for (u64, Vec<U256>)

source§

fn from(result: ProcessorResult) -> Self

Converts to this type from the input type.
source§

impl PartialEq for ProcessorResult

source§

fn eq(&self, other: &ProcessorResult) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for ProcessorResult

source§

impl StructuralPartialEq for ProcessorResult

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where + T: Debug, + F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where + E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where +From<T> for U chooses to do.

+

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/validator/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/validator/index.html index 141d82cd..63c305f0 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/validator/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/validator/index.html @@ -1 +1 @@ -redstone::core::validator - Rust

Module redstone::core::validator

source ·

Traits§

  • Validator 🔒
    A trait defining validation operations for data feeds and signers.
\ No newline at end of file +redstone::core::validator - Rust

Module redstone::core::validator

source ·

Traits§

  • Validator 🔒
    A trait defining validation operations for data feeds and signers.
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/validator/trait.Validator.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/validator/trait.Validator.html index ffbec709..4ad4fa99 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/validator/trait.Validator.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/validator/trait.Validator.html @@ -1,19 +1,19 @@ -Validator in redstone::core::validator - Rust

Trait redstone::core::validator::Validator

source ·
pub(crate) trait Validator {
+Validator in redstone::core::validator - Rust

Trait redstone::core::validator::Validator

source ·
pub(crate) trait Validator {
     // Required methods
-    fn feed_index(&self, feed_id: U256) -> Option<usize>;
-    fn signer_index(&self, signer: &[u8]) -> Option<usize>;
+    fn feed_index(&self, feed_id: U256) -> Option<usize>;
+    fn signer_index(&self, signer: &[u8]) -> Option<usize>;
     fn validate_signer_count_threshold(
         &self,
-        index: usize,
-        values: &[Option<U256>],
-    ) -> Vec<U256>;
-    fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64;
+        index: usize,
+        values: &[Option<U256>],
+    ) -> Vec<U256>;
+    fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64;
 }
Expand description

A trait defining validation operations for data feeds and signers.

This trait specifies methods for validating aspects of data feeds and signers within a system that requires data integrity and authenticity checks. Implementations of this trait are responsible for defining the logic behind each validation step, ensuring that data conforms to expected rules and conditions.

-

Required Methods§

source

fn feed_index(&self, feed_id: U256) -> Option<usize>

Retrieves the index of a given data feed.

+

Required Methods§

source

fn feed_index(&self, feed_id: U256) -> Option<usize>

Retrieves the index of a given data feed.

This method takes a feed_id representing the unique identifier of a data feed and returns an Option<usize> indicating the index of the feed within a collection of feeds. If the feed does not exist, None is returned.

@@ -25,7 +25,7 @@
§Returns
  • Option<usize> - The index of the feed if it exists, or None if it does not.
-
source

fn signer_index(&self, signer: &[u8]) -> Option<usize>

Retrieves the index of a given signer.

+
source

fn signer_index(&self, signer: &[u8]) -> Option<usize>

Retrieves the index of a given signer.

This method accepts a signer identifier in the form of a byte slice and returns an Option<usize> indicating the signer’s index within a collection of signers. If the signer is not found, None is returned.

@@ -39,9 +39,9 @@
§Returns
source

fn validate_signer_count_threshold( &self, - index: usize, - values: &[Option<U256>], -) -> Vec<U256>

Validates the signer count threshold for a given index within a set of values.

+ index: usize, + values: &[Option<U256>], +) -> Vec<U256>

Validates the signer count threshold for a given index within a set of values.

This method is responsible for ensuring that the number of valid signers meets or exceeds a specified threshold necessary for a set of data values to be considered valid. It returns a vector of U256 if the values pass the validation, to be processed in other steps.

@@ -54,7 +54,7 @@
§Returns
  • Vec<U256> - A vector of U256 values that meet the validation criteria.
-
source

fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64

Validates the timestamp for a given index.

+
source

fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64

Validates the timestamp for a given index.

This method checks whether a timestamp associated with a data value at a given index meets specific conditions (e.g., being within an acceptable time range). It returns the validated timestamp if it’s valid, to be processed in other steps.

diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/index.html index 541ea6ec..47b354db 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/index.html @@ -1 +1 @@ -redstone::crypto - Rust

Module redstone::crypto

source ·

Modules§

\ No newline at end of file +redstone::crypto - Rust

Module redstone::crypto

source ·

Modules§

Type Aliases§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/keccak256/fn.keccak256.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/keccak256/fn.keccak256.html index 2665643a..63420eda 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/keccak256/fn.keccak256.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/keccak256/fn.keccak256.html @@ -1 +1 @@ -keccak256 in redstone::crypto::keccak256 - Rust

Function redstone::crypto::keccak256::keccak256

source ·
pub fn keccak256(data: &[u8]) -> Box<[u8]>
\ No newline at end of file +keccak256 in redstone::crypto::keccak256 - Rust

Function redstone::crypto::keccak256::keccak256

source ·
pub fn keccak256(data: &[u8]) -> [u8; 32]
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/keccak256/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/keccak256/index.html index 96fe770a..e0b65a28 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/keccak256/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/keccak256/index.html @@ -1 +1 @@ -redstone::crypto::keccak256 - Rust

Module redstone::crypto::keccak256

source ·

Functions§

\ No newline at end of file +redstone::crypto::keccak256 - Rust

Module redstone::crypto::keccak256

source ·

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/recover/crypto256/fn.recover_public_key.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/recover/crypto256/fn.recover_public_key.html index ba2beac0..039b3003 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/recover/crypto256/fn.recover_public_key.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/recover/crypto256/fn.recover_public_key.html @@ -1,5 +1,5 @@ -recover_public_key in redstone::crypto::recover::crypto256 - Rust

Function redstone::crypto::recover::crypto256::recover_public_key

source ·
pub(crate) fn recover_public_key(
-    message_hash: Box<[u8]>,
-    signature_bytes: &[u8],
-    recovery_byte: u8,
-) -> Box<[u8]>
\ No newline at end of file +recover_public_key in redstone::crypto::recover::crypto256 - Rust

Function redstone::crypto::recover::crypto256::recover_public_key

source ·
pub(crate) fn recover_public_key(
+    message_hash: [u8; 32],
+    signature_bytes: [u8; 64],
+    recovery_byte: u8,
+) -> [u8; 65]
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/recover/crypto256/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/recover/crypto256/index.html index b5563f5f..1abee86b 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/recover/crypto256/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/recover/crypto256/index.html @@ -1 +1 @@ -redstone::crypto::recover::crypto256 - Rust

Module redstone::crypto::recover::crypto256

source ·

Functions§

\ No newline at end of file +redstone::crypto::recover::crypto256 - Rust

Module redstone::crypto::recover::crypto256

source ·

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/recover/fn.recover_address.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/recover/fn.recover_address.html index aba3bde0..c38049cf 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/recover/fn.recover_address.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/recover/fn.recover_address.html @@ -1 +1 @@ -recover_address in redstone::crypto::recover - Rust

Function redstone::crypto::recover::recover_address

source ·
pub fn recover_address(message: Vec<u8>, signature: Vec<u8>) -> Vec<u8> 
\ No newline at end of file +recover_address in redstone::crypto::recover - Rust

Function redstone::crypto::recover::recover_address

source ·
pub fn recover_address(message: Vec<u8>, signature: Vec<u8>) -> Vec<u8> 
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/recover/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/recover/index.html index e7703e69..6165a1e8 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/recover/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/recover/index.html @@ -1 +1 @@ -redstone::crypto::recover - Rust

Module redstone::crypto::recover

source ·

Modules§

Functions§

\ No newline at end of file +redstone::crypto::recover - Rust

Module redstone::crypto::recover

source ·

Modules§

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/sidebar-items.js index 521fe7cb..41e67b75 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/sidebar-items.js +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"mod":["keccak256","recover"]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"mod":["keccak256","recover"],"type":["EcdsaUncompressedPublicKey","Keccak256Hash","Secp256SigRs"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/type.EcdsaUncompressedPublicKey.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/type.EcdsaUncompressedPublicKey.html new file mode 100644 index 00000000..5b852c97 --- /dev/null +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/type.EcdsaUncompressedPublicKey.html @@ -0,0 +1 @@ +EcdsaUncompressedPublicKey in redstone::crypto - Rust

Type Alias redstone::crypto::EcdsaUncompressedPublicKey

source ·
pub(crate) type EcdsaUncompressedPublicKey = [u8; 65];
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/type.Keccak256Hash.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/type.Keccak256Hash.html new file mode 100644 index 00000000..2f59bdeb --- /dev/null +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/type.Keccak256Hash.html @@ -0,0 +1 @@ +Keccak256Hash in redstone::crypto - Rust

Type Alias redstone::crypto::Keccak256Hash

source ·
pub(crate) type Keccak256Hash = [u8; 32];
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/type.Secp256SigRs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/type.Secp256SigRs.html new file mode 100644 index 00000000..cbead115 --- /dev/null +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/type.Secp256SigRs.html @@ -0,0 +1 @@ +Secp256SigRs in redstone::crypto - Rust

Type Alias redstone::crypto::Secp256SigRs

source ·
pub(crate) type Secp256SigRs = [u8; 64];
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/index.html index ab2ae7f0..1c83a111 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/index.html @@ -1,6 +1,6 @@ -redstone - Rust

Crate redstone

source ·
Expand description

§RedStone

+redstone - Rust

Crate redstone

source ·
Expand description

§RedStone

redstone is a collection of utilities to make deserializing&decrypting RedStone payload. -It contains a pure Rust implementation and also an extension for some networks.

+It includes a pure Rust implementation, along with extensions for certain networks.

Different crypto-mechanisms are easily injectable. The current implementation contains secp256k1- and k256-based variants.

Modules§

Macros§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/macro.print_and_panic.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/macro.print_and_panic.html index b308eb68..468e62fc 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/macro.print_and_panic.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/macro.print_and_panic.html @@ -1,4 +1,4 @@ -print_and_panic in redstone - Rust

Macro redstone::print_and_panic

source ·
macro_rules! print_and_panic {
+print_and_panic in redstone - Rust

Macro redstone::print_and_panic

source ·
macro_rules! print_and_panic {
     ($fmt:expr) => { ... };
     ($fmt:expr, $($args:tt)*) => { ... };
 }
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/macro.print_debug.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/macro.print_debug.html index 3cb863d6..a8847b09 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/macro.print_debug.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/macro.print_debug.html @@ -1,4 +1,4 @@ -print_debug in redstone - Rust

Macro redstone::print_debug

source ·
macro_rules! print_debug {
+print_debug in redstone - Rust

Macro redstone::print_debug

source ·
macro_rules! print_debug {
     ($fmt:expr) => { ... };
     ($fmt:expr, $($args:tt)*) => { ... };
 }
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/as_str/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/as_str/index.html index 9f63a8ad..05ce8ab0 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/as_str/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/as_str/index.html @@ -1 +1 @@ -redstone::network::as_str - Rust

Module redstone::network::as_str

source ·

Traits§

\ No newline at end of file +redstone::network::as_str - Rust

Module redstone::network::as_str

source ·

Traits§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/as_str/trait.AsAsciiStr.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/as_str/trait.AsAsciiStr.html index 8fa29f1c..1638cd12 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/as_str/trait.AsAsciiStr.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/as_str/trait.AsAsciiStr.html @@ -1,4 +1,4 @@ -AsAsciiStr in redstone::network::as_str - Rust

Trait redstone::network::as_str::AsAsciiStr

source ·
pub trait AsAsciiStr {
+AsAsciiStr in redstone::network::as_str - Rust

Trait redstone::network::as_str::AsAsciiStr

source ·
pub trait AsAsciiStr {
     // Required method
-    fn as_ascii_str(&self) -> String;
-}

Required Methods§

Implementations on Foreign Types§

source§

impl AsAsciiStr for &[u8]

source§

impl AsAsciiStr for Vec<u8>

source§

impl AsAsciiStr for Bytes

Implementors§

\ No newline at end of file + fn as_ascii_str(&self) -> String; +}

Required Methods§

Implementations on Foreign Types§

source§

impl AsAsciiStr for &[u8]

source§

impl AsAsciiStr for Vec<u8>

source§

impl AsAsciiStr for Bytes

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/as_str/trait.AsHexStr.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/as_str/trait.AsHexStr.html index 8c78b5e1..6d3a5b52 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/as_str/trait.AsHexStr.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/as_str/trait.AsHexStr.html @@ -1,4 +1,4 @@ -AsHexStr in redstone::network::as_str - Rust

Trait redstone::network::as_str::AsHexStr

source ·
pub trait AsHexStr {
+AsHexStr in redstone::network::as_str - Rust

Trait redstone::network::as_str::AsHexStr

source ·
pub trait AsHexStr {
     // Required method
-    fn as_hex_str(&self) -> String;
-}

Required Methods§

Implementations on Foreign Types§

source§

impl AsHexStr for &[u8]

source§

impl AsHexStr for Box<[u8]>

source§

impl AsHexStr for Vec<u8>

source§

impl AsHexStr for Bytes

Implementors§

\ No newline at end of file + fn as_hex_str(&self) -> String; +}

Required Methods§

Implementations on Foreign Types§

source§

impl AsHexStr for &[u8]

source§

impl AsHexStr for Box<[u8]>

source§

impl AsHexStr for Vec<u8>

source§

impl AsHexStr for Bytes

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/assert/fn.assert_or_revert.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/assert/fn.assert_or_revert.html index 13078112..1c579f09 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/assert/fn.assert_or_revert.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/assert/fn.assert_or_revert.html @@ -1,7 +1,7 @@ -assert_or_revert in redstone::network::assert - Rust

Function redstone::network::assert::assert_or_revert

source ·
fn assert_or_revert<F, T, E: FnOnce(&T) -> Error>(
+assert_or_revert in redstone::network::assert - Rust

Function redstone::network::assert::assert_or_revert

source ·
fn assert_or_revert<F, T, E: FnOnce(&T) -> Error>(
     arg: T,
     check: F,
     error: E,
 ) -> T
where - F: Fn(&T) -> bool, - T: Debug,
\ No newline at end of file + F: Fn(&T) -> bool, + T: Debug,
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/assert/fn.assert_or_revert_bool_with.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/assert/fn.assert_or_revert_bool_with.html index 385fc71e..7fd4c914 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/assert/fn.assert_or_revert_bool_with.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/assert/fn.assert_or_revert_bool_with.html @@ -1 +1 @@ -assert_or_revert_bool_with in redstone::network::assert - Rust

Function redstone::network::assert::assert_or_revert_bool_with

source ·
fn assert_or_revert_bool_with<E: FnOnce() -> Error>(check: bool, error: E)
\ No newline at end of file +assert_or_revert_bool_with in redstone::network::assert - Rust

Function redstone::network::assert::assert_or_revert_bool_with

source ·
fn assert_or_revert_bool_with<E: FnOnce() -> Error>(check: bool, error: E)
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/assert/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/assert/index.html index 680c61a9..a573fd72 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/assert/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/assert/index.html @@ -1 +1 @@ -redstone::network::assert - Rust

Module redstone::network::assert

source ·

Traits§

Functions§

\ No newline at end of file +redstone::network::assert - Rust

Module redstone::network::assert

source ·

Traits§

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/assert/trait.Assert.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/assert/trait.Assert.html index e068a406..0a3d27da 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/assert/trait.Assert.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/assert/trait.Assert.html @@ -1,6 +1,6 @@ -Assert in redstone::network::assert - Rust

Trait redstone::network::assert::Assert

source ·
pub trait Assert<F> {
+Assert in redstone::network::assert - Rust

Trait redstone::network::assert::Assert

source ·
pub trait Assert<F> {
     // Required method
-    fn assert_or_revert<E: Fn(&Self) -> Error>(self, check: F, error: E) -> Self;
-}

Required Methods§

source

fn assert_or_revert<E: Fn(&Self) -> Error>(self, check: F, error: E) -> Self

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T, F> Assert<F> for T
where - T: Debug, - F: Fn(&Self) -> bool,

\ No newline at end of file + fn assert_or_revert<E: Fn(&Self) -> Error>(self, check: F, error: E) -> Self; +}

Required Methods§

source

fn assert_or_revert<E: Fn(&Self) -> Error>(self, check: F, error: E) -> Self

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T, F> Assert<F> for T
where + T: Debug, + F: Fn(&Self) -> bool,

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/assert/trait.Unwrap.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/assert/trait.Unwrap.html index db1ea7bc..b995f4cd 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/assert/trait.Unwrap.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/assert/trait.Unwrap.html @@ -1,9 +1,9 @@ -Unwrap in redstone::network::assert - Rust

Trait redstone::network::assert::Unwrap

source ·
pub trait Unwrap<R> {
+Unwrap in redstone::network::assert - Rust

Trait redstone::network::assert::Unwrap

source ·
pub trait Unwrap<R> {
     type ErrorArg;
 
     // Required method
-    fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> R;
-}

Required Associated Types§

Required Methods§

source

fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> R

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T> Unwrap<T> for Option<T>
where - T: Debug,

§

type ErrorArg = ()

source§

fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> T

source§

impl<T, Err> Unwrap<T> for Result<T, Err>
where - T: Debug, - Err: Debug,

§

type ErrorArg = Err

source§

fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> T

Implementors§

\ No newline at end of file + fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> R; +}

Required Associated Types§

Required Methods§

source

fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> R

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T> Unwrap<T> for Option<T>
where + T: Debug,

§

type ErrorArg = ()

source§

fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> T

source§

impl<T, Err> Unwrap<T> for Result<T, Err>
where + T: Debug, + Err: Debug,

§

type ErrorArg = Err

source§

fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> T

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/casper/error/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/casper/error/index.html index 6501c970..d05a628e 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/casper/error/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/casper/error/index.html @@ -1 +1 @@ -redstone::network::casper::error - Rust

Module redstone::network::casper::error

source ·
\ No newline at end of file +redstone::network::casper::error - Rust

Module redstone::network::casper::error

source ·
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/casper/from_bytes_repr/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/casper/from_bytes_repr/index.html index 5cefed58..13121774 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/casper/from_bytes_repr/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/casper/from_bytes_repr/index.html @@ -1 +1 @@ -redstone::network::casper::from_bytes_repr - Rust

Module redstone::network::casper::from_bytes_repr

source ·
\ No newline at end of file +redstone::network::casper::from_bytes_repr - Rust

Module redstone::network::casper::from_bytes_repr

source ·
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/casper/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/casper/index.html index f585fe38..d0e84651 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/casper/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/casper/index.html @@ -1 +1 @@ -redstone::network::casper - Rust

Module redstone::network::casper

source ·

Modules§

Structs§

\ No newline at end of file +redstone::network::casper - Rust

Module redstone::network::casper

source ·

Modules§

Structs§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/casper/struct.Casper.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/casper/struct.Casper.html index a52d09e8..52414550 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/casper/struct.Casper.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/casper/struct.Casper.html @@ -1,12 +1,12 @@ -Casper in redstone::network::casper - Rust

Struct redstone::network::casper::Casper

source ·
pub struct Casper;

Trait Implementations§

Auto Trait Implementations§

§

impl Freeze for Casper

§

impl RefUnwindSafe for Casper

§

impl Send for Casper

§

impl Sync for Casper

§

impl Unpin for Casper

§

impl UnwindSafe for Casper

Blanket Implementations§

source§

impl<T> Any for T
where - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for T
where - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+Casper in redstone::network::casper - Rust

Struct redstone::network::casper::Casper

source ·
pub struct Casper;

Trait Implementations§

Auto Trait Implementations§

§

impl Freeze for Casper

§

impl RefUnwindSafe for Casper

§

impl Send for Casper

§

impl Sync for Casper

§

impl Unpin for Casper

§

impl UnwindSafe for Casper

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where +From<T> for U chooses to do.

+

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/error/enum.Error.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/error/enum.Error.html index b0d0096c..74065a53 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/error/enum.Error.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/error/enum.Error.html @@ -1,19 +1,19 @@ -Error in redstone::network::error - Rust

Enum redstone::network::error::Error

source ·
pub enum Error {
-    ContractError(Box<dyn ContractErrorContent>),
+Error in redstone::network::error - Rust

Enum redstone::network::error::Error

source ·
pub enum Error {
+    ContractError(Box<dyn ContractErrorContent>),
     NumberOverflow(U256),
     ArrayIsEmpty,
-    CryptographicError(usize),
-    SizeNotSupported(usize),
-    WrongRedStoneMarker(Vec<u8>),
-    NonEmptyPayloadRemainder(Vec<u8>),
-    InsufficientSignerCount(usize, usize, U256),
-    TimestampTooOld(usize, u64),
-    TimestampTooFuture(usize, u64),
-    ClonedContractError(u8, String),
+    CryptographicError(usize),
+    SizeNotSupported(usize),
+    WrongRedStoneMarker(Vec<u8>),
+    NonEmptyPayloadRemainder(Vec<u8>),
+    InsufficientSignerCount(usize, usize, U256),
+    TimestampTooOld(usize, u64),
+    TimestampTooFuture(usize, u64),
+    ClonedContractError(u8, String),
 }
Expand description

Errors that can be encountered in the deserializing&decrypting the RedStone payload or just contract execution process.

These errors include issues with contract logic, data types, cryptographic operations, and conditions specific to the requirements.

-

Variants§

§

ContractError(Box<dyn ContractErrorContent>)

Represents errors that arise from the contract itself.

+

Variants§

§

ContractError(Box<dyn ContractErrorContent>)

Represents errors that arise from the contract itself.

This variant is used for encapsulating errors that are specific to the contract’s logic or execution conditions that aren’t covered by more specific error types.

§

NumberOverflow(U256)

Indicates an overflow error with U256 numbers.

@@ -22,44 +22,45 @@
§

ArrayIsEmpty

Used when an expected non-empty array or vector is found to be empty.

This could occur in scenarios where the contract logic requires a non-empty collection of items for the correct operation, for example, during aggregating the values.

-
§

CryptographicError(usize)

Represents errors related to cryptographic operations.

+
§

CryptographicError(usize)

Represents errors related to cryptographic operations.

This includes failures in signature verification, hashing, or other cryptographic processes, with the usize indicating the position or identifier of the failed operation.

-
§

SizeNotSupported(usize)

Signifies that an unsupported size was encountered.

+
§

SizeNotSupported(usize)

Signifies that an unsupported size was encountered.

This could be used when a data structure or input does not meet the expected size requirements for processing.

-
§

WrongRedStoneMarker(Vec<u8>)

Indicates that the marker bytes for RedStone are incorrect.

+
§

WrongRedStoneMarker(Vec<u8>)

Indicates that the marker bytes for RedStone are incorrect.

This error is specific to scenarios where marker or identifier bytes do not match expected values, potentially indicating corrupted or tampered data.

-
§

NonEmptyPayloadRemainder(Vec<u8>)

Used when there is leftover data in a payload that should have been empty.

+
§

NonEmptyPayloadRemainder(Vec<u8>)

Used when there is leftover data in a payload that should have been empty.

This could indicate an error in data parsing or that additional, unexpected data was included in a message or transaction.

-
§

InsufficientSignerCount(usize, usize, U256)

Indicates that the number of signers does not meet the required threshold.

+
§

InsufficientSignerCount(usize, usize, U256)

Indicates that the number of signers does not meet the required threshold.

This variant includes the current number of signers, the required threshold, and potentially a feed_id related to the operation that failed due to insufficient signers.

-
§

TimestampTooOld(usize, u64)

Used when a timestamp is older than allowed by the processor logic.

+
§

TimestampTooOld(usize, u64)

Used when a timestamp is older than allowed by the processor logic.

Includes the position or identifier of the timestamp and the threshold value, indicating that the provided timestamp is too far in the past.

-
§

TimestampTooFuture(usize, u64)

Indicates that a timestamp is further in the future than allowed.

+
§

TimestampTooFuture(usize, u64)

Indicates that a timestamp is further in the future than allowed.

Similar to TimestampTooOld, but for future timestamps exceeding the contract’s acceptance window.

-
§

ClonedContractError(u8, String)

Represents errors that need to clone ContractErrorContent, which is not supported by default.

+
§

ClonedContractError(u8, String)

Represents errors that need to clone ContractErrorContent, which is not supported by default.

This variant allows for the manual duplication of contract error information, including an error code and a descriptive message.

-

Implementations§

source§

impl Error

source

pub fn contract_error<T: ContractErrorContent + 'static>(value: T) -> Error

source

pub(crate) fn code(&self) -> u16

Trait Implementations§

source§

impl Clone for Error

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<Error> for ApiError

source§

fn from(error: Error) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for Error

§

impl !RefUnwindSafe for Error

§

impl !Send for Error

§

impl !Sync for Error

§

impl Unpin for Error

§

impl !UnwindSafe for Error

Blanket Implementations§

source§

impl<T> Any for T
where - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where - T: Debug, - F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where - E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for T
where - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Implementations§

source§

impl Error

source

pub fn contract_error<T: ContractErrorContent + 'static>(value: T) -> Error

source

pub(crate) fn code(&self) -> u16

Trait Implementations§

source§

impl Clone for Error

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<Error> for ApiError

source§

fn from(error: Error) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for Error

§

impl !RefUnwindSafe for Error

§

impl !Send for Error

§

impl !Sync for Error

§

impl Unpin for Error

§

impl !UnwindSafe for Error

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where + T: Debug, + F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where + E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where + T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where - T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where +From<T> for U chooses to do.

+

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/error/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/error/index.html index e083b3b4..96a07109 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/error/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/error/index.html @@ -1 +1 @@ -redstone::network::error - Rust

Module redstone::network::error

source ·

Enums§

  • Errors that can be encountered in the deserializing&decrypting the RedStone payload or just contract execution process.

Traits§

\ No newline at end of file +redstone::network::error - Rust

Module redstone::network::error

source ·

Enums§

  • Errors that can be encountered in the deserializing&decrypting the RedStone payload or just contract execution process.

Traits§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/error/trait.ContractErrorContent.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/error/trait.ContractErrorContent.html index 577c3a6f..03e752aa 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/error/trait.ContractErrorContent.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/error/trait.ContractErrorContent.html @@ -1,5 +1,5 @@ -ContractErrorContent in redstone::network::error - Rust

Trait redstone::network::error::ContractErrorContent

source ·
pub trait ContractErrorContent: Debug {
+ContractErrorContent in redstone::network::error - Rust

Trait redstone::network::error::ContractErrorContent

source ·
pub trait ContractErrorContent: Debug {
     // Required methods
-    fn code(&self) -> u8;
-    fn message(&self) -> String;
-}

Required Methods§

source

fn code(&self) -> u8

source

fn message(&self) -> String

Implementors§

\ No newline at end of file + fn code(&self) -> u8; + fn message(&self) -> String; +}

Required Methods§

source

fn code(&self) -> u8

source

fn message(&self) -> String

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/flattened/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/flattened/index.html index e62982d8..1c855537 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/flattened/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/flattened/index.html @@ -1 +1 @@ -redstone::network::flattened - Rust

Module redstone::network::flattened

source ·

Traits§

\ No newline at end of file +redstone::network::flattened - Rust

Module redstone::network::flattened

source ·

Traits§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/flattened/trait.Flattened.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/flattened/trait.Flattened.html index 5cfae35f..66be7cad 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/flattened/trait.Flattened.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/flattened/trait.Flattened.html @@ -1,4 +1,4 @@ -Flattened in redstone::network::flattened - Rust

Trait redstone::network::flattened::Flattened

source ·
pub trait Flattened<T> {
+Flattened in redstone::network::flattened - Rust

Trait redstone::network::flattened::Flattened

source ·
pub trait Flattened<T> {
     // Required method
     fn flattened(&self) -> T;
-}

Required Methods§

source

fn flattened(&self) -> T

Implementations on Foreign Types§

source§

impl Flattened<<Casper as NetworkSpecific>::BytesRepr> for Vec<Bytes>

Implementors§

\ No newline at end of file +}

Required Methods§

source

fn flattened(&self) -> T

Implementations on Foreign Types§

source§

impl Flattened<<Casper as NetworkSpecific>::BytesRepr> for Vec<Bytes>

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/from_bytes_repr/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/from_bytes_repr/index.html index 037b0f7e..3e91d071 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/from_bytes_repr/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/from_bytes_repr/index.html @@ -1 +1 @@ -redstone::network::from_bytes_repr - Rust

Module redstone::network::from_bytes_repr

source ·

Traits§

\ No newline at end of file +redstone::network::from_bytes_repr - Rust

Module redstone::network::from_bytes_repr

source ·

Traits§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/from_bytes_repr/trait.FromBytesRepr.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/from_bytes_repr/trait.FromBytesRepr.html index 6c56e1ee..60991bfe 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/from_bytes_repr/trait.FromBytesRepr.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/from_bytes_repr/trait.FromBytesRepr.html @@ -1,4 +1,4 @@ -FromBytesRepr in redstone::network::from_bytes_repr - Rust

Trait redstone::network::from_bytes_repr::FromBytesRepr

source ·
pub trait FromBytesRepr<T> {
+FromBytesRepr in redstone::network::from_bytes_repr - Rust

Trait redstone::network::from_bytes_repr::FromBytesRepr

source ·
pub trait FromBytesRepr<T> {
     // Required method
     fn from_bytes_repr(bytes: T) -> Self;
-}

Required Methods§

source

fn from_bytes_repr(bytes: T) -> Self

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file +}

Required Methods§

source

fn from_bytes_repr(bytes: T) -> Self

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/from_bytes_repr/trait.Sanitized.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/from_bytes_repr/trait.Sanitized.html index 79baf865..564f236f 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/from_bytes_repr/trait.Sanitized.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/from_bytes_repr/trait.Sanitized.html @@ -1,4 +1,4 @@ -Sanitized in redstone::network::from_bytes_repr - Rust

Trait redstone::network::from_bytes_repr::Sanitized

source ·
pub trait Sanitized {
+Sanitized in redstone::network::from_bytes_repr - Rust

Trait redstone::network::from_bytes_repr::Sanitized

source ·
pub trait Sanitized {
     // Required method
     fn sanitized(self) -> Self;
-}

Required Methods§

source

fn sanitized(self) -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Sanitized for Vec<u8>

source§

fn sanitized(self) -> Self

Implementors§

\ No newline at end of file +}

Required Methods§

source

fn sanitized(self) -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Sanitized for Vec<u8>

source§

fn sanitized(self) -> Self

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/index.html index 2e9c47bf..8f501788 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/index.html @@ -1 +1 @@ -redstone::network - Rust
\ No newline at end of file +redstone::network - Rust
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/print_debug/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/print_debug/index.html index ac53c72e..18bca892 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/print_debug/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/print_debug/index.html @@ -1 +1 @@ -redstone::network::print_debug - Rust

Module redstone::network::print_debug

source ·
\ No newline at end of file +redstone::network::print_debug - Rust

Module redstone::network::print_debug

source ·
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/constant.VALUE_SIZE.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/constant.VALUE_SIZE.html index 2e47400c..286c9ec3 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/constant.VALUE_SIZE.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/constant.VALUE_SIZE.html @@ -1 +1 @@ -VALUE_SIZE in redstone::network::specific - Rust

Constant redstone::network::specific::VALUE_SIZE

source ·
pub const VALUE_SIZE: usize = <_Network as NetworkSpecific>::VALUE_SIZE; // 32usize
\ No newline at end of file +VALUE_SIZE in redstone::network::specific - Rust

Constant redstone::network::specific::VALUE_SIZE

source ·
pub const VALUE_SIZE: usize = <_Network as NetworkSpecific>::VALUE_SIZE; // 32usize
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/fn.print.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/fn.print.html index 414a9953..267b3a19 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/fn.print.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/fn.print.html @@ -1 +1 @@ -print in redstone::network::specific - Rust

Function redstone::network::specific::print

source ·
pub fn print(_text: String)
\ No newline at end of file +print in redstone::network::specific - Rust

Function redstone::network::specific::print

source ·
pub fn print(_text: String)
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/fn.revert.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/fn.revert.html index 2e9edf89..b38daa81 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/fn.revert.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/fn.revert.html @@ -1 +1 @@ -revert in redstone::network::specific - Rust

Function redstone::network::specific::revert

source ·
pub fn revert(error: Error) -> !
\ No newline at end of file +revert in redstone::network::specific - Rust

Function redstone::network::specific::revert

source ·
pub fn revert(error: Error) -> !
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/index.html index 1378d9dc..36a5939d 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/index.html @@ -1 +1 @@ -redstone::network::specific - Rust

Module redstone::network::specific

source ·

Constants§

Traits§

Functions§

Type Aliases§

\ No newline at end of file +redstone::network::specific - Rust

Module redstone::network::specific

source ·

Constants§

Traits§

Functions§

Type Aliases§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/trait.NetworkSpecific.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/trait.NetworkSpecific.html index 48323dfa..4d22c6b6 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/trait.NetworkSpecific.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/trait.NetworkSpecific.html @@ -1,11 +1,11 @@ -NetworkSpecific in redstone::network::specific - Rust

Trait redstone::network::specific::NetworkSpecific

source ·
pub trait NetworkSpecific {
-    type BytesRepr: From<Vec<u8>> + Into<Vec<u8>>;
-    type ValueRepr: FromBytesRepr<Vec<u8>>;
+NetworkSpecific in redstone::network::specific - Rust

Trait redstone::network::specific::NetworkSpecific

source ·
pub trait NetworkSpecific {
+    type BytesRepr: From<Vec<u8>> + Into<Vec<u8>>;
+    type ValueRepr: FromBytesRepr<Vec<u8>>;
     type _Self;
 
-    const VALUE_SIZE: usize;
+    const VALUE_SIZE: usize;
 
     // Required methods
-    fn print(_text: String);
-    fn revert(error: Error) -> !;
-}

Required Associated Types§

Required Associated Constants§

Required Methods§

source

fn print(_text: String)

source

fn revert(error: Error) -> !

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file + fn print(_text: String); + fn revert(error: Error) -> !; +}

Required Associated Types§

Required Associated Constants§

Required Methods§

source

fn print(_text: String)

source

fn revert(error: Error) -> !

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/type.Bytes.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/type.Bytes.html index 04a40a5a..4f99def8 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/type.Bytes.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/type.Bytes.html @@ -1 +1 @@ -Bytes in redstone::network::specific - Rust

Type Alias redstone::network::specific::Bytes

source ·
pub type Bytes = <_Network as NetworkSpecific>::BytesRepr;
\ No newline at end of file +Bytes in redstone::network::specific - Rust

Type Alias redstone::network::specific::Bytes

source ·
pub type Bytes = <_Network as NetworkSpecific>::BytesRepr;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/type.Network.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/type.Network.html index 40e404c9..506ed82a 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/type.Network.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/type.Network.html @@ -1 +1 @@ -Network in redstone::network::specific - Rust

Type Alias redstone::network::specific::Network

source ·
pub(crate) type Network = <_Network as NetworkSpecific>::_Self;
\ No newline at end of file +Network in redstone::network::specific - Rust

Type Alias redstone::network::specific::Network

source ·
pub(crate) type Network = <_Network as NetworkSpecific>::_Self;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/type.U256.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/type.U256.html index 4b103256..02ad6f0a 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/type.U256.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/type.U256.html @@ -1 +1 @@ -U256 in redstone::network::specific - Rust

Type Alias redstone::network::specific::U256

source ·
pub type U256 = <_Network as NetworkSpecific>::ValueRepr;

Trait Implementations§

\ No newline at end of file +U256 in redstone::network::specific - Rust

Type Alias redstone::network::specific::U256

source ·
pub type U256 = <_Network as NetworkSpecific>::ValueRepr;

Trait Implementations§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/type._Network.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/type._Network.html index bf814c95..f607372a 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/type._Network.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/type._Network.html @@ -1 +1 @@ -_Network in redstone::network - Rust

Type Alias redstone::network::_Network

source ·
pub type _Network = Casper;

Aliased Type§

struct _Network;
\ No newline at end of file +_Network in redstone::network - Rust

Type Alias redstone::network::_Network

source ·
pub type _Network = Casper;

Aliased Type§

struct _Network;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.DATA_FEED_ID_BS.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.DATA_FEED_ID_BS.html index 72b04b86..8a6e1da5 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.DATA_FEED_ID_BS.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.DATA_FEED_ID_BS.html @@ -1 +1 @@ -DATA_FEED_ID_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::DATA_FEED_ID_BS

source ·
pub(crate) const DATA_FEED_ID_BS: usize = 32;
\ No newline at end of file +DATA_FEED_ID_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::DATA_FEED_ID_BS

source ·
pub(crate) const DATA_FEED_ID_BS: usize = 32;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.DATA_PACKAGES_COUNT_BS.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.DATA_PACKAGES_COUNT_BS.html index fed432b2..5785e972 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.DATA_PACKAGES_COUNT_BS.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.DATA_PACKAGES_COUNT_BS.html @@ -1 +1 @@ -DATA_PACKAGES_COUNT_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::DATA_PACKAGES_COUNT_BS

source ·
pub(crate) const DATA_PACKAGES_COUNT_BS: usize = 2;
\ No newline at end of file +DATA_PACKAGES_COUNT_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::DATA_PACKAGES_COUNT_BS

source ·
pub(crate) const DATA_PACKAGES_COUNT_BS: usize = 2;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.DATA_POINTS_COUNT_BS.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.DATA_POINTS_COUNT_BS.html index f25ed2f5..dfe6f9fa 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.DATA_POINTS_COUNT_BS.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.DATA_POINTS_COUNT_BS.html @@ -1 +1 @@ -DATA_POINTS_COUNT_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::DATA_POINTS_COUNT_BS

source ·
pub(crate) const DATA_POINTS_COUNT_BS: usize = 3;
\ No newline at end of file +DATA_POINTS_COUNT_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::DATA_POINTS_COUNT_BS

source ·
pub(crate) const DATA_POINTS_COUNT_BS: usize = 3;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.DATA_POINT_VALUE_BYTE_SIZE_BS.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.DATA_POINT_VALUE_BYTE_SIZE_BS.html index 95f9c3d5..2ac22658 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.DATA_POINT_VALUE_BYTE_SIZE_BS.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.DATA_POINT_VALUE_BYTE_SIZE_BS.html @@ -1 +1 @@ -DATA_POINT_VALUE_BYTE_SIZE_BS in redstone::protocol::constants - Rust
pub(crate) const DATA_POINT_VALUE_BYTE_SIZE_BS: usize = 4;
\ No newline at end of file +DATA_POINT_VALUE_BYTE_SIZE_BS in redstone::protocol::constants - Rust
pub(crate) const DATA_POINT_VALUE_BYTE_SIZE_BS: usize = 4;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.MAX_TIMESTAMP_AHEAD_MS.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.MAX_TIMESTAMP_AHEAD_MS.html index 160a69a6..748a6718 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.MAX_TIMESTAMP_AHEAD_MS.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.MAX_TIMESTAMP_AHEAD_MS.html @@ -1 +1 @@ -MAX_TIMESTAMP_AHEAD_MS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::MAX_TIMESTAMP_AHEAD_MS

source ·
pub(crate) const MAX_TIMESTAMP_AHEAD_MS: u64 = _; // 180_000u64
\ No newline at end of file +MAX_TIMESTAMP_AHEAD_MS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::MAX_TIMESTAMP_AHEAD_MS

source ·
pub(crate) const MAX_TIMESTAMP_AHEAD_MS: u64 = _; // 180_000u64
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.MAX_TIMESTAMP_DELAY_MS.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.MAX_TIMESTAMP_DELAY_MS.html index 47c72d3b..29966450 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.MAX_TIMESTAMP_DELAY_MS.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.MAX_TIMESTAMP_DELAY_MS.html @@ -1 +1 @@ -MAX_TIMESTAMP_DELAY_MS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::MAX_TIMESTAMP_DELAY_MS

source ·
pub(crate) const MAX_TIMESTAMP_DELAY_MS: u64 = _; // 900_000u64
\ No newline at end of file +MAX_TIMESTAMP_DELAY_MS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::MAX_TIMESTAMP_DELAY_MS

source ·
pub(crate) const MAX_TIMESTAMP_DELAY_MS: u64 = _; // 900_000u64
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.REDSTONE_MARKER.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.REDSTONE_MARKER.html index 07258216..29b8c249 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.REDSTONE_MARKER.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.REDSTONE_MARKER.html @@ -1 +1 @@ -REDSTONE_MARKER in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::REDSTONE_MARKER

source ·
pub(crate) const REDSTONE_MARKER: [u8; 9];
\ No newline at end of file +REDSTONE_MARKER in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::REDSTONE_MARKER

source ·
pub(crate) const REDSTONE_MARKER: [u8; 9];
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.REDSTONE_MARKER_BS.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.REDSTONE_MARKER_BS.html index 21ea69ca..6a9ebb32 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.REDSTONE_MARKER_BS.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.REDSTONE_MARKER_BS.html @@ -1 +1 @@ -REDSTONE_MARKER_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::REDSTONE_MARKER_BS

source ·
pub(crate) const REDSTONE_MARKER_BS: usize = 9;
\ No newline at end of file +REDSTONE_MARKER_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::REDSTONE_MARKER_BS

source ·
pub(crate) const REDSTONE_MARKER_BS: usize = 9;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.SIGNATURE_BS.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.SIGNATURE_BS.html index 2a3a5b7f..ca094747 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.SIGNATURE_BS.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.SIGNATURE_BS.html @@ -1 +1 @@ -SIGNATURE_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::SIGNATURE_BS

source ·
pub(crate) const SIGNATURE_BS: usize = 65;
\ No newline at end of file +SIGNATURE_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::SIGNATURE_BS

source ·
pub(crate) const SIGNATURE_BS: usize = 65;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.TIMESTAMP_BS.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.TIMESTAMP_BS.html index 1635207a..38d27451 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.TIMESTAMP_BS.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.TIMESTAMP_BS.html @@ -1 +1 @@ -TIMESTAMP_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::TIMESTAMP_BS

source ·
pub(crate) const TIMESTAMP_BS: usize = 6;
\ No newline at end of file +TIMESTAMP_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::TIMESTAMP_BS

source ·
pub(crate) const TIMESTAMP_BS: usize = 6;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.UNSIGNED_METADATA_BYTE_SIZE_BS.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.UNSIGNED_METADATA_BYTE_SIZE_BS.html index a7ccdc60..3b0a9907 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.UNSIGNED_METADATA_BYTE_SIZE_BS.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.UNSIGNED_METADATA_BYTE_SIZE_BS.html @@ -1 +1 @@ -UNSIGNED_METADATA_BYTE_SIZE_BS in redstone::protocol::constants - Rust
pub(crate) const UNSIGNED_METADATA_BYTE_SIZE_BS: usize = 3;
\ No newline at end of file +UNSIGNED_METADATA_BYTE_SIZE_BS in redstone::protocol::constants - Rust
pub(crate) const UNSIGNED_METADATA_BYTE_SIZE_BS: usize = 3;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/index.html index 0268cb89..2eb1f7cf 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/index.html @@ -1 +1 @@ -redstone::protocol::constants - Rust
\ No newline at end of file +redstone::protocol::constants - Rust
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_package/fn.trim_data_package.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_package/fn.trim_data_package.html index f1456016..25bf7e05 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_package/fn.trim_data_package.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_package/fn.trim_data_package.html @@ -1 +1 @@ -trim_data_package in redstone::protocol::data_package - Rust

Function redstone::protocol::data_package::trim_data_package

source ·
fn trim_data_package(payload: &mut Vec<u8>) -> DataPackage
\ No newline at end of file +trim_data_package in redstone::protocol::data_package - Rust

Function redstone::protocol::data_package::trim_data_package

source ·
fn trim_data_package(payload: &mut Vec<u8>) -> DataPackage
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_package/fn.trim_data_packages.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_package/fn.trim_data_packages.html index 393e9998..7ae9270e 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_package/fn.trim_data_packages.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_package/fn.trim_data_packages.html @@ -1,4 +1,4 @@ -trim_data_packages in redstone::protocol::data_package - Rust

Function redstone::protocol::data_package::trim_data_packages

source ·
pub(crate) fn trim_data_packages(
-    payload: &mut Vec<u8>,
-    count: usize,
-) -> Vec<DataPackage>
\ No newline at end of file +trim_data_packages in redstone::protocol::data_package - Rust

Function redstone::protocol::data_package::trim_data_packages

source ·
pub(crate) fn trim_data_packages(
+    payload: &mut Vec<u8>,
+    count: usize,
+) -> Vec<DataPackage>
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_package/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_package/index.html index 4f7ef4c4..71e2a3df 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_package/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_package/index.html @@ -1 +1 @@ -redstone::protocol::data_package - Rust

Module redstone::protocol::data_package

source ·

Structs§

Functions§

\ No newline at end of file +redstone::protocol::data_package - Rust

Module redstone::protocol::data_package

source ·

Structs§

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_package/struct.DataPackage.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_package/struct.DataPackage.html index b77c9d35..1cdc961b 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_package/struct.DataPackage.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_package/struct.DataPackage.html @@ -1,22 +1,23 @@ -DataPackage in redstone::protocol::data_package - Rust

Struct redstone::protocol::data_package::DataPackage

source ·
pub(crate) struct DataPackage {
-    pub(crate) signer_address: Vec<u8>,
-    pub(crate) timestamp: u64,
-    pub(crate) data_points: Vec<DataPoint>,
-}

Fields§

§signer_address: Vec<u8>§timestamp: u64§data_points: Vec<DataPoint>

Trait Implementations§

source§

impl Clone for DataPackage

source§

fn clone(&self) -> DataPackage

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DataPackage

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for DataPackage

source§

fn eq(&self, other: &DataPackage) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Eq for DataPackage

source§

impl StructuralPartialEq for DataPackage

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where - T: Debug, - F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where - E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for T
where - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+DataPackage in redstone::protocol::data_package - Rust

Struct redstone::protocol::data_package::DataPackage

source ·
pub(crate) struct DataPackage {
+    pub(crate) signer_address: Vec<u8>,
+    pub(crate) timestamp: u64,
+    pub(crate) data_points: Vec<DataPoint>,
+}

Fields§

§signer_address: Vec<u8>§timestamp: u64§data_points: Vec<DataPoint>

Trait Implementations§

source§

impl Clone for DataPackage

source§

fn clone(&self) -> DataPackage

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DataPackage

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for DataPackage

source§

fn eq(&self, other: &DataPackage) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for DataPackage

source§

impl StructuralPartialEq for DataPackage

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where + T: Debug, + F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where + E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where + T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where +From<T> for U chooses to do.

+

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_point/fn.trim_data_point.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_point/fn.trim_data_point.html index 10a3aa68..ef63a213 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_point/fn.trim_data_point.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_point/fn.trim_data_point.html @@ -1 +1 @@ -trim_data_point in redstone::protocol::data_point - Rust

Function redstone::protocol::data_point::trim_data_point

source ·
fn trim_data_point(payload: &mut Vec<u8>, value_size: usize) -> DataPoint
\ No newline at end of file +trim_data_point in redstone::protocol::data_point - Rust

Function redstone::protocol::data_point::trim_data_point

source ·
fn trim_data_point(payload: &mut Vec<u8>, value_size: usize) -> DataPoint
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_point/fn.trim_data_points.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_point/fn.trim_data_points.html index 4bc76a0f..6c2d70c3 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_point/fn.trim_data_points.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_point/fn.trim_data_points.html @@ -1,5 +1,5 @@ -trim_data_points in redstone::protocol::data_point - Rust

Function redstone::protocol::data_point::trim_data_points

source ·
pub(crate) fn trim_data_points(
-    payload: &mut Vec<u8>,
-    count: usize,
-    value_size: usize,
-) -> Vec<DataPoint>
\ No newline at end of file +trim_data_points in redstone::protocol::data_point - Rust

Function redstone::protocol::data_point::trim_data_points

source ·
pub(crate) fn trim_data_points(
+    payload: &mut Vec<u8>,
+    count: usize,
+    value_size: usize,
+) -> Vec<DataPoint>
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_point/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_point/index.html index 6ab1baf0..47323ad6 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_point/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_point/index.html @@ -1 +1 @@ -redstone::protocol::data_point - Rust

Module redstone::protocol::data_point

source ·

Structs§

Functions§

\ No newline at end of file +redstone::protocol::data_point - Rust

Module redstone::protocol::data_point

source ·

Structs§

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_point/struct.DataPoint.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_point/struct.DataPoint.html index 4cee4899..eee0d029 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_point/struct.DataPoint.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_point/struct.DataPoint.html @@ -1,21 +1,22 @@ -DataPoint in redstone::protocol::data_point - Rust

Struct redstone::protocol::data_point::DataPoint

source ·
pub(crate) struct DataPoint {
+DataPoint in redstone::protocol::data_point - Rust

Struct redstone::protocol::data_point::DataPoint

source ·
pub(crate) struct DataPoint {
     pub(crate) feed_id: U256,
     pub(crate) value: U256,
-}

Fields§

§feed_id: U256§value: U256

Trait Implementations§

source§

impl Clone for DataPoint

source§

fn clone(&self) -> DataPoint

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DataPoint

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for DataPoint

source§

fn eq(&self, other: &DataPoint) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Eq for DataPoint

source§

impl StructuralPartialEq for DataPoint

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where - T: Debug, - F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where - E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for T
where - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+}

Fields§

§feed_id: U256§value: U256

Trait Implementations§

source§

impl Clone for DataPoint

source§

fn clone(&self) -> DataPoint

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DataPoint

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for DataPoint

source§

fn eq(&self, other: &DataPoint) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for DataPoint

source§

impl StructuralPartialEq for DataPoint

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where + T: Debug, + F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where + E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where + T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where +From<T> for U chooses to do.

+

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/index.html index d221f7b2..933f37aa 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/index.html @@ -1 +1 @@ -redstone::protocol - Rust

Module redstone::protocol

source ·

Modules§

\ No newline at end of file +redstone::protocol - Rust

Module redstone::protocol

source ·

Modules§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/marker/fn.trim_redstone_marker.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/marker/fn.trim_redstone_marker.html index fb7c7144..01093e84 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/marker/fn.trim_redstone_marker.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/marker/fn.trim_redstone_marker.html @@ -1 +1 @@ -trim_redstone_marker in redstone::protocol::marker - Rust

Function redstone::protocol::marker::trim_redstone_marker

source ·
pub fn trim_redstone_marker(payload: &mut Vec<u8>)
\ No newline at end of file +trim_redstone_marker in redstone::protocol::marker - Rust

Function redstone::protocol::marker::trim_redstone_marker

source ·
pub fn trim_redstone_marker(payload: &mut Vec<u8>)
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/marker/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/marker/index.html index 9844daf7..0ac4ef1d 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/marker/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/marker/index.html @@ -1 +1 @@ -redstone::protocol::marker - Rust

Module redstone::protocol::marker

source ·

Functions§

\ No newline at end of file +redstone::protocol::marker - Rust

Module redstone::protocol::marker

source ·

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/payload/fn.trim_metadata.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/payload/fn.trim_metadata.html index b3e6350e..ce8dcf29 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/payload/fn.trim_metadata.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/payload/fn.trim_metadata.html @@ -1 +1 @@ -trim_metadata in redstone::protocol::payload - Rust

Function redstone::protocol::payload::trim_metadata

source ·
fn trim_metadata(payload: &mut Vec<u8>) -> usize
\ No newline at end of file +trim_metadata in redstone::protocol::payload - Rust

Function redstone::protocol::payload::trim_metadata

source ·
fn trim_metadata(payload: &mut Vec<u8>) -> usize
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/payload/fn.trim_payload.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/payload/fn.trim_payload.html index 9eae9fdd..9805f954 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/payload/fn.trim_payload.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/payload/fn.trim_payload.html @@ -1 +1 @@ -trim_payload in redstone::protocol::payload - Rust

Function redstone::protocol::payload::trim_payload

source ·
fn trim_payload(payload: &mut Vec<u8>) -> Payload
\ No newline at end of file +trim_payload in redstone::protocol::payload - Rust

Function redstone::protocol::payload::trim_payload

source ·
fn trim_payload(payload: &mut Vec<u8>) -> Payload
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/payload/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/payload/index.html index 7bedf304..7ef700d8 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/payload/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/payload/index.html @@ -1 +1 @@ -redstone::protocol::payload - Rust

Module redstone::protocol::payload

source ·

Structs§

Functions§

\ No newline at end of file +redstone::protocol::payload - Rust

Module redstone::protocol::payload

source ·

Structs§

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/payload/struct.Payload.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/payload/struct.Payload.html index 9234341b..94e5a48e 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/payload/struct.Payload.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/payload/struct.Payload.html @@ -1,18 +1,19 @@ -Payload in redstone::protocol::payload - Rust

Struct redstone::protocol::payload::Payload

source ·
pub(crate) struct Payload {
-    pub(crate) data_packages: Vec<DataPackage>,
-}

Fields§

§data_packages: Vec<DataPackage>

Implementations§

source§

impl Payload

source

pub(crate) fn make(payload_bytes: &mut Vec<u8>) -> Payload

Trait Implementations§

source§

impl Clone for Payload

source§

fn clone(&self) -> Payload

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Payload

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where - T: Debug, - F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where - E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for T
where - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+Payload in redstone::protocol::payload - Rust

Struct redstone::protocol::payload::Payload

source ·
pub(crate) struct Payload {
+    pub(crate) data_packages: Vec<DataPackage>,
+}

Fields§

§data_packages: Vec<DataPackage>

Implementations§

source§

impl Payload

source

pub(crate) fn make(payload_bytes: &mut Vec<u8>) -> Payload

Trait Implementations§

source§

impl Clone for Payload

source§

fn clone(&self) -> Payload

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Payload

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where + T: Debug, + F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where + E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where + T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where +From<T> for U chooses to do.

+

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/filter/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/filter/index.html index a153fc5f..fa4dd4df 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/filter/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/filter/index.html @@ -1 +1 @@ -redstone::utils::filter - Rust

Module redstone::utils::filter

source ·

Traits§

\ No newline at end of file +redstone::utils::filter - Rust

Module redstone::utils::filter

source ·

Traits§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/filter/trait.FilterSome.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/filter/trait.FilterSome.html index 69bc1f28..d00cce8b 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/filter/trait.FilterSome.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/filter/trait.FilterSome.html @@ -1,4 +1,4 @@ -FilterSome in redstone::utils::filter - Rust

Trait redstone::utils::filter::FilterSome

source ·
pub(crate) trait FilterSome<Output> {
+FilterSome in redstone::utils::filter - Rust

Trait redstone::utils::filter::FilterSome

source ·
pub(crate) trait FilterSome<Output> {
     // Required method
     fn filter_some(&self) -> Output;
-}

Required Methods§

source

fn filter_some(&self) -> Output

Implementations on Foreign Types§

source§

impl<T: Copy> FilterSome<Vec<T>> for [Option<T>]

source§

fn filter_some(&self) -> Vec<T>

Implementors§

\ No newline at end of file +}

Required Methods§

source

fn filter_some(&self) -> Output

Implementations on Foreign Types§

source§

impl<T: Copy> FilterSome<Vec<T>> for [Option<T>]

source§

fn filter_some(&self) -> Vec<T>

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/index.html index ef51ef17..d5ce81a0 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/index.html @@ -1 +1 @@ -redstone::utils - Rust

Module redstone::utils

source ·

Modules§

\ No newline at end of file +redstone::utils - Rust

Module redstone::utils

source ·

Modules§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/median/fn.maybe_pick_median.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/median/fn.maybe_pick_median.html index ebb4b4a4..027bd4bd 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/median/fn.maybe_pick_median.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/median/fn.maybe_pick_median.html @@ -1,2 +1,2 @@ -maybe_pick_median in redstone::utils::median - Rust

Function redstone::utils::median::maybe_pick_median

source ·
fn maybe_pick_median<T>(a: T, b: T, c: T) -> Option<T>
where - T: PartialOrd,
\ No newline at end of file +maybe_pick_median in redstone::utils::median - Rust

Function redstone::utils::median::maybe_pick_median

source ·
fn maybe_pick_median<T>(a: T, b: T, c: T) -> Option<T>
where + T: PartialOrd,
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/median/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/median/index.html index 9a4952c3..18678dad 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/median/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/median/index.html @@ -1 +1 @@ -redstone::utils::median - Rust

Module redstone::utils::median

source ·

Traits§

Functions§

\ No newline at end of file +redstone::utils::median - Rust

Module redstone::utils::median

source ·

Traits§

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/median/trait.Averageable.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/median/trait.Averageable.html index 87e04bd4..4bd8874e 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/median/trait.Averageable.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/median/trait.Averageable.html @@ -1 +1 @@ -Averageable in redstone::utils::median - Rust

Trait redstone::utils::median::Averageable

source ·
trait Averageable: Add<Output = Self> + Shr<Output = Self> + From<u8> + Rem<Output = Self> + Copy { }

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Averageable for i32

Implementors§

\ No newline at end of file +Averageable in redstone::utils::median - Rust

Trait redstone::utils::median::Averageable

source ·
trait Averageable: Add<Output = Self> + Shr<Output = Self> + From<u8> + Rem<Output = Self> + Copy { }

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Averageable for i32

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/median/trait.Avg.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/median/trait.Avg.html index 200d300b..bd2c4cfd 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/median/trait.Avg.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/median/trait.Avg.html @@ -1,5 +1,5 @@ -Avg in redstone::utils::median - Rust

Trait redstone::utils::median::Avg

source ·
trait Avg {
+Avg in redstone::utils::median - Rust

Trait redstone::utils::median::Avg

source ·
trait Avg {
     // Required method
     fn avg(self, other: Self) -> Self;
-}

Required Methods§

source

fn avg(self, other: Self) -> Self

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> Avg for T
where +}

Required Methods§

source

fn avg(self, other: Self) -> Self

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> Avg for T
where T: Averageable,

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/median/trait.Median.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/median/trait.Median.html index 60047574..405ac93d 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/median/trait.Median.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/median/trait.Median.html @@ -1,7 +1,7 @@ -Median in redstone::utils::median - Rust

Trait redstone::utils::median::Median

source ·
pub(crate) trait Median {
+Median in redstone::utils::median - Rust

Trait redstone::utils::median::Median

source ·
pub(crate) trait Median {
     type Item;
 
     // Required method
     fn median(self) -> Self::Item;
-}

Required Associated Types§

Required Methods§

source

fn median(self) -> Self::Item

Implementations on Foreign Types§

source§

impl<T> Median for Vec<T>
where - T: Copy + Ord + Avg,

§

type Item = T

source§

fn median(self) -> Self::Item

Implementors§

\ No newline at end of file +}

Required Associated Types§

Required Methods§

source

fn median(self) -> Self::Item

Implementations on Foreign Types§

source§

impl<T> Median for Vec<T>
where + T: Copy + Ord + Avg,

§

type Item = T

source§

fn median(self) -> Self::Item

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/trim/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/trim/index.html index e7e6608a..b4c2c47c 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/trim/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/trim/index.html @@ -1 +1 @@ -redstone::utils::trim - Rust

Module redstone::utils::trim

source ·

Traits§

\ No newline at end of file +redstone::utils::trim - Rust

Module redstone::utils::trim

source ·

Traits§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/trim/trait.Trim.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/trim/trait.Trim.html index 9939a0b8..bd95e2a7 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/trim/trait.Trim.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/trim/trait.Trim.html @@ -1,5 +1,5 @@ -Trim in redstone::utils::trim - Rust

Trait redstone::utils::trim::Trim

source ·
pub trait Trim<T>
where - Self: Sized,
{ +Trim in redstone::utils::trim - Rust

Trait redstone::utils::trim::Trim

source ·
pub trait Trim<T>
where + Self: Sized,
{ // Required method - fn trim_end(&mut self, len: usize) -> T; -}

Required Methods§

source

fn trim_end(&mut self, len: usize) -> T

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Trim<<Casper as NetworkSpecific>::ValueRepr> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> U256

source§

impl Trim<u64> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> u64

source§

impl Trim<usize> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> usize

source§

impl Trim<Vec<u8>> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> Self

Implementors§

\ No newline at end of file + fn trim_end(&mut self, len: usize) -> T; +}

Required Methods§

source

fn trim_end(&mut self, len: usize) -> T

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Trim<<Casper as NetworkSpecific>::ValueRepr> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> U256

source§

impl Trim<u64> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> u64

source§

impl Trim<usize> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> usize

source§

impl Trim<Vec<u8>> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> Self

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/trim_zeros/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/trim_zeros/index.html index 2a2fd9e0..9377f30d 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/trim_zeros/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/trim_zeros/index.html @@ -1 +1 @@ -redstone::utils::trim_zeros - Rust

Module redstone::utils::trim_zeros

source ·

Traits§

\ No newline at end of file +redstone::utils::trim_zeros - Rust

Module redstone::utils::trim_zeros

source ·

Traits§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/trim_zeros/trait.TrimZeros.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/trim_zeros/trait.TrimZeros.html index f1299ca4..ae49a55d 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/trim_zeros/trait.TrimZeros.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/trim_zeros/trait.TrimZeros.html @@ -1,4 +1,4 @@ -TrimZeros in redstone::utils::trim_zeros - Rust

Trait redstone::utils::trim_zeros::TrimZeros

source ·
pub trait TrimZeros {
+TrimZeros in redstone::utils::trim_zeros - Rust

Trait redstone::utils::trim_zeros::TrimZeros

source ·
pub trait TrimZeros {
     // Required method
     fn trim_zeros(self) -> Self;
-}

Required Methods§

source

fn trim_zeros(self) -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl TrimZeros for Vec<u8>

source§

fn trim_zeros(self) -> Self

Implementors§

\ No newline at end of file +}

Required Methods§

source

fn trim_zeros(self) -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl TrimZeros for Vec<u8>

source§

fn trim_zeros(self) -> Self

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/search-index.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/search-index.js index d080deeb..2cd20668 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/search-index.js +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/search-index.js @@ -1,5 +1,5 @@ var searchIndex = new Map(JSON.parse('[\ -["redstone",{"t":"CCCQQCCCCCCCIHHHFNONNONNNNONONNNNNNHHFNNNNNNNONNNONKMMMMCCHCHHICCCCCCCCKKMMKRKHMHMFNNCNCNNNNNNNPPPKPGPPPPPPPNNNNNMNNNNNNMNNNNNNKMKKMMIRIKISTRRNNNHMHMCCCCCSSSSSSSSSSSFNNNNNONNNNOONHHNNNNFNNNNNNONNNNHHNNNONHFNNNNNONNNNNHHNNNNCCCCKMKKRKMHMKMKM","n":["core","crypto","network","print_and_panic","print_debug","protocol","utils","aggregator","config","processor","processor_result","validator","Matrix","aggregate_matrix","aggregate_values","make_value_signer_matrix","Config","assert_or_revert","block_timestamp","borrow","borrow_mut","feed_ids","feed_index","fmt","from","into","signer_count_threshold","signer_index","signers","try_from","try_into","type_id","validate_signer_count_threshold","validate_timestamp","vzip","make_processor_result","process_payload","ProcessorResult","assert_or_revert","borrow","borrow_mut","eq","fmt","from","into","min_timestamp","try_from","try_into","type_id","values","vzip","Validator","feed_index","signer_index","validate_signer_count_threshold","validate_timestamp","keccak256","recover","keccak256","crypto256","recover_address","recover_public_key","_Network","as_str","assert","casper","error","flattened","from_bytes_repr","print_debug","specific","AsAsciiStr","AsHexStr","as_ascii_str","as_hex_str","Assert","ErrorArg","Unwrap","assert_or_revert","assert_or_revert","assert_or_revert_bool_with","unwrap_or_revert","Casper","borrow","borrow_mut","error","from","from_bytes_repr","into","print","revert","try_from","try_into","type_id","vzip","ArrayIsEmpty","ClonedContractError","ContractError","ContractErrorContent","CryptographicError","Error","InsufficientSignerCount","NonEmptyPayloadRemainder","NumberOverflow","SizeNotSupported","TimestampTooFuture","TimestampTooOld","WrongRedStoneMarker","assert_or_revert","borrow","borrow_mut","clone","clone_into","code","code","contract_error","fmt","fmt","from","into","message","to_owned","to_string","try_from","try_into","type_id","vzip","Flattened","flattened","FromBytesRepr","Sanitized","from_bytes_repr","sanitized","Bytes","BytesRepr","Network","NetworkSpecific","U256","VALUE_SIZE","VALUE_SIZE","ValueRepr","_Self","as_ascii_str","as_hex_str","from_bytes_repr","print","print","revert","revert","constants","data_package","data_point","marker","payload","DATA_FEED_ID_BS","DATA_PACKAGES_COUNT_BS","DATA_POINTS_COUNT_BS","DATA_POINT_VALUE_BYTE_SIZE_BS","MAX_TIMESTAMP_AHEAD_MS","MAX_TIMESTAMP_DELAY_MS","REDSTONE_MARKER","REDSTONE_MARKER_BS","SIGNATURE_BS","TIMESTAMP_BS","UNSIGNED_METADATA_BYTE_SIZE_BS","DataPackage","assert_or_revert","borrow","borrow_mut","clone","clone_into","data_points","eq","fmt","from","into","signer_address","timestamp","to_owned","trim_data_package","trim_data_packages","try_from","try_into","type_id","vzip","DataPoint","assert_or_revert","borrow","borrow_mut","clone","clone_into","eq","feed_id","fmt","from","into","to_owned","trim_data_point","trim_data_points","try_from","try_into","type_id","value","vzip","trim_redstone_marker","Payload","assert_or_revert","borrow","borrow_mut","clone","clone_into","data_packages","fmt","from","into","make","to_owned","trim_metadata","trim_payload","try_from","try_into","type_id","vzip","filter","median","trim","trim_zeros","FilterSome","filter_some","Averageable","Avg","Item","Median","avg","maybe_pick_median","median","Trim","trim_end","TrimZeros","trim_zeros"],"q":[[0,"redstone"],[7,"redstone::core"],[12,"redstone::core::aggregator"],[16,"redstone::core::config"],[35,"redstone::core::processor"],[37,"redstone::core::processor_result"],[51,"redstone::core::validator"],[56,"redstone::crypto"],[58,"redstone::crypto::keccak256"],[59,"redstone::crypto::recover"],[61,"redstone::crypto::recover::crypto256"],[62,"redstone::network"],[71,"redstone::network::as_str"],[75,"redstone::network::assert"],[82,"redstone::network::casper"],[95,"redstone::network::error"],[127,"redstone::network::flattened"],[129,"redstone::network::from_bytes_repr"],[133,"redstone::network::specific"],[149,"redstone::protocol"],[154,"redstone::protocol::constants"],[165,"redstone::protocol::data_package"],[185,"redstone::protocol::data_point"],[204,"redstone::protocol::marker"],[205,"redstone::protocol::payload"],[223,"redstone::utils"],[227,"redstone::utils::filter"],[229,"redstone::utils::median"],[236,"redstone::utils::trim"],[238,"redstone::utils::trim_zeros"],[240,"core::option"],[241,"alloc::vec"],[242,"core::ops::function"],[243,"core::fmt"],[244,"core::result"],[245,"core::any"],[246,"alloc::boxed"],[247,"alloc::string"],[248,"core::cmp"]],"i":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,20,20,20,20,20,20,20,20,20,20,20,20,20,0,23,23,23,23,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,27,0,33,0,0,30,0,33,0,48,48,0,48,0,48,48,48,48,48,48,48,8,8,8,0,8,0,8,8,8,8,8,8,8,8,8,8,8,8,35,8,8,8,8,8,8,35,8,8,8,8,8,8,0,37,0,0,38,39,0,49,0,0,0,0,49,49,49,1,1,1,0,49,0,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,5,5,5,5,0,40,40,40,40,40,40,40,40,40,40,40,0,0,40,40,40,40,40,0,0,19,19,19,19,19,19,19,19,19,19,19,0,0,19,19,19,19,0,0,0,0,0,41,0,0,45,0,42,0,45,0,46,0,47],"f":"`````````````{{{f{{f{{d{b}}}}}}h}{{f{b}}}}{{h{f{j}}}{{f{b}}}}{{{l{h}}{f{j}}}{{f{{f{{d{b}}}}}}}}`{{cei}g{}{}{}{{Ab{{l{g}}}{{n{A`}}}}}}`{{{l{c}}}{{l{e}}}{}{}}{{{l{Adc}}}{{l{Ade}}}{}{}}`{{{l{h}}b}{{d{Af}}}}{{{l{h}}{l{AdAh}}}Aj}{cc{}}{ce{}{}}`{{{l{h}}{l{{An{Al}}}}}{{d{Af}}}}`{c{{B`{e}}}{}{}}0{{{l{c}}}Bb{}}{{{l{h}}Af{l{{An{{d{b}}}}}}}{{f{b}}}}{{{l{h}}AfBd}Bd}5{{hBf}Bh}{{hBj}Bh}`=<;{{{l{Bh}}{l{Bh}}}Bl}{{{l{Bh}}{l{AdAh}}}Aj}:9`776`9`{{{l{Bn}}b}{{d{Af}}}}{{{l{Bn}}{l{{An{Al}}}}}{{d{Af}}}}{{{l{Bn}}Af{l{{An{{d{b}}}}}}}{{f{b}}}}{{{l{Bn}}AfBd}Bd}``{{{l{{An{Al}}}}}{{C`{{An{Al}}}}}}`{{{f{Al}}{f{Al}}}{{f{Al}}}}{{{C`{{An{Al}}}}{l{{An{Al}}}}Al}{{C`{{An{Al}}}}}}```````````{{{l{Cb}}}Cd}{{{l{Cf}}}Cd}```{{ceg}cCh{{Cj{{l{c}}}{{n{Bl}}}}}{{Ab{{l{c}}}{{n{A`}}}}}}{{Clce}Cl{}{{Cj{{l{Cl}}}{{n{A`}}}}}}{{Blc}Cn{{Ab{}{{n{A`}}}}}}{{{Db{}{{D`{c}}}}e}g{}{{Cj{{l{c}}}{{n{A`}}}}}{}}`{{{l{c}}}{{l{e}}}{}{}}{{{l{Adc}}}{{l{Ade}}}{}{}}`{cc{}}`{ce{}{}}{CdCn}{A`Dd}{c{{B`{e}}}{}{}}0{{{l{c}}}Bb{}}4`````````````{{cei}g{}{}{}{{Ab{{l{g}}}{{n{A`}}}}}}87{{{l{A`}}}A`}{{{l{c}}{l{Ade}}}Cn{}{}}{{{l{Df}}}Al}{{{l{A`}}}Dh}{cA`Df}{{{l{A`}}{l{AdAh}}}Aj}0<;{{{l{Df}}}Cd}{{{l{c}}}e{}{}}{{{l{c}}}Cd{}};;:>`{{{l{Dj}}}c{}}``{cDl{}}{DnDn}`````````{{{l{b}}}Cd}0{{{f{Al}}}b}{CdCn}0{A`Dd}0`````````````````{{cei}g{}{}{}{{Ab{{l{g}}}{{n{A`}}}}}}{{{l{c}}}{{l{e}}}{}{}}{{{l{Adc}}}{{l{Ade}}}{}{}}{{{l{j}}}j}{{{l{c}}{l{Ade}}}Cn{}{}}`{{{l{j}}{l{j}}}Bl}{{{l{j}}{l{AdAh}}}Aj}{cc{}}{ce{}{}}``{{{l{c}}}e{}{}}{{{l{Ad{f{Al}}}}}j}{{{l{Ad{f{Al}}}}Af}{{f{j}}}}{c{{B`{e}}}{}{}}0{{{l{c}}}Bb{}}5`=<;{{{l{E`}}}E`}:{{{l{E`}}{l{E`}}}Bl}`{{{l{E`}}{l{AdAh}}}Aj}987{{{l{Ad{f{Al}}}}Af}E`}{{{l{Ad{f{Al}}}}AfAf}{{f{E`}}}}665`:{{{l{Ad{f{Al}}}}}Cn}`{{cei}g{}{}{}{{Ab{{l{g}}}{{n{A`}}}}}}{{{l{c}}}{{l{e}}}{}{}}{{{l{Adc}}}{{l{Ade}}}{}{}}{{{l{Bf}}}Bf}{{{l{c}}{l{Ade}}}Cn{}{}}`{{{l{Bf}}{l{AdAh}}}Aj}{cc{}}{ce{}{}}{{{l{Ad{f{Al}}}}}Bf}{{{l{c}}}e{}{}}{{{l{Ad{f{Al}}}}}Af}2{c{{B`{e}}}{}{}}0{{{l{c}}}Bb{}}5`````{{{l{Eb}}}c{}}````{{EdEd}Ed}{{ccc}{{d{c}}}Ef}{{{Ej{}{{Eh{c}}}}}c{}}`{{{l{AdEl}}Af}c{}}`{EnEn}","D":"Ed","p":[[8,"U256",133],[6,"Option",240],[5,"Vec",241],[5,"Config",16],[5,"DataPackage",165],[1,"reference"],[17,"Output"],[6,"Error",95],[10,"FnOnce",242],[0,"mut"],[1,"usize"],[5,"Formatter",243],[8,"Result",243],[1,"u8"],[1,"slice"],[6,"Result",244],[5,"TypeId",245],[1,"u64"],[5,"Payload",205],[5,"ProcessorResult",37],[8,"Bytes",133],[1,"bool"],[10,"Validator",51],[5,"Box",246],[10,"AsAsciiStr",71],[5,"String",247],[10,"AsHexStr",71],[10,"Debug",243],[10,"Fn",242],[10,"Assert",75],[1,"unit"],[17,"ErrorArg"],[10,"Unwrap",75],[1,"never"],[10,"ContractErrorContent",95],[1,"u16"],[10,"Flattened",127],[10,"FromBytesRepr",129],[10,"Sanitized",129],[5,"DataPoint",185],[10,"FilterSome",227],[10,"Avg",229],[10,"PartialOrd",248],[17,"Item"],[10,"Median",229],[10,"Trim",236],[10,"TrimZeros",238],[5,"Casper",82],[10,"NetworkSpecific",133]],"r":[],"b":[[116,"impl-Display-for-Error"],[117,"impl-Debug-for-Error"]],"c":"OjAAAAAAAAA=","e":"OzAAAAEAAMYAEwABAA0AEAAAABIAAAAUAAEAFwABABwAAAAeAAYAJwAEAC8AAgAzAAAAOQAdAFgAAABaAAUAYwAAAG0ACQB5ADUAsQARAMUAEADYABgA"}]\ +["redstone",{"t":"CCCQQCCCCCCCIHHHFNONNONNNNONONNNNNNHHFNNNNNNNONNNONKMMMMIIICCHCHHICCCCCCCCKKMMKRKHMHMFNNCNCNNNNNNNPPPKPGPPPPPPPNNNNNNMNNNNNNMNNNNNNKMKKMMIRIKISTRRNNNHMHMCCCCCSSSSSSSSSSSFNNNNNNONNNNOONHHNNNNFNNNNNNNONNNNHHNNNONHFNNNNNNONNNNNHHNNNNCCCCKMKKRKMHMKMKM","n":["core","crypto","network","print_and_panic","print_debug","protocol","utils","aggregator","config","processor","processor_result","validator","Matrix","aggregate_matrix","aggregate_values","make_value_signer_matrix","Config","assert_or_revert","block_timestamp","borrow","borrow_mut","feed_ids","feed_index","fmt","from","into","signer_count_threshold","signer_index","signers","try_from","try_into","type_id","validate_signer_count_threshold","validate_timestamp","vzip","make_processor_result","process_payload","ProcessorResult","assert_or_revert","borrow","borrow_mut","eq","fmt","from","into","min_timestamp","try_from","try_into","type_id","values","vzip","Validator","feed_index","signer_index","validate_signer_count_threshold","validate_timestamp","EcdsaUncompressedPublicKey","Keccak256Hash","Secp256SigRs","keccak256","recover","keccak256","crypto256","recover_address","recover_public_key","_Network","as_str","assert","casper","error","flattened","from_bytes_repr","print_debug","specific","AsAsciiStr","AsHexStr","as_ascii_str","as_hex_str","Assert","ErrorArg","Unwrap","assert_or_revert","assert_or_revert","assert_or_revert_bool_with","unwrap_or_revert","Casper","borrow","borrow_mut","error","from","from_bytes_repr","into","print","revert","try_from","try_into","type_id","vzip","ArrayIsEmpty","ClonedContractError","ContractError","ContractErrorContent","CryptographicError","Error","InsufficientSignerCount","NonEmptyPayloadRemainder","NumberOverflow","SizeNotSupported","TimestampTooFuture","TimestampTooOld","WrongRedStoneMarker","assert_or_revert","borrow","borrow_mut","clone","clone_into","clone_to_uninit","code","code","contract_error","fmt","fmt","from","into","message","to_owned","to_string","try_from","try_into","type_id","vzip","Flattened","flattened","FromBytesRepr","Sanitized","from_bytes_repr","sanitized","Bytes","BytesRepr","Network","NetworkSpecific","U256","VALUE_SIZE","VALUE_SIZE","ValueRepr","_Self","as_ascii_str","as_hex_str","from_bytes_repr","print","print","revert","revert","constants","data_package","data_point","marker","payload","DATA_FEED_ID_BS","DATA_PACKAGES_COUNT_BS","DATA_POINTS_COUNT_BS","DATA_POINT_VALUE_BYTE_SIZE_BS","MAX_TIMESTAMP_AHEAD_MS","MAX_TIMESTAMP_DELAY_MS","REDSTONE_MARKER","REDSTONE_MARKER_BS","SIGNATURE_BS","TIMESTAMP_BS","UNSIGNED_METADATA_BYTE_SIZE_BS","DataPackage","assert_or_revert","borrow","borrow_mut","clone","clone_into","clone_to_uninit","data_points","eq","fmt","from","into","signer_address","timestamp","to_owned","trim_data_package","trim_data_packages","try_from","try_into","type_id","vzip","DataPoint","assert_or_revert","borrow","borrow_mut","clone","clone_into","clone_to_uninit","eq","feed_id","fmt","from","into","to_owned","trim_data_point","trim_data_points","try_from","try_into","type_id","value","vzip","trim_redstone_marker","Payload","assert_or_revert","borrow","borrow_mut","clone","clone_into","clone_to_uninit","data_packages","fmt","from","into","make","to_owned","trim_metadata","trim_payload","try_from","try_into","type_id","vzip","filter","median","trim","trim_zeros","FilterSome","filter_some","Averageable","Avg","Item","Median","avg","maybe_pick_median","median","Trim","trim_end","TrimZeros","trim_zeros"],"q":[[0,"redstone"],[7,"redstone::core"],[12,"redstone::core::aggregator"],[16,"redstone::core::config"],[35,"redstone::core::processor"],[37,"redstone::core::processor_result"],[51,"redstone::core::validator"],[56,"redstone::crypto"],[61,"redstone::crypto::keccak256"],[62,"redstone::crypto::recover"],[64,"redstone::crypto::recover::crypto256"],[65,"redstone::network"],[74,"redstone::network::as_str"],[78,"redstone::network::assert"],[85,"redstone::network::casper"],[98,"redstone::network::error"],[131,"redstone::network::flattened"],[133,"redstone::network::from_bytes_repr"],[137,"redstone::network::specific"],[153,"redstone::protocol"],[158,"redstone::protocol::constants"],[169,"redstone::protocol::data_package"],[190,"redstone::protocol::data_point"],[210,"redstone::protocol::marker"],[211,"redstone::protocol::payload"],[230,"redstone::utils"],[234,"redstone::utils::filter"],[236,"redstone::utils::median"],[243,"redstone::utils::trim"],[245,"redstone::utils::trim_zeros"],[247,"core::option"],[248,"alloc::vec"],[249,"core::ops::function"],[250,"core::fmt"],[251,"core::result"],[252,"core::any"],[253,"alloc::string"],[254,"core::cmp"]],"i":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,20,20,20,20,20,20,20,20,20,20,20,20,20,0,23,23,23,23,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,27,0,33,0,0,30,0,33,0,48,48,0,48,0,48,48,48,48,48,48,48,8,8,8,0,8,0,8,8,8,8,8,8,8,8,8,8,8,8,8,35,8,8,8,8,8,8,35,8,8,8,8,8,8,0,37,0,0,38,39,0,49,0,0,0,0,49,49,49,1,1,1,0,49,0,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,5,5,5,5,0,40,40,40,40,40,40,40,40,40,40,40,40,0,0,40,40,40,40,40,0,0,19,19,19,19,19,19,19,19,19,19,19,19,0,0,19,19,19,19,0,0,0,0,0,41,0,0,45,0,42,0,45,0,46,0,47],"f":"`````````````{{{f{{f{{d{b}}}}}}h}{{f{b}}}}{{h{f{j}}}{{f{b}}}}{{{l{h}}{f{j}}}{{f{{f{{d{b}}}}}}}}`{{cei}g{}{}{}{{Ab{{l{g}}}{{n{A`}}}}}}`{{{l{c}}}{{l{e}}}{}{}}{{{l{Adc}}}{{l{Ade}}}{}{}}`{{{l{h}}b}{{d{Af}}}}{{{l{h}}{l{AdAh}}}Aj}{cc{}}{ce{}{}}`{{{l{h}}{l{{An{Al}}}}}{{d{Af}}}}`{c{{B`{e}}}{}{}}0{{{l{c}}}Bb{}}{{{l{h}}Af{l{{An{{d{b}}}}}}}{{f{b}}}}{{{l{h}}AfBd}Bd}5{{hBf}Bh}{{hBj}Bh}`=<;{{{l{Bh}}{l{Bh}}}Bl}{{{l{Bh}}{l{AdAh}}}Aj}:9`776`9`{{{l{Bn}}b}{{d{Af}}}}{{{l{Bn}}{l{{An{Al}}}}}{{d{Af}}}}{{{l{Bn}}Af{l{{An{{d{b}}}}}}}{{f{b}}}}{{{l{Bn}}AfBd}Bd}`````{{{l{{An{Al}}}}}{{C`{Al}}}}`{{{f{Al}}{f{Al}}}{{f{Al}}}}{{{C`{Al}}{C`{Al}}Al}{{C`{Al}}}}```````````{{{l{Cb}}}Cd}{{{l{Cf}}}Cd}```{{ceg}cCh{{Cj{{l{c}}}{{n{Bl}}}}}{{Ab{{l{c}}}{{n{A`}}}}}}{{Clce}Cl{}{{Cj{{l{Cl}}}{{n{A`}}}}}}{{Blc}Cn{{Ab{}{{n{A`}}}}}}{{{Db{}{{D`{c}}}}e}g{}{{Cj{{l{c}}}{{n{A`}}}}}{}}`{{{l{c}}}{{l{e}}}{}{}}{{{l{Adc}}}{{l{Ade}}}{}{}}`{cc{}}`{ce{}{}}{CdCn}{A`Dd}{c{{B`{e}}}{}{}}0{{{l{c}}}Bb{}}4`````````````{{cei}g{}{}{}{{Ab{{l{g}}}{{n{A`}}}}}}87{{{l{A`}}}A`}{{{l{c}}{l{Ade}}}Cn{}{}}{{{l{c}}}Cn{}}{{{l{Df}}}Al}{{{l{A`}}}Dh}{cA`Df}{{{l{A`}}{l{AdAh}}}Aj}0=<{{{l{Df}}}Cd}{{{l{c}}}e{}{}}{{{l{c}}}Cd{}}<<;?`{{{l{Dj}}}c{}}``{cDl{}}{DnDn}`````````{{{l{b}}}Cd}0{{{f{Al}}}b}{CdCn}0{A`Dd}0`````````````````{{cei}g{}{}{}{{Ab{{l{g}}}{{n{A`}}}}}}{{{l{c}}}{{l{e}}}{}{}}{{{l{Adc}}}{{l{Ade}}}{}{}}{{{l{j}}}j}{{{l{c}}{l{Ade}}}Cn{}{}}{{{l{c}}}Cn{}}`{{{l{j}}{l{j}}}Bl}{{{l{j}}{l{AdAh}}}Aj}{cc{}}{ce{}{}}``{{{l{c}}}e{}{}}{{{l{Ad{f{Al}}}}}j}{{{l{Ad{f{Al}}}}Af}{{f{j}}}}{c{{B`{e}}}{}{}}0{{{l{c}}}Bb{}}5`>=<{{{l{E`}}}E`};:{{{l{E`}}{l{E`}}}Bl}`{{{l{E`}}{l{AdAh}}}Aj}987{{{l{Ad{f{Al}}}}Af}E`}{{{l{Ad{f{Al}}}}AfAf}{{f{E`}}}}665`:{{{l{Ad{f{Al}}}}}Cn}`{{cei}g{}{}{}{{Ab{{l{g}}}{{n{A`}}}}}}{{{l{c}}}{{l{e}}}{}{}}{{{l{Adc}}}{{l{Ade}}}{}{}}{{{l{Bf}}}Bf}{{{l{c}}{l{Ade}}}Cn{}{}}{{{l{c}}}Cn{}}`{{{l{Bf}}{l{AdAh}}}Aj}{cc{}}{ce{}{}}{{{l{Ad{f{Al}}}}}Bf}{{{l{c}}}e{}{}}{{{l{Ad{f{Al}}}}}Af}2{c{{B`{e}}}{}{}}0{{{l{c}}}Bb{}}5`````{{{l{Eb}}}c{}}````{{EdEd}Ed}{{ccc}{{d{c}}}Ef}{{{Ej{}{{Eh{c}}}}}c{}}`{{{l{AdEl}}Af}c{}}`{EnEn}","D":"Ed","p":[[8,"U256",137],[6,"Option",247],[5,"Vec",248],[5,"Config",16],[5,"DataPackage",169],[1,"reference"],[17,"Output"],[6,"Error",98],[10,"FnOnce",249],[0,"mut"],[1,"usize"],[5,"Formatter",250],[8,"Result",250],[1,"u8"],[1,"slice"],[6,"Result",251],[5,"TypeId",252],[1,"u64"],[5,"Payload",211],[5,"ProcessorResult",37],[8,"Bytes",137],[1,"bool"],[10,"Validator",51],[1,"array"],[10,"AsAsciiStr",74],[5,"String",253],[10,"AsHexStr",74],[10,"Debug",250],[10,"Fn",249],[10,"Assert",78],[1,"unit"],[17,"ErrorArg"],[10,"Unwrap",78],[1,"never"],[10,"ContractErrorContent",98],[1,"u16"],[10,"Flattened",131],[10,"FromBytesRepr",133],[10,"Sanitized",133],[5,"DataPoint",190],[10,"FilterSome",234],[10,"Avg",236],[10,"PartialOrd",254],[17,"Item"],[10,"Median",236],[10,"Trim",243],[10,"TrimZeros",245],[5,"Casper",85],[10,"NetworkSpecific",137]],"r":[],"b":[[120,"impl-Debug-for-Error"],[121,"impl-Display-for-Error"]],"c":"OjAAAAAAAAA=","e":"OzAAAAEAAM0AEwABAA0AEAAAABIAAAAUAAEAFwABABwAAAAeAAYAJwAEAC8AAgAzAAAAOQAgAFsAAABdAAUAZgAAAHAACgB9ADYAtgASAMsAEQDfABgA"}]\ ]')); if (typeof exports !== 'undefined') exports.searchIndex = searchIndex; else if (window.initSearch) window.initSearch(searchIndex); diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/settings.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/settings.html index 9631dcb2..6da7f2d5 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/settings.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/settings.html @@ -1 +1 @@ -Settings

Rustdoc settings

Back
\ No newline at end of file +Settings

Rustdoc settings

Back
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/core/aggregator.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/core/aggregator.rs.html index e839b506..ed9efa50 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/core/aggregator.rs.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/core/aggregator.rs.html @@ -1,4 +1,4 @@ -aggregator.rs - source
1
+aggregator.rs - source
1
 2
 3
 4
@@ -289,6 +289,12 @@
 289
 290
 291
+292
+293
+294
+295
+296
+297
 
use crate::{
     core::{config::Config, validator::Validator},
     network::specific::U256,
@@ -368,6 +374,9 @@
         helpers::iter_into::{IterInto, IterIntoOpt, OptIterIntoOpt},
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_aggregate_matrix() {
         let matrix = vec![
@@ -445,6 +454,9 @@
         protocol::data_package::DataPackage,
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_make_value_signer_matrix_empty() {
         let config = Config::test();
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/core/config.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/core/config.rs.html
index 0b9ca7f7..a5b2ec60 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/core/config.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/core/config.rs.html
@@ -1,4 +1,4 @@
-config.rs - source
1
+config.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/core/mod.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/core/mod.rs.html
index f278fb16..3aa3fec4 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/core/mod.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/core/mod.rs.html
@@ -1,4 +1,4 @@
-mod.rs - source
1
+mod.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/core/processor.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/core/processor.rs.html
index 2e92e10d..15860266 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/core/processor.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/core/processor.rs.html
@@ -1,4 +1,4 @@
-processor.rs - source
1
+processor.rs - source
1
 2
 3
 4
@@ -99,6 +99,9 @@
 99
 100
 101
+102
+103
+104
 
use crate::{
     core::{
         aggregator::aggregate_values, config::Config, processor_result::ProcessorResult,
@@ -160,6 +163,9 @@
         protocol::{data_package::DataPackage, payload::Payload},
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_make_processor_result() {
         let data_packages = vec![
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/core/processor_result.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/core/processor_result.rs.html
index ecdffb37..8352b915 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/core/processor_result.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/core/processor_result.rs.html
@@ -1,4 +1,4 @@
-processor_result.rs - source
1
+processor_result.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/core/validator.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/core/validator.rs.html
index 1fed8ca0..30f7ee53 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/core/validator.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/core/validator.rs.html
@@ -1,4 +1,4 @@
-validator.rs - source
1
+validator.rs - source
1
 2
 3
 4
@@ -284,6 +284,9 @@
 284
 285
 286
+287
+288
+289
 
use crate::{
     core::config::Config,
     network::{
@@ -421,6 +424,9 @@
     };
     use itertools::Itertools;
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_feed_index() {
         let config = Config::test();
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/crypto/keccak256.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/crypto/keccak256.rs.html
index 7e62e207..aadbac5d 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/crypto/keccak256.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/crypto/keccak256.rs.html
@@ -1,4 +1,4 @@
-keccak256.rs - source
1
+keccak256.rs - source
1
 2
 3
 4
@@ -34,20 +34,46 @@
 34
 35
 36
-
use sha3::{Digest, Keccak256};
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+
use crate::crypto::Keccak256Hash;
+#[cfg(not(all(feature = "crypto_radix", target_arch = "wasm32")))]
+use sha3::Digest;
 
-pub fn keccak256(data: &[u8]) -> Box<[u8]> {
-    Keccak256::new_with_prefix(data)
+#[cfg(not(all(feature = "crypto_radix", target_arch = "wasm32")))]
+pub fn keccak256(data: &[u8]) -> Keccak256Hash {
+    sha3::Keccak256::new_with_prefix(data)
         .finalize()
         .as_slice()
-        .into()
+        .try_into()
+        .unwrap()
 }
 
-#[cfg(feature = "helpers")]
+#[cfg(all(feature = "crypto_radix", target_arch = "wasm32"))]
+pub fn keccak256(data: &[u8]) -> Keccak256Hash {
+    scrypto::prelude::CryptoUtils::keccak256_hash(data).0
+}
+
+#[cfg(not(all(feature = "crypto_radix", target_arch = "wasm32")))]
+#[cfg(feature = "helpers")]
 #[cfg(test)]
 mod tests {
     use crate::{crypto::keccak256::keccak256, helpers::hex::hex_to_bytes};
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const MESSAGE: &str = "415641580000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d394303d018d79bf0ba000000020000001";
     const MESSAGE_HASH: &str = "f0805644755393876d0e917e553f0c206f8bc68b7ebfe73a79d2a9e7f5a4cea6";
     const EMPTY_MESSAGE_HASH: &str =
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/crypto/mod.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/crypto/mod.rs.html
index fa282223..c3470603 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/crypto/mod.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/crypto/mod.rs.html
@@ -1,5 +1,13 @@
-mod.rs - source
1
+mod.rs - source
1
 2
+3
+4
+5
+6
 
mod keccak256;
 pub(crate) mod recover;
+
+pub(crate) type Keccak256Hash = [u8; 32];
+pub(crate) type Secp256SigRs = [u8; 64];
+pub(crate) type EcdsaUncompressedPublicKey = [u8; 65];
 
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/crypto/recover.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/crypto/recover.rs.html index f03e84b0..3b917f5c 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/crypto/recover.rs.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/crypto/recover.rs.html @@ -1,4 +1,4 @@ -recover.rs - source
1
+recover.rs - source
1
 2
 3
 4
@@ -131,14 +131,59 @@
 131
 132
 133
-
use crate::crypto::{keccak256, recover::crypto256::recover_public_key};
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+
use crate::crypto::{
+    keccak256, recover::crypto256::recover_public_key, EcdsaUncompressedPublicKey, Keccak256Hash,
+    Secp256SigRs,
+};
 
 pub fn recover_address(message: Vec<u8>, signature: Vec<u8>) -> Vec<u8> {
-    let recovery_byte = signature[64]; // 65-byte representation
+    //TODO: check malleability support by the libraries
+    let recovery_byte = signature[64]; // 65-byte representation
     let msg_hash = keccak256::keccak256(message.as_slice());
     let key = recover_public_key(
         msg_hash,
-        &signature[..64],
+        signature[..64].try_into().unwrap(),
         recovery_byte - (if recovery_byte >= 27 { 27 } else { 0 }),
     );
     let key_hash = keccak256::keccak256(&key[1..]); // skip first uncompressed-key byte
@@ -148,66 +193,100 @@
 
 #[cfg(feature = "crypto_secp256k1")]
 pub(crate) mod crypto256 {
+    use super::{EcdsaUncompressedPublicKey, Keccak256Hash, Secp256SigRs};
     use crate::network::{assert::Unwrap, error::Error};
     use secp256k1::{ecdsa::RecoverableSignature, Message, Secp256k1 as Secp256k1Curve};
 
     pub(crate) fn recover_public_key(
-        message_hash: Box<[u8]>,
-        signature_bytes: &[u8],
+        message_hash: Keccak256Hash,
+        signature_bytes: Secp256SigRs,
         recovery_byte: u8,
-    ) -> Box<[u8]> {
-        let msg = Message::from_digest_slice(message_hash.as_ref())
-            .unwrap_or_revert(|_| Error::CryptographicError(message_hash.len()));
+    ) -> EcdsaUncompressedPublicKey {
+        let msg = Message::from_digest(message_hash);
 
         let recovery_id = secp256k1::ecdsa::RecoveryId::from_i32(recovery_byte.into())
             .unwrap_or_revert(|_| Error::CryptographicError(recovery_byte.into()));
 
         let sig: RecoverableSignature =
-            RecoverableSignature::from_compact(signature_bytes, recovery_id)
+            RecoverableSignature::from_compact(signature_bytes.as_slice(), recovery_id)
                 .unwrap_or_revert(|_| Error::CryptographicError(signature_bytes.len()));
 
         let public_key = Secp256k1Curve::new().recover_ecdsa(&msg, &sig);
 
-        public_key.unwrap().serialize_uncompressed().into()
+        public_key.unwrap().serialize_uncompressed()
     }
 }
 
 #[cfg(feature = "crypto_k256")]
 pub(crate) mod crypto256 {
+    use super::{EcdsaUncompressedPublicKey, Keccak256Hash, Secp256SigRs};
     use crate::network::{assert::Unwrap, error::Error};
     use k256::ecdsa::{RecoveryId, Signature, VerifyingKey};
 
     pub(crate) fn recover_public_key(
-        message_hash: Box<[u8]>,
-        signature_bytes: &[u8],
+        message_hash: Keccak256Hash,
+        signature_bytes: Secp256SigRs,
         recovery_byte: u8,
-    ) -> Box<[u8]> {
+    ) -> EcdsaUncompressedPublicKey {
         let recovery_id = RecoveryId::from_byte(recovery_byte)
             .unwrap_or_revert(|_| Error::CryptographicError(recovery_byte.into()));
 
-        let signature = Signature::try_from(signature_bytes)
+        let signature = Signature::try_from(signature_bytes.as_slice())
             .unwrap_or_revert(|_| Error::CryptographicError(signature_bytes.len()));
 
         let recovered_key =
             VerifyingKey::recover_from_prehash(message_hash.as_ref(), &signature, recovery_id)
-                .map(|key| key.to_encoded_point(false).to_bytes());
+                .map(|key| key.to_encoded_point(false).to_bytes())
+                .unwrap_or_revert(|_| Error::CryptographicError(0));
 
-        recovered_key.unwrap()
+        recovered_key.as_ref().try_into().unwrap()
     }
 }
 
-#[cfg(all(not(feature = "crypto_k256"), not(feature = "crypto_secp256k1")))]
+#[cfg(all(feature = "crypto_radix", target_arch = "wasm32"))]
 pub(crate) mod crypto256 {
+    use super::{EcdsaUncompressedPublicKey, Keccak256Hash, Secp256SigRs};
+    use crate::network::assert::Unwrap;
+    use crate::network::error::Error;
+    use radix_common::crypto::{Hash, IsHash, Secp256k1Signature};
+    use scrypto::crypto_utils::CryptoUtils;
+
     pub(crate) fn recover_public_key(
-        _message_hash: Box<[u8]>,
-        _signature_bytes: &[u8],
+        message_hash: Keccak256Hash,
+        signature_bytes: Secp256SigRs,
+        recovery_byte: u8,
+    ) -> EcdsaUncompressedPublicKey {
+        let hash = Hash::from_bytes(message_hash);
+
+        let mut sig_vec = Vec::with_capacity(65);
+        sig_vec.push(recovery_byte);
+        sig_vec.extend(signature_bytes);
+        let signature = Secp256k1Signature::try_from(sig_vec.as_slice())
+            .unwrap_or_revert(|_| Error::CryptographicError(signature_bytes.len()));
+
+        CryptoUtils::secp256k1_ecdsa_verify_and_key_recover_uncompressed(hash, signature).0
+    }
+}
+
+#[cfg(all(
+    not(feature = "crypto_k256"),
+    not(feature = "crypto_secp256k1"),
+    not(all(feature = "crypto_radix", target_arch = "wasm32"))
+))]
+pub(crate) mod crypto256 {
+    use super::{EcdsaUncompressedPublicKey, Keccak256Hash, Secp256SigRs};
+
+    pub(crate) fn recover_public_key(
+        _message_hash: Keccak256Hash,
+        _signature_bytes: Secp256SigRs,
         _recovery_byte: u8,
-    ) -> Box<[u8]> {
+    ) -> EcdsaUncompressedPublicKey {
         panic!("Not implemented!")
     }
 }
 
-#[cfg(feature = "helpers")]
+#[cfg(not(all(feature = "crypto_radix", target_arch = "wasm32")))]
+#[cfg(feature = "helpers")]
 #[cfg(test)]
 mod tests {
     use crate::{
@@ -215,6 +294,9 @@
         helpers::hex::hex_to_bytes,
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const MESSAGE: &str = "415641580000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d394303d018d79bf0ba000000020000001";
     const MESSAGE_HASH: &str = "f0805644755393876d0e917e553f0c206f8bc68b7ebfe73a79d2a9e7f5a4cea6";
     const SIG_V27: &str = "475195641dae43318e194c3d9e5fc308773d6fdf5e197e02644dfd9ca3d19e3e2bd7d8656428f7f02e658a16b8f83722169c57126cc50bec8fad188b1bac6d19";
@@ -228,16 +310,16 @@
 
     #[test]
     fn test_recover_public_key_v27() {
-        let public_key = recover_public_key(u8_box(MESSAGE_HASH), &u8_box(SIG_V27), 0);
+        let public_key = recover_public_key(u8_slice(MESSAGE_HASH), u8_slice(SIG_V27), 0);
 
-        assert_eq!(u8_box(PUBLIC_KEY_V27), public_key);
+        assert_eq!(u8_slice(PUBLIC_KEY_V27), public_key);
     }
 
     #[test]
     fn test_recover_public_key_v28() {
-        let public_key = recover_public_key(u8_box(MESSAGE_HASH), &u8_box(SIG_V28), 1);
+        let public_key = recover_public_key(u8_slice(MESSAGE_HASH), u8_slice(SIG_V28), 1);
 
-        assert_eq!(u8_box(PUBLIC_KEY_V28), public_key);
+        assert_eq!(u8_slice(PUBLIC_KEY_V28), public_key);
     }
 
     #[test]
@@ -260,8 +342,8 @@
         assert_eq!(hex_to_bytes(ADDRESS_V28.into()), address);
     }
 
-    fn u8_box(str: &str) -> Box<[u8]> {
-        hex_to_bytes(str.into()).as_slice().into()
+    fn u8_slice<const N: usize>(str: &str) -> [u8; N] {
+        hex_to_bytes(str.into()).as_slice().try_into().unwrap()
     }
 }
 
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/lib.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/lib.rs.html index 8b3ee7a1..dc7e6ba2 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/lib.rs.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/lib.rs.html @@ -1,4 +1,4 @@ -lib.rs - source
1
+lib.rs - source
1
 2
 3
 4
@@ -17,7 +17,7 @@
 
//! # RedStone
 //!
 //! `redstone` is a collection of utilities to make deserializing&decrypting RedStone payload.
-//! It contains a pure Rust implementation and also an extension for some networks.
+//! It includes a pure Rust implementation, along with extensions for certain networks.
 //!
 //! Different crypto-mechanisms are easily injectable.
 //! The current implementation contains `secp256k1`- and `k256`-based variants.
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/as_str.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/as_str.rs.html
index f0b58bfb..95d88b4b 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/as_str.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/as_str.rs.html
@@ -1,4 +1,4 @@
-as_str.rs - source
1
+as_str.rs - source
1
 2
 3
 4
@@ -115,6 +115,9 @@
 115
 116
 117
+118
+119
+120
 
extern crate alloc;
 
 use crate::network::specific::U256;
@@ -214,6 +217,9 @@
         specific::U256,
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const ETH: u32 = 4543560u32;
 
     #[test]
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/assert.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/assert.rs.html
index cfd43818..c6e40334 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/assert.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/assert.rs.html
@@ -1,4 +1,4 @@
-assert.rs - source
1
+assert.rs - source
1
 2
 3
 4
@@ -134,6 +134,12 @@
 134
 135
 136
+137
+138
+139
+140
+141
+142
 
use crate::{
     network::{error::Error, specific::revert},
     print_debug,
@@ -217,6 +223,9 @@
         error::Error,
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_assert_or_revert_bool_with_true() {
         assert_or_revert_bool_with(true, || Error::ArrayIsEmpty);
@@ -244,6 +253,9 @@
 mod unwrap_or_revert_tests {
     use crate::network::{assert::Unwrap, error::Error};
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_unwrap_or_revert_some() {
         let result = Some(543).unwrap_or_revert(|_| Error::CryptographicError(333));
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/casper/error.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/casper/error.rs.html
index 53deca0d..3a702daf 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/casper/error.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/casper/error.rs.html
@@ -1,4 +1,4 @@
-error.rs - source
1
+error.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/casper/from_bytes_repr.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/casper/from_bytes_repr.rs.html
index 7d4c10ab..30949a30 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/casper/from_bytes_repr.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/casper/from_bytes_repr.rs.html
@@ -1,4 +1,4 @@
-from_bytes_repr.rs - source
1
+from_bytes_repr.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/casper/mod.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/casper/mod.rs.html
index 8df66718..de5a1dd8 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/casper/mod.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/casper/mod.rs.html
@@ -1,4 +1,4 @@
-mod.rs - source
1
+mod.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/error.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/error.rs.html
index 4c0588a6..e61e278d 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/error.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/error.rs.html
@@ -1,4 +1,4 @@
-error.rs - source
1
+error.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/flattened.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/flattened.rs.html
index f8226f69..3dd50203 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/flattened.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/flattened.rs.html
@@ -1,4 +1,4 @@
-flattened.rs - source
1
+flattened.rs - source
1
 2
 3
 4
@@ -33,6 +33,9 @@
 33
 34
 35
+36
+37
+38
 
use crate::network::specific::Bytes;
 
 pub trait Flattened<T> {
@@ -50,6 +53,9 @@
 mod tests {
     use crate::network::{flattened::Flattened, specific::Bytes};
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_bytes_flattened() {
         #[allow(clippy::useless_conversion)]
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/from_bytes_repr.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/from_bytes_repr.rs.html
index 0c7663c5..46079bf7 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/from_bytes_repr.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/from_bytes_repr.rs.html
@@ -1,4 +1,4 @@
-from_bytes_repr.rs - source
1
+from_bytes_repr.rs - source
1
 2
 3
 4
@@ -126,6 +126,9 @@
 126
 127
 128
+129
+130
+131
 
use crate::network::specific::VALUE_SIZE;
 
 pub trait FromBytesRepr<T> {
@@ -160,6 +163,9 @@
         specific::{U256, VALUE_SIZE},
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[cfg(feature = "network_radix")]
     use crate::network::radix::u256_ext::U256Ext;
 
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/mod.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/mod.rs.html
index f79fb758..55e94cdf 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/mod.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/mod.rs.html
@@ -1,4 +1,4 @@
-mod.rs - source
1
+mod.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/print_debug.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/print_debug.rs.html
index 1fca4faf..52808df8 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/print_debug.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/print_debug.rs.html
@@ -1,4 +1,4 @@
-print_debug.rs - source
1
+print_debug.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/specific.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/specific.rs.html
index 8d698709..33830b2a 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/specific.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/specific.rs.html
@@ -1,4 +1,4 @@
-specific.rs - source
1
+specific.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/protocol/constants.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/protocol/constants.rs.html
index 3e2f4fd5..7b1e4887 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/protocol/constants.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/protocol/constants.rs.html
@@ -1,4 +1,4 @@
-constants.rs - source
1
+constants.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/protocol/data_package.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/protocol/data_package.rs.html
index a1d603e6..f3e8cc32 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/protocol/data_package.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/protocol/data_package.rs.html
@@ -1,4 +1,4 @@
-data_package.rs - source
1
+data_package.rs - source
1
 2
 3
 4
@@ -213,6 +213,10 @@
 213
 214
 215
+216
+217
+218
+219
 
use crate::{
     crypto::recover::recover_address,
     network::as_str::AsHexStr,
@@ -281,7 +285,8 @@
     }
 }
 
-#[cfg(feature = "helpers")]
+#[cfg(not(all(feature = "crypto_radix", target_arch = "wasm32")))]
+#[cfg(feature = "helpers")]
 #[cfg(test)]
 mod tests {
     use crate::{
@@ -297,6 +302,9 @@
         },
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const DATA_PACKAGE_BYTES_1: &str = "4554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000360cafc94e018d79bf0ba00000002000000151afa8c5c3caf6004b42c0fb17723e524f993b9ecbad3b9bce5ec74930fa436a3660e8edef10e96ee5f222de7ef5787c02ca467c0ec18daa2907b43ac20c63c11c";
     const DATA_PACKAGE_BYTES_2: &str = "4554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000360cdd851e018d79bf0ba000000020000001473fd9dc72e6814a7de719b403cf4c9eba08934a643fd0666c433b806b31e69904f2226ffd3c8ef75861b11b5e32a1fda4b1458e0da4605a772dfba2a812f3ee1b";
 
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/protocol/data_point.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/protocol/data_point.rs.html
index e643085a..b9e92d43 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/protocol/data_point.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/protocol/data_point.rs.html
@@ -1,4 +1,4 @@
-data_point.rs - source
1
+data_point.rs - source
1
 2
 3
 4
@@ -155,6 +155,9 @@
 155
 156
 157
+158
+159
+160
 
use crate::{
     network::{
         as_str::{AsAsciiStr, AsHexStr},
@@ -229,6 +232,9 @@
     };
     use std::ops::Shr;
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const DATA_POINT_BYTES_TAIL: &str = "4554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000360cafc94e";
     const VALUE: u128 = 232141080910;
 
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/protocol/marker.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/protocol/marker.rs.html
index 15b31817..7646024c 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/protocol/marker.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/protocol/marker.rs.html
@@ -1,4 +1,4 @@
-marker.rs - source
1
+marker.rs - source
1
 2
 3
 4
@@ -64,6 +64,9 @@
 64
 65
 66
+67
+68
+69
 
use crate::{
     network::{assert::Assert, error::Error},
     protocol::constants::{REDSTONE_MARKER, REDSTONE_MARKER_BS},
@@ -87,6 +90,9 @@
         protocol::{constants::REDSTONE_MARKER_BS, marker::trim_redstone_marker},
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const PAYLOAD_TAIL: &str = "1c000f000000000002ed57011e0000";
 
     #[test]
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/protocol/mod.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/protocol/mod.rs.html
index fbd60f5b..e7d0b176 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/protocol/mod.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/protocol/mod.rs.html
@@ -1,4 +1,4 @@
-mod.rs - source
1
+mod.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/protocol/payload.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/protocol/payload.rs.html
index 1cd14131..bfb8b9b0 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/protocol/payload.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/protocol/payload.rs.html
@@ -1,4 +1,4 @@
-payload.rs - source
1
+payload.rs - source
1
 2
 3
 4
@@ -102,6 +102,10 @@
 102
 103
 104
+105
+106
+107
+108
 
use crate::{
     network::{assert::Assert, error::Error},
     protocol::{
@@ -145,7 +149,8 @@
     payload.trim_end(DATA_PACKAGES_COUNT_BS)
 }
 
-#[cfg(feature = "helpers")]
+#[cfg(not(all(feature = "crypto_radix", target_arch = "wasm32")))]
+#[cfg(feature = "helpers")]
 #[cfg(test)]
 mod tests {
     use crate::{
@@ -156,6 +161,9 @@
         },
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const PAYLOAD_METADATA_BYTES: &str = "000f000000";
     const PAYLOAD_METADATA_WITH_UNSIGNED_BYTE: &str = "000f55000001";
     const PAYLOAD_METADATA_WITH_UNSIGNED_BYTES: &str = "000f11223344556677889900aabbccddeeff000010";
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/utils/filter.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/utils/filter.rs.html
index f28b29ef..7043d176 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/utils/filter.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/utils/filter.rs.html
@@ -1,4 +1,4 @@
-filter.rs - source
1
+filter.rs - source
1
 2
 3
 4
@@ -19,6 +19,9 @@
 19
 20
 21
+22
+23
+24
 
pub(crate) trait FilterSome<Output> {
     fn filter_some(&self) -> Output;
 }
@@ -33,6 +36,9 @@
 mod filter_some_tests {
     use crate::utils::filter::FilterSome;
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_filter_some() {
         let values = [None, Some(23u64), None, Some(12), Some(12), None, Some(23)];
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/utils/median.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/utils/median.rs.html
index c329ff3b..62b2749e 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/utils/median.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/utils/median.rs.html
@@ -1,4 +1,4 @@
-median.rs - source
1
+median.rs - source
1
 2
 3
 4
@@ -185,6 +185,9 @@
 185
 186
 187
+188
+189
+190
 
use crate::network::{assert::Assert, error::Error::ArrayIsEmpty, specific::U256};
 use std::ops::{Add, Rem, Shr};
 
@@ -281,6 +284,9 @@
     use itertools::Itertools;
     use std::fmt::Debug;
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[cfg(feature = "network_radix")]
     use crate::network::radix::u256_ext::U256Ext;
 
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/utils/mod.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/utils/mod.rs.html
index 44258e67..a99c109d 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/utils/mod.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/utils/mod.rs.html
@@ -1,4 +1,4 @@
-mod.rs - source
1
+mod.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/utils/trim.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/utils/trim.rs.html
index 551a41a8..63a6ae2c 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/utils/trim.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/utils/trim.rs.html
@@ -1,4 +1,4 @@
-trim.rs - source
1
+trim.rs - source
1
 2
 3
 4
@@ -147,6 +147,19 @@
 147
 148
 149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
 
use crate::network::{
     assert::Unwrap, error::Error, from_bytes_repr::FromBytesRepr, specific::U256,
 };
@@ -196,6 +209,9 @@
         utils::trim::Trim,
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const MARKER_DECIMAL: u64 = 823907890102272;
 
     fn redstone_marker_bytes() -> Vec<u8> {
@@ -253,8 +269,11 @@
         let (_, result): (_, u64) = test_trim_end(size);
         assert_eq!(result, MARKER_DECIMAL);
 
-        let (_, result): (_, usize) = test_trim_end(size);
-        assert_eq!(result, 823907890102272usize);
+        #[cfg(not(target_arch = "wasm32"))]
+        {
+            let (_, result): (_, usize) = test_trim_end(size);
+            assert_eq!(result, 823907890102272usize);
+        }
 
         let (_rest, result): (_, Vec<u8>) = test_trim_end(size);
         assert_eq!(result.as_slice().len(), size.min(REDSTONE_MARKER_BS));
@@ -271,9 +290,16 @@
         assert_eq!(x, 18446744073709551615);
     }
 
+    #[cfg(target_arch = "wasm32")]
+    #[should_panic(expected = "Number overflow: 823907890102272")]
+    #[test]
+    fn test_trim_end_u64_overflow_usize_wasm32() {
+        let (_, _): (_, usize) = test_trim_end(REDSTONE_MARKER_BS);
+    }
+
     #[should_panic(expected = "Number overflow: 18591708106338011145")]
     #[test]
-    fn test_trim_end_u64_overflow() {
+    fn test_trim_end_u64_overflow_u64() {
         let mut bytes = vec![1u8, 2, 3, 4, 5, 6, 7, 8, 9];
 
         let _: u64 = bytes.trim_end(9);
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/utils/trim_zeros.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/utils/trim_zeros.rs.html
index 0d223de1..9be0496f 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/utils/trim_zeros.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/utils/trim_zeros.rs.html
@@ -1,4 +1,4 @@
-trim_zeros.rs - source
1
+trim_zeros.rs - source
1
 2
 3
 4
@@ -43,6 +43,9 @@
 43
 44
 45
+46
+47
+48
 
pub trait TrimZeros {
     fn trim_zeros(self) -> Self;
 }
@@ -69,6 +72,9 @@
 mod tests {
     use crate::{protocol::constants::REDSTONE_MARKER, utils::trim_zeros::TrimZeros};
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     fn redstone_marker_bytes() -> Vec<u8> {
         REDSTONE_MARKER.as_slice().into()
     }
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/main-d2fab2bf619172d3.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/main-d2fab2bf619172d3.js
new file mode 100644
index 00000000..8fc48ede
--- /dev/null
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/main-d2fab2bf619172d3.js
@@ -0,0 +1,11 @@
+"use strict";window.RUSTDOC_TOOLTIP_HOVER_MS=300;window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS=450;function resourcePath(basename,extension){return getVar("root-path")+basename+getVar("resource-suffix")+extension}function hideMain(){addClass(document.getElementById(MAIN_ID),"hidden")}function showMain(){removeClass(document.getElementById(MAIN_ID),"hidden")}function blurHandler(event,parentElem,hideCallback){if(!parentElem.contains(document.activeElement)&&!parentElem.contains(event.relatedTarget)){hideCallback()}}window.rootPath=getVar("root-path");window.currentCrate=getVar("current-crate");function setMobileTopbar(){const mobileTopbar=document.querySelector(".mobile-topbar");const locationTitle=document.querySelector(".sidebar h2.location");if(mobileTopbar){const mobileTitle=document.createElement("h2");mobileTitle.className="location";if(hasClass(document.querySelector(".rustdoc"),"crate")){mobileTitle.innerHTML=`Crate ${window.currentCrate}`}else if(locationTitle){mobileTitle.innerHTML=locationTitle.innerHTML}mobileTopbar.appendChild(mobileTitle)}}function getVirtualKey(ev){if("key"in ev&&typeof ev.key!=="undefined"){return ev.key}const c=ev.charCode||ev.keyCode;if(c===27){return"Escape"}return String.fromCharCode(c)}const MAIN_ID="main-content";const SETTINGS_BUTTON_ID="settings-menu";const ALTERNATIVE_DISPLAY_ID="alternative-display";const NOT_DISPLAYED_ID="not-displayed";const HELP_BUTTON_ID="help-button";function getSettingsButton(){return document.getElementById(SETTINGS_BUTTON_ID)}function getHelpButton(){return document.getElementById(HELP_BUTTON_ID)}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}function insertAfter(newNode,referenceNode){referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling)}function getOrCreateSection(id,classes){let el=document.getElementById(id);if(!el){el=document.createElement("section");el.id=id;el.className=classes;insertAfter(el,document.getElementById(MAIN_ID))}return el}function getAlternativeDisplayElem(){return getOrCreateSection(ALTERNATIVE_DISPLAY_ID,"content hidden")}function getNotDisplayedElem(){return getOrCreateSection(NOT_DISPLAYED_ID,"hidden")}function switchDisplayedElement(elemToDisplay){const el=getAlternativeDisplayElem();if(el.children.length>0){getNotDisplayedElem().appendChild(el.firstElementChild)}if(elemToDisplay===null){addClass(el,"hidden");showMain();return}el.appendChild(elemToDisplay);hideMain();removeClass(el,"hidden")}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}function preLoadCss(cssUrl){const link=document.createElement("link");link.href=cssUrl;link.rel="preload";link.as="style";document.getElementsByTagName("head")[0].appendChild(link)}(function(){const isHelpPage=window.location.pathname.endsWith("/help.html");function loadScript(url,errorCallback){const script=document.createElement("script");script.src=url;if(errorCallback!==undefined){script.onerror=errorCallback}document.head.append(script)}getSettingsButton().onclick=event=>{if(event.ctrlKey||event.altKey||event.metaKey){return}window.hideAllModals(false);addClass(getSettingsButton(),"rotate");event.preventDefault();loadScript(getVar("static-root-path")+getVar("settings-js"));setTimeout(()=>{const themes=getVar("themes").split(",");for(const theme of themes){if(theme!==""){preLoadCss(getVar("root-path")+theme+".css")}}},0)};window.searchState={loadingText:"Loading search results...",input:document.getElementsByClassName("search-input")[0],outputElement:()=>{let el=document.getElementById("search");if(!el){el=document.createElement("section");el.id="search";getNotDisplayedElem().appendChild(el)}return el},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:()=>{if(searchState.timeout!==null){clearTimeout(searchState.timeout);searchState.timeout=null}},isDisplayed:()=>searchState.outputElement().parentElement.id===ALTERNATIVE_DISPLAY_ID,focus:()=>{searchState.input.focus()},defocus:()=>{searchState.input.blur()},showResults:search=>{if(search===null||typeof search==="undefined"){search=searchState.outputElement()}switchDisplayedElement(search);searchState.mouseMovedAfterSearch=false;document.title=searchState.title},removeQueryParameters:()=>{document.title=searchState.titleBeforeSearch;if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.hash)}},hideResults:()=>{switchDisplayedElement(null);searchState.removeQueryParameters()},getQueryStringParams:()=>{const params={};window.location.search.substring(1).split("&").map(s=>{const pair=s.split("=").map(x=>x.replace(/\+/g," "));params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params},setup:()=>{const search_input=searchState.input;if(!searchState.input){return}let searchLoaded=false;function sendSearchForm(){document.getElementsByClassName("search-form")[0].submit()}function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(getVar("static-root-path")+getVar("search-js"),sendSearchForm);loadScript(resourcePath("search-index",".js"),sendSearchForm)}}search_input.addEventListener("focus",()=>{search_input.origPlaceholder=search_input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});if(search_input.value!==""){loadSearch()}const params=searchState.getQueryStringParams();if(params.search!==undefined){searchState.setLoadingSearch();loadSearch()}},setLoadingSearch:()=>{const search=searchState.outputElement();search.innerHTML="

"+searchState.loadingText+"

";searchState.showResults(search)},descShards:new Map(),loadDesc:async function({descShard,descIndex}){if(descShard.promise===null){descShard.promise=new Promise((resolve,reject)=>{descShard.resolve=resolve;const ds=descShard;const fname=`${ds.crate}-desc-${ds.shard}-`;const url=resourcePath(`search.desc/${descShard.crate}/${fname}`,".js",);loadScript(url,reject)})}const list=await descShard.promise;return list[descIndex]},loadedDescShard:function(crate,shard,data){this.descShards.get(crate)[shard].resolve(data.split("\n"))},};const toggleAllDocsId="toggle-all-docs";let savedHash="";function handleHashes(ev){if(ev!==null&&searchState.isDisplayed()&&ev.newURL){switchDisplayedElement(null);const hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.search+"#"+hash)}const elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}const pageId=window.location.hash.replace(/^#/,"");if(savedHash!==pageId){savedHash=pageId;if(pageId!==""){expandSection(pageId)}}if(savedHash.startsWith("impl-")){const splitAt=savedHash.indexOf("/");if(splitAt!==-1){const implId=savedHash.slice(0,splitAt);const assocId=savedHash.slice(splitAt+1);const implElem=document.getElementById(implId);if(implElem&&implElem.parentElement.tagName==="SUMMARY"&&implElem.parentElement.parentElement.tagName==="DETAILS"){onEachLazy(implElem.parentElement.parentElement.querySelectorAll(`[id^="${assocId}"]`),item=>{const numbered=/([^-]+)-([0-9]+)/.exec(item.id);if(item.id===assocId||(numbered&&numbered[1]===assocId)){openParentDetails(item);item.scrollIntoView();setTimeout(()=>{window.location.replace("#"+item.id)},0)}},)}}}}function onHashChange(ev){hideSidebar();handleHashes(ev)}function openParentDetails(elem){while(elem){if(elem.tagName==="DETAILS"){elem.open=true}elem=elem.parentNode}}function expandSection(id){openParentDetails(document.getElementById(id))}function handleEscape(ev){searchState.clearInputTimeout();searchState.hideResults();ev.preventDefault();searchState.defocus();window.hideAllModals(true)}function handleShortcut(ev){const disableShortcuts=getSettingValue("disable-shortcuts")==="true";if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts){return}if(document.activeElement.tagName==="INPUT"&&document.activeElement.type!=="checkbox"&&document.activeElement.type!=="radio"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":case"/":ev.preventDefault();searchState.focus();break;case"+":ev.preventDefault();expandAllDocs();break;case"-":ev.preventDefault();collapseAllDocs();break;case"?":showHelp();break;default:break}}}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);function addSidebarItems(){if(!window.SIDEBAR_ITEMS){return}const sidebar=document.getElementsByClassName("sidebar-elems")[0];function block(shortty,id,longty){const filtered=window.SIDEBAR_ITEMS[shortty];if(!filtered){return}const modpath=hasClass(document.querySelector(".rustdoc"),"mod")?"../":"";const h3=document.createElement("h3");h3.innerHTML=`${longty}`;const ul=document.createElement("ul");ul.className="block "+shortty;for(const name of filtered){let path;if(shortty==="mod"){path=`${modpath}${name}/index.html`}else{path=`${modpath}${shortty}.${name}.html`}let current_page=document.location.href.toString();if(current_page.endsWith("/")){current_page+="index.html"}const link=document.createElement("a");link.href=path;link.textContent=name;const li=document.createElement("li");if(link.href===current_page){li.classList.add("current")}li.appendChild(link);ul.appendChild(li)}sidebar.appendChild(h3);sidebar.appendChild(ul)}if(sidebar){block("primitive","primitives","Primitive Types");block("mod","modules","Modules");block("macro","macros","Macros");block("struct","structs","Structs");block("enum","enums","Enums");block("constant","constants","Constants");block("static","static","Statics");block("trait","traits","Traits");block("fn","functions","Functions");block("type","types","Type Aliases");block("union","unions","Unions");block("foreigntype","foreign-types","Foreign Types");block("keyword","keywords","Keywords");block("opaque","opaque-types","Opaque Types");block("attr","attributes","Attribute Macros");block("derive","derives","Derive Macros");block("traitalias","trait-aliases","Trait Aliases")}}window.register_implementors=imp=>{const implementors=document.getElementById("implementors-list");const synthetic_implementors=document.getElementById("synthetic-implementors-list");const inlined_types=new Set();const TEXT_IDX=0;const SYNTHETIC_IDX=1;const TYPES_IDX=2;if(synthetic_implementors){onEachLazy(synthetic_implementors.getElementsByClassName("impl"),el=>{const aliases=el.getAttribute("data-aliases");if(!aliases){return}aliases.split(",").forEach(alias=>{inlined_types.add(alias)})})}let currentNbImpls=implementors.getElementsByClassName("impl").length;const traitName=document.querySelector(".main-heading h1 > .trait").textContent;const baseIdName="impl-"+traitName+"-";const libs=Object.getOwnPropertyNames(imp);const script=document.querySelector("script[data-ignore-extern-crates]");const ignoreExternCrates=new Set((script?script.getAttribute("data-ignore-extern-crates"):"").split(","),);for(const lib of libs){if(lib===window.currentCrate||ignoreExternCrates.has(lib)){continue}const structs=imp[lib];struct_loop:for(const struct of structs){const list=struct[SYNTHETIC_IDX]?synthetic_implementors:implementors;if(struct[SYNTHETIC_IDX]){for(const struct_type of struct[TYPES_IDX]){if(inlined_types.has(struct_type)){continue struct_loop}inlined_types.add(struct_type)}}const code=document.createElement("h3");code.innerHTML=struct[TEXT_IDX];addClass(code,"code-header");onEachLazy(code.getElementsByTagName("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});const currentId=baseIdName+currentNbImpls;const anchor=document.createElement("a");anchor.href="#"+currentId;addClass(anchor,"anchor");const display=document.createElement("div");display.id=currentId;addClass(display,"impl");display.appendChild(anchor);display.appendChild(code);list.appendChild(display);currentNbImpls+=1}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}window.register_type_impls=imp=>{if(!imp||!imp[window.currentCrate]){return}window.pending_type_impls=null;const idMap=new Map();let implementations=document.getElementById("implementations-list");let trait_implementations=document.getElementById("trait-implementations-list");let trait_implementations_header=document.getElementById("trait-implementations");const script=document.querySelector("script[data-self-path]");const selfPath=script?script.getAttribute("data-self-path"):null;const mainContent=document.querySelector("#main-content");const sidebarSection=document.querySelector(".sidebar section");let methods=document.querySelector(".sidebar .block.method");let associatedTypes=document.querySelector(".sidebar .block.associatedtype");let associatedConstants=document.querySelector(".sidebar .block.associatedconstant");let sidebarTraitList=document.querySelector(".sidebar .block.trait-implementation");for(const impList of imp[window.currentCrate]){const types=impList.slice(2);const text=impList[0];const isTrait=impList[1]!==0;const traitName=impList[1];if(types.indexOf(selfPath)===-1){continue}let outputList=isTrait?trait_implementations:implementations;if(outputList===null){const outputListName=isTrait?"Trait Implementations":"Implementations";const outputListId=isTrait?"trait-implementations-list":"implementations-list";const outputListHeaderId=isTrait?"trait-implementations":"implementations";const outputListHeader=document.createElement("h2");outputListHeader.id=outputListHeaderId;outputListHeader.innerText=outputListName;outputList=document.createElement("div");outputList.id=outputListId;if(isTrait){const link=document.createElement("a");link.href=`#${outputListHeaderId}`;link.innerText="Trait Implementations";const h=document.createElement("h3");h.appendChild(link);trait_implementations=outputList;trait_implementations_header=outputListHeader;sidebarSection.appendChild(h);sidebarTraitList=document.createElement("ul");sidebarTraitList.className="block trait-implementation";sidebarSection.appendChild(sidebarTraitList);mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList)}else{implementations=outputList;if(trait_implementations){mainContent.insertBefore(outputListHeader,trait_implementations_header);mainContent.insertBefore(outputList,trait_implementations_header)}else{const mainContent=document.querySelector("#main-content");mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList)}}}const template=document.createElement("template");template.innerHTML=text;onEachLazy(template.content.querySelectorAll("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});onEachLazy(template.content.querySelectorAll("[id]"),el=>{let i=0;if(idMap.has(el.id)){i=idMap.get(el.id)}else if(document.getElementById(el.id)){i=1;while(document.getElementById(`${el.id}-${2 * i}`)){i=2*i}while(document.getElementById(`${el.id}-${i}`)){i+=1}}if(i!==0){const oldHref=`#${el.id}`;const newHref=`#${el.id}-${i}`;el.id=`${el.id}-${i}`;onEachLazy(template.content.querySelectorAll("a[href]"),link=>{if(link.getAttribute("href")===oldHref){link.href=newHref}})}idMap.set(el.id,i+1)});const templateAssocItems=template.content.querySelectorAll("section.tymethod, "+"section.method, section.associatedtype, section.associatedconstant");if(isTrait){const li=document.createElement("li");const a=document.createElement("a");a.href=`#${template.content.querySelector(".impl").id}`;a.textContent=traitName;li.appendChild(a);sidebarTraitList.append(li)}else{onEachLazy(templateAssocItems,item=>{let block=hasClass(item,"associatedtype")?associatedTypes:(hasClass(item,"associatedconstant")?associatedConstants:(methods));if(!block){const blockTitle=hasClass(item,"associatedtype")?"Associated Types":(hasClass(item,"associatedconstant")?"Associated Constants":("Methods"));const blockClass=hasClass(item,"associatedtype")?"associatedtype":(hasClass(item,"associatedconstant")?"associatedconstant":("method"));const blockHeader=document.createElement("h3");const blockLink=document.createElement("a");blockLink.href="#implementations";blockLink.innerText=blockTitle;blockHeader.appendChild(blockLink);block=document.createElement("ul");block.className=`block ${blockClass}`;const insertionReference=methods||sidebarTraitList;if(insertionReference){const insertionReferenceH=insertionReference.previousElementSibling;sidebarSection.insertBefore(blockHeader,insertionReferenceH);sidebarSection.insertBefore(block,insertionReferenceH)}else{sidebarSection.appendChild(blockHeader);sidebarSection.appendChild(block)}if(hasClass(item,"associatedtype")){associatedTypes=block}else if(hasClass(item,"associatedconstant")){associatedConstants=block}else{methods=block}}const li=document.createElement("li");const a=document.createElement("a");a.innerText=item.id.split("-")[0].split(".")[1];a.href=`#${item.id}`;li.appendChild(a);block.appendChild(li)})}outputList.appendChild(template.content)}for(const list of[methods,associatedTypes,associatedConstants,sidebarTraitList]){if(!list){continue}const newChildren=Array.prototype.slice.call(list.children);newChildren.sort((a,b)=>{const aI=a.innerText;const bI=b.innerText;return aIbI?1:0});list.replaceChildren(...newChildren)}};if(window.pending_type_impls){window.register_type_impls(window.pending_type_impls)}function addSidebarCrates(){if(!window.ALL_CRATES){return}const sidebarElems=document.getElementsByClassName("sidebar-elems")[0];if(!sidebarElems){return}const h3=document.createElement("h3");h3.innerHTML="Crates";const ul=document.createElement("ul");ul.className="block crate";for(const crate of window.ALL_CRATES){const link=document.createElement("a");link.href=window.rootPath+crate+"/index.html";link.textContent=crate;const li=document.createElement("li");if(window.rootPath!=="./"&&crate===window.currentCrate){li.className="current"}li.appendChild(link);ul.appendChild(li)}sidebarElems.appendChild(h3);sidebarElems.appendChild(ul)}function expandAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);removeClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hasClass(e,"type-contents-toggle")&&!hasClass(e,"more-examples-toggle")){e.open=true}});innerToggle.title="collapse all docs";innerToggle.children[0].innerText="\u2212"}function collapseAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);addClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(e.parentNode.id!=="implementations-list"||(!hasClass(e,"implementors-toggle")&&!hasClass(e,"type-contents-toggle"))){e.open=false}});innerToggle.title="expand all docs";innerToggle.children[0].innerText="+"}function toggleAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);if(!innerToggle){return}if(hasClass(innerToggle,"will-expand")){expandAllDocs()}else{collapseAllDocs()}}(function(){const toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}const hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";const hideImplementations=getSettingValue("auto-hide-trait-implementations")==="true";const hideLargeItemContents=getSettingValue("auto-hide-large-items")!=="false";function setImplementorsTogglesOpen(id,open){const list=document.getElementById(id);if(list!==null){onEachLazy(list.getElementsByClassName("implementors-toggle"),e=>{e.open=open})}}if(hideImplementations){setImplementorsTogglesOpen("trait-implementations-list",false);setImplementorsTogglesOpen("blanket-implementations-list",false)}onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hideLargeItemContents&&hasClass(e,"type-contents-toggle")){e.open=true}if(hideMethodDocs&&hasClass(e,"method-toggle")){e.open=false}})}());window.rustdoc_add_line_numbers_to_examples=()=>{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");if(line_numbers.length>0){return}const count=x.textContent.split("\n").length;const elems=[];for(let i=0;i{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");for(const node of line_numbers){parent.removeChild(node)}})};if(getSettingValue("line-numbers")==="true"){window.rustdoc_add_line_numbers_to_examples()}function showSidebar(){window.hideAllModals(false);const sidebar=document.getElementsByClassName("sidebar")[0];addClass(sidebar,"shown")}function hideSidebar(){const sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"shown")}window.addEventListener("resize",()=>{if(window.CURRENT_TOOLTIP_ELEMENT){const base=window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE;const force_visible=base.TOOLTIP_FORCE_VISIBLE;hideTooltip(false);if(force_visible){showTooltip(base);base.TOOLTIP_FORCE_VISIBLE=true}}});const mainElem=document.getElementById(MAIN_ID);if(mainElem){mainElem.addEventListener("click",hideSidebar)}onEachLazy(document.querySelectorAll("a[href^='#']"),el=>{el.addEventListener("click",()=>{expandSection(el.hash.slice(1));hideSidebar()})});onEachLazy(document.querySelectorAll(".toggle > summary:not(.hideme)"),el=>{el.addEventListener("click",e=>{if(e.target.tagName!=="SUMMARY"&&e.target.tagName!=="A"){e.preventDefault()}})});function showTooltip(e){const notable_ty=e.getAttribute("data-notable-ty");if(!window.NOTABLE_TRAITS&¬able_ty){const data=document.getElementById("notable-traits-data");if(data){window.NOTABLE_TRAITS=JSON.parse(data.innerText)}else{throw new Error("showTooltip() called with notable without any notable traits!")}}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE===e){clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);return}window.hideAllModals(false);const wrapper=document.createElement("div");if(notable_ty){wrapper.innerHTML="
"+window.NOTABLE_TRAITS[notable_ty]+"
"}else{if(e.getAttribute("title")!==null){e.setAttribute("data-title",e.getAttribute("title"));e.removeAttribute("title")}if(e.getAttribute("data-title")!==null){const titleContent=document.createElement("div");titleContent.className="content";titleContent.appendChild(document.createTextNode(e.getAttribute("data-title")));wrapper.appendChild(titleContent)}}wrapper.className="tooltip popover";const focusCatcher=document.createElement("div");focusCatcher.setAttribute("tabindex","0");focusCatcher.onfocus=hideTooltip;wrapper.appendChild(focusCatcher);const pos=e.getBoundingClientRect();wrapper.style.top=(pos.top+window.scrollY+pos.height)+"px";wrapper.style.left=0;wrapper.style.right="auto";wrapper.style.visibility="hidden";const body=document.getElementsByTagName("body")[0];body.appendChild(wrapper);const wrapperPos=wrapper.getBoundingClientRect();const finalPos=pos.left+window.scrollX-wrapperPos.width+24;if(finalPos>0){wrapper.style.left=finalPos+"px"}else{wrapper.style.setProperty("--popover-arrow-offset",(wrapperPos.right-pos.right+4)+"px",)}wrapper.style.visibility="";window.CURRENT_TOOLTIP_ELEMENT=wrapper;window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE=e;clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);wrapper.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}clearTooltipHoverTimeout(e)};wrapper.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&!e.contains(ev.relatedTarget)){setTooltipHoverTimeout(e,false);addClass(wrapper,"fade-out")}}}function setTooltipHoverTimeout(element,show){clearTooltipHoverTimeout(element);if(!show&&!window.CURRENT_TOOLTIP_ELEMENT){return}if(show&&window.CURRENT_TOOLTIP_ELEMENT){return}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE!==element){return}element.TOOLTIP_HOVER_TIMEOUT=setTimeout(()=>{if(show){showTooltip(element)}else if(!element.TOOLTIP_FORCE_VISIBLE){hideTooltip(false)}},show?window.RUSTDOC_TOOLTIP_HOVER_MS:window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS)}function clearTooltipHoverTimeout(element){if(element.TOOLTIP_HOVER_TIMEOUT!==undefined){removeClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out");clearTimeout(element.TOOLTIP_HOVER_TIMEOUT);delete element.TOOLTIP_HOVER_TIMEOUT}}function tooltipBlurHandler(event){if(window.CURRENT_TOOLTIP_ELEMENT&&!window.CURRENT_TOOLTIP_ELEMENT.contains(document.activeElement)&&!window.CURRENT_TOOLTIP_ELEMENT.contains(event.relatedTarget)&&!window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.contains(document.activeElement)&&!window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.contains(event.relatedTarget)){setTimeout(()=>hideTooltip(false),0)}}function hideTooltip(focus){if(window.CURRENT_TOOLTIP_ELEMENT){if(window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE){if(focus){window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.focus()}window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE=false}const body=document.getElementsByTagName("body")[0];body.removeChild(window.CURRENT_TOOLTIP_ELEMENT);clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);window.CURRENT_TOOLTIP_ELEMENT=null}}onEachLazy(document.getElementsByClassName("tooltip"),e=>{e.onclick=()=>{e.TOOLTIP_FORCE_VISIBLE=e.TOOLTIP_FORCE_VISIBLE?false:true;if(window.CURRENT_TOOLTIP_ELEMENT&&!e.TOOLTIP_FORCE_VISIBLE){hideTooltip(true)}else{showTooltip(e);window.CURRENT_TOOLTIP_ELEMENT.setAttribute("tabindex","0");window.CURRENT_TOOLTIP_ELEMENT.focus();window.CURRENT_TOOLTIP_ELEMENT.onblur=tooltipBlurHandler}return false};e.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointermove=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&window.CURRENT_TOOLTIP_ELEMENT&&!window.CURRENT_TOOLTIP_ELEMENT.contains(ev.relatedTarget)){setTooltipHoverTimeout(e,false);addClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out")}}});const sidebar_menu_toggle=document.getElementsByClassName("sidebar-menu-toggle")[0];if(sidebar_menu_toggle){sidebar_menu_toggle.addEventListener("click",()=>{const sidebar=document.getElementsByClassName("sidebar")[0];if(!hasClass(sidebar,"shown")){showSidebar()}else{hideSidebar()}})}function helpBlurHandler(event){blurHandler(event,getHelpButton(),window.hidePopoverMenus)}function buildHelpMenu(){const book_info=document.createElement("span");const channel=getVar("channel");book_info.className="top";book_info.innerHTML=`You can find more information in \ +the rustdoc book.`;const shortcuts=[["?","Show this help dialog"],["S / /","Focus the search field"],["↑","Move up in search results"],["↓","Move down in search results"],["← / →","Switch result tab (when results focused)"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(x=>"
"+x[0].split(" ").map((y,index)=>((index&1)===0?""+y+"":" "+y+" ")).join("")+"
"+x[1]+"
").join("");const div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

"+shortcuts+"
";const infos=[`For a full list of all search features, take a look here.`,"Prefix searches with a type followed by a colon (e.g., fn:) to \ + restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ + enum, trait, type, macro, \ + and const.","Search functions by type signature (e.g., vec -> usize or \ + -> vec or String, enum:Cow -> bool)","You can look for items with an exact name by putting double quotes around \ + your request: \"string\"","Look for functions that accept or return \ + slices and \ + arrays by writing \ + square brackets (e.g., -> [u8] or [] -> Option)","Look for items inside another one by searching for a path: vec::Vec",].map(x=>"

"+x+"

").join("");const div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="

Search Tricks

"+infos;const rustdoc_version=document.createElement("span");rustdoc_version.className="bottom";const rustdoc_version_code=document.createElement("code");rustdoc_version_code.innerText="rustdoc "+getVar("rustdoc-version");rustdoc_version.appendChild(rustdoc_version_code);const container=document.createElement("div");if(!isHelpPage){container.className="popover"}container.id="help";container.style.display="none";const side_by_side=document.createElement("div");side_by_side.className="side-by-side";side_by_side.appendChild(div_shortcuts);side_by_side.appendChild(div_infos);container.appendChild(book_info);container.appendChild(side_by_side);container.appendChild(rustdoc_version);if(isHelpPage){const help_section=document.createElement("section");help_section.appendChild(container);document.getElementById("main-content").appendChild(help_section);container.style.display="block"}else{const help_button=getHelpButton();help_button.appendChild(container);container.onblur=helpBlurHandler;help_button.onblur=helpBlurHandler;help_button.children[0].onblur=helpBlurHandler}return container}window.hideAllModals=switchFocus=>{hideSidebar();window.hidePopoverMenus();hideTooltip(switchFocus)};window.hidePopoverMenus=()=>{onEachLazy(document.querySelectorAll(".search-form .popover"),elem=>{elem.style.display="none"})};function getHelpMenu(buildNeeded){let menu=getHelpButton().querySelector(".popover");if(!menu&&buildNeeded){menu=buildHelpMenu()}return menu}function showHelp(){getHelpButton().querySelector("a").focus();const menu=getHelpMenu(true);if(menu.style.display==="none"){window.hideAllModals();menu.style.display=""}}if(isHelpPage){showHelp();document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault()})}else{document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault();const menu=getHelpMenu(true);const shouldShowHelp=menu.style.display==="none";if(shouldShowHelp){showHelp()}else{window.hidePopoverMenus()}})}setMobileTopbar();addSidebarItems();addSidebarCrates();onHashChange(null);window.addEventListener("hashchange",onHashChange);searchState.setup()}());(function(){const SIDEBAR_MIN=100;const SIDEBAR_MAX=500;const RUSTDOC_MOBILE_BREAKPOINT=700;const BODY_MIN=400;const SIDEBAR_VANISH_THRESHOLD=SIDEBAR_MIN/2;const sidebarButton=document.getElementById("sidebar-button");if(sidebarButton){sidebarButton.addEventListener("click",e=>{removeClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","false");if(document.querySelector(".rustdoc.src")){window.rustdocToggleSrcSidebar()}e.preventDefault()})}let currentPointerId=null;let desiredSidebarSize=null;let pendingSidebarResizingFrame=false;const resizer=document.querySelector(".sidebar-resizer");const sidebar=document.querySelector(".sidebar");if(!resizer||!sidebar){return}const isSrcPage=hasClass(document.body,"src");function hideSidebar(){if(isSrcPage){window.rustdocCloseSourceSidebar();updateLocalStorage("src-sidebar-width",null);document.documentElement.style.removeProperty("--src-sidebar-width");sidebar.style.removeProperty("--src-sidebar-width");resizer.style.removeProperty("--src-sidebar-width")}else{addClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","true");updateLocalStorage("desktop-sidebar-width",null);document.documentElement.style.removeProperty("--desktop-sidebar-width");sidebar.style.removeProperty("--desktop-sidebar-width");resizer.style.removeProperty("--desktop-sidebar-width")}}function showSidebar(){if(isSrcPage){window.rustdocShowSourceSidebar()}else{removeClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","false")}}function changeSidebarSize(size){if(isSrcPage){updateLocalStorage("src-sidebar-width",size);sidebar.style.setProperty("--src-sidebar-width",size+"px");resizer.style.setProperty("--src-sidebar-width",size+"px")}else{updateLocalStorage("desktop-sidebar-width",size);sidebar.style.setProperty("--desktop-sidebar-width",size+"px");resizer.style.setProperty("--desktop-sidebar-width",size+"px")}}function isSidebarHidden(){return isSrcPage?!hasClass(document.documentElement,"src-sidebar-expanded"):hasClass(document.documentElement,"hide-sidebar")}function resize(e){if(currentPointerId===null||currentPointerId!==e.pointerId){return}e.preventDefault();const pos=e.clientX-3;if(pos=SIDEBAR_MIN){if(isSidebarHidden()){showSidebar()}const constrainedPos=Math.min(pos,window.innerWidth-BODY_MIN,SIDEBAR_MAX);changeSidebarSize(constrainedPos);desiredSidebarSize=constrainedPos;if(pendingSidebarResizingFrame!==false){clearTimeout(pendingSidebarResizingFrame)}pendingSidebarResizingFrame=setTimeout(()=>{if(currentPointerId===null||pendingSidebarResizingFrame===false){return}pendingSidebarResizingFrame=false;document.documentElement.style.setProperty("--resizing-sidebar-width",desiredSidebarSize+"px",)},100)}}window.addEventListener("resize",()=>{if(window.innerWidth=(window.innerWidth-BODY_MIN)){changeSidebarSize(window.innerWidth-BODY_MIN)}else if(desiredSidebarSize!==null&&desiredSidebarSize>SIDEBAR_MIN){changeSidebarSize(desiredSidebarSize)}});function stopResize(e){if(currentPointerId===null){return}if(e){e.preventDefault()}desiredSidebarSize=sidebar.getBoundingClientRect().width;removeClass(resizer,"active");window.removeEventListener("pointermove",resize,false);window.removeEventListener("pointerup",stopResize,false);removeClass(document.documentElement,"sidebar-resizing");document.documentElement.style.removeProperty("--resizing-sidebar-width");if(resizer.releasePointerCapture){resizer.releasePointerCapture(currentPointerId);currentPointerId=null}}function initResize(e){if(currentPointerId!==null||e.altKey||e.ctrlKey||e.metaKey||e.button!==0){return}if(resizer.setPointerCapture){resizer.setPointerCapture(e.pointerId);if(!resizer.hasPointerCapture(e.pointerId)){resizer.releasePointerCapture(e.pointerId);return}currentPointerId=e.pointerId}window.hideAllModals(false);e.preventDefault();window.addEventListener("pointermove",resize,false);window.addEventListener("pointercancel",stopResize,false);window.addEventListener("pointerup",stopResize,false);addClass(resizer,"active");addClass(document.documentElement,"sidebar-resizing");const pos=e.clientX-sidebar.offsetLeft-3;document.documentElement.style.setProperty("--resizing-sidebar-width",pos+"px");desiredSidebarSize=null}resizer.addEventListener("pointerdown",initResize,false)}());(function(){let reset_button_timeout=null;const but=document.getElementById("copy-path");if(!but){return}but.onclick=()=>{const parent=but.parentElement;const path=[];onEach(parent.childNodes,child=>{if(child.tagName==="A"){path.push(child.textContent)}});const el=document.createElement("textarea");el.value=path.join("::");el.setAttribute("readonly","");el.style.position="absolute";el.style.left="-9999px";document.body.appendChild(el);el.select();document.execCommand("copy");document.body.removeChild(el);but.classList.add("clicked");if(reset_button_timeout!==null){window.clearTimeout(reset_button_timeout)}function reset_button(){reset_button_timeout=null;but.classList.remove("clicked")}reset_button_timeout=window.setTimeout(reset_button,1000)}}()) \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/rustdoc-c5d6553a23f1e5a6.css b/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/rustdoc-c5d6553a23f1e5a6.css new file mode 100644 index 00000000..9f64990b --- /dev/null +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/rustdoc-c5d6553a23f1e5a6.css @@ -0,0 +1,46 @@ + :root{--nav-sub-mobile-padding:8px;--search-typename-width:6.75rem;--desktop-sidebar-width:200px;--src-sidebar-width:300px;--desktop-sidebar-z-index:100;--sidebar-elems-left-padding:24px;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular-018c141bf0843ffd.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium-8f9a781e4970d388.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular-46f98efaafac5295.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:italic;font-weight:400;src:local('Source Serif 4 Italic'),url("SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:700;src:local('Source Serif 4 Bold'),url("SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'NanumBarunGothic';src:url("NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2") format("woff2");font-display:swap;unicode-range:U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF;}*{box-sizing:border-box;}body{font:1rem/1.5 "Source Serif 4",NanumBarunGothic,serif;margin:0;position:relative;overflow-wrap:break-word;overflow-wrap:anywhere;font-feature-settings:"kern","liga";background-color:var(--main-background-color);color:var(--main-color);}h1{font-size:1.5rem;}h2{font-size:1.375rem;}h3{font-size:1.25rem;}h1,h2,h3,h4,h5,h6{font-weight:500;}h1,h2,h3,h4{margin:25px 0 15px 0;padding-bottom:6px;}.docblock h3,.docblock h4,h5,h6{margin:15px 0 5px 0;}.docblock>h2:first-child,.docblock>h3:first-child,.docblock>h4:first-child,.docblock>h5:first-child,.docblock>h6:first-child{margin-top:0;}.main-heading h1{margin:0;padding:0;flex-grow:1;overflow-wrap:break-word;overflow-wrap:anywhere;}.main-heading{display:flex;flex-wrap:wrap;padding-bottom:6px;margin-bottom:15px;}.content h2,.top-doc .docblock>h3,.top-doc .docblock>h4{border-bottom:1px solid var(--headings-border-bottom-color);}h1,h2{line-height:1.25;padding-top:3px;padding-bottom:9px;}h3.code-header{font-size:1.125rem;}h4.code-header{font-size:1rem;}.code-header{font-weight:600;margin:0;padding:0;white-space:pre-wrap;}#crate-search,h1,h2,h3,h4,h5,h6,.sidebar,.mobile-topbar,.search-input,.search-results .result-name,.item-name>a,.out-of-band,span.since,a.src,#help-button>a,summary.hideme,.scraped-example-list,ul.all-items{font-family:"Fira Sans",Arial,NanumBarunGothic,sans-serif;}#toggle-all-docs,a.anchor,.section-header a,#src-sidebar a,.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,h1 a,.search-results a,.stab,.result-name i{color:var(--main-color);}span.enum,a.enum,span.struct,a.struct,span.union,a.union,span.primitive,a.primitive,span.type,a.type,span.foreigntype,a.foreigntype{color:var(--type-link-color);}span.trait,a.trait,span.traitalias,a.traitalias{color:var(--trait-link-color);}span.associatedtype,a.associatedtype,span.constant,a.constant,span.static,a.static{color:var(--assoc-item-link-color);}span.fn,a.fn,span.method,a.method,span.tymethod,a.tymethod{color:var(--function-link-color);}span.attr,a.attr,span.derive,a.derive,span.macro,a.macro{color:var(--macro-link-color);}span.mod,a.mod{color:var(--mod-link-color);}span.keyword,a.keyword{color:var(--keyword-link-color);}a{color:var(--link-color);text-decoration:none;}ol,ul{padding-left:24px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.625em;}p,.docblock>.warning{margin:0 0 .75em 0;}p:last-child,.docblock>.warning:last-child{margin:0;}button{padding:1px 6px;cursor:pointer;}button#toggle-all-docs{padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.rustdoc{display:flex;flex-direction:row;flex-wrap:nowrap;}main{position:relative;flex-grow:1;padding:10px 15px 40px 45px;min-width:0;}.src main{padding:15px;}.width-limiter{max-width:960px;margin-right:auto;}details:not(.toggle) summary{margin-bottom:.6em;}code,pre,a.test-arrow,.code-header{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.125em;}.docblock pre code,.docblock-short pre code{padding:0;}pre{padding:14px;line-height:1.5;}pre.item-decl{overflow-x:auto;}.item-decl .type-contents-toggle{contain:initial;}.src .content pre{padding:20px;}.rustdoc.src .example-wrap pre.src-line-numbers{padding:20px 0 20px 4px;}img{max-width:100%;}.logo-container{line-height:0;display:block;}.rust-logo{filter:var(--rust-logo-filter);}.sidebar{font-size:0.875rem;flex:0 0 var(--desktop-sidebar-width);width:var(--desktop-sidebar-width);overflow-y:scroll;overscroll-behavior:contain;position:sticky;height:100vh;top:0;left:0;z-index:var(--desktop-sidebar-z-index);}.rustdoc.src .sidebar{flex-basis:50px;width:50px;border-right:1px solid;overflow-x:hidden;overflow-y:hidden;}.hide-sidebar .sidebar,.hide-sidebar .sidebar-resizer{display:none;}.sidebar-resizer{touch-action:none;width:9px;cursor:col-resize;z-index:calc(var(--desktop-sidebar-z-index) + 1);position:fixed;height:100%;left:calc(var(--desktop-sidebar-width) + 1px);}.rustdoc.src .sidebar-resizer{left:49px;}.src-sidebar-expanded .src .sidebar-resizer{left:var(--src-sidebar-width);}.sidebar-resizing{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;}.sidebar-resizing*{cursor:col-resize !important;}.sidebar-resizing .sidebar{position:fixed;}.sidebar-resizing>body{padding-left:var(--resizing-sidebar-width);}.sidebar-resizer:hover,.sidebar-resizer:active,.sidebar-resizer:focus,.sidebar-resizer.active{width:10px;margin:0;left:var(--desktop-sidebar-width);border-left:solid 1px var(--sidebar-resizer-hover);}.src-sidebar-expanded .rustdoc.src .sidebar-resizer:hover,.src-sidebar-expanded .rustdoc.src .sidebar-resizer:active,.src-sidebar-expanded .rustdoc.src .sidebar-resizer:focus,.src-sidebar-expanded .rustdoc.src .sidebar-resizer.active{left:calc(var(--src-sidebar-width) - 1px);}@media (pointer:coarse){.sidebar-resizer{display:none !important;}}.sidebar-resizer.active{padding:0 140px;width:2px;margin-left:-140px;border-left:none;}.sidebar-resizer.active:before{border-left:solid 2px var(--sidebar-resizer-active);display:block;height:100%;content:"";}.sidebar,.mobile-topbar,.sidebar-menu-toggle,#src-sidebar{background-color:var(--sidebar-background-color);}.src .sidebar>*{visibility:hidden;}.src-sidebar-expanded .src .sidebar{overflow-y:auto;flex-basis:var(--src-sidebar-width);width:var(--src-sidebar-width);}.src-sidebar-expanded .src .sidebar>*{visibility:visible;}#all-types{margin-top:1em;}*{scrollbar-width:initial;scrollbar-color:var(--scrollbar-color);}.sidebar{scrollbar-width:thin;scrollbar-color:var(--scrollbar-color);}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;background-color:var(--scrollbar-track-background-color);}.sidebar::-webkit-scrollbar-track{background-color:var(--scrollbar-track-background-color);}::-webkit-scrollbar-thumb,.sidebar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-background-color);}.hidden{display:none !important;}.logo-container>img{height:48px;width:48px;}ul.block,.block li{padding:0;margin:0;list-style:none;}.sidebar-elems a,.sidebar>h2 a{display:block;padding:0.25rem;margin-right:0.25rem;border-left:solid var(--sidebar-elems-left-padding) transparent;margin-left:calc(-0.25rem - var(--sidebar-elems-left-padding));background-clip:border-box;}.sidebar h2{overflow-wrap:anywhere;padding:0;margin:0.7rem 0;}.sidebar h3{font-size:1.125rem;padding:0;margin:0;}.sidebar-elems,.sidebar>.version,.sidebar>h2{padding-left:var(--sidebar-elems-left-padding);}.sidebar a{color:var(--sidebar-link-color);}.sidebar .current,.sidebar .current a,.sidebar-crate a.logo-container:hover+h2 a,.sidebar a:hover:not(.logo-container){background-color:var(--sidebar-current-link-background-color);}.sidebar-elems .block{margin-bottom:2em;}.sidebar-elems .block li a{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}.sidebar-crate{display:flex;align-items:center;justify-content:center;margin:14px 32px 1rem;row-gap:10px;column-gap:32px;flex-wrap:wrap;}.sidebar-crate h2{flex-grow:1;margin:0 -8px;align-self:start;}.sidebar-crate .logo-container{margin:0 calc(-16px - var(--sidebar-elems-left-padding));padding:0 var(--sidebar-elems-left-padding);text-align:center;}.sidebar-crate .logo-container img{margin-top:-16px;border-top:solid 16px transparent;box-sizing:content-box;position:relative;background-clip:border-box;z-index:1;}.sidebar-crate h2 a{display:block;border-left:solid var(--sidebar-elems-left-padding) transparent;background-clip:border-box;margin:0 calc(-24px + 0.25rem) 0 calc(-0.2rem - var(--sidebar-elems-left-padding));padding:calc((16px - 0.57rem ) / 2 ) 0.25rem;padding-left:0.2rem;}.sidebar-crate h2 .version{display:block;font-weight:normal;font-size:1rem;overflow-wrap:break-word;}.sidebar-crate+.version{margin-top:-1rem;margin-bottom:1rem;}.mobile-topbar{display:none;}.rustdoc .example-wrap{display:flex;position:relative;margin-bottom:10px;}.rustdoc .example-wrap:last-child{margin-bottom:0px;}.rustdoc .example-wrap pre{margin:0;flex-grow:1;}.rustdoc:not(.src) .example-wrap pre{overflow:auto hidden;}.rustdoc .example-wrap pre.example-line-numbers,.rustdoc .example-wrap pre.src-line-numbers{flex-grow:0;min-width:fit-content;overflow:initial;text-align:right;-webkit-user-select:none;user-select:none;padding:14px 8px;color:var(--src-line-numbers-span-color);}.rustdoc .example-wrap pre.src-line-numbers{padding:14px 0;}.src-line-numbers a,.src-line-numbers span{color:var(--src-line-numbers-span-color);padding:0 8px;}.src-line-numbers :target{background-color:transparent;border-right:none;padding:0 8px;}.src-line-numbers .line-highlighted{background-color:var(--src-line-number-highlighted-background-color);}.search-loading{text-align:center;}.docblock-short{overflow-wrap:break-word;overflow-wrap:anywhere;}.docblock :not(pre)>code,.docblock-short code{white-space:pre-wrap;}.top-doc .docblock h2{font-size:1.375rem;}.top-doc .docblock h3{font-size:1.25rem;}.top-doc .docblock h4,.top-doc .docblock h5{font-size:1.125rem;}.top-doc .docblock h6{font-size:1rem;}.docblock h5{font-size:1rem;}.docblock h6{font-size:0.875rem;}.docblock{margin-left:24px;position:relative;}.docblock>:not(.more-examples-toggle):not(.example-wrap){max-width:100%;overflow-x:auto;}.out-of-band{flex-grow:0;font-size:1.125rem;}.docblock code,.docblock-short code,pre,.rustdoc.src .example-wrap{background-color:var(--code-block-background-color);}#main-content{position:relative;}.docblock table{margin:.5em 0;border-collapse:collapse;}.docblock table td,.docblock table th{padding:.5em;border:1px solid var(--border-color);}.docblock table tbody tr:nth-child(2n){background:var(--table-alt-row-background-color);}div.where{white-space:pre-wrap;font-size:0.875rem;}.item-info{display:block;margin-left:24px;}.item-info code{font-size:0.875rem;}#main-content>.item-info{margin-left:0;}nav.sub{flex-grow:1;flex-flow:row nowrap;margin:4px 0 25px 0;display:flex;align-items:center;}.search-form{position:relative;display:flex;height:34px;flex-grow:1;}.src nav.sub{margin:0 0 15px 0;}.section-header{display:block;position:relative;}.section-header:hover>.anchor,.impl:hover>.anchor,.trait-impl:hover>.anchor,.variant:hover>.anchor{display:initial;}.anchor{display:none;position:absolute;left:-0.5em;background:none !important;}.anchor.field{left:-5px;}.section-header>.anchor{left:-15px;padding-right:8px;}h2.section-header>.anchor{padding-right:6px;}a.doc-anchor{color:var(--main-color);display:none;position:absolute;left:-17px;padding-right:5px;padding-left:3px;}*:hover>.doc-anchor{display:block;}.top-doc>.docblock>*:first-child>.doc-anchor{display:none !important;}.main-heading a:hover,.example-wrap .rust a:hover,.all-items a:hover,.docblock a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover:not(.doc-anchor),.docblock-short a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover,.item-info a{text-decoration:underline;}.crate.block li.current a{font-weight:500;}table,.item-table{overflow-wrap:break-word;}.item-table{display:table;padding:0;margin:0;}.item-table>li{display:table-row;}.item-table>li>div{display:table-cell;}.item-table>li>.item-name{padding-right:1.25rem;}.search-results-title{margin-top:0;white-space:nowrap;display:flex;align-items:baseline;}#crate-search-div{position:relative;min-width:5em;}#crate-search{min-width:115px;padding:0 23px 0 4px;max-width:100%;text-overflow:ellipsis;border:1px solid var(--border-color);border-radius:4px;outline:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;background-color:var(--main-background-color);color:inherit;line-height:1.5;font-weight:500;}#crate-search:hover,#crate-search:focus{border-color:var(--crate-search-hover-border);}#crate-search-div::after{pointer-events:none;width:100%;height:100%;position:absolute;top:0;left:0;content:"";background-repeat:no-repeat;background-size:20px;background-position:calc(100% - 2px) 56%;background-image:url('data:image/svg+xml, \ + ');filter:var(--crate-search-div-filter);}#crate-search-div:hover::after,#crate-search-div:focus-within::after{filter:var(--crate-search-div-hover-filter);}#crate-search>option{font-size:1rem;}.search-input{-webkit-appearance:none;outline:none;border:1px solid var(--border-color);border-radius:2px;padding:8px;font-size:1rem;flex-grow:1;background-color:var(--button-background-color);color:var(--search-color);}.search-input:focus{border-color:var(--search-input-focused-border-color);}.search-results{display:none;}.search-results.active{display:block;}.search-results>a{display:flex;margin-left:2px;margin-right:2px;border-bottom:1px solid var(--search-result-border-color);gap:1em;}.search-results>a>div.desc{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex:2;}.search-results a:hover,.search-results a:focus{background-color:var(--search-result-link-focus-background-color);}.search-results .result-name{display:flex;align-items:center;justify-content:start;flex:3;}.search-results .result-name .alias{color:var(--search-results-alias-color);}.search-results .result-name .grey{color:var(--search-results-grey-color);}.search-results .result-name .typename{color:var(--search-results-grey-color);font-size:0.875rem;width:var(--search-typename-width);}.search-results .result-name .path{word-break:break-all;max-width:calc(100% - var(--search-typename-width));display:inline-block;}.search-results .result-name .path>*{display:inline;}.popover{position:absolute;top:100%;right:0;z-index:calc(var(--desktop-sidebar-z-index) + 1);margin-top:7px;border-radius:3px;border:1px solid var(--border-color);background-color:var(--main-background-color);color:var(--main-color);--popover-arrow-offset:11px;}.popover::before{content:'';position:absolute;right:var(--popover-arrow-offset);border:solid var(--border-color);border-width:1px 1px 0 0;background-color:var(--main-background-color);padding:4px;transform:rotate(-45deg);top:-5px;}.setting-line{margin:1.2em 0.6em;}.setting-radio input,.setting-check input{margin-right:0.3em;height:1.2rem;width:1.2rem;border:2px solid var(--settings-input-border-color);outline:none;-webkit-appearance:none;cursor:pointer;}.setting-radio input{border-radius:50%;}.setting-radio span,.setting-check span{padding-bottom:1px;}.setting-radio{margin-top:0.1em;margin-bottom:0.1em;min-width:3.8em;padding:0.3em;display:inline-flex;align-items:center;cursor:pointer;}.setting-radio+.setting-radio{margin-left:0.5em;}.setting-check{margin-right:20px;display:flex;align-items:center;cursor:pointer;}.setting-radio input:checked{box-shadow:inset 0 0 0 3px var(--main-background-color);background-color:var(--settings-input-color);}.setting-check input:checked{background-color:var(--settings-input-color);border-width:1px;content:url('data:image/svg+xml,\ + \ + ');}.setting-radio input:focus,.setting-check input:focus{box-shadow:0 0 1px 1px var(--settings-input-color);}.setting-radio input:checked:focus{box-shadow:inset 0 0 0 3px var(--main-background-color),0 0 2px 2px var(--settings-input-color);}.setting-radio input:hover,.setting-check input:hover{border-color:var(--settings-input-color) !important;}#help.popover{max-width:600px;--popover-arrow-offset:48px;}#help dt{float:left;clear:left;margin-right:0.5rem;}#help span.top,#help span.bottom{text-align:center;display:block;font-size:1.125rem;}#help span.top{margin:10px 0;border-bottom:1px solid var(--border-color);padding-bottom:4px;margin-bottom:6px;}#help span.bottom{clear:both;border-top:1px solid var(--border-color);}.side-by-side>div{width:50%;float:left;padding:0 20px 20px 17px;}.item-info .stab{display:block;padding:3px;margin-bottom:5px;}.item-name .stab{margin-left:0.3125em;}.stab{padding:0 2px;font-size:0.875rem;font-weight:normal;color:var(--main-color);background-color:var(--stab-background-color);width:fit-content;white-space:pre-wrap;border-radius:3px;display:inline;vertical-align:baseline;}.stab.portability>code{background:none;color:var(--stab-code-color);}.stab .emoji,.item-info .stab::before{font-size:1.25rem;}.stab .emoji{margin-right:0.3rem;}.item-info .stab::before{content:"\0";width:0;display:inline-block;color:transparent;}.emoji{text-shadow:1px 0 0 black,-1px 0 0 black,0 1px 0 black,0 -1px 0 black;}.since{font-weight:normal;font-size:initial;}.rightside{padding-left:12px;float:right;}.rightside:not(a),.out-of-band{color:var(--right-side-color);}pre.rust{tab-size:4;-moz-tab-size:4;}pre.rust .kw{color:var(--code-highlight-kw-color);}pre.rust .kw-2{color:var(--code-highlight-kw-2-color);}pre.rust .lifetime{color:var(--code-highlight-lifetime-color);}pre.rust .prelude-ty{color:var(--code-highlight-prelude-color);}pre.rust .prelude-val{color:var(--code-highlight-prelude-val-color);}pre.rust .string{color:var(--code-highlight-string-color);}pre.rust .number{color:var(--code-highlight-number-color);}pre.rust .bool-val{color:var(--code-highlight-literal-color);}pre.rust .self{color:var(--code-highlight-self-color);}pre.rust .attr{color:var(--code-highlight-attribute-color);}pre.rust .macro,pre.rust .macro-nonterminal{color:var(--code-highlight-macro-color);}pre.rust .question-mark{font-weight:bold;color:var(--code-highlight-question-mark-color);}pre.rust .comment{color:var(--code-highlight-comment-color);}pre.rust .doccomment{color:var(--code-highlight-doc-comment-color);}.rustdoc.src .example-wrap pre.rust a{background:var(--codeblock-link-background);}.example-wrap.compile_fail,.example-wrap.should_panic{border-left:2px solid var(--codeblock-error-color);}.ignore.example-wrap{border-left:2px solid var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover,.example-wrap.should_panic:hover{border-left:2px solid var(--codeblock-error-hover-color);}.example-wrap.ignore:hover{border-left:2px solid var(--codeblock-ignore-hover-color);}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip{color:var(--codeblock-error-color);}.example-wrap.ignore .tooltip{color:var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover .tooltip,.example-wrap.should_panic:hover .tooltip{color:var(--codeblock-error-hover-color);}.example-wrap.ignore:hover .tooltip{color:var(--codeblock-ignore-hover-color);}.example-wrap .tooltip{position:absolute;display:block;left:-25px;top:5px;margin:0;line-height:1;}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip,.example-wrap.ignore .tooltip{font-weight:bold;font-size:1.25rem;}.content .docblock .warning{border-left:2px solid var(--warning-border-color);padding:14px;position:relative;overflow-x:visible !important;}.content .docblock .warning::before{color:var(--warning-border-color);content:"ⓘ";position:absolute;left:-25px;top:5px;font-weight:bold;font-size:1.25rem;}.top-doc>.docblock>.warning:first-child::before{top:20px;}a.test-arrow{visibility:hidden;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:1.375rem;top:5px;right:5px;z-index:1;color:var(--test-arrow-color);background-color:var(--test-arrow-background-color);}a.test-arrow:hover{color:var(--test-arrow-hover-color);background-color:var(--test-arrow-hover-background-color);}.example-wrap:hover .test-arrow{visibility:visible;}.code-attribute{font-weight:300;color:var(--code-attribute-color);}.item-spacer{width:100%;height:12px;display:block;}.out-of-band>span.since{font-size:1.25rem;}.sub-variant h4{font-size:1rem;font-weight:400;margin-top:0;margin-bottom:0;}.sub-variant{margin-left:24px;margin-bottom:40px;}.sub-variant>.sub-variant-field{margin-left:24px;}:target{padding-right:3px;background-color:var(--target-background-color);border-right:3px solid var(--target-border-color);}.code-header a.tooltip{color:inherit;margin-right:15px;position:relative;}.code-header a.tooltip:hover{color:var(--link-color);}a.tooltip:hover::after{position:absolute;top:calc(100% - 10px);left:-15px;right:-15px;height:20px;content:"\00a0";}.fade-out{opacity:0;transition:opacity 0.45s cubic-bezier(0,0,0.1,1.0);}.popover.tooltip .content{margin:0.25em 0.5em;}.popover.tooltip .content pre,.popover.tooltip .content code{background:transparent;margin:0;padding:0;font-size:1.25rem;white-space:pre-wrap;}.popover.tooltip .content>h3:first-child{margin:0 0 5px 0;}.search-failed{text-align:center;margin-top:20px;display:none;}.search-failed.active{display:block;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#search-tabs{display:flex;flex-direction:row;gap:1px;margin-bottom:4px;}#search-tabs button{text-align:center;font-size:1.125rem;border:0;border-top:2px solid;flex:1;line-height:1.5;color:inherit;}#search-tabs button:not(.selected){background-color:var(--search-tab-button-not-selected-background);border-top-color:var(--search-tab-button-not-selected-border-top-color);}#search-tabs button:hover,#search-tabs button.selected{background-color:var(--search-tab-button-selected-background);border-top-color:var(--search-tab-button-selected-border-top-color);}#search-tabs .count{font-size:1rem;font-variant-numeric:tabular-nums;color:var(--search-tab-title-count-color);}#search .error code{border-radius:3px;background-color:var(--search-error-code-background-color);}.search-corrections{font-weight:normal;}#src-sidebar{width:100%;overflow:auto;}#src-sidebar div.files>a:hover,details.dir-entry summary:hover,#src-sidebar div.files>a:focus,details.dir-entry summary:focus{background-color:var(--src-sidebar-background-hover);}#src-sidebar div.files>a.selected{background-color:var(--src-sidebar-background-selected);}.src-sidebar-title{position:sticky;top:0;display:flex;padding:8px 8px 0 48px;margin-bottom:7px;background:var(--sidebar-background-color);border-bottom:1px solid var(--border-color);}#settings-menu,#help-button{margin-left:4px;display:flex;}#sidebar-button{display:none;line-height:0;}.hide-sidebar #sidebar-button,.src #sidebar-button{display:flex;margin-right:4px;position:fixed;left:6px;height:34px;width:34px;background-color:var(--main-background-color);z-index:1;}.src #sidebar-button{left:8px;z-index:calc(var(--desktop-sidebar-z-index) + 1);}.hide-sidebar .src #sidebar-button{position:static;}#settings-menu>a,#help-button>a,#sidebar-button>a{display:flex;align-items:center;justify-content:center;background-color:var(--button-background-color);border:1px solid var(--border-color);border-radius:2px;color:var(--settings-button-color);font-size:20px;width:33px;}#settings-menu>a:hover,#settings-menu>a:focus,#help-button>a:hover,#help-button>a:focus,#sidebar-button>a:hover,#sidebar-button>a:focus{border-color:var(--settings-button-border-focus);}#settings-menu>a{line-height:0;font-size:0;}#settings-menu>a:before{content:url('data:image/svg+xml,\ + ');width:22px;height:22px;filter:var(--settings-menu-filter);}#sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');width:22px;height:22px;}#copy-path{color:var(--copy-path-button-color);background:var(--main-background-color);height:34px;width:33px;margin-left:10px;padding:0;padding-left:2px;border:0;font-size:0;}#copy-path::before{filter:var(--copy-path-img-filter);content:url('data:image/svg+xml,\ +\ +\ +');width:19px;height:18px;}#copy-path:hover::before{filter:var(--copy-path-img-hover-filter);}#copy-path.clicked::before{content:url('data:image/svg+xml,\ + \ + ');}@keyframes rotating{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}#settings-menu.rotate>a img{animation:rotating 2s linear infinite;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px var(--border-color);border-radius:3px;color:var(--kbd-color);background-color:var(--kbd-background);box-shadow:inset 0 -1px 0 var(--kbd-box-shadow-color);}ul.all-items>li{list-style:none;}details.dir-entry{padding-left:4px;}details.dir-entry>summary{margin:0 0 0 -4px;padding:0 0 0 4px;cursor:pointer;}details.dir-entry div.folders,details.dir-entry div.files{padding-left:23px;}details.dir-entry a{display:block;}details.toggle{contain:layout;position:relative;}details.toggle>summary.hideme{cursor:pointer;font-size:1rem;}details.toggle>summary{list-style:none;outline:none;}details.toggle>summary::-webkit-details-marker,details.toggle>summary::marker{display:none;}details.toggle>summary.hideme>span{margin-left:9px;}details.toggle>summary::before{background:url('data:image/svg+xml,') no-repeat top left;content:"";cursor:pointer;width:16px;height:16px;display:inline-block;vertical-align:middle;opacity:.5;filter:var(--toggle-filter);}details.toggle>summary.hideme>span,.more-examples-toggle summary,.more-examples-toggle .hide-more{color:var(--toggles-color);}details.toggle>summary::after{content:"Expand";overflow:hidden;width:0;height:0;position:absolute;}details.toggle>summary.hideme::after{content:"";}details.toggle>summary:focus::before,details.toggle>summary:hover::before{opacity:1;}details.toggle>summary:focus-visible::before{outline:1px dotted #000;outline-offset:1px;}details.non-exhaustive{margin-bottom:8px;}details.toggle>summary.hideme::before{position:relative;}details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;top:4px;}.impl-items>details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;}details.toggle[open] >summary.hideme{position:absolute;}details.toggle[open] >summary.hideme>span{display:none;}details.toggle[open] >summary::before{background:url('data:image/svg+xml,') no-repeat top left;}details.toggle[open] >summary::after{content:"Collapse";}.docblock summary>*{display:inline-block;}.docblock>.example-wrap:first-child .tooltip{margin-top:16px;}.src #sidebar-button>a:before,.sidebar-menu-toggle:before{content:url('data:image/svg+xml,\ + ');opacity:0.75;}.sidebar-menu-toggle:hover:before,.sidebar-menu-toggle:active:before,.sidebar-menu-toggle:focus:before{opacity:1;}.src #sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');opacity:0.75;}@media (max-width:850px){#search-tabs .count{display:block;}}@media (max-width:700px){*[id]{scroll-margin-top:45px;}.rustdoc{display:block;}main{padding-left:15px;padding-top:0px;}.main-heading{flex-direction:column;}.out-of-band{text-align:left;margin-left:initial;padding:initial;}.out-of-band .since::before{content:"Since ";}.sidebar .logo-container,.sidebar .location,.sidebar-resizer{display:none;}.sidebar{position:fixed;top:45px;left:-1000px;z-index:11;height:calc(100vh - 45px);width:200px;}.src main,.rustdoc.src .sidebar{top:0;padding:0;height:100vh;border:0;}.src .search-form{margin-left:40px;}.hide-sidebar .search-form{margin-left:32px;}.hide-sidebar .src .search-form{margin-left:0;}.sidebar.shown,.src-sidebar-expanded .src .sidebar,.rustdoc:not(.src) .sidebar:focus-within{left:0;}.mobile-topbar h2{padding-bottom:0;margin:auto 0.5em auto auto;overflow:hidden;font-size:24px;white-space:nowrap;text-overflow:ellipsis;}.mobile-topbar .logo-container>img{max-width:35px;max-height:35px;margin:5px 0 5px 20px;}.mobile-topbar{display:flex;flex-direction:row;position:sticky;z-index:10;font-size:2rem;height:45px;width:100%;left:0;top:0;}.hide-sidebar .mobile-topbar{display:none;}.sidebar-menu-toggle{width:45px;border:none;line-height:0;}.hide-sidebar .sidebar-menu-toggle{display:none;}.sidebar-elems{margin-top:1em;}.anchor{display:none !important;}#main-content>details.toggle>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}#copy-path,#help-button{display:none;}#sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');width:22px;height:22px;}.sidebar-menu-toggle:before{filter:var(--mobile-sidebar-menu-filter);}.sidebar-menu-toggle:hover{background:var(--main-background-color);}.item-table,.item-row,.item-table>li,.item-table>li>div,.search-results>a,.search-results>a>div{display:block;}.search-results>a{padding:5px 0px;}.search-results>a>div.desc,.item-table>li>div.desc{padding-left:2em;}.search-results .result-name{display:block;}.search-results .result-name .typename{width:initial;margin-right:0;}.search-results .result-name .typename,.search-results .result-name .path{display:inline;}.src-sidebar-expanded .src .sidebar{position:fixed;max-width:100vw;width:100vw;}.src .src-sidebar-title{padding-top:0;}details.toggle:not(.top-doc)>summary{margin-left:10px;}.impl-items>details.toggle>summary:not(.hideme)::before,#main-content>details.toggle:not(.top-doc)>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}.impl-items>.item-info{margin-left:34px;}.src nav.sub{margin:0;padding:var(--nav-sub-mobile-padding);}}@media (min-width:701px){.scraped-example-title{position:absolute;z-index:10;background:var(--main-background-color);bottom:8px;right:5px;padding:2px 4px;box-shadow:0 0 4px var(--main-background-color);}.item-table>li>.item-name{width:33%;}.item-table>li>div{padding-bottom:5px;word-break:break-all;}}@media print{nav.sidebar,nav.sub,.out-of-band,a.src,#copy-path,details.toggle[open] >summary::before,details.toggle>summary::before,details.toggle.top-doc>summary{display:none;}.docblock{margin-left:0;}main{padding:10px;}}@media (max-width:464px){.docblock{margin-left:12px;}.docblock code{overflow-wrap:break-word;overflow-wrap:anywhere;}nav.sub{flex-direction:column;}.search-form{align-self:stretch;}}.variant,.implementors-toggle>summary,.impl,#implementors-list>.docblock,.impl-items>section,.impl-items>.toggle>summary,.methods>section,.methods>.toggle>summary{margin-bottom:0.75em;}.variants>.docblock,.implementors-toggle>.docblock,.impl-items>.toggle[open]:not(:last-child),.methods>.toggle[open]:not(:last-child),.implementors-toggle[open]:not(:last-child){margin-bottom:2em;}#trait-implementations-list .impl-items>.toggle:not(:last-child),#synthetic-implementations-list .impl-items>.toggle:not(:last-child),#blanket-implementations-list .impl-items>.toggle:not(:last-child){margin-bottom:1em;}.scraped-example-list .scrape-help{margin-left:10px;padding:0 4px;font-weight:normal;font-size:12px;position:relative;bottom:1px;border:1px solid var(--scrape-example-help-border-color);border-radius:50px;color:var(--scrape-example-help-color);}.scraped-example-list .scrape-help:hover{border-color:var(--scrape-example-help-hover-border-color);color:var(--scrape-example-help-hover-color);}.scraped-example{position:relative;}.scraped-example .code-wrapper{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;}.scraped-example:not(.expanded) .code-wrapper{max-height:calc(1.5em * 5 + 10px);}.scraped-example:not(.expanded) .code-wrapper pre{overflow-y:hidden;padding-bottom:0;max-height:calc(1.5em * 5 + 10px);}.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper,.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper pre{max-height:calc(1.5em * 10 + 10px);}.scraped-example .code-wrapper .next,.scraped-example .code-wrapper .prev,.scraped-example .code-wrapper .expand{color:var(--main-color);position:absolute;top:0.25em;z-index:1;padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.scraped-example .code-wrapper .prev{right:2.25em;}.scraped-example .code-wrapper .next{right:1.25em;}.scraped-example .code-wrapper .expand{right:0.25em;}.scraped-example:not(.expanded) .code-wrapper::before,.scraped-example:not(.expanded) .code-wrapper::after{content:" ";width:100%;height:5px;position:absolute;z-index:1;}.scraped-example:not(.expanded) .code-wrapper::before{top:0;background:linear-gradient(to bottom,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example:not(.expanded) .code-wrapper::after{bottom:0;background:linear-gradient(to top,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example .code-wrapper .example-wrap{width:100%;overflow-y:hidden;margin-bottom:0;}.scraped-example:not(.expanded) .code-wrapper .example-wrap{overflow-x:hidden;}.scraped-example .example-wrap .rust span.highlight{background:var(--scrape-example-code-line-highlight);}.scraped-example .example-wrap .rust span.highlight.focus{background:var(--scrape-example-code-line-highlight-focus);}.more-examples-toggle{max-width:calc(100% + 25px);margin-top:10px;margin-left:-25px;}.more-examples-toggle .hide-more{margin-left:25px;cursor:pointer;}.more-scraped-examples{margin-left:25px;position:relative;}.toggle-line{position:absolute;top:5px;bottom:0;right:calc(100% + 10px);padding:0 4px;cursor:pointer;}.toggle-line-inner{min-width:2px;height:100%;background:var(--scrape-example-toggle-line-background);}.toggle-line:hover .toggle-line-inner{background:var(--scrape-example-toggle-line-hover-background);}.more-scraped-examples .scraped-example,.example-links{margin-top:20px;}.more-scraped-examples .scraped-example:first-child{margin-top:5px;}.example-links ul{margin-bottom:0;}:root[data-theme="light"],:root:not([data-theme]){--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#f5f5f5;--sidebar-background-color-hover:#e0e0e0;--code-block-background-color:#f5f5f5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--mobile-sidebar-menu-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#fff;--settings-menu-filter:none;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--test-arrow-color:#f5f5f5;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#f5f5f5;--test-arrow-hover-background-color:rgb(78,139,202);--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#f5f5f5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);--sidebar-resizer-hover:hsl(207,90%,66%);--sidebar-resizer-active:hsl(207,90%,54%);}:root[data-theme="dark"]{--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--mobile-sidebar-menu-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--settings-menu-filter:none;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--test-arrow-color:#dedede;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#dedede;--test-arrow-hover-background-color:#4e8bca;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2a2a2a;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);--sidebar-resizer-hover:hsl(207,30%,54%);--sidebar-resizer-active:hsl(207,90%,54%);}:root[data-theme="ayu"]{--main-background-color:#0f1419;--main-color:#c5c5c5;--settings-input-color:#ffb454;--settings-input-border-color:#999;--settings-button-color:#fff;--settings-button-border-focus:#e0e0e0;--sidebar-background-color:#14191f;--sidebar-background-color-hover:rgba(70,70,70,0.33);--code-block-background-color:#191f26;--scrollbar-track-background-color:transparent;--scrollbar-thumb-background-color:#5c6773;--scrollbar-color:#5c6773 #24292f;--headings-border-bottom-color:#5c6773;--border-color:#5c6773;--button-background-color:#141920;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--mobile-sidebar-menu-filter:invert(100%);--search-input-focused-border-color:#5c6773;--copy-path-button-color:#fff;--copy-path-img-filter:invert(70%);--copy-path-img-hover-filter:invert(100%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ffa0a5;--trait-link-color:#39afd7;--assoc-item-link-color:#39afd7;--function-link-color:#fdd687;--macro-link-color:#a37acc;--keyword-link-color:#39afd7;--mod-link-color:#39afd7;--link-color:#39afd7;--sidebar-link-color:#53b1db;--sidebar-current-link-background-color:transparent;--search-result-link-focus-background-color:#3c3c3c;--search-result-border-color:#aaa3;--search-color:#fff;--search-error-code-background-color:#4f4c4c;--search-results-alias-color:#c5c5c5;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:none;--search-tab-button-not-selected-background:transparent !important;--search-tab-button-selected-border-top-color:none;--search-tab-button-selected-background:#141920 !important;--settings-menu-filter:invert(100%);--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ff7733;--code-highlight-kw-2-color:#ff7733;--code-highlight-lifetime-color:#ff7733;--code-highlight-prelude-color:#69f2df;--code-highlight-prelude-val-color:#ff7733;--code-highlight-number-color:#b8cc52;--code-highlight-string-color:#b8cc52;--code-highlight-literal-color:#ff7733;--code-highlight-attribute-color:#e6e1cf;--code-highlight-self-color:#36a3d9;--code-highlight-macro-color:#a37acc;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#788797;--code-highlight-doc-comment-color:#a1ac88;--src-line-numbers-span-color:#5c6773;--src-line-number-highlighted-background-color:rgba(255,236,164,0.06);--test-arrow-color:#788797;--test-arrow-background-color:rgba(57,175,215,0.09);--test-arrow-hover-color:#c5c5c5;--test-arrow-hover-background-color:rgba(57,175,215,0.368);--target-background-color:rgba(255,236,164,0.06);--target-border-color:rgba(255,180,76,0.85);--kbd-color:#c5c5c5;--kbd-background:#314559;--kbd-box-shadow-color:#5c6773;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(41%) sepia(12%) saturate(487%) hue-rotate(171deg) brightness(94%) contrast(94%);--crate-search-div-hover-filter:invert(98%) sepia(12%) saturate(81%) hue-rotate(343deg) brightness(113%) contrast(76%);--crate-search-hover-border:#e0e0e0;--src-sidebar-background-selected:#14191f;--src-sidebar-background-hover:#14191f;--table-alt-row-background-color:#191f26;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(15,20,25,1);--scrape-example-code-wrapper-background-end:rgba(15,20,25,0);--sidebar-resizer-hover:hsl(34,50%,33%);--sidebar-resizer-active:hsl(34,100%,66%);}:root[data-theme="ayu"] h1,:root[data-theme="ayu"] h2,:root[data-theme="ayu"] h3,:root[data-theme="ayu"] h4,:where(:root[data-theme="ayu"]) h1 a,:root[data-theme="ayu"] .sidebar h2 a,:root[data-theme="ayu"] .sidebar h3 a{color:#fff;}:root[data-theme="ayu"] .docblock code{color:#ffb454;}:root[data-theme="ayu"] .docblock a>code{color:#39AFD7 !important;}:root[data-theme="ayu"] .code-header,:root[data-theme="ayu"] .docblock pre>code,:root[data-theme="ayu"] pre,:root[data-theme="ayu"] pre>code,:root[data-theme="ayu"] .item-info code,:root[data-theme="ayu"] .rustdoc.source .example-wrap{color:#e6e1cf;}:root[data-theme="ayu"] .sidebar .current,:root[data-theme="ayu"] .sidebar .current a,:root[data-theme="ayu"] .sidebar a:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:hover,:root[data-theme="ayu"] details.dir-entry summary:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:focus,:root[data-theme="ayu"] details.dir-entry summary:focus,:root[data-theme="ayu"] #src-sidebar div.files>a.selected{color:#ffb44c;}:root[data-theme="ayu"] .sidebar-elems .location{color:#ff7733;}:root[data-theme="ayu"] .src-line-numbers .line-highlighted{color:#708090;padding-right:7px;border-right:1px solid #ffb44c;}:root[data-theme="ayu"] .search-results a:hover,:root[data-theme="ayu"] .search-results a:focus{color:#fff !important;background-color:#3c3c3c;}:root[data-theme="ayu"] .search-results a{color:#0096cf;}:root[data-theme="ayu"] .search-results a div.desc{color:#c5c5c5;}:root[data-theme="ayu"] .result-name .primitive>i,:root[data-theme="ayu"] .result-name .keyword>i{color:#788797;}:root[data-theme="ayu"] #search-tabs>button.selected{border-bottom:1px solid #ffb44c !important;border-top:none;}:root[data-theme="ayu"] #search-tabs>button:not(.selected){border:none;background-color:transparent !important;}:root[data-theme="ayu"] #search-tabs>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}:root[data-theme="ayu"] #settings-menu>a img,:root[data-theme="ayu"] #sidebar-button>a:before{filter:invert(100);} \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/search-d234aafac6c221dd.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/search-d234aafac6c221dd.js new file mode 100644 index 00000000..3f587f65 --- /dev/null +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/search-d234aafac6c221dd.js @@ -0,0 +1,5 @@ +"use strict";if(!Array.prototype.toSpliced){Array.prototype.toSpliced=function(){const me=this.slice();Array.prototype.splice.apply(me,arguments);return me}}(function(){const itemTypes=["keyword","primitive","mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","associatedtype","constant","associatedconstant","union","foreigntype","existential","attr","derive","traitalias","generic",];const longItemTypes=["keyword","primitive type","module","extern crate","re-export","struct","enum","function","type alias","static","trait","","trait method","method","struct field","enum variant","macro","assoc type","constant","assoc const","union","foreign type","existential type","attribute macro","derive macro","trait alias",];const TY_GENERIC=itemTypes.indexOf("generic");const TY_IMPORT=itemTypes.indexOf("import");const ROOT_PATH=typeof window!=="undefined"?window.rootPath:"../";const UNBOXING_LIMIT=5;const REGEX_IDENT=/\p{ID_Start}\p{ID_Continue}*|_\p{ID_Continue}+/uy;const REGEX_INVALID_TYPE_FILTER=/[^a-z]/ui;function printTab(nb){let iter=0;let foundCurrentTab=false;let foundCurrentResultSet=false;onEachLazy(document.getElementById("search-tabs").childNodes,elem=>{if(nb===iter){addClass(elem,"selected");foundCurrentTab=true}else{removeClass(elem,"selected")}iter+=1});const isTypeSearch=(nb>0||iter===1);iter=0;onEachLazy(document.getElementById("results").childNodes,elem=>{if(nb===iter){addClass(elem,"active");foundCurrentResultSet=true}else{removeClass(elem,"active")}iter+=1});if(foundCurrentTab&&foundCurrentResultSet){searchState.currentTab=nb;const correctionsElem=document.getElementsByClassName("search-corrections");if(isTypeSearch){removeClass(correctionsElem[0],"hidden")}else{addClass(correctionsElem[0],"hidden")}}else if(nb!==0){printTab(0)}}const editDistanceState={current:[],prev:[],prevPrev:[],calculate:function calculate(a,b,limit){if(a.lengthlimit){return limit+1}while(b.length>0&&b[0]===a[0]){a=a.substring(1);b=b.substring(1)}while(b.length>0&&b[b.length-1]===a[a.length-1]){a=a.substring(0,a.length-1);b=b.substring(0,b.length-1)}if(b.length===0){return minDist}const aLength=a.length;const bLength=b.length;for(let i=0;i<=bLength;++i){this.current[i]=0;this.prev[i]=i;this.prevPrev[i]=Number.MAX_VALUE}for(let i=1;i<=aLength;++i){this.current[0]=i;const aIdx=i-1;for(let j=1;j<=bLength;++j){const bIdx=j-1;const substitutionCost=a[aIdx]===b[bIdx]?0:1;this.current[j]=Math.min(this.prev[j]+1,this.current[j-1]+1,this.prev[j-1]+substitutionCost,);if((i>1)&&(j>1)&&(a[aIdx]===b[bIdx-1])&&(a[aIdx-1]===b[bIdx])){this.current[j]=Math.min(this.current[j],this.prevPrev[j-2]+1,)}}const prevPrevTmp=this.prevPrev;this.prevPrev=this.prev;this.prev=this.current;this.current=prevPrevTmp}const distance=this.prev[bLength];return distance<=limit?distance:(limit+1)},};function editDistance(a,b,limit){return editDistanceState.calculate(a,b,limit)}function initSearch(rawSearchIndex){const MAX_RESULTS=200;const NO_TYPE_FILTER=-1;let searchIndex;let searchIndexDeprecated;let searchIndexEmptyDesc;let functionTypeFingerprint;let currentResults;const typeNameIdMap=new Map();const ALIASES=new Map();const typeNameIdOfArray=buildTypeMapIndex("array");const typeNameIdOfSlice=buildTypeMapIndex("slice");const typeNameIdOfArrayOrSlice=buildTypeMapIndex("[]");const typeNameIdOfTuple=buildTypeMapIndex("tuple");const typeNameIdOfUnit=buildTypeMapIndex("unit");const typeNameIdOfTupleOrUnit=buildTypeMapIndex("()");const typeNameIdOfFn=buildTypeMapIndex("fn");const typeNameIdOfFnMut=buildTypeMapIndex("fnmut");const typeNameIdOfFnOnce=buildTypeMapIndex("fnonce");const typeNameIdOfHof=buildTypeMapIndex("->");function buildTypeMapIndex(name,isAssocType){if(name===""||name===null){return null}if(typeNameIdMap.has(name)){const obj=typeNameIdMap.get(name);obj.assocOnly=isAssocType&&obj.assocOnly;return obj.id}else{const id=typeNameIdMap.size;typeNameIdMap.set(name,{id,assocOnly:isAssocType});return id}}function isSpecialStartCharacter(c){return"<\"".indexOf(c)!==-1}function isEndCharacter(c){return"=,>-])".indexOf(c)!==-1}function itemTypeFromName(typename){const index=itemTypes.findIndex(i=>i===typename);if(index<0){throw["Unknown type filter ",typename]}return index}function getStringElem(query,parserState,isInGenerics){if(isInGenerics){throw["Unexpected ","\""," in generics"]}else if(query.literalSearch){throw["Cannot have more than one literal search element"]}else if(parserState.totalElems-parserState.genericsElems>0){throw["Cannot use literal search when there is more than one element"]}parserState.pos+=1;const start=parserState.pos;const end=getIdentEndPosition(parserState);if(parserState.pos>=parserState.length){throw["Unclosed ","\""]}else if(parserState.userQuery[end]!=="\""){throw["Unexpected ",parserState.userQuery[end]," in a string element"]}else if(start===end){throw["Cannot have empty string element"]}parserState.pos+=1;query.literalSearch=true}function isPathStart(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="::"}function isReturnArrow(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="->"}function consumeIdent(parserState){REGEX_IDENT.lastIndex=parserState.pos;const match=parserState.userQuery.match(REGEX_IDENT);if(match){parserState.pos+=match[0].length;return true}return false}function isSeparatorCharacter(c){return c===","||c==="="}function isPathSeparator(c){return c===":"||c===" "}function prevIs(parserState,lookingFor){let pos=parserState.pos;while(pos>0){const c=parserState.userQuery[pos-1];if(c===lookingFor){return true}else if(c!==" "){break}pos-=1}return false}function isLastElemGeneric(elems,parserState){return(elems.length>0&&elems[elems.length-1].generics.length>0)||prevIs(parserState,">")}function skipWhitespace(parserState){while(parserState.pos0){throw["Cannot have more than one element if you use quotes"]}const typeFilter=parserState.typeFilter;parserState.typeFilter=null;if(name==="!"){if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive never type ","!"," and ",typeFilter," both specified",]}if(generics.length!==0){throw["Never type ","!"," does not accept generic parameters",]}const bindingName=parserState.isInBinding;parserState.isInBinding=null;return makePrimitiveElement("never",{bindingName})}const quadcolon=/::\s*::/.exec(path);if(path.startsWith("::")){throw["Paths cannot start with ","::"]}else if(path.endsWith("::")){throw["Paths cannot end with ","::"]}else if(quadcolon!==null){throw["Unexpected ",quadcolon[0]]}const pathSegments=path.split(/(?:::\s*)|(?:\s+(?:::\s*)?)/);if(pathSegments.length===0||(pathSegments.length===1&&pathSegments[0]==="")){if(generics.length>0||prevIs(parserState,">")){throw["Found generics without a path"]}else{throw["Unexpected ",parserState.userQuery[parserState.pos]]}}for(const[i,pathSegment]of pathSegments.entries()){if(pathSegment==="!"){if(i!==0){throw["Never type ","!"," is not associated item"]}pathSegments[i]="never"}}parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1}const bindingName=parserState.isInBinding;parserState.isInBinding=null;const bindings=new Map();const pathLast=pathSegments[pathSegments.length-1];return{name:name.trim(),id:null,fullPath:pathSegments,pathWithoutLast:pathSegments.slice(0,pathSegments.length-1),pathLast,normalizedPathLast:pathLast.replace(/_/g,""),generics:generics.filter(gen=>{if(gen.bindingName!==null){if(gen.name!==null){gen.bindingName.generics.unshift(gen)}bindings.set(gen.bindingName.name,gen.bindingName.generics);return false}return true}),bindings,typeFilter,bindingName,}}function getIdentEndPosition(parserState){let afterIdent=consumeIdent(parserState);let end=parserState.pos;let macroExclamation=-1;while(parserState.pos0){throw["Unexpected ",c," after ",parserState.userQuery[parserState.pos-1]," (not a valid identifier)"]}else{throw["Unexpected ",c," (not a valid identifier)"]}parserState.pos+=1;afterIdent=consumeIdent(parserState);end=parserState.pos}if(macroExclamation!==-1){if(parserState.typeFilter===null){parserState.typeFilter="macro"}else if(parserState.typeFilter!=="macro"){throw["Invalid search type: macro ","!"," and ",parserState.typeFilter," both specified",]}end=macroExclamation}return end}function getFilteredNextElem(query,parserState,elems,isInGenerics){const start=parserState.pos;if(parserState.userQuery[parserState.pos]===":"&&!isPathStart(parserState)){throw["Expected type filter before ",":"]}getNextElem(query,parserState,elems,isInGenerics);if(parserState.userQuery[parserState.pos]===":"&&!isPathStart(parserState)){if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}if(elems.length===0){throw["Expected type filter before ",":"]}else if(query.literalSearch){throw["Cannot use quotes on type filter"]}const typeFilterElem=elems.pop();checkExtraTypeFilterCharacters(start,parserState);parserState.typeFilter=typeFilterElem.name;parserState.pos+=1;parserState.totalElems-=1;query.literalSearch=false;getNextElem(query,parserState,elems,isInGenerics)}}function getNextElem(query,parserState,elems,isInGenerics){const generics=[];skipWhitespace(parserState);let start=parserState.pos;let end;if("[(".indexOf(parserState.userQuery[parserState.pos])!==-1){let endChar=")";let name="()";let friendlyName="tuple";if(parserState.userQuery[parserState.pos]==="["){endChar="]";name="[]";friendlyName="slice"}parserState.pos+=1;const{foundSeparator}=getItemsBefore(query,parserState,generics,endChar);const typeFilter=parserState.typeFilter;const bindingName=parserState.isInBinding;parserState.typeFilter=null;parserState.isInBinding=null;for(const gen of generics){if(gen.bindingName!==null){throw["Type parameter ","=",` cannot be within ${friendlyName} `,name]}}if(name==="()"&&!foundSeparator&&generics.length===1&&typeFilter===null){elems.push(generics[0])}else if(name==="()"&&generics.length===1&&generics[0].name==="->"){generics[0].typeFilter=typeFilter;elems.push(generics[0])}else{if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive ",name," and ",typeFilter," both specified",]}parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1}elems.push(makePrimitiveElement(name,{bindingName,generics}))}}else if(parserState.userQuery[parserState.pos]==="&"){if(parserState.typeFilter!==null&&parserState.typeFilter!=="primitive"){throw["Invalid search type: primitive ","&"," and ",parserState.typeFilter," both specified",]}parserState.typeFilter=null;parserState.pos+=1;let c=parserState.userQuery[parserState.pos];while(c===" "&&parserState.pos=end){throw["Found generics without a path"]}parserState.pos+=1;getItemsBefore(query,parserState,generics,">")}else if(parserState.pos=end){throw["Found generics without a path"]}if(parserState.isInBinding){throw["Unexpected ","("," after ","="]}parserState.pos+=1;const typeFilter=parserState.typeFilter;parserState.typeFilter=null;getItemsBefore(query,parserState,generics,")");skipWhitespace(parserState);if(isReturnArrow(parserState)){parserState.pos+=2;skipWhitespace(parserState);getFilteredNextElem(query,parserState,generics,isInGenerics);generics[generics.length-1].bindingName=makePrimitiveElement("output")}else{generics.push(makePrimitiveElement(null,{bindingName:makePrimitiveElement("output"),typeFilter:null,}))}parserState.typeFilter=typeFilter}if(isStringElem){skipWhitespace(parserState)}if(start>=end&&generics.length===0){return}if(parserState.userQuery[parserState.pos]==="="){if(parserState.isInBinding){throw["Cannot write ","="," twice in a binding"]}if(!isInGenerics){throw["Type parameter ","="," must be within generics list"]}const name=parserState.userQuery.slice(start,end).trim();if(name==="!"){throw["Type parameter ","="," key cannot be ","!"," never type"]}if(name.includes("!")){throw["Type parameter ","="," key cannot be ","!"," macro"]}if(name.includes("::")){throw["Type parameter ","="," key cannot contain ","::"," path"]}if(name.includes(":")){throw["Type parameter ","="," key cannot contain ",":"," type"]}parserState.isInBinding={name,generics}}else{elems.push(createQueryElement(query,parserState,parserState.userQuery.slice(start,end),generics,isInGenerics,),)}}}function getItemsBefore(query,parserState,elems,endChar){let foundStopChar=true;let foundSeparator=false;const oldTypeFilter=parserState.typeFilter;parserState.typeFilter=null;const oldIsInBinding=parserState.isInBinding;parserState.isInBinding=null;let hofParameters=null;let extra="";if(endChar===">"){extra="<"}else if(endChar==="]"){extra="["}else if(endChar===")"){extra="("}else if(endChar===""){extra="->"}else{extra=endChar}while(parserState.pos"," after ","="]}hofParameters=[...elems];elems.length=0;parserState.pos+=2;foundStopChar=true;foundSeparator=false;continue}else if(c===" "){parserState.pos+=1;continue}else if(isSeparatorCharacter(c)){parserState.pos+=1;foundStopChar=true;foundSeparator=true;continue}else if(c===":"&&isPathStart(parserState)){throw["Unexpected ","::",": paths cannot start with ","::"]}else if(isEndCharacter(c)){throw["Unexpected ",c," after ",extra]}if(!foundStopChar){let extra=[];if(isLastElemGeneric(query.elems,parserState)){extra=[" after ",">"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(endChar!==""){throw["Expected ",",",", ","=",", or ",endChar,...extra,", found ",c,]}throw["Expected ",","," or ","=",...extra,", found ",c,]}const posBefore=parserState.pos;getFilteredNextElem(query,parserState,elems,endChar!=="");if(endChar!==""&&parserState.pos>=parserState.length){throw["Unclosed ",extra]}if(posBefore===parserState.pos){parserState.pos+=1}foundStopChar=false}if(parserState.pos>=parserState.length&&endChar!==""){throw["Unclosed ",extra]}parserState.pos+=1;if(hofParameters){foundSeparator=false;if([...elems,...hofParameters].some(x=>x.bindingName)||parserState.isInBinding){throw["Unexpected ","="," within ","->"]}const hofElem=makePrimitiveElement("->",{generics:hofParameters,bindings:new Map([["output",[...elems]]]),typeFilter:null,});elems.length=0;elems[0]=hofElem}parserState.typeFilter=oldTypeFilter;parserState.isInBinding=oldIsInBinding;return{foundSeparator}}function checkExtraTypeFilterCharacters(start,parserState){const query=parserState.userQuery.slice(start,parserState.pos).trim();const match=query.match(REGEX_INVALID_TYPE_FILTER);if(match){throw["Unexpected ",match[0]," in type filter (before ",":",")",]}}function parseInput(query,parserState){let foundStopChar=true;while(parserState.pos"){if(isReturnArrow(parserState)){break}throw["Unexpected ",c," (did you mean ","->","?)"]}else if(parserState.pos>0){throw["Unexpected ",c," after ",parserState.userQuery[parserState.pos-1]]}throw["Unexpected ",c]}else if(c===" "){skipWhitespace(parserState);continue}if(!foundStopChar){let extra="";if(isLastElemGeneric(query.elems,parserState)){extra=[" after ",">"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(parserState.typeFilter!==null){throw["Expected ",","," or ","->",...extra,", found ",c,]}throw["Expected ",",",", ",":"," or ","->",...extra,", found ",c,]}const before=query.elems.length;getFilteredNextElem(query,parserState,query.elems,false);if(query.elems.length===before){parserState.pos+=1}foundStopChar=false}if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}while(parserState.pos"]}break}else{parserState.pos+=1}}}function newParsedQuery(userQuery){return{original:userQuery,userQuery:userQuery.toLowerCase(),elems:[],returned:[],foundElems:0,totalElems:0,literalSearch:false,error:null,correction:null,proposeCorrectionFrom:null,proposeCorrectionTo:null,typeFingerprint:new Uint32Array(4),}}function buildUrl(search,filterCrates){let extra="?search="+encodeURIComponent(search);if(filterCrates!==null){extra+="&filter-crate="+encodeURIComponent(filterCrates)}return getNakedUrl()+extra+window.location.hash}function getFilterCrates(){const elem=document.getElementById("crate-search");if(elem&&elem.value!=="all crates"&&rawSearchIndex.has(elem.value)){return elem.value}return null}function parseQuery(userQuery){function convertTypeFilterOnElem(elem){if(elem.typeFilter!==null){let typeFilter=elem.typeFilter;if(typeFilter==="const"){typeFilter="constant"}elem.typeFilter=itemTypeFromName(typeFilter)}else{elem.typeFilter=NO_TYPE_FILTER}for(const elem2 of elem.generics){convertTypeFilterOnElem(elem2)}for(const constraints of elem.bindings.values()){for(const constraint of constraints){convertTypeFilterOnElem(constraint)}}}userQuery=userQuery.trim().replace(/\r|\n|\t/g," ");const parserState={length:userQuery.length,pos:0,totalElems:0,genericsElems:0,typeFilter:null,isInBinding:null,userQuery:userQuery.toLowerCase(),};let query=newParsedQuery(userQuery);try{parseInput(query,parserState);for(const elem of query.elems){convertTypeFilterOnElem(elem)}for(const elem of query.returned){convertTypeFilterOnElem(elem)}}catch(err){query=newParsedQuery(userQuery);query.error=err;return query}if(!query.literalSearch){query.literalSearch=parserState.totalElems>1}query.foundElems=query.elems.length+query.returned.length;query.totalElems=parserState.totalElems;return query}function createQueryResults(results_in_args,results_returned,results_others,parsedQuery){return{"in_args":results_in_args,"returned":results_returned,"others":results_others,"query":parsedQuery,}}async function execQuery(parsedQuery,filterCrates,currentCrate){const results_others=new Map(),results_in_args=new Map(),results_returned=new Map();function transformResults(results){const duplicates=new Set();const out=[];for(const result of results){if(result.id!==-1){const obj=searchIndex[result.id];obj.dist=result.dist;const res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=res[2]+"|"+obj.ty;if(duplicates.has(obj.fullPath)){continue}if(obj.ty===TY_IMPORT&&duplicates.has(res[2])){continue}if(duplicates.has(res[2]+"|"+TY_IMPORT)){continue}duplicates.add(obj.fullPath);duplicates.add(res[2]);obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}return out}async function sortResults(results,isType,preferredCrate){const userQuery=parsedQuery.userQuery;const result_list=[];for(const result of results.values()){result.item=searchIndex[result.id];result.word=searchIndex[result.id].word;result_list.push(result)}result_list.sort((aaa,bbb)=>{let a,b;a=(aaa.word!==userQuery);b=(bbb.word!==userQuery);if(a!==b){return a-b}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.path_dist;b=bbb.path_dist;if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}a=(aaa.dist);b=(bbb.dist);if(a!==b){return a-b}a=searchIndexDeprecated.get(aaa.item.crate).contains(aaa.item.bitIndex);b=searchIndexDeprecated.get(bbb.item.crate).contains(bbb.item.bitIndex);if(a!==b){return a-b}a=(aaa.item.crate!==preferredCrate);b=(bbb.item.crate!==preferredCrate);if(a!==b){return a-b}a=aaa.word.length;b=bbb.word.length;if(a!==b){return a-b}a=aaa.word;b=bbb.word;if(a!==b){return(a>b?+1:-1)}a=searchIndexEmptyDesc.get(aaa.item.crate).contains(aaa.item.bitIndex);b=searchIndexEmptyDesc.get(bbb.item.crate).contains(bbb.item.bitIndex);if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});return transformResults(result_list)}function unifyFunctionTypes(fnTypesIn,queryElems,whereClause,mgensIn,solutionCb,unboxingDepth,){if(unboxingDepth>=UNBOXING_LIMIT){return false}const mgens=mgensIn===null?null:new Map(mgensIn);if(queryElems.length===0){return!solutionCb||solutionCb(mgens)}if(!fnTypesIn||fnTypesIn.length===0){return false}const ql=queryElems.length;const fl=fnTypesIn.length;if(ql===1&&queryElems[0].generics.length===0&&queryElems[0].bindings.size===0){const queryElem=queryElems[0];for(const fnType of fnTypesIn){if(!unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgens)){continue}if(fnType.id<0&&queryElem.id<0){if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==queryElem.id){continue}const mgensScratch=new Map(mgens);mgensScratch.set(fnType.id,queryElem.id);if(!solutionCb||solutionCb(mgensScratch)){return true}}else if(!solutionCb||solutionCb(mgens?new Map(mgens):null)){return true}}for(const fnType of fnTypesIn){if(!unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth+1,)){continue}if(fnType.id<0){if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==0){continue}const mgensScratch=new Map(mgens);mgensScratch.set(fnType.id,0);if(unifyFunctionTypes(whereClause[(-fnType.id)-1],queryElems,whereClause,mgensScratch,solutionCb,unboxingDepth+1,)){return true}}else if(unifyFunctionTypes([...fnType.generics,...Array.from(fnType.bindings.values()).flat()],queryElems,whereClause,mgens?new Map(mgens):null,solutionCb,unboxingDepth+1,)){return true}}return false}const fnTypes=fnTypesIn.slice();const flast=fl-1;const qlast=ql-1;const queryElem=queryElems[qlast];let queryElemsTmp=null;for(let i=flast;i>=0;i-=1){const fnType=fnTypes[i];if(!unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgens)){continue}let mgensScratch;if(fnType.id<0){mgensScratch=new Map(mgens);if(mgensScratch.has(fnType.id)&&mgensScratch.get(fnType.id)!==queryElem.id){continue}mgensScratch.set(fnType.id,queryElem.id)}else{mgensScratch=mgens}fnTypes[i]=fnTypes[flast];fnTypes.length=flast;if(!queryElemsTmp){queryElemsTmp=queryElems.slice(0,qlast)}const passesUnification=unifyFunctionTypes(fnTypes,queryElemsTmp,whereClause,mgensScratch,mgensScratch=>{if(fnType.generics.length===0&&queryElem.generics.length===0&&fnType.bindings.size===0&&queryElem.bindings.size===0){return!solutionCb||solutionCb(mgensScratch)}const solution=unifyFunctionTypeCheckBindings(fnType,queryElem,whereClause,mgensScratch,unboxingDepth,);if(!solution){return false}const simplifiedGenerics=solution.simplifiedGenerics;for(const simplifiedMgens of solution.mgens){const passesUnification=unifyFunctionTypes(simplifiedGenerics,queryElem.generics,whereClause,simplifiedMgens,solutionCb,unboxingDepth,);if(passesUnification){return true}}return false},unboxingDepth,);if(passesUnification){return true}fnTypes[flast]=fnTypes[i];fnTypes[i]=fnType;fnTypes.length=fl}for(let i=flast;i>=0;i-=1){const fnType=fnTypes[i];if(!unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth+1,)){continue}let mgensScratch;if(fnType.id<0){mgensScratch=new Map(mgens);if(mgensScratch.has(fnType.id)&&mgensScratch.get(fnType.id)!==0){continue}mgensScratch.set(fnType.id,0)}else{mgensScratch=mgens}const generics=fnType.id<0?whereClause[(-fnType.id)-1]:fnType.generics;const bindings=fnType.bindings?Array.from(fnType.bindings.values()).flat():[];const passesUnification=unifyFunctionTypes(fnTypes.toSpliced(i,1,...generics,...bindings),queryElems,whereClause,mgensScratch,solutionCb,unboxingDepth+1,);if(passesUnification){return true}}return false}function unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgensIn){if(!typePassesFilter(queryElem.typeFilter,fnType.ty)){return false}if(fnType.id<0&&queryElem.id<0){if(mgensIn){if(mgensIn.has(fnType.id)&&mgensIn.get(fnType.id)!==queryElem.id){return false}for(const[fid,qid]of mgensIn.entries()){if(fnType.id!==fid&&queryElem.id===qid){return false}if(fnType.id===fid&&queryElem.id!==qid){return false}}}return true}else{if(queryElem.id===typeNameIdOfArrayOrSlice&&(fnType.id===typeNameIdOfSlice||fnType.id===typeNameIdOfArray)){}else if(queryElem.id===typeNameIdOfTupleOrUnit&&(fnType.id===typeNameIdOfTuple||fnType.id===typeNameIdOfUnit)){}else if(queryElem.id===typeNameIdOfHof&&(fnType.id===typeNameIdOfFn||fnType.id===typeNameIdOfFnMut||fnType.id===typeNameIdOfFnOnce)){}else if(fnType.id!==queryElem.id||queryElem.id===null){return false}if((fnType.generics.length+fnType.bindings.size)===0&&queryElem.generics.length!==0){return false}if(fnType.bindings.size0){const fnTypePath=fnType.path!==undefined&&fnType.path!==null?fnType.path.split("::"):[];if(queryElemPathLength>fnTypePath.length){return false}let i=0;for(const path of fnTypePath){if(path===queryElem.pathWithoutLast[i]){i+=1;if(i>=queryElemPathLength){break}}}if(i0){let mgensSolutionSet=[mgensIn];for(const[name,constraints]of queryElem.bindings.entries()){if(mgensSolutionSet.length===0){return false}if(!fnType.bindings.has(name)){return false}const fnTypeBindings=fnType.bindings.get(name);mgensSolutionSet=mgensSolutionSet.flatMap(mgens=>{const newSolutions=[];unifyFunctionTypes(fnTypeBindings,constraints,whereClause,mgens,newMgens=>{newSolutions.push(newMgens);return false},unboxingDepth,);return newSolutions})}if(mgensSolutionSet.length===0){return false}const binds=Array.from(fnType.bindings.entries()).flatMap(entry=>{const[name,constraints]=entry;if(queryElem.bindings.has(name)){return[]}else{return constraints}});if(simplifiedGenerics.length>0){simplifiedGenerics=[...simplifiedGenerics,...binds]}else{simplifiedGenerics=binds}return{simplifiedGenerics,mgens:mgensSolutionSet}}return{simplifiedGenerics,mgens:[mgensIn]}}function unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth,){if(unboxingDepth>=UNBOXING_LIMIT){return false}if(fnType.id<0&&queryElem.id>=0){if(!whereClause){return false}if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==0){return false}const mgensTmp=new Map(mgens);mgensTmp.set(fnType.id,null);return checkIfInList(whereClause[(-fnType.id)-1],queryElem,whereClause,mgensTmp,unboxingDepth,)}else if(fnType.generics.length>0||fnType.bindings.size>0){const simplifiedGenerics=[...fnType.generics,...Array.from(fnType.bindings.values()).flat(),];return checkIfInList(simplifiedGenerics,queryElem,whereClause,mgens,unboxingDepth,)}return false}function checkIfInList(list,elem,whereClause,mgens,unboxingDepth){for(const entry of list){if(checkType(entry,elem,whereClause,mgens,unboxingDepth)){return true}}return false}function checkType(row,elem,whereClause,mgens,unboxingDepth){if(unboxingDepth>=UNBOXING_LIMIT){return false}if(row.bindings.size===0&&elem.bindings.size===0){if(elem.id<0&&mgens===null){return row.id<0||checkIfInList(row.generics,elem,whereClause,mgens,unboxingDepth+1,)}if(row.id>0&&elem.id>0&&elem.pathWithoutLast.length===0&&typePassesFilter(elem.typeFilter,row.ty)&&elem.generics.length===0&&elem.id!==typeNameIdOfArrayOrSlice&&elem.id!==typeNameIdOfTupleOrUnit&&elem.id!==typeNameIdOfHof){return row.id===elem.id||checkIfInList(row.generics,elem,whereClause,mgens,unboxingDepth,)}}return unifyFunctionTypes([row],[elem],whereClause,mgens,null,unboxingDepth)}function checkPath(contains,ty){if(contains.length===0){return 0}const maxPathEditDistance=Math.floor(contains.reduce((acc,next)=>acc+next.length,0)/3,);let ret_dist=maxPathEditDistance+1;const path=ty.path.split("::");if(ty.parent&&ty.parent.name){path.push(ty.parent.name.toLowerCase())}const length=path.length;const clength=contains.length;pathiter:for(let i=length-clength;i>=0;i-=1){let dist_total=0;for(let x=0;xmaxPathEditDistance){continue pathiter}dist_total+=dist}}ret_dist=Math.min(ret_dist,Math.round(dist_total/clength))}return ret_dist>maxPathEditDistance?null:ret_dist}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER||filter===type)return true;const name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,descShard:item.descShard,descIndex:item.descIndex,exactPath:item.exactPath,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,bitIndex:item.bitIndex,implDisambiguator:item.implDisambiguator,}}async function handleAliases(ret,query,filterCrates,currentCrate){const lowerQuery=query.toLowerCase();const aliases=[];const crateAliases=[];if(filterCrates!==null){if(ALIASES.has(filterCrates)&&ALIASES.get(filterCrates).has(lowerQuery)){const query_aliases=ALIASES.get(filterCrates).get(lowerQuery);for(const alias of query_aliases){aliases.push(createAliasFromItem(searchIndex[alias]))}}}else{for(const[crate,crateAliasesIndex]of ALIASES){if(crateAliasesIndex.has(lowerQuery)){const pushTo=crate===currentCrate?crateAliases:aliases;const query_aliases=crateAliasesIndex.get(lowerQuery);for(const alias of query_aliases){pushTo.push(createAliasFromItem(searchIndex[alias]))}}}}const sortFunc=(aaa,bbb)=>{if(aaa.path{return searchIndexEmptyDesc.get(alias.crate).contains(alias.bitIndex)?"":searchState.loadDesc(alias)};const[crateDescs,descs]=await Promise.all([Promise.all(crateAliases.map(fetchDesc)),Promise.all(aliases.map(fetchDesc)),]);const pushFunc=alias=>{alias.alias=query;const res=buildHrefAndPath(alias);alias.displayPath=pathSplitter(res[0]);alias.fullPath=alias.displayPath+alias.name;alias.href=res[1];ret.others.unshift(alias);if(ret.others.length>MAX_RESULTS){ret.others.pop()}};aliases.forEach((alias,i)=>{alias.desc=descs[i]});aliases.forEach(pushFunc);crateAliases.forEach((alias,i)=>{alias.desc=crateDescs[i]});crateAliases.forEach(pushFunc)}function addIntoResults(results,fullId,id,index,dist,path_dist,maxEditDistance){if(dist<=maxEditDistance||index!==-1){if(results.has(fullId)){const result=results.get(fullId);if(result.dontValidate||result.dist<=dist){return}}results.set(fullId,{id:id,index:index,dontValidate:parsedQuery.literalSearch,dist:dist,path_dist:path_dist,})}}function handleSingleArg(row,pos,elem,results_others,results_in_args,results_returned,maxEditDistance,){if(!row||(filterCrates!==null&&row.crate!==filterCrates)){return}let path_dist=0;const fullId=row.id;const tfpDist=compareTypeFingerprints(fullId,parsedQuery.typeFingerprint,);if(tfpDist!==null){const in_args=row.type&&row.type.inputs&&checkIfInList(row.type.inputs,elem,row.type.where_clause,null,0);const returned=row.type&&row.type.output&&checkIfInList(row.type.output,elem,row.type.where_clause,null,0);if(in_args){results_in_args.max_dist=Math.max(results_in_args.max_dist||0,tfpDist);const maxDist=results_in_args.sizenormalizedIndex&&normalizedIndex!==-1)){index=normalizedIndex}if(elem.fullPath.length>1){path_dist=checkPath(elem.pathWithoutLast,row);if(path_dist===null){return}}if(parsedQuery.literalSearch){if(row.word===elem.pathLast){addIntoResults(results_others,fullId,pos,index,0,path_dist)}return}const dist=editDistance(row.normalizedName,elem.normalizedPathLast,maxEditDistance);if(index===-1&&dist>maxEditDistance){return}addIntoResults(results_others,fullId,pos,index,dist,path_dist,maxEditDistance)}function handleArgs(row,pos,results){if(!row||(filterCrates!==null&&row.crate!==filterCrates)||!row.type){return}const tfpDist=compareTypeFingerprints(row.id,parsedQuery.typeFingerprint,);if(tfpDist===null){return}if(results.size>=MAX_RESULTS&&tfpDist>results.max_dist){return}if(!unifyFunctionTypes(row.type.inputs,parsedQuery.elems,row.type.where_clause,null,mgens=>{return unifyFunctionTypes(row.type.output,parsedQuery.returned,row.type.where_clause,mgens,null,0,)},0,)){return}results.max_dist=Math.max(results.max_dist||0,tfpDist);addIntoResults(results,row.id,pos,0,tfpDist,0,Number.MAX_VALUE)}function innerRunQuery(){const queryLen=parsedQuery.elems.reduce((acc,next)=>acc+next.pathLast.length,0)+parsedQuery.returned.reduce((acc,next)=>acc+next.pathLast.length,0);const maxEditDistance=Math.floor(queryLen/3);const genericSymbols=new Map();function convertNameToId(elem,isAssocType){const loweredName=elem.pathLast.toLowerCase();if(typeNameIdMap.has(loweredName)&&(isAssocType||!typeNameIdMap.get(loweredName).assocOnly)){elem.id=typeNameIdMap.get(loweredName).id}else if(!parsedQuery.literalSearch){let match=null;let matchDist=maxEditDistance+1;let matchName="";for(const[name,{id,assocOnly}]of typeNameIdMap){const dist=Math.min(editDistance(name,loweredName,maxEditDistance),editDistance(name,elem.normalizedPathLast,maxEditDistance),);if(dist<=matchDist&&dist<=maxEditDistance&&(isAssocType||!assocOnly)){if(dist===matchDist&&matchName>name){continue}match=id;matchDist=dist;matchName=name}}if(match!==null){parsedQuery.correction=matchName}elem.id=match}if((elem.id===null&&parsedQuery.totalElems>1&&elem.typeFilter===-1&&elem.generics.length===0&&elem.bindings.size===0)||elem.typeFilter===TY_GENERIC){if(genericSymbols.has(elem.name)){elem.id=genericSymbols.get(elem.name)}else{elem.id=-(genericSymbols.size+1);genericSymbols.set(elem.name,elem.id)}if(elem.typeFilter===-1&&elem.name.length>=3){const maxPartDistance=Math.floor(elem.name.length/3);let matchDist=maxPartDistance+1;let matchName="";for(const name of typeNameIdMap.keys()){const dist=editDistance(name,elem.name,maxPartDistance);if(dist<=matchDist&&dist<=maxPartDistance){if(dist===matchDist&&matchName>name){continue}matchDist=dist;matchName=name}}if(matchName!==""){parsedQuery.proposeCorrectionFrom=elem.name;parsedQuery.proposeCorrectionTo=matchName}}elem.typeFilter=TY_GENERIC}if(elem.generics.length>0&&elem.typeFilter===TY_GENERIC){parsedQuery.error=["Generic type parameter ",elem.name," does not accept generic parameters",]}for(const elem2 of elem.generics){convertNameToId(elem2)}elem.bindings=new Map(Array.from(elem.bindings.entries()).map(entry=>{const[name,constraints]=entry;if(!typeNameIdMap.has(name)){parsedQuery.error=["Type parameter ",name," does not exist",];return[null,[]]}for(const elem2 of constraints){convertNameToId(elem2)}return[typeNameIdMap.get(name).id,constraints]}),)}const fps=new Set();for(const elem of parsedQuery.elems){convertNameToId(elem);buildFunctionTypeFingerprint(elem,parsedQuery.typeFingerprint,fps)}for(const elem of parsedQuery.returned){convertNameToId(elem);buildFunctionTypeFingerprint(elem,parsedQuery.typeFingerprint,fps)}if(parsedQuery.foundElems===1&&parsedQuery.returned.length===0){if(parsedQuery.elems.length===1){const elem=parsedQuery.elems[0];for(let i=0,nSearchIndex=searchIndex.length;i0){const sortQ=(a,b)=>{const ag=a.generics.length===0&&a.bindings.size===0;const bg=b.generics.length===0&&b.bindings.size===0;if(ag!==bg){return ag-bg}const ai=a.id>0;const bi=b.id>0;return ai-bi};parsedQuery.elems.sort(sortQ);parsedQuery.returned.sort(sortQ);for(let i=0,nSearchIndex=searchIndex.length;i{const descs=await Promise.all(list.map(result=>{return searchIndexEmptyDesc.get(result.crate).contains(result.bitIndex)?"":searchState.loadDesc(result)}));for(const[i,result]of list.entries()){result.desc=descs[i]}}));if(parsedQuery.error!==null&&ret.others.length!==0){ret.query.error=null}return ret}function nextTab(direction){const next=(searchState.currentTab+direction+3)%searchState.focusedByTab.length;searchState.focusedByTab[searchState.currentTab]=document.activeElement;printTab(next);focusSearchResult()}function focusSearchResult(){const target=searchState.focusedByTab[searchState.currentTab]||document.querySelectorAll(".search-results.active a").item(0)||document.querySelectorAll("#search-tabs button").item(searchState.currentTab);searchState.focusedByTab[searchState.currentTab]=null;if(target){target.focus()}}function buildHrefAndPath(item){let displayPath;let href;const type=itemTypes[item.ty];const name=item.name;let path=item.path;let exactPath=item.exactPath;if(type==="mod"){displayPath=path+"::";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="import"){displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/index.html#reexport."+name}else if(type==="primitive"||type==="keyword"){displayPath="";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=ROOT_PATH+name+"/index.html"}else if(item.parent!==undefined){const myparent=item.parent;let anchor=type+"."+name;const parentType=itemTypes[myparent.ty];let pageType=parentType;let pageName=myparent.name;exactPath=`${myparent.exactPath}::${myparent.name}`;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){const enumNameIdx=item.path.lastIndexOf("::");const enumName=item.path.substr(enumNameIdx+2);path=item.path.substr(0,enumNameIdx);displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}if(item.implDisambiguator!==null){anchor=item.implDisambiguator+"/"+anchor}href=ROOT_PATH+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html#"+anchor}else{displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href,`${exactPath}::${name}`]}function pathSplitter(path){const tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}async function addTab(array,query,display){const extraClass=display?" active":"";const output=document.createElement("div");if(array.length>0){output.className="search-results "+extraClass;for(const item of array){const name=item.name;const type=itemTypes[item.ty];const longType=longItemTypes[item.ty];const typeName=longType.length!==0?`${longType}`:"?";const link=document.createElement("a");link.className="result-"+type;link.href=item.href;const resultName=document.createElement("div");resultName.className="result-name";resultName.insertAdjacentHTML("beforeend",`${typeName}`);link.appendChild(resultName);let alias=" ";if(item.is_alias){alias=`
\ +${item.alias} - see \ +
`}resultName.insertAdjacentHTML("beforeend",`
${alias}\ +${item.displayPath}${name}\ +
`);const description=document.createElement("div");description.className="desc";description.insertAdjacentHTML("beforeend",item.desc);link.appendChild(description);output.appendChild(link)}}else if(query.error===null){output.className="search-failed"+extraClass;output.innerHTML="No results :(
"+"Try on DuckDuckGo?

"+"Or try looking in one of these:"}return[output,array.length]}function makeTabHeader(tabNb,text,nbElems){const fmtNbElems=nbElems<10?`\u{2007}(${nbElems})\u{2007}\u{2007}`:nbElems<100?`\u{2007}(${nbElems})\u{2007}`:`\u{2007}(${nbElems})`;if(searchState.currentTab===tabNb){return""}return""}async function showResults(results,go_to_first,filterCrates){const search=searchState.outputElement();if(go_to_first||(results.others.length===1&&getSettingValue("go-to-only-result")==="true")){window.onunload=()=>{};searchState.removeQueryParameters();const elem=document.createElement("a");elem.href=results.others[0].href;removeClass(elem,"active");document.body.appendChild(elem);elem.click();return}if(results.query===undefined){results.query=parseQuery(searchState.input.value)}currentResults=results.query.userQuery;const[ret_others,ret_in_args,ret_returned]=await Promise.all([addTab(results.others,results.query,true),addTab(results.in_args,results.query,false),addTab(results.returned,results.query,false),]);let currentTab=searchState.currentTab;if((currentTab===0&&ret_others[1]===0)||(currentTab===1&&ret_in_args[1]===0)||(currentTab===2&&ret_returned[1]===0)){if(ret_others[1]!==0){currentTab=0}else if(ret_in_args[1]!==0){currentTab=1}else if(ret_returned[1]!==0){currentTab=2}}let crates="";if(rawSearchIndex.size>1){crates=" in 
"}let output=`

Results${crates}

`;if(results.query.error!==null){const error=results.query.error;error.forEach((value,index)=>{value=value.split("<").join("<").split(">").join(">");if(index%2!==0){error[index]=`${value.replaceAll(" ", " ")}`}else{error[index]=value}});output+=`

Query parser error: "${error.join("")}".

`;output+="
"+makeTabHeader(0,"In Names",ret_others[1])+"
";currentTab=0}else if(results.query.foundElems<=1&&results.query.returned.length===0){output+="
"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
"}else{const signatureTabTitle=results.query.elems.length===0?"In Function Return Types":results.query.returned.length===0?"In Function Parameters":"In Function Signatures";output+="
"+makeTabHeader(0,signatureTabTitle,ret_others[1])+"
";currentTab=0}if(results.query.correction!==null){const orig=results.query.returned.length>0?results.query.returned[0].name:results.query.elems[0].name;output+="

"+`Type "${orig}" not found. `+"Showing results for closest type name "+`"${results.query.correction}" instead.

`}if(results.query.proposeCorrectionFrom!==null){const orig=results.query.proposeCorrectionFrom;const targ=results.query.proposeCorrectionTo;output+="

"+`Type "${orig}" not found and used as generic parameter. `+`Consider searching for "${targ}" instead.

`}const resultsElem=document.createElement("div");resultsElem.id="results";resultsElem.appendChild(ret_others[0]);resultsElem.appendChild(ret_in_args[0]);resultsElem.appendChild(ret_returned[0]);search.innerHTML=output;const crateSearch=document.getElementById("crate-search");if(crateSearch){crateSearch.addEventListener("input",updateCrate)}search.appendChild(resultsElem);searchState.showResults(search);const elems=document.getElementById("search-tabs").childNodes;searchState.focusedByTab=[];let i=0;for(const elem of elems){const j=i;elem.onclick=()=>printTab(j);searchState.focusedByTab.push(null);i+=1}printTab(currentTab)}function updateSearchHistory(url){if(!browserSupportsHistoryApi()){return}const params=searchState.getQueryStringParams();if(!history.state&&!params.search){history.pushState(null,"",url)}else{history.replaceState(null,"",url)}}async function search(forced){const query=parseQuery(searchState.input.value.trim());let filterCrates=getFilterCrates();if(!forced&&query.userQuery===currentResults){if(query.userQuery.length>0){putBackSearch()}return}searchState.setLoadingSearch();const params=searchState.getQueryStringParams();if(filterCrates===null&¶ms["filter-crate"]!==undefined){filterCrates=params["filter-crate"]}searchState.title="Results for "+query.original+" - Rust";updateSearchHistory(buildUrl(query.original,filterCrates));await showResults(await execQuery(query,filterCrates,window.currentCrate),params.go_to_first,filterCrates)}function buildItemSearchTypeAll(types,lowercasePaths){return types.length>0?types.map(type=>buildItemSearchType(type,lowercasePaths)):EMPTY_GENERICS_ARRAY}const EMPTY_BINDINGS_MAP=new Map();const EMPTY_GENERICS_ARRAY=[];let TYPES_POOL=new Map();function buildItemSearchType(type,lowercasePaths,isAssocType){const PATH_INDEX_DATA=0;const GENERICS_DATA=1;const BINDINGS_DATA=2;let pathIndex,generics,bindings;if(typeof type==="number"){pathIndex=type;generics=EMPTY_GENERICS_ARRAY;bindings=EMPTY_BINDINGS_MAP}else{pathIndex=type[PATH_INDEX_DATA];generics=buildItemSearchTypeAll(type[GENERICS_DATA],lowercasePaths,);if(type.length>BINDINGS_DATA&&type[BINDINGS_DATA].length>0){bindings=new Map(type[BINDINGS_DATA].map(binding=>{const[assocType,constraints]=binding;return[buildItemSearchType(assocType,lowercasePaths,true).id,buildItemSearchTypeAll(constraints,lowercasePaths),]}))}else{bindings=EMPTY_BINDINGS_MAP}}let result;if(pathIndex<0){result={id:pathIndex,ty:TY_GENERIC,path:null,exactPath:null,generics,bindings,}}else if(pathIndex===0){result={id:null,ty:null,path:null,exactPath:null,generics,bindings,}}else{const item=lowercasePaths[pathIndex-1];result={id:buildTypeMapIndex(item.name,isAssocType),ty:item.ty,path:item.path,exactPath:item.exactPath,generics,bindings,}}const cr=TYPES_POOL.get(result.id);if(cr){if(cr.generics.length===result.generics.length&&cr.generics!==result.generics&&cr.generics.every((x,i)=>result.generics[i]===x)){result.generics=cr.generics}if(cr.bindings.size===result.bindings.size&&cr.bindings!==result.bindings){let ok=true;for(const[k,v]of cr.bindings.entries()){const v2=result.bindings.get(v);if(!v2){ok=false;break}if(v!==v2&&v.length===v2.length&&v.every((x,i)=>v2[i]===x)){result.bindings.set(k,v)}else if(v!==v2){ok=false;break}}if(ok){result.bindings=cr.bindings}}if(cr.ty===result.ty&&cr.path===result.path&&cr.bindings===result.bindings&&cr.generics===result.generics&&cr.ty===result.ty){return cr}}TYPES_POOL.set(result.id,result);return result}function buildFunctionSearchTypeCallback(lowercasePaths){return functionSearchType=>{if(functionSearchType===0){return null}const INPUTS_DATA=0;const OUTPUT_DATA=1;let inputs,output;if(typeof functionSearchType[INPUTS_DATA]==="number"){inputs=[buildItemSearchType(functionSearchType[INPUTS_DATA],lowercasePaths)]}else{inputs=buildItemSearchTypeAll(functionSearchType[INPUTS_DATA],lowercasePaths,)}if(functionSearchType.length>1){if(typeof functionSearchType[OUTPUT_DATA]==="number"){output=[buildItemSearchType(functionSearchType[OUTPUT_DATA],lowercasePaths)]}else{output=buildItemSearchTypeAll(functionSearchType[OUTPUT_DATA],lowercasePaths,)}}else{output=[]}const where_clause=[];const l=functionSearchType.length;for(let i=2;i{k=(~~k+0x7ed55d16)+(k<<12);k=(k ^ 0xc761c23c)^(k>>>19);k=(~~k+0x165667b1)+(k<<5);k=(~~k+0xd3a2646c)^(k<<9);k=(~~k+0xfd7046c5)+(k<<3);return(k ^ 0xb55a4f09)^(k>>>16)};const hashint2=k=>{k=~k+(k<<15);k ^=k>>>12;k+=k<<2;k ^=k>>>4;k=Math.imul(k,2057);return k ^(k>>16)};if(input!==null){const h0a=hashint1(input);const h0b=hashint2(input);const h1a=~~(h0a+Math.imul(h0b,2));const h1b=~~(h0a+Math.imul(h0b,3));const h2a=~~(h0a+Math.imul(h0b,4));const h2b=~~(h0a+Math.imul(h0b,5));output[0]|=(1<<(h0a%32))|(1<<(h1b%32));output[1]|=(1<<(h1a%32))|(1<<(h2b%32));output[2]|=(1<<(h2a%32))|(1<<(h0b%32));fps.add(input)}for(const g of type.generics){buildFunctionTypeFingerprint(g,output,fps)}const fb={id:null,ty:0,generics:EMPTY_GENERICS_ARRAY,bindings:EMPTY_BINDINGS_MAP,};for(const[k,v]of type.bindings.entries()){fb.id=k;fb.generics=v;buildFunctionTypeFingerprint(fb,output,fps)}output[3]=fps.size}function compareTypeFingerprints(fullId,queryFingerprint){const fh0=functionTypeFingerprint[fullId*4];const fh1=functionTypeFingerprint[(fullId*4)+1];const fh2=functionTypeFingerprint[(fullId*4)+2];const[qh0,qh1,qh2]=queryFingerprint;const[in0,in1,in2]=[fh0&qh0,fh1&qh1,fh2&qh2];if((in0 ^ qh0)||(in1 ^ qh1)||(in2 ^ qh2)){return null}return functionTypeFingerprint[(fullId*4)+3]}class VlqHexDecoder{constructor(string,cons){this.string=string;this.cons=cons;this.offset=0;this.backrefQueue=[]}decodeList(){let c=this.string.charCodeAt(this.offset);const ret=[];while(c!==125){ret.push(this.decode());c=this.string.charCodeAt(this.offset)}this.offset+=1;return ret}decode(){let n=0;let c=this.string.charCodeAt(this.offset);if(c===123){this.offset+=1;return this.decodeList()}while(c<96){n=(n<<4)|(c&0xF);this.offset+=1;c=this.string.charCodeAt(this.offset)}n=(n<<4)|(c&0xF);const[sign,value]=[n&1,n>>1];this.offset+=1;return sign?-value:value}next(){const c=this.string.charCodeAt(this.offset);if(c>=48&&c<64){this.offset+=1;return this.backrefQueue[c-48]}if(c===96){this.offset+=1;return this.cons(0)}const result=this.cons(this.decode());this.backrefQueue.unshift(result);if(this.backrefQueue.length>16){this.backrefQueue.pop()}return result}}class RoaringBitmap{constructor(str){const strdecoded=atob(str);const u8array=new Uint8Array(strdecoded.length);for(let j=0;j=4){offsets=[];for(let j=0;j>3]&(1<<(j&0x7))){const runcount=(u8array[i]|(u8array[i+1]<<8));i+=2;this.containers.push(new RoaringBitmapRun(runcount,u8array.slice(i,i+(runcount*4)),));i+=runcount*4}else if(this.cardinalities[j]>=4096){this.containers.push(new RoaringBitmapBits(u8array.slice(i,i+8192)));i+=8192}else{const end=this.cardinalities[j]*2;this.containers.push(new RoaringBitmapArray(this.cardinalities[j],u8array.slice(i,i+end),));i+=end}}}contains(keyvalue){const key=keyvalue>>16;const value=keyvalue&0xFFFF;for(let i=0;i=start&&value<=(start+lenm1)){return true}}return false}}class RoaringBitmapArray{constructor(cardinality,array){this.cardinality=cardinality;this.array=array}contains(value){const l=this.cardinality*2;for(let i=0;i>3]&(1<<(value&7)))}}function buildIndex(rawSearchIndex){searchIndex=[];searchIndexDeprecated=new Map();searchIndexEmptyDesc=new Map();let currentIndex=0;let id=0;for(const crate of rawSearchIndex.values()){id+=crate.t.length+1}functionTypeFingerprint=new Uint32Array((id+1)*4);id=0;for(const[crate,crateCorpus]of rawSearchIndex){const itemDescShardDecoder=new VlqHexDecoder(crateCorpus.D,noop=>noop);let descShard={crate,shard:0,start:0,len:itemDescShardDecoder.next(),promise:null,resolve:null,};const descShardList=[descShard];searchIndexDeprecated.set(crate,new RoaringBitmap(crateCorpus.c));searchIndexEmptyDesc.set(crate,new RoaringBitmap(crateCorpus.e));let descIndex=0;const crateRow={crate,ty:3,name:crate,path:"",descShard,descIndex,exactPath:"",desc:crateCorpus.doc,parent:undefined,type:null,id,word:crate,normalizedName:crate.indexOf("_")===-1?crate:crate.replace(/_/g,""),bitIndex:0,implDisambiguator:null,};id+=1;searchIndex.push(crateRow);currentIndex+=1;if(!searchIndexEmptyDesc.get(crate).contains(0)){descIndex+=1}const itemTypes=crateCorpus.t;const itemNames=crateCorpus.n;const itemPaths=new Map(crateCorpus.q);const itemReexports=new Map(crateCorpus.r);const itemParentIdxs=crateCorpus.i;const implDisambiguator=new Map(crateCorpus.b);const paths=crateCorpus.p;const aliases=crateCorpus.a;const lowercasePaths=[];const itemFunctionDecoder=new VlqHexDecoder(crateCorpus.f,buildFunctionSearchTypeCallback(lowercasePaths),);let len=paths.length;let lastPath=itemPaths.get(0);for(let i=0;i2){path=itemPaths.has(elem[2])?itemPaths.get(elem[2]):lastPath;lastPath=path}const exactPath=elem.length>3?itemPaths.get(elem[3]):path;lowercasePaths.push({ty,name:name.toLowerCase(),path,exactPath});paths[i]={ty,name,path,exactPath}}lastPath="";len=itemTypes.length;for(let i=0;i=descShard.len&&!searchIndexEmptyDesc.get(crate).contains(bitIndex)){descShard={crate,shard:descShard.shard+1,start:descShard.start+descShard.len,len:itemDescShardDecoder.next(),promise:null,resolve:null,};descIndex=0;descShardList.push(descShard)}let word="";if(typeof itemNames[i]==="string"){word=itemNames[i].toLowerCase()}const path=itemPaths.has(i)?itemPaths.get(i):lastPath;const type=itemFunctionDecoder.next();if(type!==null){if(type){const fp=functionTypeFingerprint.subarray(id*4,(id+1)*4);const fps=new Set();for(const t of type.inputs){buildFunctionTypeFingerprint(t,fp,fps)}for(const t of type.output){buildFunctionTypeFingerprint(t,fp,fps)}for(const w of type.where_clause){for(const t of w){buildFunctionTypeFingerprint(t,fp,fps)}}}}const row={crate,ty:itemTypes.charCodeAt(i)-65,name:itemNames[i],path,descShard,descIndex,exactPath:itemReexports.has(i)?itemPaths.get(itemReexports.get(i)):path,parent:itemParentIdxs[i]>0?paths[itemParentIdxs[i]-1]:undefined,type,id,word,normalizedName:word.indexOf("_")===-1?word:word.replace(/_/g,""),bitIndex,implDisambiguator:implDisambiguator.has(i)?implDisambiguator.get(i):null,};id+=1;searchIndex.push(row);lastPath=row.path;if(!searchIndexEmptyDesc.get(crate).contains(bitIndex)){descIndex+=1}}if(aliases){const currentCrateAliases=new Map();ALIASES.set(crate,currentCrateAliases);for(const alias_name in aliases){if(!Object.prototype.hasOwnProperty.call(aliases,alias_name)){continue}let currentNameAliases;if(currentCrateAliases.has(alias_name)){currentNameAliases=currentCrateAliases.get(alias_name)}else{currentNameAliases=[];currentCrateAliases.set(alias_name,currentNameAliases)}for(const local_alias of aliases[alias_name]){currentNameAliases.push(local_alias+currentIndex)}}}currentIndex+=itemTypes.length;searchState.descShards.set(crate,descShardList)}TYPES_POOL=new Map()}function onSearchSubmit(e){e.preventDefault();searchState.clearInputTimeout();search()}function putBackSearch(){const search_input=searchState.input;if(!searchState.input){return}if(search_input.value!==""&&!searchState.isDisplayed()){searchState.showResults();if(browserSupportsHistoryApi()){history.replaceState(null,"",buildUrl(search_input.value,getFilterCrates()))}document.title=searchState.title}}function registerSearchEvents(){const params=searchState.getQueryStringParams();if(searchState.input.value===""){searchState.input.value=params.search||""}const searchAfter500ms=()=>{searchState.clearInputTimeout();if(searchState.input.value.length===0){searchState.hideResults()}else{searchState.timeout=setTimeout(search,500)}};searchState.input.onkeyup=searchAfter500ms;searchState.input.oninput=searchAfter500ms;document.getElementsByClassName("search-form")[0].onsubmit=onSearchSubmit;searchState.input.onchange=e=>{if(e.target!==document.activeElement){return}searchState.clearInputTimeout();setTimeout(search,0)};searchState.input.onpaste=searchState.input.onchange;searchState.outputElement().addEventListener("keydown",e=>{if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey){return}if(e.which===38){const previous=document.activeElement.previousElementSibling;if(previous){previous.focus()}else{searchState.focus()}e.preventDefault()}else if(e.which===40){const next=document.activeElement.nextElementSibling;if(next){next.focus()}const rect=document.activeElement.getBoundingClientRect();if(window.innerHeight-rect.bottom{if(e.which===40){focusSearchResult();e.preventDefault()}});searchState.input.addEventListener("focus",()=>{putBackSearch()});searchState.input.addEventListener("blur",()=>{searchState.input.placeholder=searchState.input.origPlaceholder});if(browserSupportsHistoryApi()){const previousTitle=document.title;window.addEventListener("popstate",e=>{const params=searchState.getQueryStringParams();document.title=previousTitle;currentResults=null;if(params.search&¶ms.search.length>0){searchState.input.value=params.search;e.preventDefault();search()}else{searchState.input.value="";searchState.hideResults()}})}window.onpageshow=()=>{const qSearch=searchState.getQueryStringParams().search;if(searchState.input.value===""&&qSearch){searchState.input.value=qSearch}search()}}function updateCrate(ev){if(ev.target.value==="all crates"){const query=searchState.input.value.trim();updateSearchHistory(buildUrl(query,null))}currentResults=null;search(true)}buildIndex(rawSearchIndex);if(typeof window!=="undefined"){registerSearchEvents();if(window.searchState.getQueryStringParams().search){search()}}if(typeof exports!=="undefined"){exports.initSearch=initSearch;exports.execQuery=execQuery;exports.parseQuery=parseQuery}}if(typeof window!=="undefined"){window.initSearch=initSearch;if(window.searchIndex!==undefined){initSearch(window.searchIndex)}}else{initSearch(new Map())}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/clone/trait.Clone.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/clone/trait.Clone.js index 270a1587..f3493485 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/clone/trait.Clone.js +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/clone/trait.Clone.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl Clone for Error"],["impl Clone for DataPackage"],["impl Clone for DataPoint"],["impl Clone for Payload"]] +"redstone":[["impl Clone for Error"],["impl Clone for DataPackage"],["impl Clone for DataPoint"],["impl Clone for Payload"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/cmp/trait.Eq.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/cmp/trait.Eq.js index a573550b..65c9074b 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/cmp/trait.Eq.js +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/cmp/trait.Eq.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl Eq for ProcessorResult"],["impl Eq for DataPackage"],["impl Eq for DataPoint"]] +"redstone":[["impl Eq for ProcessorResult"],["impl Eq for DataPackage"],["impl Eq for DataPoint"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/cmp/trait.PartialEq.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/cmp/trait.PartialEq.js index 695eda8f..694c39aa 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/cmp/trait.PartialEq.js +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/cmp/trait.PartialEq.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl PartialEq for ProcessorResult"],["impl PartialEq for DataPackage"],["impl PartialEq for DataPoint"]] +"redstone":[["impl PartialEq for ProcessorResult"],["impl PartialEq for DataPackage"],["impl PartialEq for DataPoint"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/convert/trait.From.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/convert/trait.From.js index 28d42f05..efdca1d7 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/convert/trait.From.js +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/convert/trait.From.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl From<Error> for ApiError"],["impl From<ProcessorResult> for (u64, Vec<U256>)"]] +"redstone":[["impl From<Error> for ApiError"],["impl From<ProcessorResult> for (u64, Vec<U256>)"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/fmt/trait.Debug.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/fmt/trait.Debug.js index f544c767..00b02dec 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/fmt/trait.Debug.js +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/fmt/trait.Debug.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl Debug for Error"],["impl Debug for Config"],["impl Debug for ProcessorResult"],["impl Debug for DataPackage"],["impl Debug for DataPoint"],["impl Debug for Payload"]] +"redstone":[["impl Debug for Error"],["impl Debug for Config"],["impl Debug for ProcessorResult"],["impl Debug for DataPackage"],["impl Debug for DataPoint"],["impl Debug for Payload"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/fmt/trait.Display.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/fmt/trait.Display.js index 899cd7d8..99ad5f7c 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/fmt/trait.Display.js +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/fmt/trait.Display.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl Display for Error"]] +"redstone":[["impl Display for Error"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/marker/trait.Freeze.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/marker/trait.Freeze.js index 3152e387..813f6177 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/marker/trait.Freeze.js +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/marker/trait.Freeze.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl Freeze for Error",1,["redstone::network::error::Error"]],["impl Freeze for Config",1,["redstone::core::config::Config"]],["impl Freeze for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Freeze for Casper",1,["redstone::network::casper::Casper"]],["impl Freeze for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Freeze for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Freeze for Payload",1,["redstone::protocol::payload::Payload"]]] +"redstone":[["impl Freeze for Error",1,["redstone::network::error::Error"]],["impl Freeze for Config",1,["redstone::core::config::Config"]],["impl Freeze for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Freeze for Casper",1,["redstone::network::casper::Casper"]],["impl Freeze for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Freeze for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Freeze for Payload",1,["redstone::protocol::payload::Payload"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/marker/trait.Send.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/marker/trait.Send.js index 2e259f12..bc0b7373 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/marker/trait.Send.js +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/marker/trait.Send.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl !Send for Error",1,["redstone::network::error::Error"]],["impl Send for Config",1,["redstone::core::config::Config"]],["impl Send for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Send for Casper",1,["redstone::network::casper::Casper"]],["impl Send for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Send for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Send for Payload",1,["redstone::protocol::payload::Payload"]]] +"redstone":[["impl !Send for Error",1,["redstone::network::error::Error"]],["impl Send for Config",1,["redstone::core::config::Config"]],["impl Send for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Send for Casper",1,["redstone::network::casper::Casper"]],["impl Send for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Send for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Send for Payload",1,["redstone::protocol::payload::Payload"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/marker/trait.StructuralPartialEq.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/marker/trait.StructuralPartialEq.js index 19408b71..e4ec763f 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/marker/trait.StructuralPartialEq.js +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/marker/trait.StructuralPartialEq.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl StructuralPartialEq for ProcessorResult"],["impl StructuralPartialEq for DataPackage"],["impl StructuralPartialEq for DataPoint"]] +"redstone":[["impl StructuralPartialEq for ProcessorResult"],["impl StructuralPartialEq for DataPackage"],["impl StructuralPartialEq for DataPoint"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/marker/trait.Sync.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/marker/trait.Sync.js index 22784882..f07f6942 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/marker/trait.Sync.js +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/marker/trait.Sync.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl !Sync for Error",1,["redstone::network::error::Error"]],["impl Sync for Config",1,["redstone::core::config::Config"]],["impl Sync for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Sync for Casper",1,["redstone::network::casper::Casper"]],["impl Sync for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Sync for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Sync for Payload",1,["redstone::protocol::payload::Payload"]]] +"redstone":[["impl !Sync for Error",1,["redstone::network::error::Error"]],["impl Sync for Config",1,["redstone::core::config::Config"]],["impl Sync for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Sync for Casper",1,["redstone::network::casper::Casper"]],["impl Sync for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Sync for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Sync for Payload",1,["redstone::protocol::payload::Payload"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/marker/trait.Unpin.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/marker/trait.Unpin.js index 3e63cbc0..e3df1d1f 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/marker/trait.Unpin.js +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/marker/trait.Unpin.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl Unpin for Error",1,["redstone::network::error::Error"]],["impl Unpin for Config",1,["redstone::core::config::Config"]],["impl Unpin for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Unpin for Casper",1,["redstone::network::casper::Casper"]],["impl Unpin for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Unpin for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Unpin for Payload",1,["redstone::protocol::payload::Payload"]]] +"redstone":[["impl Unpin for Error",1,["redstone::network::error::Error"]],["impl Unpin for Config",1,["redstone::core::config::Config"]],["impl Unpin for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Unpin for Casper",1,["redstone::network::casper::Casper"]],["impl Unpin for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Unpin for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Unpin for Payload",1,["redstone::protocol::payload::Payload"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js index 6f8f3bd3..646a886b 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl !RefUnwindSafe for Error",1,["redstone::network::error::Error"]],["impl RefUnwindSafe for Config",1,["redstone::core::config::Config"]],["impl RefUnwindSafe for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl RefUnwindSafe for Casper",1,["redstone::network::casper::Casper"]],["impl RefUnwindSafe for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl RefUnwindSafe for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl RefUnwindSafe for Payload",1,["redstone::protocol::payload::Payload"]]] +"redstone":[["impl !RefUnwindSafe for Error",1,["redstone::network::error::Error"]],["impl RefUnwindSafe for Config",1,["redstone::core::config::Config"]],["impl RefUnwindSafe for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl RefUnwindSafe for Casper",1,["redstone::network::casper::Casper"]],["impl RefUnwindSafe for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl RefUnwindSafe for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl RefUnwindSafe for Payload",1,["redstone::protocol::payload::Payload"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js index a29a861a..ee026d94 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl !UnwindSafe for Error",1,["redstone::network::error::Error"]],["impl UnwindSafe for Config",1,["redstone::core::config::Config"]],["impl UnwindSafe for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl UnwindSafe for Casper",1,["redstone::network::casper::Casper"]],["impl UnwindSafe for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl UnwindSafe for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl UnwindSafe for Payload",1,["redstone::protocol::payload::Payload"]]] +"redstone":[["impl !UnwindSafe for Error",1,["redstone::network::error::Error"]],["impl UnwindSafe for Config",1,["redstone::core::config::Config"]],["impl UnwindSafe for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl UnwindSafe for Casper",1,["redstone::network::casper::Casper"]],["impl UnwindSafe for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl UnwindSafe for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl UnwindSafe for Payload",1,["redstone::protocol::payload::Payload"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/type.impl/alloc/vec/struct.Vec.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/type.impl/alloc/vec/struct.Vec.js index 1d91fcbc..e4879074 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/type.impl/alloc/vec/struct.Vec.js +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/type.impl/alloc/vec/struct.Vec.js @@ -1,3 +1,3 @@ (function() {var type_impls = { -"redstone":[["
1.5.0 · source§

impl<T, A> AsMut<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn as_mut(&mut self) -> &mut [T]

Converts this type into a mutable reference of the (usually inferred) input type.
","AsMut<[T]>","redstone::core::aggregator::Matrix"],["
1.5.0 · source§

impl<T, A> AsMut<Vec<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn as_mut(&mut self) -> &mut Vec<T, A>

Converts this type into a mutable reference of the (usually inferred) input type.
","AsMut>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> AsRef<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn as_ref(&self) -> &[T]

Converts this type into a shared reference of the (usually inferred) input type.
","AsRef<[T]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> AsRef<Vec<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn as_ref(&self) -> &Vec<T, A>

Converts this type into a shared reference of the (usually inferred) input type.
","AsRef>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Borrow<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn borrow(&self) -> &[T]

Immutably borrows from an owned value. Read more
","Borrow<[T]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> BorrowMut<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn borrow_mut(&mut self) -> &mut [T]

Mutably borrows from an owned value. Read more
","BorrowMut<[T]>","redstone::core::aggregator::Matrix"],["
source§

impl<T> CLTyped for Vec<T>
where\n T: CLTyped,

source§

fn cl_type() -> CLType

The CLType of Self.
","CLTyped","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Clone for Vec<T, A>
where\n T: Clone,\n A: Allocator + Clone,

source§

fn clone_from(&mut self, source: &Vec<T, A>)

Overwrites the contents of self with a clone of the contents of source.

\n

This method is preferred over simply assigning source.clone() to self,\nas it avoids reallocation if possible. Additionally, if the element type\nT overrides clone_from(), this will reuse the resources of self’s\nelements as well.

\n
§Examples
\n
let x = vec![5, 6, 7];\nlet mut y = vec![8, 9, 10];\nlet yp: *const i32 = y.as_ptr();\n\ny.clone_from(&x);\n\n// The value is the same\nassert_eq!(x, y);\n\n// And no reallocation occurred\nassert_eq!(yp, y.as_ptr());
\n
source§

fn clone(&self) -> Vec<T, A>

Returns a copy of the value. Read more
","Clone","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Debug for Vec<T, A>
where\n T: Debug,\n A: Allocator,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T> Default for Vec<T>

source§

fn default() -> Vec<T>

Creates an empty Vec<T>.

\n

The vector will not allocate until elements are pushed onto it.

\n
","Default","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Deref for Vec<T, A>
where\n A: Allocator,

§

type Target = [T]

The resulting type after dereferencing.
source§

fn deref(&self) -> &[T]

Dereferences the value.
","Deref","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> DerefMut for Vec<T, A>
where\n A: Allocator,

source§

fn deref_mut(&mut self) -> &mut [T]

Mutably dereferences the value.
","DerefMut","redstone::core::aggregator::Matrix"],["
source§

impl<'de, T> Deserialize<'de> for Vec<T>
where\n T: Deserialize<'de>,

source§

fn deserialize<D>(\n deserializer: D,\n) -> Result<Vec<T>, <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Drop for Vec<T, A>
where\n A: Allocator,

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
","Drop","redstone::core::aggregator::Matrix"],["
1.2.0 · source§

impl<'a, T, A> Extend<&'a T> for Vec<T, A>
where\n T: Copy + 'a,\n A: Allocator,

Extend implementation that copies elements out of references before pushing them onto the Vec.

\n

This implementation is specialized for slice iterators, where it uses copy_from_slice to\nappend the entire slice at once.

\n
source§

fn extend<I>(&mut self, iter: I)
where\n I: IntoIterator<Item = &'a T>,

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, _: &'a T)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
","Extend<&'a T>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Extend<T> for Vec<T, A>
where\n A: Allocator,

source§

fn extend<I>(&mut self, iter: I)
where\n I: IntoIterator<Item = T>,

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: T)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
","Extend","redstone::core::aggregator::Matrix"],["
source§

impl Flattened<<Casper as NetworkSpecific>::BytesRepr> for Vec<Bytes>

","Flattened<::BytesRepr>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T> From<&[T]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &[T]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&[1, 2, 3][..]), vec![1, 2, 3]);
\n
","From<&[T]>","redstone::core::aggregator::Matrix"],["
1.74.0 · source§

impl<T, const N: usize> From<&[T; N]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &[T; N]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&[1, 2, 3]), vec![1, 2, 3]);
\n
","From<&[T; N]>","redstone::core::aggregator::Matrix"],["
1.19.0 · source§

impl<T> From<&mut [T]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &mut [T]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&mut [1, 2, 3][..]), vec![1, 2, 3]);
\n
","From<&mut [T]>","redstone::core::aggregator::Matrix"],["
1.74.0 · source§

impl<T, const N: usize> From<&mut [T; N]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &mut [T; N]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&mut [1, 2, 3]), vec![1, 2, 3]);
\n
","From<&mut [T; N]>","redstone::core::aggregator::Matrix"],["
1.44.0 · source§

impl<T, const N: usize> From<[T; N]> for Vec<T>

source§

fn from(s: [T; N]) -> Vec<T>

Allocate a Vec<T> and move s’s items into it.

\n
§Examples
\n
assert_eq!(Vec::from([1, 2, 3]), vec![1, 2, 3]);
\n
","From<[T; N]>","redstone::core::aggregator::Matrix"],["
1.5.0 · source§

impl<T, A> From<BinaryHeap<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn from(heap: BinaryHeap<T, A>) -> Vec<T, A>

Converts a BinaryHeap<T> into a Vec<T>.

\n

This conversion requires no data movement or allocation, and has\nconstant time complexity.

\n
","From>","redstone::core::aggregator::Matrix"],["
1.18.0 · source§

impl<T, A> From<Box<[T], A>> for Vec<T, A>
where\n A: Allocator,

source§

fn from(s: Box<[T], A>) -> Vec<T, A>

Convert a boxed slice into a vector by transferring ownership of\nthe existing heap allocation.

\n
§Examples
\n
let b: Box<[i32]> = vec![1, 2, 3].into_boxed_slice();\nassert_eq!(Vec::from(b), vec![1, 2, 3]);
\n
","From>","redstone::core::aggregator::Matrix"],["
1.14.0 · source§

impl<'a, T> From<Cow<'a, [T]>> for Vec<T>
where\n [T]: ToOwned<Owned = Vec<T>>,

source§

fn from(s: Cow<'a, [T]>) -> Vec<T>

Convert a clone-on-write slice into a vector.

\n

If s already owns a Vec<T>, it will be returned directly.\nIf s is borrowing a slice, a new Vec<T> will be allocated and\nfilled by cloning s’s items into it.

\n
§Examples
\n
let o: Cow<'_, [i32]> = Cow::Owned(vec![1, 2, 3]);\nlet b: Cow<'_, [i32]> = Cow::Borrowed(&[1, 2, 3]);\nassert_eq!(Vec::from(o), Vec::from(b));
\n
","From>","redstone::core::aggregator::Matrix"],["
1.10.0 · source§

impl<T, A> From<VecDeque<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn from(other: VecDeque<T, A>) -> Vec<T, A>

Turn a VecDeque<T> into a Vec<T>.

\n

This never needs to re-allocate, but does need to do O(n) data movement if\nthe circular buffer doesn’t happen to be at the beginning of the allocation.

\n
§Examples
\n
use std::collections::VecDeque;\n\n// This one is *O*(1).\nlet deque: VecDeque<_> = (1..5).collect();\nlet ptr = deque.as_slices().0.as_ptr();\nlet vec = Vec::from(deque);\nassert_eq!(vec, [1, 2, 3, 4]);\nassert_eq!(vec.as_ptr(), ptr);\n\n// This one needs data rearranging.\nlet mut deque: VecDeque<_> = (1..5).collect();\ndeque.push_front(9);\ndeque.push_front(8);\nlet ptr = deque.as_slices().1.as_ptr();\nlet vec = Vec::from(deque);\nassert_eq!(vec, [8, 9, 1, 2, 3, 4]);\nassert_eq!(vec.as_ptr(), ptr);
\n
","From>","redstone::core::aggregator::Matrix"],["
source§

impl<T> FromBytes for Vec<T>
where\n T: FromBytes,

source§

fn from_bytes(bytes: &[u8]) -> Result<(Vec<T>, &[u8]), Error>

Deserializes the slice into Self.
source§

fn from_vec(bytes: Vec<u8>) -> Result<(Vec<T>, Vec<u8>), Error>

Deserializes the Vec<u8> into Self.
","FromBytes","redstone::core::aggregator::Matrix"],["
source§

impl FromBytesRepr<Vec<u8>> for U256

source§

fn from_bytes_repr(bytes: Vec<u8>) -> Self

","FromBytesRepr>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T> FromIterator<T> for Vec<T>

Collects an iterator into a Vec, commonly called via Iterator::collect()

\n

§Allocation behavior

\n

In general Vec does not guarantee any particular growth or allocation strategy.\nThat also applies to this trait impl.

\n

Note: This section covers implementation details and is therefore exempt from\nstability guarantees.

\n

Vec may use any or none of the following strategies,\ndepending on the supplied iterator:

\n
    \n
  • preallocate based on Iterator::size_hint()\n
      \n
    • and panic if the number of items is outside the provided lower/upper bounds
    • \n
    \n
  • \n
  • use an amortized growth strategy similar to pushing one item at a time
  • \n
  • perform the iteration in-place on the original allocation backing the iterator
  • \n
\n

The last case warrants some attention. It is an optimization that in many cases reduces peak memory\nconsumption and improves cache locality. But when big, short-lived allocations are created,\nonly a small fraction of their items get collected, no further use is made of the spare capacity\nand the resulting Vec is moved into a longer-lived structure, then this can lead to the large\nallocations having their lifetimes unnecessarily extended which can result in increased memory\nfootprint.

\n

In cases where this is an issue, the excess capacity can be discarded with Vec::shrink_to(),\nVec::shrink_to_fit() or by collecting into Box<[T]> instead, which additionally reduces\nthe size of the long-lived struct.

\n\n
static LONG_LIVED: Mutex<Vec<Vec<u16>>> = Mutex::new(Vec::new());\n\nfor i in 0..10 {\n    let big_temporary: Vec<u16> = (0..1024).collect();\n    // discard most items\n    let mut result: Vec<_> = big_temporary.into_iter().filter(|i| i % 100 == 0).collect();\n    // without this a lot of unused capacity might be moved into the global\n    result.shrink_to_fit();\n    LONG_LIVED.lock().unwrap().push(result);\n}
\n
source§

fn from_iter<I>(iter: I) -> Vec<T>
where\n I: IntoIterator<Item = T>,

Creates a value from an iterator. Read more
","FromIterator","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Hash for Vec<T, A>
where\n T: Hash,\n A: Allocator,

The hash of a vector is the same as that of the corresponding slice,\nas required by the core::borrow::Borrow implementation.

\n\n
use std::hash::BuildHasher;\n\nlet b = std::hash::RandomState::new();\nlet v: Vec<u8> = vec![0xa8, 0x3c, 0x09];\nlet s: &[u8] = &[0xa8, 0x3c, 0x09];\nassert_eq!(b.hash_one(v), b.hash_one(s));
\n
source§

fn hash<H>(&self, state: &mut H)
where\n H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, I, A> Index<I> for Vec<T, A>
where\n I: SliceIndex<[T]>,\n A: Allocator,

§

type Output = <I as SliceIndex<[T]>>::Output

The returned type after indexing.
source§

fn index(&self, index: I) -> &<Vec<T, A> as Index<I>>::Output

Performs the indexing (container[index]) operation. Read more
","Index","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, I, A> IndexMut<I> for Vec<T, A>
where\n I: SliceIndex<[T]>,\n A: Allocator,

source§

fn index_mut(&mut self, index: I) -> &mut <Vec<T, A> as Index<I>>::Output

Performs the mutable indexing (container[index]) operation. Read more
","IndexMut","redstone::core::aggregator::Matrix"],["
source§

impl<'de, T, E> IntoDeserializer<'de, E> for Vec<T>
where\n T: IntoDeserializer<'de, E>,\n E: Error,

§

type Deserializer = SeqDeserializer<<Vec<T> as IntoIterator>::IntoIter, E>

The type of the deserializer being converted into.
source§

fn into_deserializer(self) -> <Vec<T> as IntoDeserializer<'de, E>>::Deserializer

Convert this value into a deserializer.
","IntoDeserializer<'de, E>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> IntoIterator for Vec<T, A>
where\n A: Allocator,

source§

fn into_iter(self) -> <Vec<T, A> as IntoIterator>::IntoIter

Creates a consuming iterator, that is, one that moves each value out of\nthe vector (from start to end). The vector cannot be used after calling\nthis.

\n
§Examples
\n
let v = vec![\"a\".to_string(), \"b\".to_string()];\nlet mut v_iter = v.into_iter();\n\nlet first_element: Option<String> = v_iter.next();\n\nassert_eq!(first_element, Some(\"a\".to_string()));\nassert_eq!(v_iter.next(), Some(\"b\".to_string()));\nassert_eq!(v_iter.next(), None);
\n
§

type Item = T

The type of the elements being iterated over.
§

type IntoIter = IntoIter<T, A>

Which kind of iterator are we turning this into?
","IntoIterator","redstone::core::aggregator::Matrix"],["
source§

impl<T> Median for Vec<T>
where\n T: Copy + Ord + Avg,

§

type Item = T

source§

fn median(self) -> Self::Item

","Median","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Ord for Vec<T, A>
where\n T: Ord,\n A: Allocator,

Implements ordering of vectors, lexicographically.

\n
source§

fn cmp(&self, other: &Vec<T, A>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
","Ord","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A> PartialEq<&[U]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &&[U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&[U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&[U]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A, const N: usize> PartialEq<&[U; N]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &&[U; N]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&[U; N]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&[U; N]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A> PartialEq<&mut [U]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &&mut [U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&mut [U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&mut [U]>","redstone::core::aggregator::Matrix"],["
1.48.0 · source§

impl<T, U, A> PartialEq<[U]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &[U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &[U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<[U]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A, const N: usize> PartialEq<[U; N]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &[U; N]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &[U; N]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<[U; N]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A1, A2> PartialEq<Vec<U, A2>> for Vec<T, A1>
where\n A1: Allocator,\n A2: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &Vec<U, A2>) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &Vec<U, A2>) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A1, A2> PartialOrd<Vec<T, A2>> for Vec<T, A1>
where\n T: PartialOrd,\n A1: Allocator,\n A2: Allocator,

Implements comparison of vectors, lexicographically.

\n
source§

fn partial_cmp(&self, other: &Vec<T, A2>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <=\noperator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >=\noperator. Read more
","PartialOrd>","redstone::core::aggregator::Matrix"],["
source§

impl<T> Serialize for Vec<T>
where\n T: Serialize,

source§

fn serialize<S>(\n &self,\n serializer: S,\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","redstone::core::aggregator::Matrix"],["
source§

impl<T> ToBytes for Vec<T>
where\n T: ToBytes,

source§

fn to_bytes(&self) -> Result<Vec<u8>, Error>

Serializes &self to a Vec<u8>.
source§

fn into_bytes(self) -> Result<Vec<u8>, Error>

Consumes self and serializes to a Vec<u8>.
source§

fn serialized_length(&self) -> usize

Returns the length of the Vec<u8> which would be returned from a successful call to\nto_bytes() or into_bytes(). The data is not actually serialized, so this call is\nrelatively cheap.
source§

fn write_bytes(&self, writer: &mut Vec<u8>) -> Result<(), Error>

Writes &self into a mutable writer.
","ToBytes","redstone::core::aggregator::Matrix"],["
source§

impl<T> Vec<T>

1.0.0 (const: 1.39.0) · source

pub const fn new() -> Vec<T>

Constructs a new, empty Vec<T>.

\n

The vector will not allocate until elements are pushed onto it.

\n
§Examples
\n
let mut vec: Vec<i32> = Vec::new();
\n
1.0.0 · source

pub fn with_capacity(capacity: usize) -> Vec<T>

Constructs a new, empty Vec<T> with at least the specified capacity.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n

It is important to note that although the returned vector has the\nminimum capacity specified, the vector will have a zero length. For\nan explanation of the difference between length and capacity, see\nCapacity and reallocation.

\n

If it is important to know the exact allocated capacity of a Vec,\nalways use the capacity method after construction.

\n

For Vec<T> where T is a zero-sized type, there will be no allocation\nand the capacity will always be usize::MAX.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = Vec::with_capacity(10);\n\n// The vector contains no items, even though it has capacity for more\nassert_eq!(vec.len(), 0);\nassert!(vec.capacity() >= 10);\n\n// These are all done without reallocating...\nfor i in 0..10 {\n    vec.push(i);\n}\nassert_eq!(vec.len(), 10);\nassert!(vec.capacity() >= 10);\n\n// ...but this may make the vector reallocate\nvec.push(11);\nassert_eq!(vec.len(), 11);\nassert!(vec.capacity() >= 11);\n\n// A vector of a zero-sized type will always over-allocate, since no\n// allocation is necessary\nlet vec_units = Vec::<()>::with_capacity(10);\nassert_eq!(vec_units.capacity(), usize::MAX);
\n
source

pub fn try_with_capacity(capacity: usize) -> Result<Vec<T>, TryReserveError>

🔬This is a nightly-only experimental API. (try_with_capacity)

Constructs a new, empty Vec<T> with at least the specified capacity.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n
§Errors
\n

Returns an error if the capacity exceeds isize::MAX bytes,\nor if the allocator reports allocation failure.

\n
1.0.0 · source

pub unsafe fn from_raw_parts(\n ptr: *mut T,\n length: usize,\n capacity: usize,\n) -> Vec<T>

Creates a Vec<T> directly from a pointer, a length, and a capacity.

\n
§Safety
\n

This is highly unsafe, due to the number of invariants that aren’t\nchecked:

\n
    \n
  • ptr must have been allocated using the global allocator, such as via\nthe alloc::alloc function.
  • \n
  • T needs to have the same alignment as what ptr was allocated with.\n(T having a less strict alignment is not sufficient, the alignment really\nneeds to be equal to satisfy the dealloc requirement that memory must be\nallocated and deallocated with the same layout.)
  • \n
  • The size of T times the capacity (ie. the allocated size in bytes) needs\nto be the same size as the pointer was allocated with. (Because similar to\nalignment, dealloc must be called with the same layout size.)
  • \n
  • length needs to be less than or equal to capacity.
  • \n
  • The first length values must be properly initialized values of type T.
  • \n
  • capacity needs to be the capacity that the pointer was allocated with.
  • \n
  • The allocated size in bytes must be no larger than isize::MAX.\nSee the safety documentation of pointer::offset.
  • \n
\n

These requirements are always upheld by any ptr that has been allocated\nvia Vec<T>. Other allocation sources are allowed if the invariants are\nupheld.

\n

Violating these may cause problems like corrupting the allocator’s\ninternal data structures. For example it is normally not safe\nto build a Vec<u8> from a pointer to a C char array with length\nsize_t, doing so is only safe if the array was initially allocated by\na Vec or String.\nIt’s also not safe to build one from a Vec<u16> and its length, because\nthe allocator cares about the alignment, and these two types have different\nalignments. The buffer was allocated with alignment 2 (for u16), but after\nturning it into a Vec<u8> it’ll be deallocated with alignment 1. To avoid\nthese issues, it is often preferable to do casting/transmuting using\nslice::from_raw_parts instead.

\n

The ownership of ptr is effectively transferred to the\nVec<T> which may then deallocate, reallocate or change the\ncontents of memory pointed to by the pointer at will. Ensure\nthat nothing else uses the pointer after calling this\nfunction.

\n
§Examples
\n
use std::ptr;\nuse std::mem;\n\nlet v = vec![1, 2, 3];\n\n// Prevent running `v`'s destructor so we are in complete control\n// of the allocation.\nlet mut v = mem::ManuallyDrop::new(v);\n\n// Pull out the various important pieces of information about `v`\nlet p = v.as_mut_ptr();\nlet len = v.len();\nlet cap = v.capacity();\n\nunsafe {\n    // Overwrite memory with 4, 5, 6\n    for i in 0..len {\n        ptr::write(p.add(i), 4 + i);\n    }\n\n    // Put everything back together into a Vec\n    let rebuilt = Vec::from_raw_parts(p, len, cap);\n    assert_eq!(rebuilt, [4, 5, 6]);\n}
\n

Using memory that was allocated elsewhere:

\n\n
use std::alloc::{alloc, Layout};\n\nfn main() {\n    let layout = Layout::array::<u32>(16).expect(\"overflow cannot happen\");\n\n    let vec = unsafe {\n        let mem = alloc(layout).cast::<u32>();\n        if mem.is_null() {\n            return;\n        }\n\n        mem.write(1_000_000);\n\n        Vec::from_raw_parts(mem, 1, 16)\n    };\n\n    assert_eq!(vec, &[1_000_000]);\n    assert_eq!(vec.capacity(), 16);\n}
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n T: Clone,\n A: Allocator,

1.5.0 · source

pub fn resize(&mut self, new_len: usize, value: T)

Resizes the Vec in-place so that len is equal to new_len.

\n

If new_len is greater than len, the Vec is extended by the\ndifference, with each additional slot filled with value.\nIf new_len is less than len, the Vec is simply truncated.

\n

This method requires T to implement Clone,\nin order to be able to clone the passed value.\nIf you need more flexibility (or want to rely on Default instead of\nClone), use Vec::resize_with.\nIf you only need to resize to a smaller size, use Vec::truncate.

\n
§Examples
\n
let mut vec = vec![\"hello\"];\nvec.resize(3, \"world\");\nassert_eq!(vec, [\"hello\", \"world\", \"world\"]);\n\nlet mut vec = vec![1, 2, 3, 4];\nvec.resize(2, 0);\nassert_eq!(vec, [1, 2]);
\n
1.6.0 · source

pub fn extend_from_slice(&mut self, other: &[T])

Clones and appends all elements in a slice to the Vec.

\n

Iterates over the slice other, clones each element, and then appends\nit to this Vec. The other slice is traversed in-order.

\n

Note that this function is same as extend except that it is\nspecialized to work with slices instead. If and when Rust gets\nspecialization this function will likely be deprecated (but still\navailable).

\n
§Examples
\n
let mut vec = vec![1];\nvec.extend_from_slice(&[2, 3, 4]);\nassert_eq!(vec, [1, 2, 3, 4]);
\n
1.53.0 · source

pub fn extend_from_within<R>(&mut self, src: R)
where\n R: RangeBounds<usize>,

Copies elements from src range to the end of the vector.

\n
§Panics
\n

Panics if the starting point is greater than the end point or if\nthe end point is greater than the length of the vector.

\n
§Examples
\n
let mut vec = vec![0, 1, 2, 3, 4];\n\nvec.extend_from_within(2..);\nassert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4]);\n\nvec.extend_from_within(..2);\nassert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4, 0, 1]);\n\nvec.extend_from_within(4..8);\nassert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4, 0, 1, 4, 2, 3, 4]);
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n T: PartialEq,\n A: Allocator,

1.0.0 · source

pub fn dedup(&mut self)

Removes consecutive repeated elements in the vector according to the\nPartialEq trait implementation.

\n

If the vector is sorted, this removes all duplicates.

\n
§Examples
\n
let mut vec = vec![1, 2, 2, 3, 2];\n\nvec.dedup();\n\nassert_eq!(vec, [1, 2, 3, 2]);
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n A: Allocator,

1.21.0 · source

pub fn splice<R, I>(\n &mut self,\n range: R,\n replace_with: I,\n) -> Splice<'_, <I as IntoIterator>::IntoIter, A>
where\n R: RangeBounds<usize>,\n I: IntoIterator<Item = T>,

Creates a splicing iterator that replaces the specified range in the vector\nwith the given replace_with iterator and yields the removed items.\nreplace_with does not need to be the same length as range.

\n

range is removed even if the iterator is not consumed until the end.

\n

It is unspecified how many elements are removed from the vector\nif the Splice value is leaked.

\n

The input iterator replace_with is only consumed when the Splice value is dropped.

\n

This is optimal if:

\n
    \n
  • The tail (elements in the vector after range) is empty,
  • \n
  • or replace_with yields fewer or equal elements than range’s length
  • \n
  • or the lower bound of its size_hint() is exact.
  • \n
\n

Otherwise, a temporary vector is allocated and the tail is moved twice.

\n
§Panics
\n

Panics if the starting point is greater than the end point or if\nthe end point is greater than the length of the vector.

\n
§Examples
\n
let mut v = vec![1, 2, 3, 4];\nlet new = [7, 8, 9];\nlet u: Vec<_> = v.splice(1..3, new).collect();\nassert_eq!(v, &[1, 7, 8, 9, 4]);\nassert_eq!(u, &[2, 3]);
\n
source

pub fn extract_if<F>(&mut self, filter: F) -> ExtractIf<'_, T, F, A>
where\n F: FnMut(&mut T) -> bool,

🔬This is a nightly-only experimental API. (extract_if)

Creates an iterator which uses a closure to determine if an element should be removed.

\n

If the closure returns true, then the element is removed and yielded.\nIf the closure returns false, the element will remain in the vector and will not be yielded\nby the iterator.

\n

If the returned ExtractIf is not exhausted, e.g. because it is dropped without iterating\nor the iteration short-circuits, then the remaining elements will be retained.\nUse retain with a negated predicate if you do not need the returned iterator.

\n

Using this method is equivalent to the following code:

\n\n
let mut i = 0;\nwhile i < vec.len() {\n    if some_predicate(&mut vec[i]) {\n        let val = vec.remove(i);\n        // your code here\n    } else {\n        i += 1;\n    }\n}\n
\n

But extract_if is easier to use. extract_if is also more efficient,\nbecause it can backshift the elements of the array in bulk.

\n

Note that extract_if also lets you mutate every element in the filter closure,\nregardless of whether you choose to keep or remove it.

\n
§Examples
\n

Splitting an array into evens and odds, reusing the original allocation:

\n\n
#![feature(extract_if)]\nlet mut numbers = vec![1, 2, 3, 4, 5, 6, 8, 9, 11, 13, 14, 15];\n\nlet evens = numbers.extract_if(|x| *x % 2 == 0).collect::<Vec<_>>();\nlet odds = numbers;\n\nassert_eq!(evens, vec![2, 4, 6, 8, 14]);\nassert_eq!(odds, vec![1, 3, 5, 9, 11, 13, 15]);
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n A: Allocator,

source

pub const fn new_in(alloc: A) -> Vec<T, A>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new, empty Vec<T, A>.

\n

The vector will not allocate until elements are pushed onto it.

\n
§Examples
\n
#![feature(allocator_api)]\n\nuse std::alloc::System;\n\nlet mut vec: Vec<i32, _> = Vec::new_in(System);
\n
source

pub fn with_capacity_in(capacity: usize, alloc: A) -> Vec<T, A>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new, empty Vec<T, A> with at least the specified capacity\nwith the provided allocator.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n

It is important to note that although the returned vector has the\nminimum capacity specified, the vector will have a zero length. For\nan explanation of the difference between length and capacity, see\nCapacity and reallocation.

\n

If it is important to know the exact allocated capacity of a Vec,\nalways use the capacity method after construction.

\n

For Vec<T, A> where T is a zero-sized type, there will be no allocation\nand the capacity will always be usize::MAX.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
#![feature(allocator_api)]\n\nuse std::alloc::System;\n\nlet mut vec = Vec::with_capacity_in(10, System);\n\n// The vector contains no items, even though it has capacity for more\nassert_eq!(vec.len(), 0);\nassert!(vec.capacity() >= 10);\n\n// These are all done without reallocating...\nfor i in 0..10 {\n    vec.push(i);\n}\nassert_eq!(vec.len(), 10);\nassert!(vec.capacity() >= 10);\n\n// ...but this may make the vector reallocate\nvec.push(11);\nassert_eq!(vec.len(), 11);\nassert!(vec.capacity() >= 11);\n\n// A vector of a zero-sized type will always over-allocate, since no\n// allocation is necessary\nlet vec_units = Vec::<(), System>::with_capacity_in(10, System);\nassert_eq!(vec_units.capacity(), usize::MAX);
\n
source

pub fn try_with_capacity_in(\n capacity: usize,\n alloc: A,\n) -> Result<Vec<T, A>, TryReserveError>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new, empty Vec<T, A> with at least the specified capacity\nwith the provided allocator.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n
§Errors
\n

Returns an error if the capacity exceeds isize::MAX bytes,\nor if the allocator reports allocation failure.

\n
source

pub unsafe fn from_raw_parts_in(\n ptr: *mut T,\n length: usize,\n capacity: usize,\n alloc: A,\n) -> Vec<T, A>

🔬This is a nightly-only experimental API. (allocator_api)

Creates a Vec<T, A> directly from a pointer, a length, a capacity,\nand an allocator.

\n
§Safety
\n

This is highly unsafe, due to the number of invariants that aren’t\nchecked:

\n
    \n
  • ptr must be currently allocated via the given allocator alloc.
  • \n
  • T needs to have the same alignment as what ptr was allocated with.\n(T having a less strict alignment is not sufficient, the alignment really\nneeds to be equal to satisfy the dealloc requirement that memory must be\nallocated and deallocated with the same layout.)
  • \n
  • The size of T times the capacity (ie. the allocated size in bytes) needs\nto be the same size as the pointer was allocated with. (Because similar to\nalignment, dealloc must be called with the same layout size.)
  • \n
  • length needs to be less than or equal to capacity.
  • \n
  • The first length values must be properly initialized values of type T.
  • \n
  • capacity needs to fit the layout size that the pointer was allocated with.
  • \n
  • The allocated size in bytes must be no larger than isize::MAX.\nSee the safety documentation of pointer::offset.
  • \n
\n

These requirements are always upheld by any ptr that has been allocated\nvia Vec<T, A>. Other allocation sources are allowed if the invariants are\nupheld.

\n

Violating these may cause problems like corrupting the allocator’s\ninternal data structures. For example it is not safe\nto build a Vec<u8> from a pointer to a C char array with length size_t.\nIt’s also not safe to build one from a Vec<u16> and its length, because\nthe allocator cares about the alignment, and these two types have different\nalignments. The buffer was allocated with alignment 2 (for u16), but after\nturning it into a Vec<u8> it’ll be deallocated with alignment 1.

\n

The ownership of ptr is effectively transferred to the\nVec<T> which may then deallocate, reallocate or change the\ncontents of memory pointed to by the pointer at will. Ensure\nthat nothing else uses the pointer after calling this\nfunction.

\n
§Examples
\n
#![feature(allocator_api)]\n\nuse std::alloc::System;\n\nuse std::ptr;\nuse std::mem;\n\nlet mut v = Vec::with_capacity_in(3, System);\nv.push(1);\nv.push(2);\nv.push(3);\n\n// Prevent running `v`'s destructor so we are in complete control\n// of the allocation.\nlet mut v = mem::ManuallyDrop::new(v);\n\n// Pull out the various important pieces of information about `v`\nlet p = v.as_mut_ptr();\nlet len = v.len();\nlet cap = v.capacity();\nlet alloc = v.allocator();\n\nunsafe {\n    // Overwrite memory with 4, 5, 6\n    for i in 0..len {\n        ptr::write(p.add(i), 4 + i);\n    }\n\n    // Put everything back together into a Vec\n    let rebuilt = Vec::from_raw_parts_in(p, len, cap, alloc.clone());\n    assert_eq!(rebuilt, [4, 5, 6]);\n}
\n

Using memory that was allocated elsewhere:

\n\n
#![feature(allocator_api)]\n\nuse std::alloc::{AllocError, Allocator, Global, Layout};\n\nfn main() {\n    let layout = Layout::array::<u32>(16).expect(\"overflow cannot happen\");\n\n    let vec = unsafe {\n        let mem = match Global.allocate(layout) {\n            Ok(mem) => mem.cast::<u32>().as_ptr(),\n            Err(AllocError) => return,\n        };\n\n        mem.write(1_000_000);\n\n        Vec::from_raw_parts_in(mem, 1, 16, Global)\n    };\n\n    assert_eq!(vec, &[1_000_000]);\n    assert_eq!(vec.capacity(), 16);\n}
\n
source

pub fn into_raw_parts(self) -> (*mut T, usize, usize)

🔬This is a nightly-only experimental API. (vec_into_raw_parts)

Decomposes a Vec<T> into its raw components: (pointer, length, capacity).

\n

Returns the raw pointer to the underlying data, the length of\nthe vector (in elements), and the allocated capacity of the\ndata (in elements). These are the same arguments in the same\norder as the arguments to from_raw_parts.

\n

After calling this function, the caller is responsible for the\nmemory previously managed by the Vec. The only way to do\nthis is to convert the raw pointer, length, and capacity back\ninto a Vec with the from_raw_parts function, allowing\nthe destructor to perform the cleanup.

\n
§Examples
\n
#![feature(vec_into_raw_parts)]\nlet v: Vec<i32> = vec![-1, 0, 1];\n\nlet (ptr, len, cap) = v.into_raw_parts();\n\nlet rebuilt = unsafe {\n    // We can now make changes to the components, such as\n    // transmuting the raw pointer to a compatible type.\n    let ptr = ptr as *mut u32;\n\n    Vec::from_raw_parts(ptr, len, cap)\n};\nassert_eq!(rebuilt, [4294967295, 0, 1]);
\n
source

pub fn into_raw_parts_with_alloc(self) -> (*mut T, usize, usize, A)

🔬This is a nightly-only experimental API. (allocator_api)

Decomposes a Vec<T> into its raw components: (pointer, length, capacity, allocator).

\n

Returns the raw pointer to the underlying data, the length of the vector (in elements),\nthe allocated capacity of the data (in elements), and the allocator. These are the same\narguments in the same order as the arguments to from_raw_parts_in.

\n

After calling this function, the caller is responsible for the\nmemory previously managed by the Vec. The only way to do\nthis is to convert the raw pointer, length, and capacity back\ninto a Vec with the from_raw_parts_in function, allowing\nthe destructor to perform the cleanup.

\n
§Examples
\n
#![feature(allocator_api, vec_into_raw_parts)]\n\nuse std::alloc::System;\n\nlet mut v: Vec<i32, System> = Vec::new_in(System);\nv.push(-1);\nv.push(0);\nv.push(1);\n\nlet (ptr, len, cap, alloc) = v.into_raw_parts_with_alloc();\n\nlet rebuilt = unsafe {\n    // We can now make changes to the components, such as\n    // transmuting the raw pointer to a compatible type.\n    let ptr = ptr as *mut u32;\n\n    Vec::from_raw_parts_in(ptr, len, cap, alloc)\n};\nassert_eq!(rebuilt, [4294967295, 0, 1]);
\n
1.0.0 · source

pub fn capacity(&self) -> usize

Returns the total number of elements the vector can hold without\nreallocating.

\n
§Examples
\n
let mut vec: Vec<i32> = Vec::with_capacity(10);\nvec.push(42);\nassert!(vec.capacity() >= 10);
\n
1.0.0 · source

pub fn reserve(&mut self, additional: usize)

Reserves capacity for at least additional more elements to be inserted\nin the given Vec<T>. The collection may reserve more space to\nspeculatively avoid frequent reallocations. After calling reserve,\ncapacity will be greater than or equal to self.len() + additional.\nDoes nothing if capacity is already sufficient.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1];\nvec.reserve(10);\nassert!(vec.capacity() >= 11);
\n
1.0.0 · source

pub fn reserve_exact(&mut self, additional: usize)

Reserves the minimum capacity for at least additional more elements to\nbe inserted in the given Vec<T>. Unlike reserve, this will not\ndeliberately over-allocate to speculatively avoid frequent allocations.\nAfter calling reserve_exact, capacity will be greater than or equal to\nself.len() + additional. Does nothing if the capacity is already\nsufficient.

\n

Note that the allocator may give the collection more space than it\nrequests. Therefore, capacity can not be relied upon to be precisely\nminimal. Prefer reserve if future insertions are expected.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1];\nvec.reserve_exact(10);\nassert!(vec.capacity() >= 11);
\n
1.57.0 · source

pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>

Tries to reserve capacity for at least additional more elements to be inserted\nin the given Vec<T>. The collection may reserve more space to speculatively avoid\nfrequent reallocations. After calling try_reserve, capacity will be\ngreater than or equal to self.len() + additional if it returns\nOk(()). Does nothing if capacity is already sufficient. This method\npreserves the contents even if an error occurs.

\n
§Errors
\n

If the capacity overflows, or the allocator reports a failure, then an error\nis returned.

\n
§Examples
\n
use std::collections::TryReserveError;\n\nfn process_data(data: &[u32]) -> Result<Vec<u32>, TryReserveError> {\n    let mut output = Vec::new();\n\n    // Pre-reserve the memory, exiting if we can't\n    output.try_reserve(data.len())?;\n\n    // Now we know this can't OOM in the middle of our complex work\n    output.extend(data.iter().map(|&val| {\n        val * 2 + 5 // very complicated\n    }));\n\n    Ok(output)\n}
\n
1.57.0 · source

pub fn try_reserve_exact(\n &mut self,\n additional: usize,\n) -> Result<(), TryReserveError>

Tries to reserve the minimum capacity for at least additional\nelements to be inserted in the given Vec<T>. Unlike try_reserve,\nthis will not deliberately over-allocate to speculatively avoid frequent\nallocations. After calling try_reserve_exact, capacity will be greater\nthan or equal to self.len() + additional if it returns Ok(()).\nDoes nothing if the capacity is already sufficient.

\n

Note that the allocator may give the collection more space than it\nrequests. Therefore, capacity can not be relied upon to be precisely\nminimal. Prefer try_reserve if future insertions are expected.

\n
§Errors
\n

If the capacity overflows, or the allocator reports a failure, then an error\nis returned.

\n
§Examples
\n
use std::collections::TryReserveError;\n\nfn process_data(data: &[u32]) -> Result<Vec<u32>, TryReserveError> {\n    let mut output = Vec::new();\n\n    // Pre-reserve the memory, exiting if we can't\n    output.try_reserve_exact(data.len())?;\n\n    // Now we know this can't OOM in the middle of our complex work\n    output.extend(data.iter().map(|&val| {\n        val * 2 + 5 // very complicated\n    }));\n\n    Ok(output)\n}
\n
1.0.0 · source

pub fn shrink_to_fit(&mut self)

Shrinks the capacity of the vector as much as possible.

\n

The behavior of this method depends on the allocator, which may either shrink the vector\nin-place or reallocate. The resulting vector might still have some excess capacity, just as\nis the case for with_capacity. See Allocator::shrink for more details.

\n
§Examples
\n
let mut vec = Vec::with_capacity(10);\nvec.extend([1, 2, 3]);\nassert!(vec.capacity() >= 10);\nvec.shrink_to_fit();\nassert!(vec.capacity() >= 3);
\n
1.56.0 · source

pub fn shrink_to(&mut self, min_capacity: usize)

Shrinks the capacity of the vector with a lower bound.

\n

The capacity will remain at least as large as both the length\nand the supplied value.

\n

If the current capacity is less than the lower limit, this is a no-op.

\n
§Examples
\n
let mut vec = Vec::with_capacity(10);\nvec.extend([1, 2, 3]);\nassert!(vec.capacity() >= 10);\nvec.shrink_to(4);\nassert!(vec.capacity() >= 4);\nvec.shrink_to(0);\nassert!(vec.capacity() >= 3);
\n
1.0.0 · source

pub fn into_boxed_slice(self) -> Box<[T], A>

Converts the vector into Box<[T]>.

\n

Before doing the conversion, this method discards excess capacity like shrink_to_fit.

\n
§Examples
\n
let v = vec![1, 2, 3];\n\nlet slice = v.into_boxed_slice();
\n

Any excess capacity is removed:

\n\n
let mut vec = Vec::with_capacity(10);\nvec.extend([1, 2, 3]);\n\nassert!(vec.capacity() >= 10);\nlet slice = vec.into_boxed_slice();\nassert_eq!(slice.into_vec().capacity(), 3);
\n
1.0.0 · source

pub fn truncate(&mut self, len: usize)

Shortens the vector, keeping the first len elements and dropping\nthe rest.

\n

If len is greater or equal to the vector’s current length, this has\nno effect.

\n

The drain method can emulate truncate, but causes the excess\nelements to be returned instead of dropped.

\n

Note that this method has no effect on the allocated capacity\nof the vector.

\n
§Examples
\n

Truncating a five element vector to two elements:

\n\n
let mut vec = vec![1, 2, 3, 4, 5];\nvec.truncate(2);\nassert_eq!(vec, [1, 2]);
\n

No truncation occurs when len is greater than the vector’s current\nlength:

\n\n
let mut vec = vec![1, 2, 3];\nvec.truncate(8);\nassert_eq!(vec, [1, 2, 3]);
\n

Truncating when len == 0 is equivalent to calling the clear\nmethod.

\n\n
let mut vec = vec![1, 2, 3];\nvec.truncate(0);\nassert_eq!(vec, []);
\n
1.7.0 · source

pub fn as_slice(&self) -> &[T]

Extracts a slice containing the entire vector.

\n

Equivalent to &s[..].

\n
§Examples
\n
use std::io::{self, Write};\nlet buffer = vec![1, 2, 3, 5, 8];\nio::sink().write(buffer.as_slice()).unwrap();
\n
1.7.0 · source

pub fn as_mut_slice(&mut self) -> &mut [T]

Extracts a mutable slice of the entire vector.

\n

Equivalent to &mut s[..].

\n
§Examples
\n
use std::io::{self, Read};\nlet mut buffer = vec![0; 3];\nio::repeat(0b101).read_exact(buffer.as_mut_slice()).unwrap();
\n
1.37.0 · source

pub fn as_ptr(&self) -> *const T

Returns a raw pointer to the vector’s buffer, or a dangling raw pointer\nvalid for zero sized reads if the vector didn’t allocate.

\n

The caller must ensure that the vector outlives the pointer this\nfunction returns, or else it will end up pointing to garbage.\nModifying the vector may cause its buffer to be reallocated,\nwhich would also make any pointers to it invalid.

\n

The caller must also ensure that the memory the pointer (non-transitively) points to\nis never written to (except inside an UnsafeCell) using this pointer or any pointer\nderived from it. If you need to mutate the contents of the slice, use as_mut_ptr.

\n

This method guarantees that for the purpose of the aliasing model, this method\ndoes not materialize a reference to the underlying slice, and thus the returned pointer\nwill remain valid when mixed with other calls to as_ptr and as_mut_ptr.\nNote that calling other methods that materialize mutable references to the slice,\nor mutable references to specific elements you are planning on accessing through this pointer,\nas well as writing to those elements, may still invalidate this pointer.\nSee the second example below for how this guarantee can be used.

\n
§Examples
\n
let x = vec![1, 2, 4];\nlet x_ptr = x.as_ptr();\n\nunsafe {\n    for i in 0..x.len() {\n        assert_eq!(*x_ptr.add(i), 1 << i);\n    }\n}
\n

Due to the aliasing guarantee, the following code is legal:

\n\n
unsafe {\n    let mut v = vec![0, 1, 2];\n    let ptr1 = v.as_ptr();\n    let _ = ptr1.read();\n    let ptr2 = v.as_mut_ptr().offset(2);\n    ptr2.write(2);\n    // Notably, the write to `ptr2` did *not* invalidate `ptr1`\n    // because it mutated a different element:\n    let _ = ptr1.read();\n}
\n
1.37.0 · source

pub fn as_mut_ptr(&mut self) -> *mut T

Returns an unsafe mutable pointer to the vector’s buffer, or a dangling\nraw pointer valid for zero sized reads if the vector didn’t allocate.

\n

The caller must ensure that the vector outlives the pointer this\nfunction returns, or else it will end up pointing to garbage.\nModifying the vector may cause its buffer to be reallocated,\nwhich would also make any pointers to it invalid.

\n

This method guarantees that for the purpose of the aliasing model, this method\ndoes not materialize a reference to the underlying slice, and thus the returned pointer\nwill remain valid when mixed with other calls to as_ptr and as_mut_ptr.\nNote that calling other methods that materialize references to the slice,\nor references to specific elements you are planning on accessing through this pointer,\nmay still invalidate this pointer.\nSee the second example below for how this guarantee can be used.

\n
§Examples
\n
// Allocate vector big enough for 4 elements.\nlet size = 4;\nlet mut x: Vec<i32> = Vec::with_capacity(size);\nlet x_ptr = x.as_mut_ptr();\n\n// Initialize elements via raw pointer writes, then set length.\nunsafe {\n    for i in 0..size {\n        *x_ptr.add(i) = i as i32;\n    }\n    x.set_len(size);\n}\nassert_eq!(&*x, &[0, 1, 2, 3]);
\n

Due to the aliasing guarantee, the following code is legal:

\n\n
unsafe {\n    let mut v = vec![0];\n    let ptr1 = v.as_mut_ptr();\n    ptr1.write(1);\n    let ptr2 = v.as_mut_ptr();\n    ptr2.write(2);\n    // Notably, the write to `ptr2` did *not* invalidate `ptr1`:\n    ptr1.write(3);\n}
\n
source

pub fn allocator(&self) -> &A

🔬This is a nightly-only experimental API. (allocator_api)

Returns a reference to the underlying allocator.

\n
1.0.0 · source

pub unsafe fn set_len(&mut self, new_len: usize)

Forces the length of the vector to new_len.

\n

This is a low-level operation that maintains none of the normal\ninvariants of the type. Normally changing the length of a vector\nis done using one of the safe operations instead, such as\ntruncate, resize, extend, or clear.

\n
§Safety
\n
    \n
  • new_len must be less than or equal to capacity().
  • \n
  • The elements at old_len..new_len must be initialized.
  • \n
\n
§Examples
\n

This method can be useful for situations in which the vector\nis serving as a buffer for other code, particularly over FFI:

\n\n
pub fn get_dictionary(&self) -> Option<Vec<u8>> {\n    // Per the FFI method's docs, \"32768 bytes is always enough\".\n    let mut dict = Vec::with_capacity(32_768);\n    let mut dict_length = 0;\n    // SAFETY: When `deflateGetDictionary` returns `Z_OK`, it holds that:\n    // 1. `dict_length` elements were initialized.\n    // 2. `dict_length` <= the capacity (32_768)\n    // which makes `set_len` safe to call.\n    unsafe {\n        // Make the FFI call...\n        let r = deflateGetDictionary(self.strm, dict.as_mut_ptr(), &mut dict_length);\n        if r == Z_OK {\n            // ...and update the length to what was initialized.\n            dict.set_len(dict_length);\n            Some(dict)\n        } else {\n            None\n        }\n    }\n}
\n

While the following example is sound, there is a memory leak since\nthe inner vectors were not freed prior to the set_len call:

\n\n
let mut vec = vec![vec![1, 0, 0],\n                   vec![0, 1, 0],\n                   vec![0, 0, 1]];\n// SAFETY:\n// 1. `old_len..0` is empty so no elements need to be initialized.\n// 2. `0 <= capacity` always holds whatever `capacity` is.\nunsafe {\n    vec.set_len(0);\n}
\n

Normally, here, one would use clear instead to correctly drop\nthe contents and thus not leak memory.

\n
1.0.0 · source

pub fn swap_remove(&mut self, index: usize) -> T

Removes an element from the vector and returns it.

\n

The removed element is replaced by the last element of the vector.

\n

This does not preserve ordering of the remaining elements, but is O(1).\nIf you need to preserve the element order, use remove instead.

\n
§Panics
\n

Panics if index is out of bounds.

\n
§Examples
\n
let mut v = vec![\"foo\", \"bar\", \"baz\", \"qux\"];\n\nassert_eq!(v.swap_remove(1), \"bar\");\nassert_eq!(v, [\"foo\", \"qux\", \"baz\"]);\n\nassert_eq!(v.swap_remove(0), \"foo\");\nassert_eq!(v, [\"baz\", \"qux\"]);
\n
1.0.0 · source

pub fn insert(&mut self, index: usize, element: T)

Inserts an element at position index within the vector, shifting all\nelements after it to the right.

\n
§Panics
\n

Panics if index > len.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nvec.insert(1, 4);\nassert_eq!(vec, [1, 4, 2, 3]);\nvec.insert(4, 5);\nassert_eq!(vec, [1, 4, 2, 3, 5]);
\n
§Time complexity
\n

Takes O(Vec::len) time. All items after the insertion index must be\nshifted to the right. In the worst case, all elements are shifted when\nthe insertion index is 0.

\n
1.0.0 · source

pub fn remove(&mut self, index: usize) -> T

Removes and returns the element at position index within the vector,\nshifting all elements after it to the left.

\n

Note: Because this shifts over the remaining elements, it has a\nworst-case performance of O(n). If you don’t need the order of elements\nto be preserved, use swap_remove instead. If you’d like to remove\nelements from the beginning of the Vec, consider using\nVecDeque::pop_front instead.

\n
§Panics
\n

Panics if index is out of bounds.

\n
§Examples
\n
let mut v = vec![1, 2, 3];\nassert_eq!(v.remove(1), 2);\nassert_eq!(v, [1, 3]);
\n
1.0.0 · source

pub fn retain<F>(&mut self, f: F)
where\n F: FnMut(&T) -> bool,

Retains only the elements specified by the predicate.

\n

In other words, remove all elements e for which f(&e) returns false.\nThis method operates in place, visiting each element exactly once in the\noriginal order, and preserves the order of the retained elements.

\n
§Examples
\n
let mut vec = vec![1, 2, 3, 4];\nvec.retain(|&x| x % 2 == 0);\nassert_eq!(vec, [2, 4]);
\n

Because the elements are visited exactly once in the original order,\nexternal state may be used to decide which elements to keep.

\n\n
let mut vec = vec![1, 2, 3, 4, 5];\nlet keep = [false, true, true, false, true];\nlet mut iter = keep.iter();\nvec.retain(|_| *iter.next().unwrap());\nassert_eq!(vec, [2, 3, 5]);
\n
1.61.0 · source

pub fn retain_mut<F>(&mut self, f: F)
where\n F: FnMut(&mut T) -> bool,

Retains only the elements specified by the predicate, passing a mutable reference to it.

\n

In other words, remove all elements e such that f(&mut e) returns false.\nThis method operates in place, visiting each element exactly once in the\noriginal order, and preserves the order of the retained elements.

\n
§Examples
\n
let mut vec = vec![1, 2, 3, 4];\nvec.retain_mut(|x| if *x <= 3 {\n    *x += 1;\n    true\n} else {\n    false\n});\nassert_eq!(vec, [2, 3, 4]);
\n
1.16.0 · source

pub fn dedup_by_key<F, K>(&mut self, key: F)
where\n F: FnMut(&mut T) -> K,\n K: PartialEq,

Removes all but the first of consecutive elements in the vector that resolve to the same\nkey.

\n

If the vector is sorted, this removes all duplicates.

\n
§Examples
\n
let mut vec = vec![10, 20, 21, 30, 20];\n\nvec.dedup_by_key(|i| *i / 10);\n\nassert_eq!(vec, [10, 20, 30, 20]);
\n
1.16.0 · source

pub fn dedup_by<F>(&mut self, same_bucket: F)
where\n F: FnMut(&mut T, &mut T) -> bool,

Removes all but the first of consecutive elements in the vector satisfying a given equality\nrelation.

\n

The same_bucket function is passed references to two elements from the vector and\nmust determine if the elements compare equal. The elements are passed in opposite order\nfrom their order in the slice, so if same_bucket(a, b) returns true, a is removed.

\n

If the vector is sorted, this removes all duplicates.

\n
§Examples
\n
let mut vec = vec![\"foo\", \"bar\", \"Bar\", \"baz\", \"bar\"];\n\nvec.dedup_by(|a, b| a.eq_ignore_ascii_case(b));\n\nassert_eq!(vec, [\"foo\", \"bar\", \"baz\", \"bar\"]);
\n
1.0.0 · source

pub fn push(&mut self, value: T)

Appends an element to the back of a collection.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1, 2];\nvec.push(3);\nassert_eq!(vec, [1, 2, 3]);
\n
§Time complexity
\n

Takes amortized O(1) time. If the vector’s length would exceed its\ncapacity after the push, O(capacity) time is taken to copy the\nvector’s elements to a larger allocation. This expensive operation is\noffset by the capacity O(1) insertions it allows.

\n
source

pub fn push_within_capacity(&mut self, value: T) -> Result<(), T>

🔬This is a nightly-only experimental API. (vec_push_within_capacity)

Appends an element if there is sufficient spare capacity, otherwise an error is returned\nwith the element.

\n

Unlike push this method will not reallocate when there’s insufficient capacity.\nThe caller should use reserve or try_reserve to ensure that there is enough capacity.

\n
§Examples
\n

A manual, panic-free alternative to FromIterator:

\n\n
#![feature(vec_push_within_capacity)]\n\nuse std::collections::TryReserveError;\nfn from_iter_fallible<T>(iter: impl Iterator<Item=T>) -> Result<Vec<T>, TryReserveError> {\n    let mut vec = Vec::new();\n    for value in iter {\n        if let Err(value) = vec.push_within_capacity(value) {\n            vec.try_reserve(1)?;\n            // this cannot fail, the previous line either returned or added at least 1 free slot\n            let _ = vec.push_within_capacity(value);\n        }\n    }\n    Ok(vec)\n}\nassert_eq!(from_iter_fallible(0..100), Ok(Vec::from_iter(0..100)));
\n
§Time complexity
\n

Takes O(1) time.

\n
1.0.0 · source

pub fn pop(&mut self) -> Option<T>

Removes the last element from a vector and returns it, or None if it\nis empty.

\n

If you’d like to pop the first element, consider using\nVecDeque::pop_front instead.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nassert_eq!(vec.pop(), Some(3));\nassert_eq!(vec, [1, 2]);
\n
§Time complexity
\n

Takes O(1) time.

\n
source

pub fn pop_if<F>(&mut self, f: F) -> Option<T>
where\n F: FnOnce(&mut T) -> bool,

🔬This is a nightly-only experimental API. (vec_pop_if)

Removes and returns the last element in a vector if the predicate\nreturns true, or None if the predicate returns false or the vector\nis empty.

\n
§Examples
\n
#![feature(vec_pop_if)]\n\nlet mut vec = vec![1, 2, 3, 4];\nlet pred = |x: &mut i32| *x % 2 == 0;\n\nassert_eq!(vec.pop_if(pred), Some(4));\nassert_eq!(vec, [1, 2, 3]);\nassert_eq!(vec.pop_if(pred), None);
\n
1.4.0 · source

pub fn append(&mut self, other: &mut Vec<T, A>)

Moves all the elements of other into self, leaving other empty.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nlet mut vec2 = vec![4, 5, 6];\nvec.append(&mut vec2);\nassert_eq!(vec, [1, 2, 3, 4, 5, 6]);\nassert_eq!(vec2, []);
\n
1.6.0 · source

pub fn drain<R>(&mut self, range: R) -> Drain<'_, T, A>
where\n R: RangeBounds<usize>,

Removes the specified range from the vector in bulk, returning all\nremoved elements as an iterator. If the iterator is dropped before\nbeing fully consumed, it drops the remaining removed elements.

\n

The returned iterator keeps a mutable borrow on the vector to optimize\nits implementation.

\n
§Panics
\n

Panics if the starting point is greater than the end point or if\nthe end point is greater than the length of the vector.

\n
§Leaking
\n

If the returned iterator goes out of scope without being dropped (due to\nmem::forget, for example), the vector may have lost and leaked\nelements arbitrarily, including elements outside the range.

\n
§Examples
\n
let mut v = vec![1, 2, 3];\nlet u: Vec<_> = v.drain(1..).collect();\nassert_eq!(v, &[1]);\nassert_eq!(u, &[2, 3]);\n\n// A full range clears the vector, like `clear()` does\nv.drain(..);\nassert_eq!(v, &[]);
\n
1.0.0 · source

pub fn clear(&mut self)

Clears the vector, removing all values.

\n

Note that this method has no effect on the allocated capacity\nof the vector.

\n
§Examples
\n
let mut v = vec![1, 2, 3];\n\nv.clear();\n\nassert!(v.is_empty());
\n
1.0.0 · source

pub fn len(&self) -> usize

Returns the number of elements in the vector, also referred to\nas its ‘length’.

\n
§Examples
\n
let a = vec![1, 2, 3];\nassert_eq!(a.len(), 3);
\n
1.0.0 · source

pub fn is_empty(&self) -> bool

Returns true if the vector contains no elements.

\n
§Examples
\n
let mut v = Vec::new();\nassert!(v.is_empty());\n\nv.push(1);\nassert!(!v.is_empty());
\n
1.4.0 · source

pub fn split_off(&mut self, at: usize) -> Vec<T, A>
where\n A: Clone,

Splits the collection into two at the given index.

\n

Returns a newly allocated vector containing the elements in the range\n[at, len). After the call, the original vector will be left containing\nthe elements [0, at) with its previous capacity unchanged.

\n
    \n
  • If you want to take ownership of the entire contents and capacity of\nthe vector, see mem::take or mem::replace.
  • \n
  • If you don’t need the returned vector at all, see Vec::truncate.
  • \n
  • If you want to take ownership of an arbitrary subslice, or you don’t\nnecessarily want to store the removed items in a vector, see Vec::drain.
  • \n
\n
§Panics
\n

Panics if at > len.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nlet vec2 = vec.split_off(1);\nassert_eq!(vec, [1]);\nassert_eq!(vec2, [2, 3]);
\n
1.33.0 · source

pub fn resize_with<F>(&mut self, new_len: usize, f: F)
where\n F: FnMut() -> T,

Resizes the Vec in-place so that len is equal to new_len.

\n

If new_len is greater than len, the Vec is extended by the\ndifference, with each additional slot filled with the result of\ncalling the closure f. The return values from f will end up\nin the Vec in the order they have been generated.

\n

If new_len is less than len, the Vec is simply truncated.

\n

This method uses a closure to create new values on every push. If\nyou’d rather Clone a given value, use Vec::resize. If you\nwant to use the Default trait to generate values, you can\npass Default::default as the second argument.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nvec.resize_with(5, Default::default);\nassert_eq!(vec, [1, 2, 3, 0, 0]);\n\nlet mut vec = vec![];\nlet mut p = 1;\nvec.resize_with(4, || { p *= 2; p });\nassert_eq!(vec, [2, 4, 8, 16]);
\n
1.47.0 · source

pub fn leak<'a>(self) -> &'a mut [T]
where\n A: 'a,

Consumes and leaks the Vec, returning a mutable reference to the contents,\n&'a mut [T]. Note that the type T must outlive the chosen lifetime\n'a. If the type has only static references, or none at all, then this\nmay be chosen to be 'static.

\n

As of Rust 1.57, this method does not reallocate or shrink the Vec,\nso the leaked allocation may include unused capacity that is not part\nof the returned slice.

\n

This function is mainly useful for data that lives for the remainder of\nthe program’s life. Dropping the returned reference will cause a memory\nleak.

\n
§Examples
\n

Simple usage:

\n\n
let x = vec![1, 2, 3];\nlet static_ref: &'static mut [usize] = x.leak();\nstatic_ref[0] += 1;\nassert_eq!(static_ref, &[2, 2, 3]);
\n
1.60.0 · source

pub fn spare_capacity_mut(&mut self) -> &mut [MaybeUninit<T>]

Returns the remaining spare capacity of the vector as a slice of\nMaybeUninit<T>.

\n

The returned slice can be used to fill the vector with data (e.g. by\nreading from a file) before marking the data as initialized using the\nset_len method.

\n
§Examples
\n
// Allocate vector big enough for 10 elements.\nlet mut v = Vec::with_capacity(10);\n\n// Fill in the first 3 elements.\nlet uninit = v.spare_capacity_mut();\nuninit[0].write(0);\nuninit[1].write(1);\nuninit[2].write(2);\n\n// Mark the first 3 elements of the vector as being initialized.\nunsafe {\n    v.set_len(3);\n}\n\nassert_eq!(&v, &[0, 1, 2]);
\n
source

pub fn split_at_spare_mut(&mut self) -> (&mut [T], &mut [MaybeUninit<T>])

🔬This is a nightly-only experimental API. (vec_split_at_spare)

Returns vector content as a slice of T, along with the remaining spare\ncapacity of the vector as a slice of MaybeUninit<T>.

\n

The returned spare capacity slice can be used to fill the vector with data\n(e.g. by reading from a file) before marking the data as initialized using\nthe set_len method.

\n

Note that this is a low-level API, which should be used with care for\noptimization purposes. If you need to append data to a Vec\nyou can use push, extend, extend_from_slice,\nextend_from_within, insert, append, resize or\nresize_with, depending on your exact needs.

\n
§Examples
\n
#![feature(vec_split_at_spare)]\n\nlet mut v = vec![1, 1, 2];\n\n// Reserve additional space big enough for 10 elements.\nv.reserve(10);\n\nlet (init, uninit) = v.split_at_spare_mut();\nlet sum = init.iter().copied().sum::<u32>();\n\n// Fill in the next 4 elements.\nuninit[0].write(sum);\nuninit[1].write(sum * 2);\nuninit[2].write(sum * 3);\nuninit[3].write(sum * 4);\n\n// Mark the 4 elements of the vector as being initialized.\nunsafe {\n    let len = v.len();\n    v.set_len(len + 4);\n}\n\nassert_eq!(&v, &[1, 1, 2, 4, 8, 12, 16]);
\n
",0,"redstone::core::aggregator::Matrix"],["
§

impl<Z> Zeroize for Vec<Z>
where\n Z: Zeroize,

§

fn zeroize(&mut self)

“Best effort” zeroization for Vec.

\n

Ensures the entire capacity of the Vec is zeroed. Cannot ensure that\nprevious reallocations did not leave values on the heap.

\n
","Zeroize","redstone::core::aggregator::Matrix"],["
source§

impl<T, A> DerefPure for Vec<T, A>
where\n A: Allocator,

","DerefPure","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Eq for Vec<T, A>
where\n T: Eq,\n A: Allocator,

","Eq","redstone::core::aggregator::Matrix"],["
§

impl<Z> ZeroizeOnDrop for Vec<Z>
where\n Z: ZeroizeOnDrop,

","ZeroizeOnDrop","redstone::core::aggregator::Matrix"]] +"redstone":[["
1.5.0 · source§

impl<T, A> AsMut<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn as_mut(&mut self) -> &mut [T]

Converts this type into a mutable reference of the (usually inferred) input type.
","AsMut<[T]>","redstone::core::aggregator::Matrix"],["
1.5.0 · source§

impl<T, A> AsMut<Vec<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn as_mut(&mut self) -> &mut Vec<T, A>

Converts this type into a mutable reference of the (usually inferred) input type.
","AsMut>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> AsRef<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn as_ref(&self) -> &[T]

Converts this type into a shared reference of the (usually inferred) input type.
","AsRef<[T]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> AsRef<Vec<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn as_ref(&self) -> &Vec<T, A>

Converts this type into a shared reference of the (usually inferred) input type.
","AsRef>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Borrow<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn borrow(&self) -> &[T]

Immutably borrows from an owned value. Read more
","Borrow<[T]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> BorrowMut<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn borrow_mut(&mut self) -> &mut [T]

Mutably borrows from an owned value. Read more
","BorrowMut<[T]>","redstone::core::aggregator::Matrix"],["
source§

impl<T> CLTyped for Vec<T>
where\n T: CLTyped,

source§

fn cl_type() -> CLType

The CLType of Self.
","CLTyped","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Clone for Vec<T, A>
where\n T: Clone,\n A: Allocator + Clone,

source§

fn clone_from(&mut self, source: &Vec<T, A>)

Overwrites the contents of self with a clone of the contents of source.

\n

This method is preferred over simply assigning source.clone() to self,\nas it avoids reallocation if possible. Additionally, if the element type\nT overrides clone_from(), this will reuse the resources of self’s\nelements as well.

\n
§Examples
\n
let x = vec![5, 6, 7];\nlet mut y = vec![8, 9, 10];\nlet yp: *const i32 = y.as_ptr();\n\ny.clone_from(&x);\n\n// The value is the same\nassert_eq!(x, y);\n\n// And no reallocation occurred\nassert_eq!(yp, y.as_ptr());
\n
source§

fn clone(&self) -> Vec<T, A>

Returns a copy of the value. Read more
","Clone","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Debug for Vec<T, A>
where\n T: Debug,\n A: Allocator,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T> Default for Vec<T>

source§

fn default() -> Vec<T>

Creates an empty Vec<T>.

\n

The vector will not allocate until elements are pushed onto it.

\n
","Default","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Deref for Vec<T, A>
where\n A: Allocator,

§

type Target = [T]

The resulting type after dereferencing.
source§

fn deref(&self) -> &[T]

Dereferences the value.
","Deref","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> DerefMut for Vec<T, A>
where\n A: Allocator,

source§

fn deref_mut(&mut self) -> &mut [T]

Mutably dereferences the value.
","DerefMut","redstone::core::aggregator::Matrix"],["
source§

impl<'de, T> Deserialize<'de> for Vec<T>
where\n T: Deserialize<'de>,

source§

fn deserialize<D>(\n deserializer: D,\n) -> Result<Vec<T>, <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Drop for Vec<T, A>
where\n A: Allocator,

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
","Drop","redstone::core::aggregator::Matrix"],["
1.2.0 · source§

impl<'a, T, A> Extend<&'a T> for Vec<T, A>
where\n T: Copy + 'a,\n A: Allocator,

Extend implementation that copies elements out of references before pushing them onto the Vec.

\n

This implementation is specialized for slice iterators, where it uses copy_from_slice to\nappend the entire slice at once.

\n
source§

fn extend<I>(&mut self, iter: I)
where\n I: IntoIterator<Item = &'a T>,

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, _: &'a T)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
","Extend<&'a T>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Extend<T> for Vec<T, A>
where\n A: Allocator,

source§

fn extend<I>(&mut self, iter: I)
where\n I: IntoIterator<Item = T>,

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: T)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
","Extend","redstone::core::aggregator::Matrix"],["
source§

impl Flattened<<Casper as NetworkSpecific>::BytesRepr> for Vec<Bytes>

","Flattened<::BytesRepr>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T> From<&[T]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &[T]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&[1, 2, 3][..]), vec![1, 2, 3]);
\n
","From<&[T]>","redstone::core::aggregator::Matrix"],["
1.74.0 · source§

impl<T, const N: usize> From<&[T; N]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &[T; N]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&[1, 2, 3]), vec![1, 2, 3]);
\n
","From<&[T; N]>","redstone::core::aggregator::Matrix"],["
1.19.0 · source§

impl<T> From<&mut [T]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &mut [T]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&mut [1, 2, 3][..]), vec![1, 2, 3]);
\n
","From<&mut [T]>","redstone::core::aggregator::Matrix"],["
1.74.0 · source§

impl<T, const N: usize> From<&mut [T; N]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &mut [T; N]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&mut [1, 2, 3]), vec![1, 2, 3]);
\n
","From<&mut [T; N]>","redstone::core::aggregator::Matrix"],["
1.44.0 · source§

impl<T, const N: usize> From<[T; N]> for Vec<T>

source§

fn from(s: [T; N]) -> Vec<T>

Allocate a Vec<T> and move s’s items into it.

\n
§Examples
\n
assert_eq!(Vec::from([1, 2, 3]), vec![1, 2, 3]);
\n
","From<[T; N]>","redstone::core::aggregator::Matrix"],["
1.5.0 · source§

impl<T, A> From<BinaryHeap<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn from(heap: BinaryHeap<T, A>) -> Vec<T, A>

Converts a BinaryHeap<T> into a Vec<T>.

\n

This conversion requires no data movement or allocation, and has\nconstant time complexity.

\n
","From>","redstone::core::aggregator::Matrix"],["
1.18.0 · source§

impl<T, A> From<Box<[T], A>> for Vec<T, A>
where\n A: Allocator,

source§

fn from(s: Box<[T], A>) -> Vec<T, A>

Convert a boxed slice into a vector by transferring ownership of\nthe existing heap allocation.

\n
§Examples
\n
let b: Box<[i32]> = vec![1, 2, 3].into_boxed_slice();\nassert_eq!(Vec::from(b), vec![1, 2, 3]);
\n
","From>","redstone::core::aggregator::Matrix"],["
1.14.0 · source§

impl<'a, T> From<Cow<'a, [T]>> for Vec<T>
where\n [T]: ToOwned<Owned = Vec<T>>,

source§

fn from(s: Cow<'a, [T]>) -> Vec<T>

Convert a clone-on-write slice into a vector.

\n

If s already owns a Vec<T>, it will be returned directly.\nIf s is borrowing a slice, a new Vec<T> will be allocated and\nfilled by cloning s’s items into it.

\n
§Examples
\n
let o: Cow<'_, [i32]> = Cow::Owned(vec![1, 2, 3]);\nlet b: Cow<'_, [i32]> = Cow::Borrowed(&[1, 2, 3]);\nassert_eq!(Vec::from(o), Vec::from(b));
\n
","From>","redstone::core::aggregator::Matrix"],["
1.10.0 · source§

impl<T, A> From<VecDeque<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn from(other: VecDeque<T, A>) -> Vec<T, A>

Turn a VecDeque<T> into a Vec<T>.

\n

This never needs to re-allocate, but does need to do O(n) data movement if\nthe circular buffer doesn’t happen to be at the beginning of the allocation.

\n
§Examples
\n
use std::collections::VecDeque;\n\n// This one is *O*(1).\nlet deque: VecDeque<_> = (1..5).collect();\nlet ptr = deque.as_slices().0.as_ptr();\nlet vec = Vec::from(deque);\nassert_eq!(vec, [1, 2, 3, 4]);\nassert_eq!(vec.as_ptr(), ptr);\n\n// This one needs data rearranging.\nlet mut deque: VecDeque<_> = (1..5).collect();\ndeque.push_front(9);\ndeque.push_front(8);\nlet ptr = deque.as_slices().1.as_ptr();\nlet vec = Vec::from(deque);\nassert_eq!(vec, [8, 9, 1, 2, 3, 4]);\nassert_eq!(vec.as_ptr(), ptr);
\n
","From>","redstone::core::aggregator::Matrix"],["
source§

impl<T> FromBytes for Vec<T>
where\n T: FromBytes,

source§

fn from_bytes(bytes: &[u8]) -> Result<(Vec<T>, &[u8]), Error>

Deserializes the slice into Self.
source§

fn from_vec(bytes: Vec<u8>) -> Result<(Vec<T>, Vec<u8>), Error>

Deserializes the Vec<u8> into Self.
","FromBytes","redstone::core::aggregator::Matrix"],["
source§

impl FromBytesRepr<Vec<u8>> for U256

source§

fn from_bytes_repr(bytes: Vec<u8>) -> Self

","FromBytesRepr>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T> FromIterator<T> for Vec<T>

Collects an iterator into a Vec, commonly called via Iterator::collect()

\n

§Allocation behavior

\n

In general Vec does not guarantee any particular growth or allocation strategy.\nThat also applies to this trait impl.

\n

Note: This section covers implementation details and is therefore exempt from\nstability guarantees.

\n

Vec may use any or none of the following strategies,\ndepending on the supplied iterator:

\n
    \n
  • preallocate based on Iterator::size_hint()\n
      \n
    • and panic if the number of items is outside the provided lower/upper bounds
    • \n
    \n
  • \n
  • use an amortized growth strategy similar to pushing one item at a time
  • \n
  • perform the iteration in-place on the original allocation backing the iterator
  • \n
\n

The last case warrants some attention. It is an optimization that in many cases reduces peak memory\nconsumption and improves cache locality. But when big, short-lived allocations are created,\nonly a small fraction of their items get collected, no further use is made of the spare capacity\nand the resulting Vec is moved into a longer-lived structure, then this can lead to the large\nallocations having their lifetimes unnecessarily extended which can result in increased memory\nfootprint.

\n

In cases where this is an issue, the excess capacity can be discarded with Vec::shrink_to(),\nVec::shrink_to_fit() or by collecting into Box<[T]> instead, which additionally reduces\nthe size of the long-lived struct.

\n\n
static LONG_LIVED: Mutex<Vec<Vec<u16>>> = Mutex::new(Vec::new());\n\nfor i in 0..10 {\n    let big_temporary: Vec<u16> = (0..1024).collect();\n    // discard most items\n    let mut result: Vec<_> = big_temporary.into_iter().filter(|i| i % 100 == 0).collect();\n    // without this a lot of unused capacity might be moved into the global\n    result.shrink_to_fit();\n    LONG_LIVED.lock().unwrap().push(result);\n}
\n
source§

fn from_iter<I>(iter: I) -> Vec<T>
where\n I: IntoIterator<Item = T>,

Creates a value from an iterator. Read more
","FromIterator","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Hash for Vec<T, A>
where\n T: Hash,\n A: Allocator,

The hash of a vector is the same as that of the corresponding slice,\nas required by the core::borrow::Borrow implementation.

\n\n
use std::hash::BuildHasher;\n\nlet b = std::hash::RandomState::new();\nlet v: Vec<u8> = vec![0xa8, 0x3c, 0x09];\nlet s: &[u8] = &[0xa8, 0x3c, 0x09];\nassert_eq!(b.hash_one(v), b.hash_one(s));
\n
source§

fn hash<H>(&self, state: &mut H)
where\n H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, I, A> Index<I> for Vec<T, A>
where\n I: SliceIndex<[T]>,\n A: Allocator,

§

type Output = <I as SliceIndex<[T]>>::Output

The returned type after indexing.
source§

fn index(&self, index: I) -> &<Vec<T, A> as Index<I>>::Output

Performs the indexing (container[index]) operation. Read more
","Index","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, I, A> IndexMut<I> for Vec<T, A>
where\n I: SliceIndex<[T]>,\n A: Allocator,

source§

fn index_mut(&mut self, index: I) -> &mut <Vec<T, A> as Index<I>>::Output

Performs the mutable indexing (container[index]) operation. Read more
","IndexMut","redstone::core::aggregator::Matrix"],["
source§

impl<'de, T, E> IntoDeserializer<'de, E> for Vec<T>
where\n T: IntoDeserializer<'de, E>,\n E: Error,

§

type Deserializer = SeqDeserializer<<Vec<T> as IntoIterator>::IntoIter, E>

The type of the deserializer being converted into.
source§

fn into_deserializer(self) -> <Vec<T> as IntoDeserializer<'de, E>>::Deserializer

Convert this value into a deserializer.
","IntoDeserializer<'de, E>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> IntoIterator for Vec<T, A>
where\n A: Allocator,

source§

fn into_iter(self) -> <Vec<T, A> as IntoIterator>::IntoIter

Creates a consuming iterator, that is, one that moves each value out of\nthe vector (from start to end). The vector cannot be used after calling\nthis.

\n
§Examples
\n
let v = vec![\"a\".to_string(), \"b\".to_string()];\nlet mut v_iter = v.into_iter();\n\nlet first_element: Option<String> = v_iter.next();\n\nassert_eq!(first_element, Some(\"a\".to_string()));\nassert_eq!(v_iter.next(), Some(\"b\".to_string()));\nassert_eq!(v_iter.next(), None);
\n
§

type Item = T

The type of the elements being iterated over.
§

type IntoIter = IntoIter<T, A>

Which kind of iterator are we turning this into?
","IntoIterator","redstone::core::aggregator::Matrix"],["
source§

impl<T> Median for Vec<T>
where\n T: Copy + Ord + Avg,

§

type Item = T

source§

fn median(self) -> Self::Item

","Median","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Ord for Vec<T, A>
where\n T: Ord,\n A: Allocator,

Implements ordering of vectors, lexicographically.

\n
source§

fn cmp(&self, other: &Vec<T, A>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
","Ord","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A> PartialEq<&[U]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &&[U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&[U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&[U]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A, const N: usize> PartialEq<&[U; N]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &&[U; N]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&[U; N]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&[U; N]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A> PartialEq<&mut [U]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &&mut [U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&mut [U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&mut [U]>","redstone::core::aggregator::Matrix"],["
1.48.0 · source§

impl<T, U, A> PartialEq<[U]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &[U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &[U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<[U]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A, const N: usize> PartialEq<[U; N]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &[U; N]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &[U; N]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<[U; N]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A1, A2> PartialEq<Vec<U, A2>> for Vec<T, A1>
where\n A1: Allocator,\n A2: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &Vec<U, A2>) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &Vec<U, A2>) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A1, A2> PartialOrd<Vec<T, A2>> for Vec<T, A1>
where\n T: PartialOrd,\n A1: Allocator,\n A2: Allocator,

Implements comparison of vectors, lexicographically.

\n
source§

fn partial_cmp(&self, other: &Vec<T, A2>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <=\noperator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >=\noperator. Read more
","PartialOrd>","redstone::core::aggregator::Matrix"],["
source§

impl<T> Serialize for Vec<T>
where\n T: Serialize,

source§

fn serialize<S>(\n &self,\n serializer: S,\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","redstone::core::aggregator::Matrix"],["
source§

impl<T> ToBytes for Vec<T>
where\n T: ToBytes,

source§

fn to_bytes(&self) -> Result<Vec<u8>, Error>

Serializes &self to a Vec<u8>.
source§

fn into_bytes(self) -> Result<Vec<u8>, Error>

Consumes self and serializes to a Vec<u8>.
source§

fn serialized_length(&self) -> usize

Returns the length of the Vec<u8> which would be returned from a successful call to\nto_bytes() or into_bytes(). The data is not actually serialized, so this call is\nrelatively cheap.
source§

fn write_bytes(&self, writer: &mut Vec<u8>) -> Result<(), Error>

Writes &self into a mutable writer.
","ToBytes","redstone::core::aggregator::Matrix"],["
source§

impl<T> Vec<T>

1.0.0 (const: 1.39.0) · source

pub const fn new() -> Vec<T>

Constructs a new, empty Vec<T>.

\n

The vector will not allocate until elements are pushed onto it.

\n
§Examples
\n
let mut vec: Vec<i32> = Vec::new();
\n
1.0.0 · source

pub fn with_capacity(capacity: usize) -> Vec<T>

Constructs a new, empty Vec<T> with at least the specified capacity.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n

It is important to note that although the returned vector has the\nminimum capacity specified, the vector will have a zero length. For\nan explanation of the difference between length and capacity, see\nCapacity and reallocation.

\n

If it is important to know the exact allocated capacity of a Vec,\nalways use the capacity method after construction.

\n

For Vec<T> where T is a zero-sized type, there will be no allocation\nand the capacity will always be usize::MAX.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = Vec::with_capacity(10);\n\n// The vector contains no items, even though it has capacity for more\nassert_eq!(vec.len(), 0);\nassert!(vec.capacity() >= 10);\n\n// These are all done without reallocating...\nfor i in 0..10 {\n    vec.push(i);\n}\nassert_eq!(vec.len(), 10);\nassert!(vec.capacity() >= 10);\n\n// ...but this may make the vector reallocate\nvec.push(11);\nassert_eq!(vec.len(), 11);\nassert!(vec.capacity() >= 11);\n\n// A vector of a zero-sized type will always over-allocate, since no\n// allocation is necessary\nlet vec_units = Vec::<()>::with_capacity(10);\nassert_eq!(vec_units.capacity(), usize::MAX);
\n
source

pub fn try_with_capacity(capacity: usize) -> Result<Vec<T>, TryReserveError>

🔬This is a nightly-only experimental API. (try_with_capacity)

Constructs a new, empty Vec<T> with at least the specified capacity.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n
§Errors
\n

Returns an error if the capacity exceeds isize::MAX bytes,\nor if the allocator reports allocation failure.

\n
1.0.0 · source

pub unsafe fn from_raw_parts(\n ptr: *mut T,\n length: usize,\n capacity: usize,\n) -> Vec<T>

Creates a Vec<T> directly from a pointer, a length, and a capacity.

\n
§Safety
\n

This is highly unsafe, due to the number of invariants that aren’t\nchecked:

\n
    \n
  • ptr must have been allocated using the global allocator, such as via\nthe alloc::alloc function.
  • \n
  • T needs to have the same alignment as what ptr was allocated with.\n(T having a less strict alignment is not sufficient, the alignment really\nneeds to be equal to satisfy the dealloc requirement that memory must be\nallocated and deallocated with the same layout.)
  • \n
  • The size of T times the capacity (ie. the allocated size in bytes) needs\nto be the same size as the pointer was allocated with. (Because similar to\nalignment, dealloc must be called with the same layout size.)
  • \n
  • length needs to be less than or equal to capacity.
  • \n
  • The first length values must be properly initialized values of type T.
  • \n
  • capacity needs to be the capacity that the pointer was allocated with.
  • \n
  • The allocated size in bytes must be no larger than isize::MAX.\nSee the safety documentation of pointer::offset.
  • \n
\n

These requirements are always upheld by any ptr that has been allocated\nvia Vec<T>. Other allocation sources are allowed if the invariants are\nupheld.

\n

Violating these may cause problems like corrupting the allocator’s\ninternal data structures. For example it is normally not safe\nto build a Vec<u8> from a pointer to a C char array with length\nsize_t, doing so is only safe if the array was initially allocated by\na Vec or String.\nIt’s also not safe to build one from a Vec<u16> and its length, because\nthe allocator cares about the alignment, and these two types have different\nalignments. The buffer was allocated with alignment 2 (for u16), but after\nturning it into a Vec<u8> it’ll be deallocated with alignment 1. To avoid\nthese issues, it is often preferable to do casting/transmuting using\nslice::from_raw_parts instead.

\n

The ownership of ptr is effectively transferred to the\nVec<T> which may then deallocate, reallocate or change the\ncontents of memory pointed to by the pointer at will. Ensure\nthat nothing else uses the pointer after calling this\nfunction.

\n
§Examples
\n
use std::ptr;\nuse std::mem;\n\nlet v = vec![1, 2, 3];\n\n// Prevent running `v`'s destructor so we are in complete control\n// of the allocation.\nlet mut v = mem::ManuallyDrop::new(v);\n\n// Pull out the various important pieces of information about `v`\nlet p = v.as_mut_ptr();\nlet len = v.len();\nlet cap = v.capacity();\n\nunsafe {\n    // Overwrite memory with 4, 5, 6\n    for i in 0..len {\n        ptr::write(p.add(i), 4 + i);\n    }\n\n    // Put everything back together into a Vec\n    let rebuilt = Vec::from_raw_parts(p, len, cap);\n    assert_eq!(rebuilt, [4, 5, 6]);\n}
\n

Using memory that was allocated elsewhere:

\n\n
use std::alloc::{alloc, Layout};\n\nfn main() {\n    let layout = Layout::array::<u32>(16).expect(\"overflow cannot happen\");\n\n    let vec = unsafe {\n        let mem = alloc(layout).cast::<u32>();\n        if mem.is_null() {\n            return;\n        }\n\n        mem.write(1_000_000);\n\n        Vec::from_raw_parts(mem, 1, 16)\n    };\n\n    assert_eq!(vec, &[1_000_000]);\n    assert_eq!(vec.capacity(), 16);\n}
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n T: Clone,\n A: Allocator,

1.5.0 · source

pub fn resize(&mut self, new_len: usize, value: T)

Resizes the Vec in-place so that len is equal to new_len.

\n

If new_len is greater than len, the Vec is extended by the\ndifference, with each additional slot filled with value.\nIf new_len is less than len, the Vec is simply truncated.

\n

This method requires T to implement Clone,\nin order to be able to clone the passed value.\nIf you need more flexibility (or want to rely on Default instead of\nClone), use Vec::resize_with.\nIf you only need to resize to a smaller size, use Vec::truncate.

\n
§Examples
\n
let mut vec = vec![\"hello\"];\nvec.resize(3, \"world\");\nassert_eq!(vec, [\"hello\", \"world\", \"world\"]);\n\nlet mut vec = vec![1, 2, 3, 4];\nvec.resize(2, 0);\nassert_eq!(vec, [1, 2]);
\n
1.6.0 · source

pub fn extend_from_slice(&mut self, other: &[T])

Clones and appends all elements in a slice to the Vec.

\n

Iterates over the slice other, clones each element, and then appends\nit to this Vec. The other slice is traversed in-order.

\n

Note that this function is same as extend except that it is\nspecialized to work with slices instead. If and when Rust gets\nspecialization this function will likely be deprecated (but still\navailable).

\n
§Examples
\n
let mut vec = vec![1];\nvec.extend_from_slice(&[2, 3, 4]);\nassert_eq!(vec, [1, 2, 3, 4]);
\n
1.53.0 · source

pub fn extend_from_within<R>(&mut self, src: R)
where\n R: RangeBounds<usize>,

Copies elements from src range to the end of the vector.

\n
§Panics
\n

Panics if the starting point is greater than the end point or if\nthe end point is greater than the length of the vector.

\n
§Examples
\n
let mut vec = vec![0, 1, 2, 3, 4];\n\nvec.extend_from_within(2..);\nassert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4]);\n\nvec.extend_from_within(..2);\nassert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4, 0, 1]);\n\nvec.extend_from_within(4..8);\nassert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4, 0, 1, 4, 2, 3, 4]);
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n T: PartialEq,\n A: Allocator,

1.0.0 · source

pub fn dedup(&mut self)

Removes consecutive repeated elements in the vector according to the\nPartialEq trait implementation.

\n

If the vector is sorted, this removes all duplicates.

\n
§Examples
\n
let mut vec = vec![1, 2, 2, 3, 2];\n\nvec.dedup();\n\nassert_eq!(vec, [1, 2, 3, 2]);
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n A: Allocator,

1.21.0 · source

pub fn splice<R, I>(\n &mut self,\n range: R,\n replace_with: I,\n) -> Splice<'_, <I as IntoIterator>::IntoIter, A>
where\n R: RangeBounds<usize>,\n I: IntoIterator<Item = T>,

Creates a splicing iterator that replaces the specified range in the vector\nwith the given replace_with iterator and yields the removed items.\nreplace_with does not need to be the same length as range.

\n

range is removed even if the iterator is not consumed until the end.

\n

It is unspecified how many elements are removed from the vector\nif the Splice value is leaked.

\n

The input iterator replace_with is only consumed when the Splice value is dropped.

\n

This is optimal if:

\n
    \n
  • The tail (elements in the vector after range) is empty,
  • \n
  • or replace_with yields fewer or equal elements than range’s length
  • \n
  • or the lower bound of its size_hint() is exact.
  • \n
\n

Otherwise, a temporary vector is allocated and the tail is moved twice.

\n
§Panics
\n

Panics if the starting point is greater than the end point or if\nthe end point is greater than the length of the vector.

\n
§Examples
\n
let mut v = vec![1, 2, 3, 4];\nlet new = [7, 8, 9];\nlet u: Vec<_> = v.splice(1..3, new).collect();\nassert_eq!(v, &[1, 7, 8, 9, 4]);\nassert_eq!(u, &[2, 3]);
\n
source

pub fn extract_if<F>(&mut self, filter: F) -> ExtractIf<'_, T, F, A>
where\n F: FnMut(&mut T) -> bool,

🔬This is a nightly-only experimental API. (extract_if)

Creates an iterator which uses a closure to determine if an element should be removed.

\n

If the closure returns true, then the element is removed and yielded.\nIf the closure returns false, the element will remain in the vector and will not be yielded\nby the iterator.

\n

If the returned ExtractIf is not exhausted, e.g. because it is dropped without iterating\nor the iteration short-circuits, then the remaining elements will be retained.\nUse retain with a negated predicate if you do not need the returned iterator.

\n

Using this method is equivalent to the following code:

\n\n
let mut i = 0;\nwhile i < vec.len() {\n    if some_predicate(&mut vec[i]) {\n        let val = vec.remove(i);\n        // your code here\n    } else {\n        i += 1;\n    }\n}\n
\n

But extract_if is easier to use. extract_if is also more efficient,\nbecause it can backshift the elements of the array in bulk.

\n

Note that extract_if also lets you mutate every element in the filter closure,\nregardless of whether you choose to keep or remove it.

\n
§Examples
\n

Splitting an array into evens and odds, reusing the original allocation:

\n\n
#![feature(extract_if)]\nlet mut numbers = vec![1, 2, 3, 4, 5, 6, 8, 9, 11, 13, 14, 15];\n\nlet evens = numbers.extract_if(|x| *x % 2 == 0).collect::<Vec<_>>();\nlet odds = numbers;\n\nassert_eq!(evens, vec![2, 4, 6, 8, 14]);\nassert_eq!(odds, vec![1, 3, 5, 9, 11, 13, 15]);
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n A: Allocator,

source

pub const fn new_in(alloc: A) -> Vec<T, A>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new, empty Vec<T, A>.

\n

The vector will not allocate until elements are pushed onto it.

\n
§Examples
\n
#![feature(allocator_api)]\n\nuse std::alloc::System;\n\nlet mut vec: Vec<i32, _> = Vec::new_in(System);
\n
source

pub fn with_capacity_in(capacity: usize, alloc: A) -> Vec<T, A>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new, empty Vec<T, A> with at least the specified capacity\nwith the provided allocator.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n

It is important to note that although the returned vector has the\nminimum capacity specified, the vector will have a zero length. For\nan explanation of the difference between length and capacity, see\nCapacity and reallocation.

\n

If it is important to know the exact allocated capacity of a Vec,\nalways use the capacity method after construction.

\n

For Vec<T, A> where T is a zero-sized type, there will be no allocation\nand the capacity will always be usize::MAX.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
#![feature(allocator_api)]\n\nuse std::alloc::System;\n\nlet mut vec = Vec::with_capacity_in(10, System);\n\n// The vector contains no items, even though it has capacity for more\nassert_eq!(vec.len(), 0);\nassert!(vec.capacity() >= 10);\n\n// These are all done without reallocating...\nfor i in 0..10 {\n    vec.push(i);\n}\nassert_eq!(vec.len(), 10);\nassert!(vec.capacity() >= 10);\n\n// ...but this may make the vector reallocate\nvec.push(11);\nassert_eq!(vec.len(), 11);\nassert!(vec.capacity() >= 11);\n\n// A vector of a zero-sized type will always over-allocate, since no\n// allocation is necessary\nlet vec_units = Vec::<(), System>::with_capacity_in(10, System);\nassert_eq!(vec_units.capacity(), usize::MAX);
\n
source

pub fn try_with_capacity_in(\n capacity: usize,\n alloc: A,\n) -> Result<Vec<T, A>, TryReserveError>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new, empty Vec<T, A> with at least the specified capacity\nwith the provided allocator.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n
§Errors
\n

Returns an error if the capacity exceeds isize::MAX bytes,\nor if the allocator reports allocation failure.

\n
source

pub unsafe fn from_raw_parts_in(\n ptr: *mut T,\n length: usize,\n capacity: usize,\n alloc: A,\n) -> Vec<T, A>

🔬This is a nightly-only experimental API. (allocator_api)

Creates a Vec<T, A> directly from a pointer, a length, a capacity,\nand an allocator.

\n
§Safety
\n

This is highly unsafe, due to the number of invariants that aren’t\nchecked:

\n
    \n
  • ptr must be currently allocated via the given allocator alloc.
  • \n
  • T needs to have the same alignment as what ptr was allocated with.\n(T having a less strict alignment is not sufficient, the alignment really\nneeds to be equal to satisfy the dealloc requirement that memory must be\nallocated and deallocated with the same layout.)
  • \n
  • The size of T times the capacity (ie. the allocated size in bytes) needs\nto be the same size as the pointer was allocated with. (Because similar to\nalignment, dealloc must be called with the same layout size.)
  • \n
  • length needs to be less than or equal to capacity.
  • \n
  • The first length values must be properly initialized values of type T.
  • \n
  • capacity needs to fit the layout size that the pointer was allocated with.
  • \n
  • The allocated size in bytes must be no larger than isize::MAX.\nSee the safety documentation of pointer::offset.
  • \n
\n

These requirements are always upheld by any ptr that has been allocated\nvia Vec<T, A>. Other allocation sources are allowed if the invariants are\nupheld.

\n

Violating these may cause problems like corrupting the allocator’s\ninternal data structures. For example it is not safe\nto build a Vec<u8> from a pointer to a C char array with length size_t.\nIt’s also not safe to build one from a Vec<u16> and its length, because\nthe allocator cares about the alignment, and these two types have different\nalignments. The buffer was allocated with alignment 2 (for u16), but after\nturning it into a Vec<u8> it’ll be deallocated with alignment 1.

\n

The ownership of ptr is effectively transferred to the\nVec<T> which may then deallocate, reallocate or change the\ncontents of memory pointed to by the pointer at will. Ensure\nthat nothing else uses the pointer after calling this\nfunction.

\n
§Examples
\n
#![feature(allocator_api)]\n\nuse std::alloc::System;\n\nuse std::ptr;\nuse std::mem;\n\nlet mut v = Vec::with_capacity_in(3, System);\nv.push(1);\nv.push(2);\nv.push(3);\n\n// Prevent running `v`'s destructor so we are in complete control\n// of the allocation.\nlet mut v = mem::ManuallyDrop::new(v);\n\n// Pull out the various important pieces of information about `v`\nlet p = v.as_mut_ptr();\nlet len = v.len();\nlet cap = v.capacity();\nlet alloc = v.allocator();\n\nunsafe {\n    // Overwrite memory with 4, 5, 6\n    for i in 0..len {\n        ptr::write(p.add(i), 4 + i);\n    }\n\n    // Put everything back together into a Vec\n    let rebuilt = Vec::from_raw_parts_in(p, len, cap, alloc.clone());\n    assert_eq!(rebuilt, [4, 5, 6]);\n}
\n

Using memory that was allocated elsewhere:

\n\n
#![feature(allocator_api)]\n\nuse std::alloc::{AllocError, Allocator, Global, Layout};\n\nfn main() {\n    let layout = Layout::array::<u32>(16).expect(\"overflow cannot happen\");\n\n    let vec = unsafe {\n        let mem = match Global.allocate(layout) {\n            Ok(mem) => mem.cast::<u32>().as_ptr(),\n            Err(AllocError) => return,\n        };\n\n        mem.write(1_000_000);\n\n        Vec::from_raw_parts_in(mem, 1, 16, Global)\n    };\n\n    assert_eq!(vec, &[1_000_000]);\n    assert_eq!(vec.capacity(), 16);\n}
\n
source

pub fn into_raw_parts(self) -> (*mut T, usize, usize)

🔬This is a nightly-only experimental API. (vec_into_raw_parts)

Decomposes a Vec<T> into its raw components: (pointer, length, capacity).

\n

Returns the raw pointer to the underlying data, the length of\nthe vector (in elements), and the allocated capacity of the\ndata (in elements). These are the same arguments in the same\norder as the arguments to from_raw_parts.

\n

After calling this function, the caller is responsible for the\nmemory previously managed by the Vec. The only way to do\nthis is to convert the raw pointer, length, and capacity back\ninto a Vec with the from_raw_parts function, allowing\nthe destructor to perform the cleanup.

\n
§Examples
\n
#![feature(vec_into_raw_parts)]\nlet v: Vec<i32> = vec![-1, 0, 1];\n\nlet (ptr, len, cap) = v.into_raw_parts();\n\nlet rebuilt = unsafe {\n    // We can now make changes to the components, such as\n    // transmuting the raw pointer to a compatible type.\n    let ptr = ptr as *mut u32;\n\n    Vec::from_raw_parts(ptr, len, cap)\n};\nassert_eq!(rebuilt, [4294967295, 0, 1]);
\n
source

pub fn into_raw_parts_with_alloc(self) -> (*mut T, usize, usize, A)

🔬This is a nightly-only experimental API. (allocator_api)

Decomposes a Vec<T> into its raw components: (pointer, length, capacity, allocator).

\n

Returns the raw pointer to the underlying data, the length of the vector (in elements),\nthe allocated capacity of the data (in elements), and the allocator. These are the same\narguments in the same order as the arguments to from_raw_parts_in.

\n

After calling this function, the caller is responsible for the\nmemory previously managed by the Vec. The only way to do\nthis is to convert the raw pointer, length, and capacity back\ninto a Vec with the from_raw_parts_in function, allowing\nthe destructor to perform the cleanup.

\n
§Examples
\n
#![feature(allocator_api, vec_into_raw_parts)]\n\nuse std::alloc::System;\n\nlet mut v: Vec<i32, System> = Vec::new_in(System);\nv.push(-1);\nv.push(0);\nv.push(1);\n\nlet (ptr, len, cap, alloc) = v.into_raw_parts_with_alloc();\n\nlet rebuilt = unsafe {\n    // We can now make changes to the components, such as\n    // transmuting the raw pointer to a compatible type.\n    let ptr = ptr as *mut u32;\n\n    Vec::from_raw_parts_in(ptr, len, cap, alloc)\n};\nassert_eq!(rebuilt, [4294967295, 0, 1]);
\n
1.0.0 · source

pub fn capacity(&self) -> usize

Returns the total number of elements the vector can hold without\nreallocating.

\n
§Examples
\n
let mut vec: Vec<i32> = Vec::with_capacity(10);\nvec.push(42);\nassert!(vec.capacity() >= 10);
\n
1.0.0 · source

pub fn reserve(&mut self, additional: usize)

Reserves capacity for at least additional more elements to be inserted\nin the given Vec<T>. The collection may reserve more space to\nspeculatively avoid frequent reallocations. After calling reserve,\ncapacity will be greater than or equal to self.len() + additional.\nDoes nothing if capacity is already sufficient.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1];\nvec.reserve(10);\nassert!(vec.capacity() >= 11);
\n
1.0.0 · source

pub fn reserve_exact(&mut self, additional: usize)

Reserves the minimum capacity for at least additional more elements to\nbe inserted in the given Vec<T>. Unlike reserve, this will not\ndeliberately over-allocate to speculatively avoid frequent allocations.\nAfter calling reserve_exact, capacity will be greater than or equal to\nself.len() + additional. Does nothing if the capacity is already\nsufficient.

\n

Note that the allocator may give the collection more space than it\nrequests. Therefore, capacity can not be relied upon to be precisely\nminimal. Prefer reserve if future insertions are expected.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1];\nvec.reserve_exact(10);\nassert!(vec.capacity() >= 11);
\n
1.57.0 · source

pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>

Tries to reserve capacity for at least additional more elements to be inserted\nin the given Vec<T>. The collection may reserve more space to speculatively avoid\nfrequent reallocations. After calling try_reserve, capacity will be\ngreater than or equal to self.len() + additional if it returns\nOk(()). Does nothing if capacity is already sufficient. This method\npreserves the contents even if an error occurs.

\n
§Errors
\n

If the capacity overflows, or the allocator reports a failure, then an error\nis returned.

\n
§Examples
\n
use std::collections::TryReserveError;\n\nfn process_data(data: &[u32]) -> Result<Vec<u32>, TryReserveError> {\n    let mut output = Vec::new();\n\n    // Pre-reserve the memory, exiting if we can't\n    output.try_reserve(data.len())?;\n\n    // Now we know this can't OOM in the middle of our complex work\n    output.extend(data.iter().map(|&val| {\n        val * 2 + 5 // very complicated\n    }));\n\n    Ok(output)\n}
\n
1.57.0 · source

pub fn try_reserve_exact(\n &mut self,\n additional: usize,\n) -> Result<(), TryReserveError>

Tries to reserve the minimum capacity for at least additional\nelements to be inserted in the given Vec<T>. Unlike try_reserve,\nthis will not deliberately over-allocate to speculatively avoid frequent\nallocations. After calling try_reserve_exact, capacity will be greater\nthan or equal to self.len() + additional if it returns Ok(()).\nDoes nothing if the capacity is already sufficient.

\n

Note that the allocator may give the collection more space than it\nrequests. Therefore, capacity can not be relied upon to be precisely\nminimal. Prefer try_reserve if future insertions are expected.

\n
§Errors
\n

If the capacity overflows, or the allocator reports a failure, then an error\nis returned.

\n
§Examples
\n
use std::collections::TryReserveError;\n\nfn process_data(data: &[u32]) -> Result<Vec<u32>, TryReserveError> {\n    let mut output = Vec::new();\n\n    // Pre-reserve the memory, exiting if we can't\n    output.try_reserve_exact(data.len())?;\n\n    // Now we know this can't OOM in the middle of our complex work\n    output.extend(data.iter().map(|&val| {\n        val * 2 + 5 // very complicated\n    }));\n\n    Ok(output)\n}
\n
1.0.0 · source

pub fn shrink_to_fit(&mut self)

Shrinks the capacity of the vector as much as possible.

\n

The behavior of this method depends on the allocator, which may either shrink the vector\nin-place or reallocate. The resulting vector might still have some excess capacity, just as\nis the case for with_capacity. See Allocator::shrink for more details.

\n
§Examples
\n
let mut vec = Vec::with_capacity(10);\nvec.extend([1, 2, 3]);\nassert!(vec.capacity() >= 10);\nvec.shrink_to_fit();\nassert!(vec.capacity() >= 3);
\n
1.56.0 · source

pub fn shrink_to(&mut self, min_capacity: usize)

Shrinks the capacity of the vector with a lower bound.

\n

The capacity will remain at least as large as both the length\nand the supplied value.

\n

If the current capacity is less than the lower limit, this is a no-op.

\n
§Examples
\n
let mut vec = Vec::with_capacity(10);\nvec.extend([1, 2, 3]);\nassert!(vec.capacity() >= 10);\nvec.shrink_to(4);\nassert!(vec.capacity() >= 4);\nvec.shrink_to(0);\nassert!(vec.capacity() >= 3);
\n
1.0.0 · source

pub fn into_boxed_slice(self) -> Box<[T], A>

Converts the vector into Box<[T]>.

\n

Before doing the conversion, this method discards excess capacity like shrink_to_fit.

\n
§Examples
\n
let v = vec![1, 2, 3];\n\nlet slice = v.into_boxed_slice();
\n

Any excess capacity is removed:

\n\n
let mut vec = Vec::with_capacity(10);\nvec.extend([1, 2, 3]);\n\nassert!(vec.capacity() >= 10);\nlet slice = vec.into_boxed_slice();\nassert_eq!(slice.into_vec().capacity(), 3);
\n
1.0.0 · source

pub fn truncate(&mut self, len: usize)

Shortens the vector, keeping the first len elements and dropping\nthe rest.

\n

If len is greater or equal to the vector’s current length, this has\nno effect.

\n

The drain method can emulate truncate, but causes the excess\nelements to be returned instead of dropped.

\n

Note that this method has no effect on the allocated capacity\nof the vector.

\n
§Examples
\n

Truncating a five element vector to two elements:

\n\n
let mut vec = vec![1, 2, 3, 4, 5];\nvec.truncate(2);\nassert_eq!(vec, [1, 2]);
\n

No truncation occurs when len is greater than the vector’s current\nlength:

\n\n
let mut vec = vec![1, 2, 3];\nvec.truncate(8);\nassert_eq!(vec, [1, 2, 3]);
\n

Truncating when len == 0 is equivalent to calling the clear\nmethod.

\n\n
let mut vec = vec![1, 2, 3];\nvec.truncate(0);\nassert_eq!(vec, []);
\n
1.7.0 · source

pub fn as_slice(&self) -> &[T]

Extracts a slice containing the entire vector.

\n

Equivalent to &s[..].

\n
§Examples
\n
use std::io::{self, Write};\nlet buffer = vec![1, 2, 3, 5, 8];\nio::sink().write(buffer.as_slice()).unwrap();
\n
1.7.0 · source

pub fn as_mut_slice(&mut self) -> &mut [T]

Extracts a mutable slice of the entire vector.

\n

Equivalent to &mut s[..].

\n
§Examples
\n
use std::io::{self, Read};\nlet mut buffer = vec![0; 3];\nio::repeat(0b101).read_exact(buffer.as_mut_slice()).unwrap();
\n
1.37.0 · source

pub fn as_ptr(&self) -> *const T

Returns a raw pointer to the vector’s buffer, or a dangling raw pointer\nvalid for zero sized reads if the vector didn’t allocate.

\n

The caller must ensure that the vector outlives the pointer this\nfunction returns, or else it will end up pointing to garbage.\nModifying the vector may cause its buffer to be reallocated,\nwhich would also make any pointers to it invalid.

\n

The caller must also ensure that the memory the pointer (non-transitively) points to\nis never written to (except inside an UnsafeCell) using this pointer or any pointer\nderived from it. If you need to mutate the contents of the slice, use as_mut_ptr.

\n

This method guarantees that for the purpose of the aliasing model, this method\ndoes not materialize a reference to the underlying slice, and thus the returned pointer\nwill remain valid when mixed with other calls to as_ptr and as_mut_ptr.\nNote that calling other methods that materialize mutable references to the slice,\nor mutable references to specific elements you are planning on accessing through this pointer,\nas well as writing to those elements, may still invalidate this pointer.\nSee the second example below for how this guarantee can be used.

\n
§Examples
\n
let x = vec![1, 2, 4];\nlet x_ptr = x.as_ptr();\n\nunsafe {\n    for i in 0..x.len() {\n        assert_eq!(*x_ptr.add(i), 1 << i);\n    }\n}
\n

Due to the aliasing guarantee, the following code is legal:

\n\n
unsafe {\n    let mut v = vec![0, 1, 2];\n    let ptr1 = v.as_ptr();\n    let _ = ptr1.read();\n    let ptr2 = v.as_mut_ptr().offset(2);\n    ptr2.write(2);\n    // Notably, the write to `ptr2` did *not* invalidate `ptr1`\n    // because it mutated a different element:\n    let _ = ptr1.read();\n}
\n
1.37.0 · source

pub fn as_mut_ptr(&mut self) -> *mut T

Returns an unsafe mutable pointer to the vector’s buffer, or a dangling\nraw pointer valid for zero sized reads if the vector didn’t allocate.

\n

The caller must ensure that the vector outlives the pointer this\nfunction returns, or else it will end up pointing to garbage.\nModifying the vector may cause its buffer to be reallocated,\nwhich would also make any pointers to it invalid.

\n

This method guarantees that for the purpose of the aliasing model, this method\ndoes not materialize a reference to the underlying slice, and thus the returned pointer\nwill remain valid when mixed with other calls to as_ptr and as_mut_ptr.\nNote that calling other methods that materialize references to the slice,\nor references to specific elements you are planning on accessing through this pointer,\nmay still invalidate this pointer.\nSee the second example below for how this guarantee can be used.

\n
§Examples
\n
// Allocate vector big enough for 4 elements.\nlet size = 4;\nlet mut x: Vec<i32> = Vec::with_capacity(size);\nlet x_ptr = x.as_mut_ptr();\n\n// Initialize elements via raw pointer writes, then set length.\nunsafe {\n    for i in 0..size {\n        *x_ptr.add(i) = i as i32;\n    }\n    x.set_len(size);\n}\nassert_eq!(&*x, &[0, 1, 2, 3]);
\n

Due to the aliasing guarantee, the following code is legal:

\n\n
unsafe {\n    let mut v = vec![0];\n    let ptr1 = v.as_mut_ptr();\n    ptr1.write(1);\n    let ptr2 = v.as_mut_ptr();\n    ptr2.write(2);\n    // Notably, the write to `ptr2` did *not* invalidate `ptr1`:\n    ptr1.write(3);\n}
\n
source

pub fn allocator(&self) -> &A

🔬This is a nightly-only experimental API. (allocator_api)

Returns a reference to the underlying allocator.

\n
1.0.0 · source

pub unsafe fn set_len(&mut self, new_len: usize)

Forces the length of the vector to new_len.

\n

This is a low-level operation that maintains none of the normal\ninvariants of the type. Normally changing the length of a vector\nis done using one of the safe operations instead, such as\ntruncate, resize, extend, or clear.

\n
§Safety
\n
    \n
  • new_len must be less than or equal to capacity().
  • \n
  • The elements at old_len..new_len must be initialized.
  • \n
\n
§Examples
\n

This method can be useful for situations in which the vector\nis serving as a buffer for other code, particularly over FFI:

\n\n
pub fn get_dictionary(&self) -> Option<Vec<u8>> {\n    // Per the FFI method's docs, \"32768 bytes is always enough\".\n    let mut dict = Vec::with_capacity(32_768);\n    let mut dict_length = 0;\n    // SAFETY: When `deflateGetDictionary` returns `Z_OK`, it holds that:\n    // 1. `dict_length` elements were initialized.\n    // 2. `dict_length` <= the capacity (32_768)\n    // which makes `set_len` safe to call.\n    unsafe {\n        // Make the FFI call...\n        let r = deflateGetDictionary(self.strm, dict.as_mut_ptr(), &mut dict_length);\n        if r == Z_OK {\n            // ...and update the length to what was initialized.\n            dict.set_len(dict_length);\n            Some(dict)\n        } else {\n            None\n        }\n    }\n}
\n

While the following example is sound, there is a memory leak since\nthe inner vectors were not freed prior to the set_len call:

\n\n
let mut vec = vec![vec![1, 0, 0],\n                   vec![0, 1, 0],\n                   vec![0, 0, 1]];\n// SAFETY:\n// 1. `old_len..0` is empty so no elements need to be initialized.\n// 2. `0 <= capacity` always holds whatever `capacity` is.\nunsafe {\n    vec.set_len(0);\n}
\n

Normally, here, one would use clear instead to correctly drop\nthe contents and thus not leak memory.

\n
1.0.0 · source

pub fn swap_remove(&mut self, index: usize) -> T

Removes an element from the vector and returns it.

\n

The removed element is replaced by the last element of the vector.

\n

This does not preserve ordering of the remaining elements, but is O(1).\nIf you need to preserve the element order, use remove instead.

\n
§Panics
\n

Panics if index is out of bounds.

\n
§Examples
\n
let mut v = vec![\"foo\", \"bar\", \"baz\", \"qux\"];\n\nassert_eq!(v.swap_remove(1), \"bar\");\nassert_eq!(v, [\"foo\", \"qux\", \"baz\"]);\n\nassert_eq!(v.swap_remove(0), \"foo\");\nassert_eq!(v, [\"baz\", \"qux\"]);
\n
1.0.0 · source

pub fn insert(&mut self, index: usize, element: T)

Inserts an element at position index within the vector, shifting all\nelements after it to the right.

\n
§Panics
\n

Panics if index > len.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nvec.insert(1, 4);\nassert_eq!(vec, [1, 4, 2, 3]);\nvec.insert(4, 5);\nassert_eq!(vec, [1, 4, 2, 3, 5]);
\n
§Time complexity
\n

Takes O(Vec::len) time. All items after the insertion index must be\nshifted to the right. In the worst case, all elements are shifted when\nthe insertion index is 0.

\n
1.0.0 · source

pub fn remove(&mut self, index: usize) -> T

Removes and returns the element at position index within the vector,\nshifting all elements after it to the left.

\n

Note: Because this shifts over the remaining elements, it has a\nworst-case performance of O(n). If you don’t need the order of elements\nto be preserved, use swap_remove instead. If you’d like to remove\nelements from the beginning of the Vec, consider using\nVecDeque::pop_front instead.

\n
§Panics
\n

Panics if index is out of bounds.

\n
§Examples
\n
let mut v = vec![1, 2, 3];\nassert_eq!(v.remove(1), 2);\nassert_eq!(v, [1, 3]);
\n
1.0.0 · source

pub fn retain<F>(&mut self, f: F)
where\n F: FnMut(&T) -> bool,

Retains only the elements specified by the predicate.

\n

In other words, remove all elements e for which f(&e) returns false.\nThis method operates in place, visiting each element exactly once in the\noriginal order, and preserves the order of the retained elements.

\n
§Examples
\n
let mut vec = vec![1, 2, 3, 4];\nvec.retain(|&x| x % 2 == 0);\nassert_eq!(vec, [2, 4]);
\n

Because the elements are visited exactly once in the original order,\nexternal state may be used to decide which elements to keep.

\n\n
let mut vec = vec![1, 2, 3, 4, 5];\nlet keep = [false, true, true, false, true];\nlet mut iter = keep.iter();\nvec.retain(|_| *iter.next().unwrap());\nassert_eq!(vec, [2, 3, 5]);
\n
1.61.0 · source

pub fn retain_mut<F>(&mut self, f: F)
where\n F: FnMut(&mut T) -> bool,

Retains only the elements specified by the predicate, passing a mutable reference to it.

\n

In other words, remove all elements e such that f(&mut e) returns false.\nThis method operates in place, visiting each element exactly once in the\noriginal order, and preserves the order of the retained elements.

\n
§Examples
\n
let mut vec = vec![1, 2, 3, 4];\nvec.retain_mut(|x| if *x <= 3 {\n    *x += 1;\n    true\n} else {\n    false\n});\nassert_eq!(vec, [2, 3, 4]);
\n
1.16.0 · source

pub fn dedup_by_key<F, K>(&mut self, key: F)
where\n F: FnMut(&mut T) -> K,\n K: PartialEq,

Removes all but the first of consecutive elements in the vector that resolve to the same\nkey.

\n

If the vector is sorted, this removes all duplicates.

\n
§Examples
\n
let mut vec = vec![10, 20, 21, 30, 20];\n\nvec.dedup_by_key(|i| *i / 10);\n\nassert_eq!(vec, [10, 20, 30, 20]);
\n
1.16.0 · source

pub fn dedup_by<F>(&mut self, same_bucket: F)
where\n F: FnMut(&mut T, &mut T) -> bool,

Removes all but the first of consecutive elements in the vector satisfying a given equality\nrelation.

\n

The same_bucket function is passed references to two elements from the vector and\nmust determine if the elements compare equal. The elements are passed in opposite order\nfrom their order in the slice, so if same_bucket(a, b) returns true, a is removed.

\n

If the vector is sorted, this removes all duplicates.

\n
§Examples
\n
let mut vec = vec![\"foo\", \"bar\", \"Bar\", \"baz\", \"bar\"];\n\nvec.dedup_by(|a, b| a.eq_ignore_ascii_case(b));\n\nassert_eq!(vec, [\"foo\", \"bar\", \"baz\", \"bar\"]);
\n
1.0.0 · source

pub fn push(&mut self, value: T)

Appends an element to the back of a collection.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1, 2];\nvec.push(3);\nassert_eq!(vec, [1, 2, 3]);
\n
§Time complexity
\n

Takes amortized O(1) time. If the vector’s length would exceed its\ncapacity after the push, O(capacity) time is taken to copy the\nvector’s elements to a larger allocation. This expensive operation is\noffset by the capacity O(1) insertions it allows.

\n
source

pub fn push_within_capacity(&mut self, value: T) -> Result<(), T>

🔬This is a nightly-only experimental API. (vec_push_within_capacity)

Appends an element if there is sufficient spare capacity, otherwise an error is returned\nwith the element.

\n

Unlike push this method will not reallocate when there’s insufficient capacity.\nThe caller should use reserve or try_reserve to ensure that there is enough capacity.

\n
§Examples
\n

A manual, panic-free alternative to FromIterator:

\n\n
#![feature(vec_push_within_capacity)]\n\nuse std::collections::TryReserveError;\nfn from_iter_fallible<T>(iter: impl Iterator<Item=T>) -> Result<Vec<T>, TryReserveError> {\n    let mut vec = Vec::new();\n    for value in iter {\n        if let Err(value) = vec.push_within_capacity(value) {\n            vec.try_reserve(1)?;\n            // this cannot fail, the previous line either returned or added at least 1 free slot\n            let _ = vec.push_within_capacity(value);\n        }\n    }\n    Ok(vec)\n}\nassert_eq!(from_iter_fallible(0..100), Ok(Vec::from_iter(0..100)));
\n
§Time complexity
\n

Takes O(1) time.

\n
1.0.0 · source

pub fn pop(&mut self) -> Option<T>

Removes the last element from a vector and returns it, or None if it\nis empty.

\n

If you’d like to pop the first element, consider using\nVecDeque::pop_front instead.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nassert_eq!(vec.pop(), Some(3));\nassert_eq!(vec, [1, 2]);
\n
§Time complexity
\n

Takes O(1) time.

\n
source

pub fn pop_if<F>(&mut self, f: F) -> Option<T>
where\n F: FnOnce(&mut T) -> bool,

🔬This is a nightly-only experimental API. (vec_pop_if)

Removes and returns the last element in a vector if the predicate\nreturns true, or None if the predicate returns false or the vector\nis empty.

\n
§Examples
\n
#![feature(vec_pop_if)]\n\nlet mut vec = vec![1, 2, 3, 4];\nlet pred = |x: &mut i32| *x % 2 == 0;\n\nassert_eq!(vec.pop_if(pred), Some(4));\nassert_eq!(vec, [1, 2, 3]);\nassert_eq!(vec.pop_if(pred), None);
\n
1.4.0 · source

pub fn append(&mut self, other: &mut Vec<T, A>)

Moves all the elements of other into self, leaving other empty.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nlet mut vec2 = vec![4, 5, 6];\nvec.append(&mut vec2);\nassert_eq!(vec, [1, 2, 3, 4, 5, 6]);\nassert_eq!(vec2, []);
\n
1.6.0 · source

pub fn drain<R>(&mut self, range: R) -> Drain<'_, T, A>
where\n R: RangeBounds<usize>,

Removes the specified range from the vector in bulk, returning all\nremoved elements as an iterator. If the iterator is dropped before\nbeing fully consumed, it drops the remaining removed elements.

\n

The returned iterator keeps a mutable borrow on the vector to optimize\nits implementation.

\n
§Panics
\n

Panics if the starting point is greater than the end point or if\nthe end point is greater than the length of the vector.

\n
§Leaking
\n

If the returned iterator goes out of scope without being dropped (due to\nmem::forget, for example), the vector may have lost and leaked\nelements arbitrarily, including elements outside the range.

\n
§Examples
\n
let mut v = vec![1, 2, 3];\nlet u: Vec<_> = v.drain(1..).collect();\nassert_eq!(v, &[1]);\nassert_eq!(u, &[2, 3]);\n\n// A full range clears the vector, like `clear()` does\nv.drain(..);\nassert_eq!(v, &[]);
\n
1.0.0 · source

pub fn clear(&mut self)

Clears the vector, removing all values.

\n

Note that this method has no effect on the allocated capacity\nof the vector.

\n
§Examples
\n
let mut v = vec![1, 2, 3];\n\nv.clear();\n\nassert!(v.is_empty());
\n
1.0.0 · source

pub fn len(&self) -> usize

Returns the number of elements in the vector, also referred to\nas its ‘length’.

\n
§Examples
\n
let a = vec![1, 2, 3];\nassert_eq!(a.len(), 3);
\n
1.0.0 · source

pub fn is_empty(&self) -> bool

Returns true if the vector contains no elements.

\n
§Examples
\n
let mut v = Vec::new();\nassert!(v.is_empty());\n\nv.push(1);\nassert!(!v.is_empty());
\n
1.4.0 · source

pub fn split_off(&mut self, at: usize) -> Vec<T, A>
where\n A: Clone,

Splits the collection into two at the given index.

\n

Returns a newly allocated vector containing the elements in the range\n[at, len). After the call, the original vector will be left containing\nthe elements [0, at) with its previous capacity unchanged.

\n
    \n
  • If you want to take ownership of the entire contents and capacity of\nthe vector, see mem::take or mem::replace.
  • \n
  • If you don’t need the returned vector at all, see Vec::truncate.
  • \n
  • If you want to take ownership of an arbitrary subslice, or you don’t\nnecessarily want to store the removed items in a vector, see Vec::drain.
  • \n
\n
§Panics
\n

Panics if at > len.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nlet vec2 = vec.split_off(1);\nassert_eq!(vec, [1]);\nassert_eq!(vec2, [2, 3]);
\n
1.33.0 · source

pub fn resize_with<F>(&mut self, new_len: usize, f: F)
where\n F: FnMut() -> T,

Resizes the Vec in-place so that len is equal to new_len.

\n

If new_len is greater than len, the Vec is extended by the\ndifference, with each additional slot filled with the result of\ncalling the closure f. The return values from f will end up\nin the Vec in the order they have been generated.

\n

If new_len is less than len, the Vec is simply truncated.

\n

This method uses a closure to create new values on every push. If\nyou’d rather Clone a given value, use Vec::resize. If you\nwant to use the Default trait to generate values, you can\npass Default::default as the second argument.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nvec.resize_with(5, Default::default);\nassert_eq!(vec, [1, 2, 3, 0, 0]);\n\nlet mut vec = vec![];\nlet mut p = 1;\nvec.resize_with(4, || { p *= 2; p });\nassert_eq!(vec, [2, 4, 8, 16]);
\n
1.47.0 · source

pub fn leak<'a>(self) -> &'a mut [T]
where\n A: 'a,

Consumes and leaks the Vec, returning a mutable reference to the contents,\n&'a mut [T]. Note that the type T must outlive the chosen lifetime\n'a. If the type has only static references, or none at all, then this\nmay be chosen to be 'static.

\n

As of Rust 1.57, this method does not reallocate or shrink the Vec,\nso the leaked allocation may include unused capacity that is not part\nof the returned slice.

\n

This function is mainly useful for data that lives for the remainder of\nthe program’s life. Dropping the returned reference will cause a memory\nleak.

\n
§Examples
\n

Simple usage:

\n\n
let x = vec![1, 2, 3];\nlet static_ref: &'static mut [usize] = x.leak();\nstatic_ref[0] += 1;\nassert_eq!(static_ref, &[2, 2, 3]);
\n
1.60.0 · source

pub fn spare_capacity_mut(&mut self) -> &mut [MaybeUninit<T>]

Returns the remaining spare capacity of the vector as a slice of\nMaybeUninit<T>.

\n

The returned slice can be used to fill the vector with data (e.g. by\nreading from a file) before marking the data as initialized using the\nset_len method.

\n
§Examples
\n
// Allocate vector big enough for 10 elements.\nlet mut v = Vec::with_capacity(10);\n\n// Fill in the first 3 elements.\nlet uninit = v.spare_capacity_mut();\nuninit[0].write(0);\nuninit[1].write(1);\nuninit[2].write(2);\n\n// Mark the first 3 elements of the vector as being initialized.\nunsafe {\n    v.set_len(3);\n}\n\nassert_eq!(&v, &[0, 1, 2]);
\n
source

pub fn split_at_spare_mut(&mut self) -> (&mut [T], &mut [MaybeUninit<T>])

🔬This is a nightly-only experimental API. (vec_split_at_spare)

Returns vector content as a slice of T, along with the remaining spare\ncapacity of the vector as a slice of MaybeUninit<T>.

\n

The returned spare capacity slice can be used to fill the vector with data\n(e.g. by reading from a file) before marking the data as initialized using\nthe set_len method.

\n

Note that this is a low-level API, which should be used with care for\noptimization purposes. If you need to append data to a Vec\nyou can use push, extend, extend_from_slice,\nextend_from_within, insert, append, resize or\nresize_with, depending on your exact needs.

\n
§Examples
\n
#![feature(vec_split_at_spare)]\n\nlet mut v = vec![1, 1, 2];\n\n// Reserve additional space big enough for 10 elements.\nv.reserve(10);\n\nlet (init, uninit) = v.split_at_spare_mut();\nlet sum = init.iter().copied().sum::<u32>();\n\n// Fill in the next 4 elements.\nuninit[0].write(sum);\nuninit[1].write(sum * 2);\nuninit[2].write(sum * 3);\nuninit[3].write(sum * 4);\n\n// Mark the 4 elements of the vector as being initialized.\nunsafe {\n    let len = v.len();\n    v.set_len(len + 4);\n}\n\nassert_eq!(&v, &[1, 1, 2, 4, 8, 12, 16]);
\n
",0,"redstone::core::aggregator::Matrix"],["
§

impl<Z> Zeroize for Vec<Z>
where\n Z: Zeroize,

§

fn zeroize(&mut self)

“Best effort” zeroization for Vec.

\n

Ensures the entire capacity of the Vec is zeroed. Cannot ensure that\nprevious reallocations did not leave values on the heap.

\n
","Zeroize","redstone::core::aggregator::Matrix"],["
source§

impl<T, A> DerefPure for Vec<T, A>
where\n A: Allocator,

","DerefPure","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Eq for Vec<T, A>
where\n T: Eq,\n A: Allocator,

","Eq","redstone::core::aggregator::Matrix"],["
§

impl<Z> ZeroizeOnDrop for Vec<Z>
where\n Z: ZeroizeOnDrop,

","ZeroizeOnDrop","redstone::core::aggregator::Matrix"]] };if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/type.impl/redstone/network/casper/struct.Casper.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/type.impl/redstone/network/casper/struct.Casper.js index cadcd6d3..dd6dda89 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/type.impl/redstone/network/casper/struct.Casper.js +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/type.impl/redstone/network/casper/struct.Casper.js @@ -1,3 +1,3 @@ (function() {var type_impls = { -"redstone":[["
source§

impl NetworkSpecific for Casper

","NetworkSpecific","redstone::network::_Network"]] +"redstone":[["
source§

impl NetworkSpecific for Casper

","NetworkSpecific","redstone::network::_Network"]] };if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/type.impl/std/primitive.array.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/type.impl/std/primitive.array.js new file mode 100644 index 00000000..ac9f1135 --- /dev/null +++ b/static/rust/redstone/crypto_secp256k1,network_casper/doc/type.impl/std/primitive.array.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"redstone":[["
source§

impl<T, const N: usize> [T; N]

1.55.0 · source

pub fn map<F, U>(self, f: F) -> [U; N]
where\n F: FnMut(T) -> U,

Returns an array of the same size as self, with function f applied to each element\nin order.

\n

If you don’t necessarily need a new fixed-size array, consider using\nIterator::map instead.

\n
§Note on performance and stack usage
\n

Unfortunately, usages of this method are currently not always optimized\nas well as they could be. This mainly concerns large arrays, as mapping\nover small arrays seem to be optimized just fine. Also note that in\ndebug mode (i.e. without any optimizations), this method can use a lot\nof stack space (a few times the size of the array or more).

\n

Therefore, in performance-critical code, try to avoid using this method\non large arrays or check the emitted code. Also try to avoid chained\nmaps (e.g. arr.map(...).map(...)).

\n

In many cases, you can instead use Iterator::map by calling .iter()\nor .into_iter() on your array. [T; N]::map is only necessary if you\nreally need a new array of the same size as the result. Rust’s lazy\niterators tend to get optimized very well.

\n
§Examples
\n
let x = [1, 2, 3];\nlet y = x.map(|v| v + 1);\nassert_eq!(y, [2, 3, 4]);\n\nlet x = [1, 2, 3];\nlet mut temp = 0;\nlet y = x.map(|v| { temp += 1; v * temp });\nassert_eq!(y, [1, 4, 9]);\n\nlet x = [\"Ferris\", \"Bueller's\", \"Day\", \"Off\"];\nlet y = x.map(|v| v.len());\nassert_eq!(y, [6, 9, 3, 3]);
\n
source

pub fn try_map<R>(\n self,\n f: impl FnMut(T) -> R,\n) -> <<R as Try>::Residual as Residual<[<R as Try>::Output; N]>>::TryType
where\n R: Try,\n <R as Try>::Residual: Residual<[<R as Try>::Output; N]>,

🔬This is a nightly-only experimental API. (array_try_map)

A fallible function f applied to each element on array self in order to\nreturn an array the same size as self or the first error encountered.

\n

The return type of this function depends on the return type of the closure.\nIf you return Result<T, E> from the closure, you’ll get a Result<[T; N], E>.\nIf you return Option<T> from the closure, you’ll get an Option<[T; N]>.

\n
§Examples
\n
#![feature(array_try_map)]\n\nlet a = [\"1\", \"2\", \"3\"];\nlet b = a.try_map(|v| v.parse::<u32>()).unwrap().map(|v| v + 1);\nassert_eq!(b, [2, 3, 4]);\n\nlet a = [\"1\", \"2a\", \"3\"];\nlet b = a.try_map(|v| v.parse::<u32>());\nassert!(b.is_err());\n\nuse std::num::NonZero;\n\nlet z = [1, 2, 0, 3, 4];\nassert_eq!(z.try_map(NonZero::new), None);\n\nlet a = [1, 2, 3];\nlet b = a.try_map(NonZero::new);\nlet c = b.map(|x| x.map(NonZero::get));\nassert_eq!(c, Some(a));
\n
1.57.0 (const: 1.57.0) · source

pub const fn as_slice(&self) -> &[T]

Returns a slice containing the entire array. Equivalent to &s[..].

\n
1.57.0 · source

pub fn as_mut_slice(&mut self) -> &mut [T]

Returns a mutable slice containing the entire array. Equivalent to\n&mut s[..].

\n
1.77.0 · source

pub fn each_ref(&self) -> [&T; N]

Borrows each element and returns an array of references with the same\nsize as self.

\n
§Example
\n
let floats = [3.1, 2.7, -1.0];\nlet float_refs: [&f64; 3] = floats.each_ref();\nassert_eq!(float_refs, [&3.1, &2.7, &-1.0]);
\n

This method is particularly useful if combined with other methods, like\nmap. This way, you can avoid moving the original\narray if its elements are not Copy.

\n\n
let strings = [\"Ferris\".to_string(), \"♥\".to_string(), \"Rust\".to_string()];\nlet is_ascii = strings.each_ref().map(|s| s.is_ascii());\nassert_eq!(is_ascii, [true, false, true]);\n\n// We can still access the original array: it has not been moved.\nassert_eq!(strings.len(), 3);
\n
1.77.0 · source

pub fn each_mut(&mut self) -> [&mut T; N]

Borrows each element mutably and returns an array of mutable references\nwith the same size as self.

\n
§Example
\n
\nlet mut floats = [3.1, 2.7, -1.0];\nlet float_refs: [&mut f64; 3] = floats.each_mut();\n*float_refs[0] = 0.0;\nassert_eq!(float_refs, [&mut 0.0, &mut 2.7, &mut -1.0]);\nassert_eq!(floats, [0.0, 2.7, -1.0]);
\n
source

pub fn split_array_ref<const M: usize>(&self) -> (&[T; M], &[T])

🔬This is a nightly-only experimental API. (split_array)

Divides one array reference into two at an index.

\n

The first will contain all indices from [0, M) (excluding\nthe index M itself) and the second will contain all\nindices from [M, N) (excluding the index N itself).

\n
§Panics
\n

Panics if M > N.

\n
§Examples
\n
#![feature(split_array)]\n\nlet v = [1, 2, 3, 4, 5, 6];\n\n{\n   let (left, right) = v.split_array_ref::<0>();\n   assert_eq!(left, &[]);\n   assert_eq!(right, &[1, 2, 3, 4, 5, 6]);\n}\n\n{\n    let (left, right) = v.split_array_ref::<2>();\n    assert_eq!(left, &[1, 2]);\n    assert_eq!(right, &[3, 4, 5, 6]);\n}\n\n{\n    let (left, right) = v.split_array_ref::<6>();\n    assert_eq!(left, &[1, 2, 3, 4, 5, 6]);\n    assert_eq!(right, &[]);\n}
\n
source

pub fn split_array_mut<const M: usize>(&mut self) -> (&mut [T; M], &mut [T])

🔬This is a nightly-only experimental API. (split_array)

Divides one mutable array reference into two at an index.

\n

The first will contain all indices from [0, M) (excluding\nthe index M itself) and the second will contain all\nindices from [M, N) (excluding the index N itself).

\n
§Panics
\n

Panics if M > N.

\n
§Examples
\n
#![feature(split_array)]\n\nlet mut v = [1, 0, 3, 0, 5, 6];\nlet (left, right) = v.split_array_mut::<2>();\nassert_eq!(left, &mut [1, 0][..]);\nassert_eq!(right, &mut [3, 0, 5, 6]);\nleft[1] = 2;\nright[1] = 4;\nassert_eq!(v, [1, 2, 3, 4, 5, 6]);
\n
source

pub fn rsplit_array_ref<const M: usize>(&self) -> (&[T], &[T; M])

🔬This is a nightly-only experimental API. (split_array)

Divides one array reference into two at an index from the end.

\n

The first will contain all indices from [0, N - M) (excluding\nthe index N - M itself) and the second will contain all\nindices from [N - M, N) (excluding the index N itself).

\n
§Panics
\n

Panics if M > N.

\n
§Examples
\n
#![feature(split_array)]\n\nlet v = [1, 2, 3, 4, 5, 6];\n\n{\n   let (left, right) = v.rsplit_array_ref::<0>();\n   assert_eq!(left, &[1, 2, 3, 4, 5, 6]);\n   assert_eq!(right, &[]);\n}\n\n{\n    let (left, right) = v.rsplit_array_ref::<2>();\n    assert_eq!(left, &[1, 2, 3, 4]);\n    assert_eq!(right, &[5, 6]);\n}\n\n{\n    let (left, right) = v.rsplit_array_ref::<6>();\n    assert_eq!(left, &[]);\n    assert_eq!(right, &[1, 2, 3, 4, 5, 6]);\n}
\n
source

pub fn rsplit_array_mut<const M: usize>(&mut self) -> (&mut [T], &mut [T; M])

🔬This is a nightly-only experimental API. (split_array)

Divides one mutable array reference into two at an index from the end.

\n

The first will contain all indices from [0, N - M) (excluding\nthe index N - M itself) and the second will contain all\nindices from [N - M, N) (excluding the index N itself).

\n
§Panics
\n

Panics if M > N.

\n
§Examples
\n
#![feature(split_array)]\n\nlet mut v = [1, 0, 3, 0, 5, 6];\nlet (left, right) = v.rsplit_array_mut::<4>();\nassert_eq!(left, &mut [1, 0]);\nassert_eq!(right, &mut [3, 0, 5, 6][..]);\nleft[1] = 2;\nright[1] = 4;\nassert_eq!(v, [1, 2, 3, 4, 5, 6]);
\n
",0,"redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<const N: usize> [u8; N]

source

pub const fn as_ascii(&self) -> Option<&[AsciiChar; N]>

🔬This is a nightly-only experimental API. (ascii_char)

Converts this array of bytes into a array of ASCII characters,\nor returns None if any of the characters is non-ASCII.

\n
§Examples
\n
#![feature(ascii_char)]\n#![feature(const_option)]\n\nconst HEX_DIGITS: [std::ascii::Char; 16] =\n    *b\"0123456789abcdef\".as_ascii().unwrap();\n\nassert_eq!(HEX_DIGITS[1].as_str(), \"1\");\nassert_eq!(HEX_DIGITS[10].as_str(), \"a\");
\n
source

pub const unsafe fn as_ascii_unchecked(&self) -> &[AsciiChar; N]

🔬This is a nightly-only experimental API. (ascii_char)

Converts this array of bytes into a array of ASCII characters,\nwithout checking whether they’re valid.

\n
§Safety
\n

Every byte in the array must be in 0..=127, or else this is UB.

\n
",0,"redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
§

impl<const N: usize, T> AsBytes for [T; N]
where\n T: AsBytes,

§

fn as_bytes(&self) -> &[u8]

Gets the bytes of this value. Read more
§

fn write_to(&self, bytes: &mut [u8]) -> Option<()>

Writes a copy of self to bytes. Read more
§

fn write_to_prefix(&self, bytes: &mut [u8]) -> Option<()>

Writes a copy of self to the prefix of bytes. Read more
§

fn write_to_suffix(&self, bytes: &mut [u8]) -> Option<()>

Writes a copy of self to the suffix of bytes. Read more
","AsBytes","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.0.0 · source§

impl<T, const N: usize> AsMut<[T]> for [T; N]

source§

fn as_mut(&mut self) -> &mut [T]

Converts this type into a mutable reference of the (usually inferred) input type.
","AsMut<[T]>","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.0.0 · source§

impl<T, const N: usize> AsRef<[T]> for [T; N]

source§

fn as_ref(&self) -> &[T]

Converts this type into a shared reference of the (usually inferred) input type.
","AsRef<[T]>","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
§

impl<const N: usize, T> BatchInvert<[T; N]> for T
where\n T: Invert<Output = CtOption<T>> + Mul<Output = T> + Copy + Default + ConditionallySelectable,

§

type Output = [T; N]

The output of batch inversion. A container of field elements.
§

fn batch_invert(field_elements: &[T; N]) -> CtOption<[T; N]>

Invert a batch of field elements.
","BatchInvert<[T; N]>","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T, const N: usize> Borrow<[T]> for [T; N]

source§

fn borrow(&self) -> &[T]

Immutably borrows from an owned value. Read more
","Borrow<[T]>","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T, const N: usize> BorrowMut<[T]> for [T; N]

source§

fn borrow_mut(&mut self) -> &mut [T]

Mutably borrows from an owned value. Read more
","BorrowMut<[T]>","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<const COUNT: usize> CLTyped for [u8; COUNT]

source§

fn cl_type() -> CLType

The CLType of Self.
","CLTyped","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
§

impl CPtr for [u8; 32]

§

type Target = u8

§

fn as_c_ptr(&self) -> *const <[u8; 32] as CPtr>::Target

§

fn as_mut_c_ptr(&mut self) -> *mut <[u8; 32] as CPtr>::Target

","CPtr","redstone::crypto::Keccak256Hash"],["
1.58.0 · source§

impl<T, const N: usize> Clone for [T; N]
where\n T: Clone,

source§

fn clone(&self) -> [T; N]

Returns a copy of the value. Read more
source§

fn clone_from(&mut self, other: &[T; N])

Performs copy-assignment from source. Read more
","Clone","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.0.0 · source§

impl<T, const N: usize> Debug for [T; N]
where\n T: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
§

impl<'a, T, const N: usize> DecodeValue<'a> for [T; N]
where\n T: Decode<'a>,

§

fn decode_value<R>(reader: &mut R, header: Header) -> Result<[T; N], Error>
where\n R: Reader<'a>,

Attempt to decode this message using the provided [Reader].
","DecodeValue<'a>","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 32]
where\n T: Default,

source§

fn default() -> [T; 32]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash"],["
1.4.0 · source§

impl<T> Default for [T; 31]
where\n T: Default,

source§

fn default() -> [T; 31]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 30]
where\n T: Default,

source§

fn default() -> [T; 30]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 29]
where\n T: Default,

source§

fn default() -> [T; 29]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 28]
where\n T: Default,

source§

fn default() -> [T; 28]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 27]
where\n T: Default,

source§

fn default() -> [T; 27]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 26]
where\n T: Default,

source§

fn default() -> [T; 26]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 25]
where\n T: Default,

source§

fn default() -> [T; 25]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 24]
where\n T: Default,

source§

fn default() -> [T; 24]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 23]
where\n T: Default,

source§

fn default() -> [T; 23]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 22]
where\n T: Default,

source§

fn default() -> [T; 22]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 21]
where\n T: Default,

source§

fn default() -> [T; 21]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 20]
where\n T: Default,

source§

fn default() -> [T; 20]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 19]
where\n T: Default,

source§

fn default() -> [T; 19]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 18]
where\n T: Default,

source§

fn default() -> [T; 18]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 17]
where\n T: Default,

source§

fn default() -> [T; 17]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 16]
where\n T: Default,

source§

fn default() -> [T; 16]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 15]
where\n T: Default,

source§

fn default() -> [T; 15]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 14]
where\n T: Default,

source§

fn default() -> [T; 14]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 13]
where\n T: Default,

source§

fn default() -> [T; 13]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 12]
where\n T: Default,

source§

fn default() -> [T; 12]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 11]
where\n T: Default,

source§

fn default() -> [T; 11]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 10]
where\n T: Default,

source§

fn default() -> [T; 10]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 9]
where\n T: Default,

source§

fn default() -> [T; 9]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 8]
where\n T: Default,

source§

fn default() -> [T; 8]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 7]
where\n T: Default,

source§

fn default() -> [T; 7]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 6]
where\n T: Default,

source§

fn default() -> [T; 6]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 5]
where\n T: Default,

source§

fn default() -> [T; 5]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 4]
where\n T: Default,

source§

fn default() -> [T; 4]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 3]
where\n T: Default,

source§

fn default() -> [T; 3]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 2]
where\n T: Default,

source§

fn default() -> [T; 2]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 1]
where\n T: Default,

source§

fn default() -> [T; 1]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 0]

source§

fn default() -> [T; 0]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<'de, T> Deserialize<'de> for [T; 32]
where\n T: Deserialize<'de>,

source§

fn deserialize<D>(\n deserializer: D,\n) -> Result<[T; 32], <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","redstone::crypto::Keccak256Hash"],["
source§

impl<'de, const N: usize> Deserialize<'de> for [u8; N]

source§

fn deserialize<D>(\n deserializer: D,\n) -> Result<[u8; N], <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

","Deserialize<'de>","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
§

impl<T, const N: usize> EncodeValue for [T; N]
where\n T: Encode,

§

fn value_len(&self) -> Result<Length, Error>

Compute the length of this value (sans [Tag]+[Length] header) when\nencoded as ASN.1 DER.
§

fn encode_value(&self, writer: &mut impl Writer) -> Result<(), Error>

Encode value (sans [Tag]+[Length] header) as ASN.1 DER using the\nprovided [Writer].
§

fn header(&self) -> Result<Header, Error>
where\n Self: Tagged,

Get the [Header] used to encode this value.
","EncodeValue","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 32]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash"],["
source§

impl<T> Fill for [T; 31]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 30]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 29]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 28]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 27]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 26]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 25]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 24]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 23]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 22]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 21]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 20]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 19]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 18]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 17]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 16]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 15]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 14]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 13]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 12]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 11]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 10]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 9]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 8]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 7]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 6]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 5]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 4]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 3]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 2]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 1]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 0]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 2048]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 1024]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 512]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 256]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 128]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 64]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
§

impl<T, const N: usize> FixedTag for [T; N]

§

const TAG: Tag = Tag::Sequence

ASN.1 tag
","FixedTag","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
§

impl From<&Signature> for [u8; 64]

§

fn from(sig: &Signature) -> [u8; 64]

Converts to this type from the input type.
","From<&Signature>","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
§

impl<T> From<GenericArray<T, UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>> for [T; 64]

§

fn from(\n sel: GenericArray<T, UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>,\n) -> [T; 64]

Converts to this type from the input type.
","From, B0>, B0>, B0>, B0>, B0>, B0>>>","redstone::crypto::Secp256SigRs"],["
§

impl<T> From<GenericArray<T, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>> for [T; 32]

§

fn from(\n sel: GenericArray<T, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>,\n) -> [T; 32]

Converts to this type from the input type.
","From, B0>, B0>, B0>, B0>, B0>>>","redstone::crypto::Keccak256Hash"],["
§

impl From<Signature> for [u8; 64]

§

fn from(sig: Signature) -> [u8; 64]

Converts to this type from the input type.
","From","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T, const N: usize> From<Simd<T, N>> for [T; N]

source§

fn from(vector: Simd<T, N>) -> [T; N]

Converts to this type from the input type.
","From>","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl From<U128> for [u8; 16]

source§

fn from(number: U128) -> [u8; 16]

Converts to this type from the input type.
","From","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl From<U256> for [u8; 32]

source§

fn from(number: U256) -> [u8; 32]

Converts to this type from the input type.
","From","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl From<U512> for [u8; 64]

source§

fn from(number: U512) -> [u8; 64]

Converts to this type from the input type.
","From","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
§

impl<const N: usize, T> FromBytes for [T; N]
where\n T: FromBytes,

§

fn ref_from(bytes: &[u8]) -> Option<&Self>
where\n Self: Sized,

Interprets the given bytes as a &Self without copying. Read more
§

fn ref_from_prefix(bytes: &[u8]) -> Option<&Self>
where\n Self: Sized,

Interprets the prefix of the given bytes as a &Self without copying. Read more
§

fn ref_from_suffix(bytes: &[u8]) -> Option<&Self>
where\n Self: Sized,

Interprets the suffix of the given bytes as a &Self without copying. Read more
§

fn slice_from(bytes: &[u8]) -> Option<&[Self]>
where\n Self: Sized,

Interprets the given bytes as a &[Self] without copying. Read more
§

fn slice_from_prefix(bytes: &[u8], count: usize) -> Option<(&[Self], &[u8])>
where\n Self: Sized,

Interprets the prefix of the given bytes as a &[Self] with length\nequal to count without copying. Read more
§

fn slice_from_suffix(bytes: &[u8], count: usize) -> Option<(&[u8], &[Self])>
where\n Self: Sized,

Interprets the suffix of the given bytes as a &[Self] with length\nequal to count without copying. Read more
§

fn read_from(bytes: &[u8]) -> Option<Self>
where\n Self: Sized,

Reads a copy of Self from bytes. Read more
§

fn read_from_prefix(bytes: &[u8]) -> Option<Self>
where\n Self: Sized,

Reads a copy of Self from the prefix of bytes. Read more
§

fn read_from_suffix(bytes: &[u8]) -> Option<Self>
where\n Self: Sized,

Reads a copy of Self from the suffix of bytes. Read more
","FromBytes","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<const COUNT: usize> FromBytes for [u8; COUNT]

source§

fn from_bytes(bytes: &[u8]) -> Result<([u8; COUNT], &[u8]), Error>

Deserializes the slice into Self.
source§

fn from_vec(bytes: Vec<u8>) -> Result<(Self, Vec<u8>), Error>

Deserializes the Vec<u8> into Self.
","FromBytes","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl FromHex for [u8; 32]

§

type Error = FromHexError

source§

fn from_hex<T>(hex: T) -> Result<[u8; 32], <[u8; 32] as FromHex>::Error>
where\n T: AsRef<[u8]>,

Creates an instance of type Self from the given hex string, or fails\nwith a custom error type. Read more
","FromHex","redstone::crypto::Keccak256Hash"],["
source§

impl FromHex for [u8; 64]

§

type Error = FromHexError

source§

fn from_hex<T>(hex: T) -> Result<[u8; 64], <[u8; 64] as FromHex>::Error>
where\n T: AsRef<[u8]>,

Creates an instance of type Self from the given hex string, or fails\nwith a custom error type. Read more
","FromHex","redstone::crypto::Secp256SigRs"],["
source§

impl FromHex for [u8; 65]

§

type Error = FromHexError

source§

fn from_hex<T>(hex: T) -> Result<[u8; 65], <[u8; 65] as FromHex>::Error>
where\n T: AsRef<[u8]>,

Creates an instance of type Self from the given hex string, or fails\nwith a custom error type. Read more
","FromHex","redstone::crypto::EcdsaUncompressedPublicKey"],["
§

impl<const N: usize, T> FromZeroes for [T; N]
where\n T: FromZeroes,

§

fn zero(&mut self)

Overwrites self with zeroes. Read more
§

fn new_zeroed() -> Self
where\n Self: Sized,

Creates an instance of Self from zeroed bytes. Read more
","FromZeroes","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.0.0 · source§

impl<T, const N: usize> Hash for [T; N]
where\n T: Hash,

The hash of an array is the same as that of the corresponding slice,\nas required by the Borrow implementation.

\n\n
use std::hash::BuildHasher;\n\nlet b = std::hash::RandomState::new();\nlet a: [u8; 3] = [0xa8, 0x3c, 0x09];\nlet s: &[u8] = &[0xa8, 0x3c, 0x09];\nassert_eq!(b.hash_one(a), b.hash_one(s));
\n
source§

fn hash<H>(&self, state: &mut H)
where\n H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.50.0 · source§

impl<T, I, const N: usize> Index<I> for [T; N]
where\n [T]: Index<I>,

§

type Output = <[T] as Index<I>>::Output

The returned type after indexing.
source§

fn index(&self, index: I) -> &<[T; N] as Index<I>>::Output

Performs the indexing (container[index]) operation. Read more
","Index","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.50.0 · source§

impl<T, I, const N: usize> IndexMut<I> for [T; N]
where\n [T]: IndexMut<I>,

source§

fn index_mut(&mut self, index: I) -> &mut <[T; N] as Index<I>>::Output

Performs the mutable indexing (container[index]) operation. Read more
","IndexMut","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.53.0 · source§

impl<T, const N: usize> IntoIterator for [T; N]

source§

fn into_iter(self) -> <[T; N] as IntoIterator>::IntoIter

Creates a consuming iterator, that is, one that moves each value out of\nthe array (from start to end). The array cannot be used after calling\nthis unless T implements Copy, so the whole array is copied.

\n

Arrays have special behavior when calling .into_iter() prior to the\n2021 edition – see the array Editions section for more information.

\n
§

type Item = T

The type of the elements being iterated over.
§

type IntoIter = IntoIter<T, N>

Which kind of iterator are we turning this into?
","IntoIterator","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.0.0 · source§

impl<T, const N: usize> Ord for [T; N]
where\n T: Ord,

Implements comparison of arrays lexicographically.

\n
source§

fn cmp(&self, other: &[T; N]) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
","Ord","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.0.0 · source§

impl<T, U, const N: usize> PartialEq<&[U]> for [T; N]
where\n T: PartialEq<U>,

source§

fn eq(&self, other: &&[U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&[U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&[U]>","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.0.0 · source§

impl<T, U, const N: usize> PartialEq<&mut [U]> for [T; N]
where\n T: PartialEq<U>,

source§

fn eq(&self, other: &&mut [U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&mut [U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&mut [U]>","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.0.0 · source§

impl<T, U, const N: usize> PartialEq<[U]> for [T; N]
where\n T: PartialEq<U>,

source§

fn eq(&self, other: &[U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &[U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<[U]>","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.0.0 · source§

impl<T, U, const N: usize> PartialEq<[U; N]> for [T; N]
where\n T: PartialEq<U>,

source§

fn eq(&self, other: &[U; N]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &[U; N]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<[U; N]>","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.0.0 · source§

impl<T, const N: usize> PartialOrd for [T; N]
where\n T: PartialOrd,

Implements comparison of arrays lexicographically.

\n
source§

fn partial_cmp(&self, other: &[T; N]) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
source§

fn lt(&self, other: &[T; N]) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
source§

fn le(&self, other: &[T; N]) -> bool

This method tests less than or equal to (for self and other) and is used by the <=\noperator. Read more
source§

fn ge(&self, other: &[T; N]) -> bool

This method tests greater than or equal to (for self and other) and is used by the >=\noperator. Read more
source§

fn gt(&self, other: &[T; N]) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
","PartialOrd","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Serialize for [T; 32]
where\n T: Serialize,

source§

fn serialize<S>(\n &self,\n serializer: S,\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","redstone::crypto::Keccak256Hash"],["
source§

impl<const N: usize> Serialize for [u8; N]

source§

fn serialize<S>(\n &self,\n serializer: S,\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

","Serialize","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.51.0 · source§

impl<T, const N: usize> SlicePattern for [T; N]

§

type Item = T

🔬This is a nightly-only experimental API. (slice_pattern)
The element type of the slice being matched on.
source§

fn as_slice(&self) -> &[<[T; N] as SlicePattern>::Item]

🔬This is a nightly-only experimental API. (slice_pattern)
Currently, the consumers of SlicePattern need a slice.
","SlicePattern","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<const COUNT: usize> ToBytes for [u8; COUNT]

source§

fn to_bytes(&self) -> Result<Vec<u8>, Error>

Serializes &self to a Vec<u8>.
source§

fn serialized_length(&self) -> usize

Returns the length of the Vec<u8> which would be returned from a successful call to\nto_bytes() or into_bytes(). The data is not actually serialized, so this call is\nrelatively cheap.
source§

fn write_bytes(&self, writer: &mut Vec<u8>) -> Result<(), Error>

Writes &self into a mutable writer.
source§

fn into_bytes(self) -> Result<Vec<u8>, Error>
where\n Self: Sized,

Consumes self and serializes to a Vec<u8>.
","ToBytes","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.34.0 · source§

impl<T, const N: usize> TryFrom<&[T]> for [T; N]
where\n T: Copy,

Tries to create an array [T; N] by copying from a slice &[T]. Succeeds if\nslice.len() == N.

\n\n
let bytes: [u8; 3] = [1, 0, 2];\n\nlet bytes_head: [u8; 2] = <[u8; 2]>::try_from(&bytes[0..2]).unwrap();\nassert_eq!(1, u16::from_le_bytes(bytes_head));\n\nlet bytes_tail: [u8; 2] = bytes[1..3].try_into().unwrap();\nassert_eq!(512, u16::from_le_bytes(bytes_tail));
\n
§

type Error = TryFromSliceError

The type returned in the event of a conversion error.
source§

fn try_from(slice: &[T]) -> Result<[T; N], TryFromSliceError>

Performs the conversion.
","TryFrom<&[T]>","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.59.0 · source§

impl<T, const N: usize> TryFrom<&mut [T]> for [T; N]
where\n T: Copy,

Tries to create an array [T; N] by copying from a mutable slice &mut [T].\nSucceeds if slice.len() == N.

\n\n
let mut bytes: [u8; 3] = [1, 0, 2];\n\nlet bytes_head: [u8; 2] = <[u8; 2]>::try_from(&mut bytes[0..2]).unwrap();\nassert_eq!(1, u16::from_le_bytes(bytes_head));\n\nlet bytes_tail: [u8; 2] = (&mut bytes[1..3]).try_into().unwrap();\nassert_eq!(512, u16::from_le_bytes(bytes_tail));
\n
§

type Error = TryFromSliceError

The type returned in the event of a conversion error.
source§

fn try_from(slice: &mut [T]) -> Result<[T; N], TryFromSliceError>

Performs the conversion.
","TryFrom<&mut [T]>","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.48.0 · source§

impl<T, A, const N: usize> TryFrom<Vec<T, A>> for [T; N]
where\n A: Allocator,

source§

fn try_from(vec: Vec<T, A>) -> Result<[T; N], Vec<T, A>>

Gets the entire contents of the Vec<T> as an array,\nif its size exactly matches that of the requested array.

\n
§Examples
\n
assert_eq!(vec![1, 2, 3].try_into(), Ok([1, 2, 3]));\nassert_eq!(<Vec<i32>>::new().try_into(), Ok([]));
\n

If the length doesn’t match, the input comes back in Err:

\n\n
let r: Result<[i32; 4], _> = (0..10).collect::<Vec<_>>().try_into();\nassert_eq!(r, Err(vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9]));
\n

If you’re fine with just getting a prefix of the Vec<T>,\nyou can call .truncate(N) first.

\n\n
let mut v = String::from(\"hello world\").into_bytes();\nv.sort();\nv.truncate(2);\nlet [a, b]: [_; 2] = v.try_into().unwrap();\nassert_eq!(a, b' ');\nassert_eq!(b, b'd');
\n
§

type Error = Vec<T, A>

The type returned in the event of a conversion error.
","TryFrom>","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
§

impl<T, const N: usize> ValueOrd for [T; N]
where\n T: DerOrd,

§

fn value_cmp(&self, other: &[T; N]) -> Result<Ordering, Error>

Return an Ordering between value portion of TLV-encoded self and\nother when serialized as ASN.1 DER.
","ValueOrd","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
§

impl<Z, const N: usize> Zeroize for [Z; N]
where\n Z: Zeroize,

Impl [Zeroize] on arrays of types that impl [Zeroize].

\n
§

fn zeroize(&mut self)

Zero out this object from memory using Rust intrinsics which ensure the\nzeroization operation is not “optimized away” by the compiler.
","Zeroize","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T, const N: usize> ConstParamTy for [T; N]
where\n T: ConstParamTy,

","ConstParamTy","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.58.0 · source§

impl<T, const N: usize> Copy for [T; N]
where\n T: Copy,

","Copy","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.0.0 · source§

impl<T, const N: usize> Eq for [T; N]
where\n T: Eq,

","Eq","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T, const N: usize> StructuralPartialEq for [T; N]

","StructuralPartialEq","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
§

impl<const N: usize, T> Unaligned for [T; N]
where\n T: Unaligned,

","Unaligned","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
§

impl<Z, const N: usize> ZeroizeOnDrop for [Z; N]
where\n Z: ZeroizeOnDrop,

Impl [ZeroizeOnDrop] on arrays of types that impl [ZeroizeOnDrop].

\n
","ZeroizeOnDrop","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"]] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/help.html b/static/rust/redstone/crypto_secp256k1,network_casper/help.html index f173d86a..616df0e4 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/help.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/help.html @@ -1 +1 @@ -Help

Rustdoc help

Back
\ No newline at end of file +Help

Rustdoc help

Back
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/all.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/all.html index d76b13f5..2bdc6695 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/all.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/all.html @@ -1 +1 @@ -List of all items in this crate

List of all items

Structs

Enums

Traits

Macros

Functions

Type Aliases

Constants

\ No newline at end of file +List of all items in this crate

List of all items

Structs

Enums

Traits

Macros

Functions

Type Aliases

Constants

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/aggregator/fn.aggregate_matrix.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/aggregator/fn.aggregate_matrix.html index 0792edbc..218d36be 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/aggregator/fn.aggregate_matrix.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/aggregator/fn.aggregate_matrix.html @@ -1 +1 @@ -aggregate_matrix in redstone::core::aggregator - Rust

Function redstone::core::aggregator::aggregate_matrix

source ·
fn aggregate_matrix(matrix: Vec<Vec<Option<U256>>>, config: Config) -> Vec<U256>
\ No newline at end of file +aggregate_matrix in redstone::core::aggregator - Rust

Function redstone::core::aggregator::aggregate_matrix

source ·
fn aggregate_matrix(matrix: Vec<Vec<Option<U256>>>, config: Config) -> Vec<U256>
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/aggregator/fn.aggregate_values.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/aggregator/fn.aggregate_values.html index 15726f8e..56391872 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/aggregator/fn.aggregate_values.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/aggregator/fn.aggregate_values.html @@ -1,7 +1,7 @@ -aggregate_values in redstone::core::aggregator - Rust

Function redstone::core::aggregator::aggregate_values

source ·
pub(crate) fn aggregate_values(
+aggregate_values in redstone::core::aggregator - Rust

Function redstone::core::aggregator::aggregate_values

source ·
pub(crate) fn aggregate_values(
     config: Config,
-    data_packages: Vec<DataPackage>,
-) -> Vec<U256>
Expand description

Aggregates values from a collection of data packages according to the provided configuration.

+ data_packages: Vec<DataPackage>, +) -> Vec<U256>
Expand description

Aggregates values from a collection of data packages according to the provided configuration.

This function takes a configuration and a vector of data packages, constructs a matrix of values and their corresponding signers, and then aggregates these values based on the aggregation logic defined in the provided configuration. The aggregation strategy could vary, for example, by taking diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/aggregator/fn.make_value_signer_matrix.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/aggregator/fn.make_value_signer_matrix.html index f3dc8819..f3c03b87 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/aggregator/fn.make_value_signer_matrix.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/aggregator/fn.make_value_signer_matrix.html @@ -1,4 +1,4 @@ -make_value_signer_matrix in redstone::core::aggregator - Rust

Function redstone::core::aggregator::make_value_signer_matrix

source ·
fn make_value_signer_matrix(
+make_value_signer_matrix in redstone::core::aggregator - Rust

Function redstone::core::aggregator::make_value_signer_matrix

source ·
fn make_value_signer_matrix(
     config: &Config,
-    data_packages: Vec<DataPackage>,
-) -> Vec<Vec<Option<U256>>>
\ No newline at end of file + data_packages: Vec<DataPackage>, +) -> Vec<Vec<Option<U256>>>
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/aggregator/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/aggregator/index.html index 7aa39374..d9b656ee 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/aggregator/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/aggregator/index.html @@ -1 +1 @@ -redstone::core::aggregator - Rust

Module redstone::core::aggregator

source ·

Functions§

Type Aliases§

\ No newline at end of file +redstone::core::aggregator - Rust

Module redstone::core::aggregator

source ·

Functions§

Type Aliases§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/aggregator/type.Matrix.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/aggregator/type.Matrix.html index 61c3f974..5fadd5eb 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/aggregator/type.Matrix.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/aggregator/type.Matrix.html @@ -1 +1 @@ -Matrix in redstone::core::aggregator - Rust

Type Alias redstone::core::aggregator::Matrix

source ·
type Matrix = Vec<Vec<Option<U256>>>;

Aliased Type§

struct Matrix { /* private fields */ }
\ No newline at end of file +Matrix in redstone::core::aggregator - Rust

Type Alias redstone::core::aggregator::Matrix

source ·
type Matrix = Vec<Vec<Option<U256>>>;

Aliased Type§

struct Matrix { /* private fields */ }
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/config/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/config/index.html index 32a77abc..5badc729 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/config/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/config/index.html @@ -1 +1 @@ -redstone::core::config - Rust

Module redstone::core::config

source ·

Structs§

  • Configuration for a RedStone payload processor.
\ No newline at end of file +redstone::core::config - Rust

Module redstone::core::config

source ·

Structs§

  • Configuration for a RedStone payload processor.
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/config/struct.Config.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/config/struct.Config.html index 5f859175..f80ce0c8 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/config/struct.Config.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/config/struct.Config.html @@ -1,38 +1,38 @@ -Config in redstone::core::config - Rust

Struct redstone::core::config::Config

source ·
pub struct Config {
-    pub signer_count_threshold: u8,
-    pub signers: Vec<Bytes>,
-    pub feed_ids: Vec<U256>,
-    pub block_timestamp: u64,
+Config in redstone::core::config - Rust

Struct redstone::core::config::Config

source ·
pub struct Config {
+    pub signer_count_threshold: u8,
+    pub signers: Vec<Bytes>,
+    pub feed_ids: Vec<U256>,
+    pub block_timestamp: u64,
 }
Expand description

Configuration for a RedStone payload processor.

Specifies the parameters necessary for the verification and aggregation of values from various data points passed by the RedStone payload.

-

Fields§

§signer_count_threshold: u8

The minimum number of signers required validating the data.

+

Fields§

§signer_count_threshold: u8

The minimum number of signers required validating the data.

Specifies how many unique signers (from different addresses) are required for the data to be considered valid and trustworthy.

-
§signers: Vec<Bytes>

List of identifiers for signers authorized to sign the data.

+
§signers: Vec<Bytes>

List of identifiers for signers authorized to sign the data.

Each signer is identified by a unique, network-specific byte string (Bytes), which represents their address.

-
§feed_ids: Vec<U256>

Identifiers for the data feeds from which values are aggregated.

+
§feed_ids: Vec<U256>

Identifiers for the data feeds from which values are aggregated.

Each data feed id is represented by the network-specific U256 type.

-
§block_timestamp: u64

The current block time in timestamp format, used for verifying data timeliness.

+
§block_timestamp: u64

The current block time in timestamp format, used for verifying data timeliness.

The value’s been expressed in milliseconds since the Unix epoch (January 1, 1970) and allows for determining whether the data is current in the context of blockchain time.

-

Trait Implementations§

source§

impl Debug for Config

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Validator for Config

source§

fn feed_index(&self, feed_id: U256) -> Option<usize>

Retrieves the index of a given data feed. Read more
source§

fn signer_index(&self, signer: &[u8]) -> Option<usize>

Retrieves the index of a given signer. Read more
source§

fn validate_signer_count_threshold( +

Trait Implementations§

source§

impl Debug for Config

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Validator for Config

source§

fn feed_index(&self, feed_id: U256) -> Option<usize>

Retrieves the index of a given data feed. Read more
source§

fn signer_index(&self, signer: &[u8]) -> Option<usize>

Retrieves the index of a given signer. Read more
source§

fn validate_signer_count_threshold( &self, - index: usize, - values: &[Option<U256>], -) -> Vec<U256>

Validates the signer count threshold for a given index within a set of values. Read more
source§

fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64

Validates the timestamp for a given index. Read more

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

Blanket Implementations§

source§

impl<T> Any for T
where - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where - T: Debug, - F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where - E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for T
where - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+ index: usize, + values: &[Option<U256>], +) -> Vec<U256>
Validates the signer count threshold for a given index within a set of values. Read more
source§

fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64

Validates the timestamp for a given index. Read more

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where + T: Debug, + F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where + E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where +From<T> for U chooses to do.

+

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/index.html index e427a2e8..e5c1246b 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/index.html @@ -1 +1 @@ -redstone::core - Rust

Module redstone::core

source ·

Modules§

\ No newline at end of file +redstone::core - Rust

Module redstone::core

source ·

Modules§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/processor/fn.make_processor_result.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/processor/fn.make_processor_result.html index d15046f1..33203759 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/processor/fn.make_processor_result.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/processor/fn.make_processor_result.html @@ -1 +1 @@ -make_processor_result in redstone::core::processor - Rust

Function redstone::core::processor::make_processor_result

source ·
fn make_processor_result(config: Config, payload: Payload) -> ProcessorResult
\ No newline at end of file +make_processor_result in redstone::core::processor - Rust

Function redstone::core::processor::make_processor_result

source ·
fn make_processor_result(config: Config, payload: Payload) -> ProcessorResult
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/processor/fn.process_payload.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/processor/fn.process_payload.html index b1ad0b84..6a5eb34e 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/processor/fn.process_payload.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/processor/fn.process_payload.html @@ -1,4 +1,4 @@ -process_payload in redstone::core::processor - Rust

Function redstone::core::processor::process_payload

source ·
pub fn process_payload(config: Config, payload_bytes: Bytes) -> ProcessorResult
Expand description

The main processor of the RedStone payload.

+process_payload in redstone::core::processor - Rust

Function redstone::core::processor::process_payload

source ·
pub fn process_payload(config: Config, payload_bytes: Bytes) -> ProcessorResult
Expand description

The main processor of the RedStone payload.

§Arguments

  • config - Configuration of the payload processing.
  • diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/processor/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/processor/index.html index ccd25006..5b72173e 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/processor/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/processor/index.html @@ -1 +1 @@ -redstone::core::processor - Rust

    Module redstone::core::processor

    source ·

    Functions§

    \ No newline at end of file +redstone::core::processor - Rust

    Module redstone::core::processor

    source ·

    Functions§

    \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/processor_result/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/processor_result/index.html index 52eaf103..fb6292fd 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/processor_result/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/processor_result/index.html @@ -1 +1 @@ -redstone::core::processor_result - Rust

    Module redstone::core::processor_result

    source ·

    Structs§

    \ No newline at end of file +redstone::core::processor_result - Rust

    Module redstone::core::processor_result

    source ·

    Structs§

    \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/processor_result/struct.ProcessorResult.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/processor_result/struct.ProcessorResult.html index 788c8b93..7c37d7b6 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/processor_result/struct.ProcessorResult.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/processor_result/struct.ProcessorResult.html @@ -1,29 +1,29 @@ -ProcessorResult in redstone::core::processor_result - Rust

    Struct redstone::core::processor_result::ProcessorResult

    source ·
    pub struct ProcessorResult {
    -    pub min_timestamp: u64,
    -    pub values: Vec<U256>,
    +ProcessorResult in redstone::core::processor_result - Rust

    Struct redstone::core::processor_result::ProcessorResult

    source ·
    pub struct ProcessorResult {
    +    pub min_timestamp: u64,
    +    pub values: Vec<U256>,
     }
    Expand description

    Represents the result of processing the RedStone payload.

    This structure is used to encapsulate the outcome of a RedStone payload processing operation, particularly focusing on time-sensitive data and its associated values, according to the Config.

    -

    Fields§

    §min_timestamp: u64

    The minimum timestamp encountered during processing.

    +

Fields§

§min_timestamp: u64

The minimum timestamp encountered during processing.

This field captures the earliest time point (in milliseconds since the Unix epoch) among the processed data packages, indicating the starting boundary of the dataset’s time range.

-
§values: Vec<U256>

A collection of values processed during the operation.

+
§values: Vec<U256>

A collection of values processed during the operation.

Each element in this vector represents a processed value corresponding to the passed data_feed item in the Config.

-

Trait Implementations§

source§

impl Debug for ProcessorResult

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<ProcessorResult> for (u64, Vec<U256>)

source§

fn from(result: ProcessorResult) -> Self

Converts to this type from the input type.
source§

impl PartialEq for ProcessorResult

source§

fn eq(&self, other: &ProcessorResult) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Eq for ProcessorResult

source§

impl StructuralPartialEq for ProcessorResult

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where - T: Debug, - F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where - E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for T
where - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

source§

impl Debug for ProcessorResult

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<ProcessorResult> for (u64, Vec<U256>)

source§

fn from(result: ProcessorResult) -> Self

Converts to this type from the input type.
source§

impl PartialEq for ProcessorResult

source§

fn eq(&self, other: &ProcessorResult) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for ProcessorResult

source§

impl StructuralPartialEq for ProcessorResult

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where + T: Debug, + F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where + E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where +From<T> for U chooses to do.

+

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/validator/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/validator/index.html index 141d82cd..63c305f0 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/validator/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/validator/index.html @@ -1 +1 @@ -redstone::core::validator - Rust

Module redstone::core::validator

source ·

Traits§

  • Validator 🔒
    A trait defining validation operations for data feeds and signers.
\ No newline at end of file +redstone::core::validator - Rust

Module redstone::core::validator

source ·

Traits§

  • Validator 🔒
    A trait defining validation operations for data feeds and signers.
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/validator/trait.Validator.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/validator/trait.Validator.html index ffbec709..4ad4fa99 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/validator/trait.Validator.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/validator/trait.Validator.html @@ -1,19 +1,19 @@ -Validator in redstone::core::validator - Rust

Trait redstone::core::validator::Validator

source ·
pub(crate) trait Validator {
+Validator in redstone::core::validator - Rust

Trait redstone::core::validator::Validator

source ·
pub(crate) trait Validator {
     // Required methods
-    fn feed_index(&self, feed_id: U256) -> Option<usize>;
-    fn signer_index(&self, signer: &[u8]) -> Option<usize>;
+    fn feed_index(&self, feed_id: U256) -> Option<usize>;
+    fn signer_index(&self, signer: &[u8]) -> Option<usize>;
     fn validate_signer_count_threshold(
         &self,
-        index: usize,
-        values: &[Option<U256>],
-    ) -> Vec<U256>;
-    fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64;
+        index: usize,
+        values: &[Option<U256>],
+    ) -> Vec<U256>;
+    fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64;
 }
Expand description

A trait defining validation operations for data feeds and signers.

This trait specifies methods for validating aspects of data feeds and signers within a system that requires data integrity and authenticity checks. Implementations of this trait are responsible for defining the logic behind each validation step, ensuring that data conforms to expected rules and conditions.

-

Required Methods§

source

fn feed_index(&self, feed_id: U256) -> Option<usize>

Retrieves the index of a given data feed.

+

Required Methods§

source

fn feed_index(&self, feed_id: U256) -> Option<usize>

Retrieves the index of a given data feed.

This method takes a feed_id representing the unique identifier of a data feed and returns an Option<usize> indicating the index of the feed within a collection of feeds. If the feed does not exist, None is returned.

@@ -25,7 +25,7 @@
§Returns
  • Option<usize> - The index of the feed if it exists, or None if it does not.
-
source

fn signer_index(&self, signer: &[u8]) -> Option<usize>

Retrieves the index of a given signer.

+
source

fn signer_index(&self, signer: &[u8]) -> Option<usize>

Retrieves the index of a given signer.

This method accepts a signer identifier in the form of a byte slice and returns an Option<usize> indicating the signer’s index within a collection of signers. If the signer is not found, None is returned.

@@ -39,9 +39,9 @@
§Returns
source

fn validate_signer_count_threshold( &self, - index: usize, - values: &[Option<U256>], -) -> Vec<U256>

Validates the signer count threshold for a given index within a set of values.

+ index: usize, + values: &[Option<U256>], +) -> Vec<U256>

Validates the signer count threshold for a given index within a set of values.

This method is responsible for ensuring that the number of valid signers meets or exceeds a specified threshold necessary for a set of data values to be considered valid. It returns a vector of U256 if the values pass the validation, to be processed in other steps.

@@ -54,7 +54,7 @@
§Returns
  • Vec<U256> - A vector of U256 values that meet the validation criteria.
-
source

fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64

Validates the timestamp for a given index.

+
source

fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64

Validates the timestamp for a given index.

This method checks whether a timestamp associated with a data value at a given index meets specific conditions (e.g., being within an acceptable time range). It returns the validated timestamp if it’s valid, to be processed in other steps.

diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/index.html index 541ea6ec..47b354db 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/index.html @@ -1 +1 @@ -redstone::crypto - Rust

Module redstone::crypto

source ·

Modules§

\ No newline at end of file +redstone::crypto - Rust

Module redstone::crypto

source ·

Modules§

Type Aliases§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/keccak256/fn.keccak256.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/keccak256/fn.keccak256.html index 2665643a..63420eda 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/keccak256/fn.keccak256.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/keccak256/fn.keccak256.html @@ -1 +1 @@ -keccak256 in redstone::crypto::keccak256 - Rust

Function redstone::crypto::keccak256::keccak256

source ·
pub fn keccak256(data: &[u8]) -> Box<[u8]>
\ No newline at end of file +keccak256 in redstone::crypto::keccak256 - Rust

Function redstone::crypto::keccak256::keccak256

source ·
pub fn keccak256(data: &[u8]) -> [u8; 32]
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/keccak256/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/keccak256/index.html index 96fe770a..e0b65a28 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/keccak256/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/keccak256/index.html @@ -1 +1 @@ -redstone::crypto::keccak256 - Rust

Module redstone::crypto::keccak256

source ·

Functions§

\ No newline at end of file +redstone::crypto::keccak256 - Rust

Module redstone::crypto::keccak256

source ·

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/recover/crypto256/fn.recover_public_key.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/recover/crypto256/fn.recover_public_key.html index ba2beac0..039b3003 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/recover/crypto256/fn.recover_public_key.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/recover/crypto256/fn.recover_public_key.html @@ -1,5 +1,5 @@ -recover_public_key in redstone::crypto::recover::crypto256 - Rust

Function redstone::crypto::recover::crypto256::recover_public_key

source ·
pub(crate) fn recover_public_key(
-    message_hash: Box<[u8]>,
-    signature_bytes: &[u8],
-    recovery_byte: u8,
-) -> Box<[u8]>
\ No newline at end of file +recover_public_key in redstone::crypto::recover::crypto256 - Rust

Function redstone::crypto::recover::crypto256::recover_public_key

source ·
pub(crate) fn recover_public_key(
+    message_hash: [u8; 32],
+    signature_bytes: [u8; 64],
+    recovery_byte: u8,
+) -> [u8; 65]
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/recover/crypto256/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/recover/crypto256/index.html index b5563f5f..1abee86b 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/recover/crypto256/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/recover/crypto256/index.html @@ -1 +1 @@ -redstone::crypto::recover::crypto256 - Rust

Module redstone::crypto::recover::crypto256

source ·

Functions§

\ No newline at end of file +redstone::crypto::recover::crypto256 - Rust

Module redstone::crypto::recover::crypto256

source ·

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/recover/fn.recover_address.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/recover/fn.recover_address.html index aba3bde0..c38049cf 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/recover/fn.recover_address.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/recover/fn.recover_address.html @@ -1 +1 @@ -recover_address in redstone::crypto::recover - Rust

Function redstone::crypto::recover::recover_address

source ·
pub fn recover_address(message: Vec<u8>, signature: Vec<u8>) -> Vec<u8> 
\ No newline at end of file +recover_address in redstone::crypto::recover - Rust

Function redstone::crypto::recover::recover_address

source ·
pub fn recover_address(message: Vec<u8>, signature: Vec<u8>) -> Vec<u8> 
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/recover/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/recover/index.html index e7703e69..6165a1e8 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/recover/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/recover/index.html @@ -1 +1 @@ -redstone::crypto::recover - Rust

Module redstone::crypto::recover

source ·

Modules§

Functions§

\ No newline at end of file +redstone::crypto::recover - Rust

Module redstone::crypto::recover

source ·

Modules§

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/sidebar-items.js index 521fe7cb..41e67b75 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/sidebar-items.js +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"mod":["keccak256","recover"]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"mod":["keccak256","recover"],"type":["EcdsaUncompressedPublicKey","Keccak256Hash","Secp256SigRs"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/type.EcdsaUncompressedPublicKey.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/type.EcdsaUncompressedPublicKey.html new file mode 100644 index 00000000..5b852c97 --- /dev/null +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/type.EcdsaUncompressedPublicKey.html @@ -0,0 +1 @@ +EcdsaUncompressedPublicKey in redstone::crypto - Rust

Type Alias redstone::crypto::EcdsaUncompressedPublicKey

source ·
pub(crate) type EcdsaUncompressedPublicKey = [u8; 65];
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/type.Keccak256Hash.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/type.Keccak256Hash.html new file mode 100644 index 00000000..2f59bdeb --- /dev/null +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/type.Keccak256Hash.html @@ -0,0 +1 @@ +Keccak256Hash in redstone::crypto - Rust

Type Alias redstone::crypto::Keccak256Hash

source ·
pub(crate) type Keccak256Hash = [u8; 32];
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/type.Secp256SigRs.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/type.Secp256SigRs.html new file mode 100644 index 00000000..cbead115 --- /dev/null +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/type.Secp256SigRs.html @@ -0,0 +1 @@ +Secp256SigRs in redstone::crypto - Rust

Type Alias redstone::crypto::Secp256SigRs

source ·
pub(crate) type Secp256SigRs = [u8; 64];
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/index.html index ea091ee8..1c83a111 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/index.html @@ -1,4 +1,4 @@ -redstone - Rust

Crate redstone

source ·
Expand description

§RedStone

+redstone - Rust

Crate redstone

source ·
Expand description

§RedStone

redstone is a collection of utilities to make deserializing&decrypting RedStone payload. It includes a pure Rust implementation, along with extensions for certain networks.

Different crypto-mechanisms are easily injectable. diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/macro.print_and_panic.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/macro.print_and_panic.html index b308eb68..468e62fc 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/macro.print_and_panic.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/macro.print_and_panic.html @@ -1,4 +1,4 @@ -print_and_panic in redstone - Rust

Macro redstone::print_and_panic

source ·
macro_rules! print_and_panic {
+print_and_panic in redstone - Rust

Macro redstone::print_and_panic

source ·
macro_rules! print_and_panic {
     ($fmt:expr) => { ... };
     ($fmt:expr, $($args:tt)*) => { ... };
 }
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/macro.print_debug.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/macro.print_debug.html index 3cb863d6..a8847b09 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/macro.print_debug.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/macro.print_debug.html @@ -1,4 +1,4 @@ -print_debug in redstone - Rust

Macro redstone::print_debug

source ·
macro_rules! print_debug {
+print_debug in redstone - Rust

Macro redstone::print_debug

source ·
macro_rules! print_debug {
     ($fmt:expr) => { ... };
     ($fmt:expr, $($args:tt)*) => { ... };
 }
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/as_str/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/as_str/index.html index 9f63a8ad..05ce8ab0 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/as_str/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/as_str/index.html @@ -1 +1 @@ -redstone::network::as_str - Rust

Module redstone::network::as_str

source ·

Traits§

\ No newline at end of file +redstone::network::as_str - Rust

Module redstone::network::as_str

source ·

Traits§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/as_str/trait.AsAsciiStr.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/as_str/trait.AsAsciiStr.html index 8fa29f1c..1638cd12 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/as_str/trait.AsAsciiStr.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/as_str/trait.AsAsciiStr.html @@ -1,4 +1,4 @@ -AsAsciiStr in redstone::network::as_str - Rust

Trait redstone::network::as_str::AsAsciiStr

source ·
pub trait AsAsciiStr {
+AsAsciiStr in redstone::network::as_str - Rust

Trait redstone::network::as_str::AsAsciiStr

source ·
pub trait AsAsciiStr {
     // Required method
-    fn as_ascii_str(&self) -> String;
-}

Required Methods§

Implementations on Foreign Types§

source§

impl AsAsciiStr for &[u8]

source§

impl AsAsciiStr for Vec<u8>

source§

impl AsAsciiStr for Bytes

Implementors§

\ No newline at end of file + fn as_ascii_str(&self) -> String; +}

Required Methods§

Implementations on Foreign Types§

source§

impl AsAsciiStr for &[u8]

source§

impl AsAsciiStr for Vec<u8>

source§

impl AsAsciiStr for Bytes

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/as_str/trait.AsHexStr.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/as_str/trait.AsHexStr.html index 8c78b5e1..6d3a5b52 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/as_str/trait.AsHexStr.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/as_str/trait.AsHexStr.html @@ -1,4 +1,4 @@ -AsHexStr in redstone::network::as_str - Rust

Trait redstone::network::as_str::AsHexStr

source ·
pub trait AsHexStr {
+AsHexStr in redstone::network::as_str - Rust

Trait redstone::network::as_str::AsHexStr

source ·
pub trait AsHexStr {
     // Required method
-    fn as_hex_str(&self) -> String;
-}

Required Methods§

Implementations on Foreign Types§

source§

impl AsHexStr for &[u8]

source§

impl AsHexStr for Box<[u8]>

source§

impl AsHexStr for Vec<u8>

source§

impl AsHexStr for Bytes

Implementors§

\ No newline at end of file + fn as_hex_str(&self) -> String; +}

Required Methods§

Implementations on Foreign Types§

source§

impl AsHexStr for &[u8]

source§

impl AsHexStr for Box<[u8]>

source§

impl AsHexStr for Vec<u8>

source§

impl AsHexStr for Bytes

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/assert/fn.assert_or_revert.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/assert/fn.assert_or_revert.html index 13078112..1c579f09 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/assert/fn.assert_or_revert.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/assert/fn.assert_or_revert.html @@ -1,7 +1,7 @@ -assert_or_revert in redstone::network::assert - Rust

Function redstone::network::assert::assert_or_revert

source ·
fn assert_or_revert<F, T, E: FnOnce(&T) -> Error>(
+assert_or_revert in redstone::network::assert - Rust

Function redstone::network::assert::assert_or_revert

source ·
fn assert_or_revert<F, T, E: FnOnce(&T) -> Error>(
     arg: T,
     check: F,
     error: E,
 ) -> T
where - F: Fn(&T) -> bool, - T: Debug,
\ No newline at end of file + F: Fn(&T) -> bool, + T: Debug,
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/assert/fn.assert_or_revert_bool_with.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/assert/fn.assert_or_revert_bool_with.html index 385fc71e..7fd4c914 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/assert/fn.assert_or_revert_bool_with.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/assert/fn.assert_or_revert_bool_with.html @@ -1 +1 @@ -assert_or_revert_bool_with in redstone::network::assert - Rust

Function redstone::network::assert::assert_or_revert_bool_with

source ·
fn assert_or_revert_bool_with<E: FnOnce() -> Error>(check: bool, error: E)
\ No newline at end of file +assert_or_revert_bool_with in redstone::network::assert - Rust

Function redstone::network::assert::assert_or_revert_bool_with

source ·
fn assert_or_revert_bool_with<E: FnOnce() -> Error>(check: bool, error: E)
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/assert/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/assert/index.html index 680c61a9..a573fd72 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/assert/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/assert/index.html @@ -1 +1 @@ -redstone::network::assert - Rust

Module redstone::network::assert

source ·

Traits§

Functions§

\ No newline at end of file +redstone::network::assert - Rust

Module redstone::network::assert

source ·

Traits§

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/assert/trait.Assert.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/assert/trait.Assert.html index e068a406..0a3d27da 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/assert/trait.Assert.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/assert/trait.Assert.html @@ -1,6 +1,6 @@ -Assert in redstone::network::assert - Rust

Trait redstone::network::assert::Assert

source ·
pub trait Assert<F> {
+Assert in redstone::network::assert - Rust

Trait redstone::network::assert::Assert

source ·
pub trait Assert<F> {
     // Required method
-    fn assert_or_revert<E: Fn(&Self) -> Error>(self, check: F, error: E) -> Self;
-}

Required Methods§

source

fn assert_or_revert<E: Fn(&Self) -> Error>(self, check: F, error: E) -> Self

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T, F> Assert<F> for T
where - T: Debug, - F: Fn(&Self) -> bool,

\ No newline at end of file + fn assert_or_revert<E: Fn(&Self) -> Error>(self, check: F, error: E) -> Self; +}

Required Methods§

source

fn assert_or_revert<E: Fn(&Self) -> Error>(self, check: F, error: E) -> Self

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T, F> Assert<F> for T
where + T: Debug, + F: Fn(&Self) -> bool,

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/assert/trait.Unwrap.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/assert/trait.Unwrap.html index db1ea7bc..b995f4cd 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/assert/trait.Unwrap.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/assert/trait.Unwrap.html @@ -1,9 +1,9 @@ -Unwrap in redstone::network::assert - Rust

Trait redstone::network::assert::Unwrap

source ·
pub trait Unwrap<R> {
+Unwrap in redstone::network::assert - Rust

Trait redstone::network::assert::Unwrap

source ·
pub trait Unwrap<R> {
     type ErrorArg;
 
     // Required method
-    fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> R;
-}

Required Associated Types§

Required Methods§

source

fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> R

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T> Unwrap<T> for Option<T>
where - T: Debug,

§

type ErrorArg = ()

source§

fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> T

source§

impl<T, Err> Unwrap<T> for Result<T, Err>
where - T: Debug, - Err: Debug,

§

type ErrorArg = Err

source§

fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> T

Implementors§

\ No newline at end of file + fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> R; +}

Required Associated Types§

Required Methods§

source

fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> R

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T> Unwrap<T> for Option<T>
where + T: Debug,

§

type ErrorArg = ()

source§

fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> T

source§

impl<T, Err> Unwrap<T> for Result<T, Err>
where + T: Debug, + Err: Debug,

§

type ErrorArg = Err

source§

fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> T

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/casper/error/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/casper/error/index.html index 6501c970..d05a628e 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/casper/error/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/casper/error/index.html @@ -1 +1 @@ -redstone::network::casper::error - Rust

Module redstone::network::casper::error

source ·
\ No newline at end of file +redstone::network::casper::error - Rust

Module redstone::network::casper::error

source ·
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/casper/from_bytes_repr/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/casper/from_bytes_repr/index.html index 5cefed58..13121774 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/casper/from_bytes_repr/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/casper/from_bytes_repr/index.html @@ -1 +1 @@ -redstone::network::casper::from_bytes_repr - Rust

Module redstone::network::casper::from_bytes_repr

source ·
\ No newline at end of file +redstone::network::casper::from_bytes_repr - Rust

Module redstone::network::casper::from_bytes_repr

source ·
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/casper/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/casper/index.html index f585fe38..d0e84651 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/casper/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/casper/index.html @@ -1 +1 @@ -redstone::network::casper - Rust

Module redstone::network::casper

source ·

Modules§

Structs§

\ No newline at end of file +redstone::network::casper - Rust

Module redstone::network::casper

source ·

Modules§

Structs§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/casper/struct.Casper.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/casper/struct.Casper.html index a52d09e8..52414550 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/casper/struct.Casper.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/casper/struct.Casper.html @@ -1,12 +1,12 @@ -Casper in redstone::network::casper - Rust

Struct redstone::network::casper::Casper

source ·
pub struct Casper;

Trait Implementations§

Auto Trait Implementations§

§

impl Freeze for Casper

§

impl RefUnwindSafe for Casper

§

impl Send for Casper

§

impl Sync for Casper

§

impl Unpin for Casper

§

impl UnwindSafe for Casper

Blanket Implementations§

source§

impl<T> Any for T
where - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for T
where - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+Casper in redstone::network::casper - Rust

Struct redstone::network::casper::Casper

source ·
pub struct Casper;

Trait Implementations§

Auto Trait Implementations§

§

impl Freeze for Casper

§

impl RefUnwindSafe for Casper

§

impl Send for Casper

§

impl Sync for Casper

§

impl Unpin for Casper

§

impl UnwindSafe for Casper

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where +From<T> for U chooses to do.

+

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/error/enum.Error.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/error/enum.Error.html index b0d0096c..74065a53 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/error/enum.Error.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/error/enum.Error.html @@ -1,19 +1,19 @@ -Error in redstone::network::error - Rust

Enum redstone::network::error::Error

source ·
pub enum Error {
-    ContractError(Box<dyn ContractErrorContent>),
+Error in redstone::network::error - Rust

Enum redstone::network::error::Error

source ·
pub enum Error {
+    ContractError(Box<dyn ContractErrorContent>),
     NumberOverflow(U256),
     ArrayIsEmpty,
-    CryptographicError(usize),
-    SizeNotSupported(usize),
-    WrongRedStoneMarker(Vec<u8>),
-    NonEmptyPayloadRemainder(Vec<u8>),
-    InsufficientSignerCount(usize, usize, U256),
-    TimestampTooOld(usize, u64),
-    TimestampTooFuture(usize, u64),
-    ClonedContractError(u8, String),
+    CryptographicError(usize),
+    SizeNotSupported(usize),
+    WrongRedStoneMarker(Vec<u8>),
+    NonEmptyPayloadRemainder(Vec<u8>),
+    InsufficientSignerCount(usize, usize, U256),
+    TimestampTooOld(usize, u64),
+    TimestampTooFuture(usize, u64),
+    ClonedContractError(u8, String),
 }
Expand description

Errors that can be encountered in the deserializing&decrypting the RedStone payload or just contract execution process.

These errors include issues with contract logic, data types, cryptographic operations, and conditions specific to the requirements.

-

Variants§

§

ContractError(Box<dyn ContractErrorContent>)

Represents errors that arise from the contract itself.

+

Variants§

§

ContractError(Box<dyn ContractErrorContent>)

Represents errors that arise from the contract itself.

This variant is used for encapsulating errors that are specific to the contract’s logic or execution conditions that aren’t covered by more specific error types.

§

NumberOverflow(U256)

Indicates an overflow error with U256 numbers.

@@ -22,44 +22,45 @@
§

ArrayIsEmpty

Used when an expected non-empty array or vector is found to be empty.

This could occur in scenarios where the contract logic requires a non-empty collection of items for the correct operation, for example, during aggregating the values.

-
§

CryptographicError(usize)

Represents errors related to cryptographic operations.

+
§

CryptographicError(usize)

Represents errors related to cryptographic operations.

This includes failures in signature verification, hashing, or other cryptographic processes, with the usize indicating the position or identifier of the failed operation.

-
§

SizeNotSupported(usize)

Signifies that an unsupported size was encountered.

+
§

SizeNotSupported(usize)

Signifies that an unsupported size was encountered.

This could be used when a data structure or input does not meet the expected size requirements for processing.

-
§

WrongRedStoneMarker(Vec<u8>)

Indicates that the marker bytes for RedStone are incorrect.

+
§

WrongRedStoneMarker(Vec<u8>)

Indicates that the marker bytes for RedStone are incorrect.

This error is specific to scenarios where marker or identifier bytes do not match expected values, potentially indicating corrupted or tampered data.

-
§

NonEmptyPayloadRemainder(Vec<u8>)

Used when there is leftover data in a payload that should have been empty.

+
§

NonEmptyPayloadRemainder(Vec<u8>)

Used when there is leftover data in a payload that should have been empty.

This could indicate an error in data parsing or that additional, unexpected data was included in a message or transaction.

-
§

InsufficientSignerCount(usize, usize, U256)

Indicates that the number of signers does not meet the required threshold.

+
§

InsufficientSignerCount(usize, usize, U256)

Indicates that the number of signers does not meet the required threshold.

This variant includes the current number of signers, the required threshold, and potentially a feed_id related to the operation that failed due to insufficient signers.

-
§

TimestampTooOld(usize, u64)

Used when a timestamp is older than allowed by the processor logic.

+
§

TimestampTooOld(usize, u64)

Used when a timestamp is older than allowed by the processor logic.

Includes the position or identifier of the timestamp and the threshold value, indicating that the provided timestamp is too far in the past.

-
§

TimestampTooFuture(usize, u64)

Indicates that a timestamp is further in the future than allowed.

+
§

TimestampTooFuture(usize, u64)

Indicates that a timestamp is further in the future than allowed.

Similar to TimestampTooOld, but for future timestamps exceeding the contract’s acceptance window.

-
§

ClonedContractError(u8, String)

Represents errors that need to clone ContractErrorContent, which is not supported by default.

+
§

ClonedContractError(u8, String)

Represents errors that need to clone ContractErrorContent, which is not supported by default.

This variant allows for the manual duplication of contract error information, including an error code and a descriptive message.

-

Implementations§

source§

impl Error

source

pub fn contract_error<T: ContractErrorContent + 'static>(value: T) -> Error

source

pub(crate) fn code(&self) -> u16

Trait Implementations§

source§

impl Clone for Error

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<Error> for ApiError

source§

fn from(error: Error) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for Error

§

impl !RefUnwindSafe for Error

§

impl !Send for Error

§

impl !Sync for Error

§

impl Unpin for Error

§

impl !UnwindSafe for Error

Blanket Implementations§

source§

impl<T> Any for T
where - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where - T: Debug, - F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where - E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for T
where - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Implementations§

source§

impl Error

source

pub fn contract_error<T: ContractErrorContent + 'static>(value: T) -> Error

source

pub(crate) fn code(&self) -> u16

Trait Implementations§

source§

impl Clone for Error

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<Error> for ApiError

source§

fn from(error: Error) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for Error

§

impl !RefUnwindSafe for Error

§

impl !Send for Error

§

impl !Sync for Error

§

impl Unpin for Error

§

impl !UnwindSafe for Error

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where + T: Debug, + F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where + E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where + T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where - T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where +From<T> for U chooses to do.

+

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/error/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/error/index.html index e083b3b4..96a07109 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/error/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/error/index.html @@ -1 +1 @@ -redstone::network::error - Rust

Module redstone::network::error

source ·

Enums§

  • Errors that can be encountered in the deserializing&decrypting the RedStone payload or just contract execution process.

Traits§

\ No newline at end of file +redstone::network::error - Rust

Module redstone::network::error

source ·

Enums§

  • Errors that can be encountered in the deserializing&decrypting the RedStone payload or just contract execution process.

Traits§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/error/trait.ContractErrorContent.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/error/trait.ContractErrorContent.html index 577c3a6f..03e752aa 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/error/trait.ContractErrorContent.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/error/trait.ContractErrorContent.html @@ -1,5 +1,5 @@ -ContractErrorContent in redstone::network::error - Rust

Trait redstone::network::error::ContractErrorContent

source ·
pub trait ContractErrorContent: Debug {
+ContractErrorContent in redstone::network::error - Rust

Trait redstone::network::error::ContractErrorContent

source ·
pub trait ContractErrorContent: Debug {
     // Required methods
-    fn code(&self) -> u8;
-    fn message(&self) -> String;
-}

Required Methods§

source

fn code(&self) -> u8

source

fn message(&self) -> String

Implementors§

\ No newline at end of file + fn code(&self) -> u8; + fn message(&self) -> String; +}

Required Methods§

source

fn code(&self) -> u8

source

fn message(&self) -> String

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/flattened/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/flattened/index.html index e62982d8..1c855537 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/flattened/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/flattened/index.html @@ -1 +1 @@ -redstone::network::flattened - Rust

Module redstone::network::flattened

source ·

Traits§

\ No newline at end of file +redstone::network::flattened - Rust

Module redstone::network::flattened

source ·

Traits§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/flattened/trait.Flattened.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/flattened/trait.Flattened.html index 5cfae35f..66be7cad 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/flattened/trait.Flattened.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/flattened/trait.Flattened.html @@ -1,4 +1,4 @@ -Flattened in redstone::network::flattened - Rust

Trait redstone::network::flattened::Flattened

source ·
pub trait Flattened<T> {
+Flattened in redstone::network::flattened - Rust

Trait redstone::network::flattened::Flattened

source ·
pub trait Flattened<T> {
     // Required method
     fn flattened(&self) -> T;
-}

Required Methods§

source

fn flattened(&self) -> T

Implementations on Foreign Types§

source§

impl Flattened<<Casper as NetworkSpecific>::BytesRepr> for Vec<Bytes>

Implementors§

\ No newline at end of file +}

Required Methods§

source

fn flattened(&self) -> T

Implementations on Foreign Types§

source§

impl Flattened<<Casper as NetworkSpecific>::BytesRepr> for Vec<Bytes>

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/from_bytes_repr/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/from_bytes_repr/index.html index 037b0f7e..3e91d071 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/from_bytes_repr/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/from_bytes_repr/index.html @@ -1 +1 @@ -redstone::network::from_bytes_repr - Rust

Module redstone::network::from_bytes_repr

source ·

Traits§

\ No newline at end of file +redstone::network::from_bytes_repr - Rust

Module redstone::network::from_bytes_repr

source ·

Traits§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/from_bytes_repr/trait.FromBytesRepr.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/from_bytes_repr/trait.FromBytesRepr.html index 6c56e1ee..60991bfe 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/from_bytes_repr/trait.FromBytesRepr.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/from_bytes_repr/trait.FromBytesRepr.html @@ -1,4 +1,4 @@ -FromBytesRepr in redstone::network::from_bytes_repr - Rust

Trait redstone::network::from_bytes_repr::FromBytesRepr

source ·
pub trait FromBytesRepr<T> {
+FromBytesRepr in redstone::network::from_bytes_repr - Rust

Trait redstone::network::from_bytes_repr::FromBytesRepr

source ·
pub trait FromBytesRepr<T> {
     // Required method
     fn from_bytes_repr(bytes: T) -> Self;
-}

Required Methods§

source

fn from_bytes_repr(bytes: T) -> Self

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file +}

Required Methods§

source

fn from_bytes_repr(bytes: T) -> Self

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/from_bytes_repr/trait.Sanitized.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/from_bytes_repr/trait.Sanitized.html index 79baf865..564f236f 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/from_bytes_repr/trait.Sanitized.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/from_bytes_repr/trait.Sanitized.html @@ -1,4 +1,4 @@ -Sanitized in redstone::network::from_bytes_repr - Rust

Trait redstone::network::from_bytes_repr::Sanitized

source ·
pub trait Sanitized {
+Sanitized in redstone::network::from_bytes_repr - Rust

Trait redstone::network::from_bytes_repr::Sanitized

source ·
pub trait Sanitized {
     // Required method
     fn sanitized(self) -> Self;
-}

Required Methods§

source

fn sanitized(self) -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Sanitized for Vec<u8>

source§

fn sanitized(self) -> Self

Implementors§

\ No newline at end of file +}

Required Methods§

source

fn sanitized(self) -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Sanitized for Vec<u8>

source§

fn sanitized(self) -> Self

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/index.html index 2e9c47bf..8f501788 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/index.html @@ -1 +1 @@ -redstone::network - Rust
\ No newline at end of file +redstone::network - Rust
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/print_debug/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/print_debug/index.html index ac53c72e..18bca892 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/print_debug/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/print_debug/index.html @@ -1 +1 @@ -redstone::network::print_debug - Rust

Module redstone::network::print_debug

source ·
\ No newline at end of file +redstone::network::print_debug - Rust

Module redstone::network::print_debug

source ·
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/constant.VALUE_SIZE.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/constant.VALUE_SIZE.html index 2e47400c..286c9ec3 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/constant.VALUE_SIZE.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/constant.VALUE_SIZE.html @@ -1 +1 @@ -VALUE_SIZE in redstone::network::specific - Rust

Constant redstone::network::specific::VALUE_SIZE

source ·
pub const VALUE_SIZE: usize = <_Network as NetworkSpecific>::VALUE_SIZE; // 32usize
\ No newline at end of file +VALUE_SIZE in redstone::network::specific - Rust

Constant redstone::network::specific::VALUE_SIZE

source ·
pub const VALUE_SIZE: usize = <_Network as NetworkSpecific>::VALUE_SIZE; // 32usize
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/fn.print.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/fn.print.html index 414a9953..267b3a19 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/fn.print.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/fn.print.html @@ -1 +1 @@ -print in redstone::network::specific - Rust

Function redstone::network::specific::print

source ·
pub fn print(_text: String)
\ No newline at end of file +print in redstone::network::specific - Rust

Function redstone::network::specific::print

source ·
pub fn print(_text: String)
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/fn.revert.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/fn.revert.html index 2e9edf89..b38daa81 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/fn.revert.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/fn.revert.html @@ -1 +1 @@ -revert in redstone::network::specific - Rust

Function redstone::network::specific::revert

source ·
pub fn revert(error: Error) -> !
\ No newline at end of file +revert in redstone::network::specific - Rust

Function redstone::network::specific::revert

source ·
pub fn revert(error: Error) -> !
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/index.html index 1378d9dc..36a5939d 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/index.html @@ -1 +1 @@ -redstone::network::specific - Rust

Module redstone::network::specific

source ·

Constants§

Traits§

Functions§

Type Aliases§

\ No newline at end of file +redstone::network::specific - Rust

Module redstone::network::specific

source ·

Constants§

Traits§

Functions§

Type Aliases§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/trait.NetworkSpecific.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/trait.NetworkSpecific.html index 48323dfa..4d22c6b6 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/trait.NetworkSpecific.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/trait.NetworkSpecific.html @@ -1,11 +1,11 @@ -NetworkSpecific in redstone::network::specific - Rust

Trait redstone::network::specific::NetworkSpecific

source ·
pub trait NetworkSpecific {
-    type BytesRepr: From<Vec<u8>> + Into<Vec<u8>>;
-    type ValueRepr: FromBytesRepr<Vec<u8>>;
+NetworkSpecific in redstone::network::specific - Rust

Trait redstone::network::specific::NetworkSpecific

source ·
pub trait NetworkSpecific {
+    type BytesRepr: From<Vec<u8>> + Into<Vec<u8>>;
+    type ValueRepr: FromBytesRepr<Vec<u8>>;
     type _Self;
 
-    const VALUE_SIZE: usize;
+    const VALUE_SIZE: usize;
 
     // Required methods
-    fn print(_text: String);
-    fn revert(error: Error) -> !;
-}

Required Associated Types§

Required Associated Constants§

Required Methods§

source

fn print(_text: String)

source

fn revert(error: Error) -> !

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file + fn print(_text: String); + fn revert(error: Error) -> !; +}

Required Associated Types§

Required Associated Constants§

Required Methods§

source

fn print(_text: String)

source

fn revert(error: Error) -> !

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/type.Bytes.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/type.Bytes.html index 04a40a5a..4f99def8 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/type.Bytes.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/type.Bytes.html @@ -1 +1 @@ -Bytes in redstone::network::specific - Rust

Type Alias redstone::network::specific::Bytes

source ·
pub type Bytes = <_Network as NetworkSpecific>::BytesRepr;
\ No newline at end of file +Bytes in redstone::network::specific - Rust

Type Alias redstone::network::specific::Bytes

source ·
pub type Bytes = <_Network as NetworkSpecific>::BytesRepr;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/type.Network.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/type.Network.html index 40e404c9..506ed82a 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/type.Network.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/type.Network.html @@ -1 +1 @@ -Network in redstone::network::specific - Rust

Type Alias redstone::network::specific::Network

source ·
pub(crate) type Network = <_Network as NetworkSpecific>::_Self;
\ No newline at end of file +Network in redstone::network::specific - Rust

Type Alias redstone::network::specific::Network

source ·
pub(crate) type Network = <_Network as NetworkSpecific>::_Self;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/type.U256.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/type.U256.html index 4b103256..02ad6f0a 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/type.U256.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/type.U256.html @@ -1 +1 @@ -U256 in redstone::network::specific - Rust

Type Alias redstone::network::specific::U256

source ·
pub type U256 = <_Network as NetworkSpecific>::ValueRepr;

Trait Implementations§

\ No newline at end of file +U256 in redstone::network::specific - Rust

Type Alias redstone::network::specific::U256

source ·
pub type U256 = <_Network as NetworkSpecific>::ValueRepr;

Trait Implementations§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/type._Network.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/type._Network.html index bf814c95..f607372a 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/type._Network.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/type._Network.html @@ -1 +1 @@ -_Network in redstone::network - Rust

Type Alias redstone::network::_Network

source ·
pub type _Network = Casper;

Aliased Type§

struct _Network;
\ No newline at end of file +_Network in redstone::network - Rust

Type Alias redstone::network::_Network

source ·
pub type _Network = Casper;

Aliased Type§

struct _Network;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.DATA_FEED_ID_BS.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.DATA_FEED_ID_BS.html index 72b04b86..8a6e1da5 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.DATA_FEED_ID_BS.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.DATA_FEED_ID_BS.html @@ -1 +1 @@ -DATA_FEED_ID_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::DATA_FEED_ID_BS

source ·
pub(crate) const DATA_FEED_ID_BS: usize = 32;
\ No newline at end of file +DATA_FEED_ID_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::DATA_FEED_ID_BS

source ·
pub(crate) const DATA_FEED_ID_BS: usize = 32;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.DATA_PACKAGES_COUNT_BS.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.DATA_PACKAGES_COUNT_BS.html index fed432b2..5785e972 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.DATA_PACKAGES_COUNT_BS.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.DATA_PACKAGES_COUNT_BS.html @@ -1 +1 @@ -DATA_PACKAGES_COUNT_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::DATA_PACKAGES_COUNT_BS

source ·
pub(crate) const DATA_PACKAGES_COUNT_BS: usize = 2;
\ No newline at end of file +DATA_PACKAGES_COUNT_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::DATA_PACKAGES_COUNT_BS

source ·
pub(crate) const DATA_PACKAGES_COUNT_BS: usize = 2;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.DATA_POINTS_COUNT_BS.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.DATA_POINTS_COUNT_BS.html index f25ed2f5..dfe6f9fa 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.DATA_POINTS_COUNT_BS.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.DATA_POINTS_COUNT_BS.html @@ -1 +1 @@ -DATA_POINTS_COUNT_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::DATA_POINTS_COUNT_BS

source ·
pub(crate) const DATA_POINTS_COUNT_BS: usize = 3;
\ No newline at end of file +DATA_POINTS_COUNT_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::DATA_POINTS_COUNT_BS

source ·
pub(crate) const DATA_POINTS_COUNT_BS: usize = 3;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.DATA_POINT_VALUE_BYTE_SIZE_BS.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.DATA_POINT_VALUE_BYTE_SIZE_BS.html index 95f9c3d5..2ac22658 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.DATA_POINT_VALUE_BYTE_SIZE_BS.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.DATA_POINT_VALUE_BYTE_SIZE_BS.html @@ -1 +1 @@ -DATA_POINT_VALUE_BYTE_SIZE_BS in redstone::protocol::constants - Rust
pub(crate) const DATA_POINT_VALUE_BYTE_SIZE_BS: usize = 4;
\ No newline at end of file +DATA_POINT_VALUE_BYTE_SIZE_BS in redstone::protocol::constants - Rust
pub(crate) const DATA_POINT_VALUE_BYTE_SIZE_BS: usize = 4;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.MAX_TIMESTAMP_AHEAD_MS.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.MAX_TIMESTAMP_AHEAD_MS.html index 160a69a6..748a6718 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.MAX_TIMESTAMP_AHEAD_MS.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.MAX_TIMESTAMP_AHEAD_MS.html @@ -1 +1 @@ -MAX_TIMESTAMP_AHEAD_MS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::MAX_TIMESTAMP_AHEAD_MS

source ·
pub(crate) const MAX_TIMESTAMP_AHEAD_MS: u64 = _; // 180_000u64
\ No newline at end of file +MAX_TIMESTAMP_AHEAD_MS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::MAX_TIMESTAMP_AHEAD_MS

source ·
pub(crate) const MAX_TIMESTAMP_AHEAD_MS: u64 = _; // 180_000u64
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.MAX_TIMESTAMP_DELAY_MS.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.MAX_TIMESTAMP_DELAY_MS.html index 47c72d3b..29966450 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.MAX_TIMESTAMP_DELAY_MS.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.MAX_TIMESTAMP_DELAY_MS.html @@ -1 +1 @@ -MAX_TIMESTAMP_DELAY_MS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::MAX_TIMESTAMP_DELAY_MS

source ·
pub(crate) const MAX_TIMESTAMP_DELAY_MS: u64 = _; // 900_000u64
\ No newline at end of file +MAX_TIMESTAMP_DELAY_MS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::MAX_TIMESTAMP_DELAY_MS

source ·
pub(crate) const MAX_TIMESTAMP_DELAY_MS: u64 = _; // 900_000u64
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.REDSTONE_MARKER.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.REDSTONE_MARKER.html index 07258216..29b8c249 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.REDSTONE_MARKER.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.REDSTONE_MARKER.html @@ -1 +1 @@ -REDSTONE_MARKER in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::REDSTONE_MARKER

source ·
pub(crate) const REDSTONE_MARKER: [u8; 9];
\ No newline at end of file +REDSTONE_MARKER in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::REDSTONE_MARKER

source ·
pub(crate) const REDSTONE_MARKER: [u8; 9];
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.REDSTONE_MARKER_BS.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.REDSTONE_MARKER_BS.html index 21ea69ca..6a9ebb32 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.REDSTONE_MARKER_BS.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.REDSTONE_MARKER_BS.html @@ -1 +1 @@ -REDSTONE_MARKER_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::REDSTONE_MARKER_BS

source ·
pub(crate) const REDSTONE_MARKER_BS: usize = 9;
\ No newline at end of file +REDSTONE_MARKER_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::REDSTONE_MARKER_BS

source ·
pub(crate) const REDSTONE_MARKER_BS: usize = 9;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.SIGNATURE_BS.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.SIGNATURE_BS.html index 2a3a5b7f..ca094747 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.SIGNATURE_BS.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.SIGNATURE_BS.html @@ -1 +1 @@ -SIGNATURE_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::SIGNATURE_BS

source ·
pub(crate) const SIGNATURE_BS: usize = 65;
\ No newline at end of file +SIGNATURE_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::SIGNATURE_BS

source ·
pub(crate) const SIGNATURE_BS: usize = 65;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.TIMESTAMP_BS.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.TIMESTAMP_BS.html index 1635207a..38d27451 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.TIMESTAMP_BS.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.TIMESTAMP_BS.html @@ -1 +1 @@ -TIMESTAMP_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::TIMESTAMP_BS

source ·
pub(crate) const TIMESTAMP_BS: usize = 6;
\ No newline at end of file +TIMESTAMP_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::TIMESTAMP_BS

source ·
pub(crate) const TIMESTAMP_BS: usize = 6;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.UNSIGNED_METADATA_BYTE_SIZE_BS.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.UNSIGNED_METADATA_BYTE_SIZE_BS.html index a7ccdc60..3b0a9907 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.UNSIGNED_METADATA_BYTE_SIZE_BS.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.UNSIGNED_METADATA_BYTE_SIZE_BS.html @@ -1 +1 @@ -UNSIGNED_METADATA_BYTE_SIZE_BS in redstone::protocol::constants - Rust
pub(crate) const UNSIGNED_METADATA_BYTE_SIZE_BS: usize = 3;
\ No newline at end of file +UNSIGNED_METADATA_BYTE_SIZE_BS in redstone::protocol::constants - Rust
pub(crate) const UNSIGNED_METADATA_BYTE_SIZE_BS: usize = 3;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/index.html index 0268cb89..2eb1f7cf 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/index.html @@ -1 +1 @@ -redstone::protocol::constants - Rust
\ No newline at end of file +redstone::protocol::constants - Rust
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_package/fn.trim_data_package.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_package/fn.trim_data_package.html index f1456016..25bf7e05 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_package/fn.trim_data_package.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_package/fn.trim_data_package.html @@ -1 +1 @@ -trim_data_package in redstone::protocol::data_package - Rust

Function redstone::protocol::data_package::trim_data_package

source ·
fn trim_data_package(payload: &mut Vec<u8>) -> DataPackage
\ No newline at end of file +trim_data_package in redstone::protocol::data_package - Rust

Function redstone::protocol::data_package::trim_data_package

source ·
fn trim_data_package(payload: &mut Vec<u8>) -> DataPackage
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_package/fn.trim_data_packages.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_package/fn.trim_data_packages.html index 393e9998..7ae9270e 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_package/fn.trim_data_packages.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_package/fn.trim_data_packages.html @@ -1,4 +1,4 @@ -trim_data_packages in redstone::protocol::data_package - Rust

Function redstone::protocol::data_package::trim_data_packages

source ·
pub(crate) fn trim_data_packages(
-    payload: &mut Vec<u8>,
-    count: usize,
-) -> Vec<DataPackage>
\ No newline at end of file +trim_data_packages in redstone::protocol::data_package - Rust

Function redstone::protocol::data_package::trim_data_packages

source ·
pub(crate) fn trim_data_packages(
+    payload: &mut Vec<u8>,
+    count: usize,
+) -> Vec<DataPackage>
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_package/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_package/index.html index 4f7ef4c4..71e2a3df 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_package/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_package/index.html @@ -1 +1 @@ -redstone::protocol::data_package - Rust

Module redstone::protocol::data_package

source ·

Structs§

Functions§

\ No newline at end of file +redstone::protocol::data_package - Rust

Module redstone::protocol::data_package

source ·

Structs§

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_package/struct.DataPackage.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_package/struct.DataPackage.html index b77c9d35..1cdc961b 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_package/struct.DataPackage.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_package/struct.DataPackage.html @@ -1,22 +1,23 @@ -DataPackage in redstone::protocol::data_package - Rust

Struct redstone::protocol::data_package::DataPackage

source ·
pub(crate) struct DataPackage {
-    pub(crate) signer_address: Vec<u8>,
-    pub(crate) timestamp: u64,
-    pub(crate) data_points: Vec<DataPoint>,
-}

Fields§

§signer_address: Vec<u8>§timestamp: u64§data_points: Vec<DataPoint>

Trait Implementations§

source§

impl Clone for DataPackage

source§

fn clone(&self) -> DataPackage

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DataPackage

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for DataPackage

source§

fn eq(&self, other: &DataPackage) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Eq for DataPackage

source§

impl StructuralPartialEq for DataPackage

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where - T: Debug, - F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where - E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for T
where - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+DataPackage in redstone::protocol::data_package - Rust

Struct redstone::protocol::data_package::DataPackage

source ·
pub(crate) struct DataPackage {
+    pub(crate) signer_address: Vec<u8>,
+    pub(crate) timestamp: u64,
+    pub(crate) data_points: Vec<DataPoint>,
+}

Fields§

§signer_address: Vec<u8>§timestamp: u64§data_points: Vec<DataPoint>

Trait Implementations§

source§

impl Clone for DataPackage

source§

fn clone(&self) -> DataPackage

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DataPackage

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for DataPackage

source§

fn eq(&self, other: &DataPackage) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for DataPackage

source§

impl StructuralPartialEq for DataPackage

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where + T: Debug, + F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where + E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where + T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where +From<T> for U chooses to do.

+

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_point/fn.trim_data_point.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_point/fn.trim_data_point.html index 10a3aa68..ef63a213 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_point/fn.trim_data_point.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_point/fn.trim_data_point.html @@ -1 +1 @@ -trim_data_point in redstone::protocol::data_point - Rust

Function redstone::protocol::data_point::trim_data_point

source ·
fn trim_data_point(payload: &mut Vec<u8>, value_size: usize) -> DataPoint
\ No newline at end of file +trim_data_point in redstone::protocol::data_point - Rust

Function redstone::protocol::data_point::trim_data_point

source ·
fn trim_data_point(payload: &mut Vec<u8>, value_size: usize) -> DataPoint
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_point/fn.trim_data_points.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_point/fn.trim_data_points.html index 4bc76a0f..6c2d70c3 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_point/fn.trim_data_points.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_point/fn.trim_data_points.html @@ -1,5 +1,5 @@ -trim_data_points in redstone::protocol::data_point - Rust

Function redstone::protocol::data_point::trim_data_points

source ·
pub(crate) fn trim_data_points(
-    payload: &mut Vec<u8>,
-    count: usize,
-    value_size: usize,
-) -> Vec<DataPoint>
\ No newline at end of file +trim_data_points in redstone::protocol::data_point - Rust

Function redstone::protocol::data_point::trim_data_points

source ·
pub(crate) fn trim_data_points(
+    payload: &mut Vec<u8>,
+    count: usize,
+    value_size: usize,
+) -> Vec<DataPoint>
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_point/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_point/index.html index 6ab1baf0..47323ad6 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_point/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_point/index.html @@ -1 +1 @@ -redstone::protocol::data_point - Rust

Module redstone::protocol::data_point

source ·

Structs§

Functions§

\ No newline at end of file +redstone::protocol::data_point - Rust

Module redstone::protocol::data_point

source ·

Structs§

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_point/struct.DataPoint.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_point/struct.DataPoint.html index 4cee4899..eee0d029 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_point/struct.DataPoint.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_point/struct.DataPoint.html @@ -1,21 +1,22 @@ -DataPoint in redstone::protocol::data_point - Rust

Struct redstone::protocol::data_point::DataPoint

source ·
pub(crate) struct DataPoint {
+DataPoint in redstone::protocol::data_point - Rust

Struct redstone::protocol::data_point::DataPoint

source ·
pub(crate) struct DataPoint {
     pub(crate) feed_id: U256,
     pub(crate) value: U256,
-}

Fields§

§feed_id: U256§value: U256

Trait Implementations§

source§

impl Clone for DataPoint

source§

fn clone(&self) -> DataPoint

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DataPoint

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for DataPoint

source§

fn eq(&self, other: &DataPoint) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Eq for DataPoint

source§

impl StructuralPartialEq for DataPoint

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where - T: Debug, - F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where - E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for T
where - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+}

Fields§

§feed_id: U256§value: U256

Trait Implementations§

source§

impl Clone for DataPoint

source§

fn clone(&self) -> DataPoint

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DataPoint

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for DataPoint

source§

fn eq(&self, other: &DataPoint) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for DataPoint

source§

impl StructuralPartialEq for DataPoint

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where + T: Debug, + F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where + E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where + T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where +From<T> for U chooses to do.

+

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/index.html index d221f7b2..933f37aa 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/index.html @@ -1 +1 @@ -redstone::protocol - Rust

Module redstone::protocol

source ·

Modules§

\ No newline at end of file +redstone::protocol - Rust

Module redstone::protocol

source ·

Modules§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/marker/fn.trim_redstone_marker.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/marker/fn.trim_redstone_marker.html index fb7c7144..01093e84 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/marker/fn.trim_redstone_marker.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/marker/fn.trim_redstone_marker.html @@ -1 +1 @@ -trim_redstone_marker in redstone::protocol::marker - Rust

Function redstone::protocol::marker::trim_redstone_marker

source ·
pub fn trim_redstone_marker(payload: &mut Vec<u8>)
\ No newline at end of file +trim_redstone_marker in redstone::protocol::marker - Rust

Function redstone::protocol::marker::trim_redstone_marker

source ·
pub fn trim_redstone_marker(payload: &mut Vec<u8>)
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/marker/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/marker/index.html index 9844daf7..0ac4ef1d 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/marker/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/marker/index.html @@ -1 +1 @@ -redstone::protocol::marker - Rust

Module redstone::protocol::marker

source ·

Functions§

\ No newline at end of file +redstone::protocol::marker - Rust

Module redstone::protocol::marker

source ·

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/payload/fn.trim_metadata.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/payload/fn.trim_metadata.html index b3e6350e..ce8dcf29 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/payload/fn.trim_metadata.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/payload/fn.trim_metadata.html @@ -1 +1 @@ -trim_metadata in redstone::protocol::payload - Rust

Function redstone::protocol::payload::trim_metadata

source ·
fn trim_metadata(payload: &mut Vec<u8>) -> usize
\ No newline at end of file +trim_metadata in redstone::protocol::payload - Rust

Function redstone::protocol::payload::trim_metadata

source ·
fn trim_metadata(payload: &mut Vec<u8>) -> usize
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/payload/fn.trim_payload.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/payload/fn.trim_payload.html index 9eae9fdd..9805f954 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/payload/fn.trim_payload.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/payload/fn.trim_payload.html @@ -1 +1 @@ -trim_payload in redstone::protocol::payload - Rust

Function redstone::protocol::payload::trim_payload

source ·
fn trim_payload(payload: &mut Vec<u8>) -> Payload
\ No newline at end of file +trim_payload in redstone::protocol::payload - Rust

Function redstone::protocol::payload::trim_payload

source ·
fn trim_payload(payload: &mut Vec<u8>) -> Payload
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/payload/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/payload/index.html index 7bedf304..7ef700d8 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/payload/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/payload/index.html @@ -1 +1 @@ -redstone::protocol::payload - Rust

Module redstone::protocol::payload

source ·

Structs§

Functions§

\ No newline at end of file +redstone::protocol::payload - Rust

Module redstone::protocol::payload

source ·

Structs§

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/payload/struct.Payload.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/payload/struct.Payload.html index 9234341b..94e5a48e 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/payload/struct.Payload.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/payload/struct.Payload.html @@ -1,18 +1,19 @@ -Payload in redstone::protocol::payload - Rust

Struct redstone::protocol::payload::Payload

source ·
pub(crate) struct Payload {
-    pub(crate) data_packages: Vec<DataPackage>,
-}

Fields§

§data_packages: Vec<DataPackage>

Implementations§

source§

impl Payload

source

pub(crate) fn make(payload_bytes: &mut Vec<u8>) -> Payload

Trait Implementations§

source§

impl Clone for Payload

source§

fn clone(&self) -> Payload

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Payload

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where - T: Debug, - F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where - E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for T
where - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+Payload in redstone::protocol::payload - Rust

Struct redstone::protocol::payload::Payload

source ·
pub(crate) struct Payload {
+    pub(crate) data_packages: Vec<DataPackage>,
+}

Fields§

§data_packages: Vec<DataPackage>

Implementations§

source§

impl Payload

source

pub(crate) fn make(payload_bytes: &mut Vec<u8>) -> Payload

Trait Implementations§

source§

impl Clone for Payload

source§

fn clone(&self) -> Payload

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Payload

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where + T: Debug, + F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where + E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where + T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where +From<T> for U chooses to do.

+

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/filter/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/filter/index.html index a153fc5f..fa4dd4df 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/filter/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/filter/index.html @@ -1 +1 @@ -redstone::utils::filter - Rust

Module redstone::utils::filter

source ·

Traits§

\ No newline at end of file +redstone::utils::filter - Rust

Module redstone::utils::filter

source ·

Traits§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/filter/trait.FilterSome.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/filter/trait.FilterSome.html index 69bc1f28..d00cce8b 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/filter/trait.FilterSome.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/filter/trait.FilterSome.html @@ -1,4 +1,4 @@ -FilterSome in redstone::utils::filter - Rust

Trait redstone::utils::filter::FilterSome

source ·
pub(crate) trait FilterSome<Output> {
+FilterSome in redstone::utils::filter - Rust

Trait redstone::utils::filter::FilterSome

source ·
pub(crate) trait FilterSome<Output> {
     // Required method
     fn filter_some(&self) -> Output;
-}

Required Methods§

source

fn filter_some(&self) -> Output

Implementations on Foreign Types§

source§

impl<T: Copy> FilterSome<Vec<T>> for [Option<T>]

source§

fn filter_some(&self) -> Vec<T>

Implementors§

\ No newline at end of file +}

Required Methods§

source

fn filter_some(&self) -> Output

Implementations on Foreign Types§

source§

impl<T: Copy> FilterSome<Vec<T>> for [Option<T>]

source§

fn filter_some(&self) -> Vec<T>

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/index.html index ef51ef17..d5ce81a0 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/index.html @@ -1 +1 @@ -redstone::utils - Rust

Module redstone::utils

source ·

Modules§

\ No newline at end of file +redstone::utils - Rust

Module redstone::utils

source ·

Modules§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/median/fn.maybe_pick_median.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/median/fn.maybe_pick_median.html index ebb4b4a4..027bd4bd 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/median/fn.maybe_pick_median.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/median/fn.maybe_pick_median.html @@ -1,2 +1,2 @@ -maybe_pick_median in redstone::utils::median - Rust

Function redstone::utils::median::maybe_pick_median

source ·
fn maybe_pick_median<T>(a: T, b: T, c: T) -> Option<T>
where - T: PartialOrd,
\ No newline at end of file +maybe_pick_median in redstone::utils::median - Rust

Function redstone::utils::median::maybe_pick_median

source ·
fn maybe_pick_median<T>(a: T, b: T, c: T) -> Option<T>
where + T: PartialOrd,
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/median/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/median/index.html index 9a4952c3..18678dad 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/median/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/median/index.html @@ -1 +1 @@ -redstone::utils::median - Rust

Module redstone::utils::median

source ·

Traits§

Functions§

\ No newline at end of file +redstone::utils::median - Rust

Module redstone::utils::median

source ·

Traits§

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/median/trait.Averageable.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/median/trait.Averageable.html index 87e04bd4..4bd8874e 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/median/trait.Averageable.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/median/trait.Averageable.html @@ -1 +1 @@ -Averageable in redstone::utils::median - Rust

Trait redstone::utils::median::Averageable

source ·
trait Averageable: Add<Output = Self> + Shr<Output = Self> + From<u8> + Rem<Output = Self> + Copy { }

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Averageable for i32

Implementors§

\ No newline at end of file +Averageable in redstone::utils::median - Rust

Trait redstone::utils::median::Averageable

source ·
trait Averageable: Add<Output = Self> + Shr<Output = Self> + From<u8> + Rem<Output = Self> + Copy { }

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Averageable for i32

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/median/trait.Avg.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/median/trait.Avg.html index 200d300b..bd2c4cfd 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/median/trait.Avg.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/median/trait.Avg.html @@ -1,5 +1,5 @@ -Avg in redstone::utils::median - Rust

Trait redstone::utils::median::Avg

source ·
trait Avg {
+Avg in redstone::utils::median - Rust

Trait redstone::utils::median::Avg

source ·
trait Avg {
     // Required method
     fn avg(self, other: Self) -> Self;
-}

Required Methods§

source

fn avg(self, other: Self) -> Self

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> Avg for T
where +}

Required Methods§

source

fn avg(self, other: Self) -> Self

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> Avg for T
where T: Averageable,

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/median/trait.Median.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/median/trait.Median.html index 60047574..405ac93d 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/median/trait.Median.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/median/trait.Median.html @@ -1,7 +1,7 @@ -Median in redstone::utils::median - Rust

Trait redstone::utils::median::Median

source ·
pub(crate) trait Median {
+Median in redstone::utils::median - Rust

Trait redstone::utils::median::Median

source ·
pub(crate) trait Median {
     type Item;
 
     // Required method
     fn median(self) -> Self::Item;
-}

Required Associated Types§

Required Methods§

source

fn median(self) -> Self::Item

Implementations on Foreign Types§

source§

impl<T> Median for Vec<T>
where - T: Copy + Ord + Avg,

§

type Item = T

source§

fn median(self) -> Self::Item

Implementors§

\ No newline at end of file +}

Required Associated Types§

Required Methods§

source

fn median(self) -> Self::Item

Implementations on Foreign Types§

source§

impl<T> Median for Vec<T>
where + T: Copy + Ord + Avg,

§

type Item = T

source§

fn median(self) -> Self::Item

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/trim/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/trim/index.html index e7e6608a..b4c2c47c 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/trim/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/trim/index.html @@ -1 +1 @@ -redstone::utils::trim - Rust

Module redstone::utils::trim

source ·

Traits§

\ No newline at end of file +redstone::utils::trim - Rust

Module redstone::utils::trim

source ·

Traits§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/trim/trait.Trim.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/trim/trait.Trim.html index 9939a0b8..bd95e2a7 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/trim/trait.Trim.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/trim/trait.Trim.html @@ -1,5 +1,5 @@ -Trim in redstone::utils::trim - Rust

Trait redstone::utils::trim::Trim

source ·
pub trait Trim<T>
where - Self: Sized,
{ +Trim in redstone::utils::trim - Rust

Trait redstone::utils::trim::Trim

source ·
pub trait Trim<T>
where + Self: Sized,
{ // Required method - fn trim_end(&mut self, len: usize) -> T; -}

Required Methods§

source

fn trim_end(&mut self, len: usize) -> T

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Trim<<Casper as NetworkSpecific>::ValueRepr> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> U256

source§

impl Trim<u64> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> u64

source§

impl Trim<usize> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> usize

source§

impl Trim<Vec<u8>> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> Self

Implementors§

\ No newline at end of file + fn trim_end(&mut self, len: usize) -> T; +}

Required Methods§

source

fn trim_end(&mut self, len: usize) -> T

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Trim<<Casper as NetworkSpecific>::ValueRepr> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> U256

source§

impl Trim<u64> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> u64

source§

impl Trim<usize> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> usize

source§

impl Trim<Vec<u8>> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> Self

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/trim_zeros/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/trim_zeros/index.html index 2a2fd9e0..9377f30d 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/trim_zeros/index.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/trim_zeros/index.html @@ -1 +1 @@ -redstone::utils::trim_zeros - Rust

Module redstone::utils::trim_zeros

source ·

Traits§

\ No newline at end of file +redstone::utils::trim_zeros - Rust

Module redstone::utils::trim_zeros

source ·

Traits§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/trim_zeros/trait.TrimZeros.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/trim_zeros/trait.TrimZeros.html index f1299ca4..ae49a55d 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/trim_zeros/trait.TrimZeros.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/trim_zeros/trait.TrimZeros.html @@ -1,4 +1,4 @@ -TrimZeros in redstone::utils::trim_zeros - Rust

Trait redstone::utils::trim_zeros::TrimZeros

source ·
pub trait TrimZeros {
+TrimZeros in redstone::utils::trim_zeros - Rust

Trait redstone::utils::trim_zeros::TrimZeros

source ·
pub trait TrimZeros {
     // Required method
     fn trim_zeros(self) -> Self;
-}

Required Methods§

source

fn trim_zeros(self) -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl TrimZeros for Vec<u8>

source§

fn trim_zeros(self) -> Self

Implementors§

\ No newline at end of file +}

Required Methods§

source

fn trim_zeros(self) -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl TrimZeros for Vec<u8>

source§

fn trim_zeros(self) -> Self

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/search-index.js b/static/rust/redstone/crypto_secp256k1,network_casper/search-index.js index d080deeb..2cd20668 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/search-index.js +++ b/static/rust/redstone/crypto_secp256k1,network_casper/search-index.js @@ -1,5 +1,5 @@ var searchIndex = new Map(JSON.parse('[\ -["redstone",{"t":"CCCQQCCCCCCCIHHHFNONNONNNNONONNNNNNHHFNNNNNNNONNNONKMMMMCCHCHHICCCCCCCCKKMMKRKHMHMFNNCNCNNNNNNNPPPKPGPPPPPPPNNNNNMNNNNNNMNNNNNNKMKKMMIRIKISTRRNNNHMHMCCCCCSSSSSSSSSSSFNNNNNONNNNOONHHNNNNFNNNNNNONNNNHHNNNONHFNNNNNONNNNNHHNNNNCCCCKMKKRKMHMKMKM","n":["core","crypto","network","print_and_panic","print_debug","protocol","utils","aggregator","config","processor","processor_result","validator","Matrix","aggregate_matrix","aggregate_values","make_value_signer_matrix","Config","assert_or_revert","block_timestamp","borrow","borrow_mut","feed_ids","feed_index","fmt","from","into","signer_count_threshold","signer_index","signers","try_from","try_into","type_id","validate_signer_count_threshold","validate_timestamp","vzip","make_processor_result","process_payload","ProcessorResult","assert_or_revert","borrow","borrow_mut","eq","fmt","from","into","min_timestamp","try_from","try_into","type_id","values","vzip","Validator","feed_index","signer_index","validate_signer_count_threshold","validate_timestamp","keccak256","recover","keccak256","crypto256","recover_address","recover_public_key","_Network","as_str","assert","casper","error","flattened","from_bytes_repr","print_debug","specific","AsAsciiStr","AsHexStr","as_ascii_str","as_hex_str","Assert","ErrorArg","Unwrap","assert_or_revert","assert_or_revert","assert_or_revert_bool_with","unwrap_or_revert","Casper","borrow","borrow_mut","error","from","from_bytes_repr","into","print","revert","try_from","try_into","type_id","vzip","ArrayIsEmpty","ClonedContractError","ContractError","ContractErrorContent","CryptographicError","Error","InsufficientSignerCount","NonEmptyPayloadRemainder","NumberOverflow","SizeNotSupported","TimestampTooFuture","TimestampTooOld","WrongRedStoneMarker","assert_or_revert","borrow","borrow_mut","clone","clone_into","code","code","contract_error","fmt","fmt","from","into","message","to_owned","to_string","try_from","try_into","type_id","vzip","Flattened","flattened","FromBytesRepr","Sanitized","from_bytes_repr","sanitized","Bytes","BytesRepr","Network","NetworkSpecific","U256","VALUE_SIZE","VALUE_SIZE","ValueRepr","_Self","as_ascii_str","as_hex_str","from_bytes_repr","print","print","revert","revert","constants","data_package","data_point","marker","payload","DATA_FEED_ID_BS","DATA_PACKAGES_COUNT_BS","DATA_POINTS_COUNT_BS","DATA_POINT_VALUE_BYTE_SIZE_BS","MAX_TIMESTAMP_AHEAD_MS","MAX_TIMESTAMP_DELAY_MS","REDSTONE_MARKER","REDSTONE_MARKER_BS","SIGNATURE_BS","TIMESTAMP_BS","UNSIGNED_METADATA_BYTE_SIZE_BS","DataPackage","assert_or_revert","borrow","borrow_mut","clone","clone_into","data_points","eq","fmt","from","into","signer_address","timestamp","to_owned","trim_data_package","trim_data_packages","try_from","try_into","type_id","vzip","DataPoint","assert_or_revert","borrow","borrow_mut","clone","clone_into","eq","feed_id","fmt","from","into","to_owned","trim_data_point","trim_data_points","try_from","try_into","type_id","value","vzip","trim_redstone_marker","Payload","assert_or_revert","borrow","borrow_mut","clone","clone_into","data_packages","fmt","from","into","make","to_owned","trim_metadata","trim_payload","try_from","try_into","type_id","vzip","filter","median","trim","trim_zeros","FilterSome","filter_some","Averageable","Avg","Item","Median","avg","maybe_pick_median","median","Trim","trim_end","TrimZeros","trim_zeros"],"q":[[0,"redstone"],[7,"redstone::core"],[12,"redstone::core::aggregator"],[16,"redstone::core::config"],[35,"redstone::core::processor"],[37,"redstone::core::processor_result"],[51,"redstone::core::validator"],[56,"redstone::crypto"],[58,"redstone::crypto::keccak256"],[59,"redstone::crypto::recover"],[61,"redstone::crypto::recover::crypto256"],[62,"redstone::network"],[71,"redstone::network::as_str"],[75,"redstone::network::assert"],[82,"redstone::network::casper"],[95,"redstone::network::error"],[127,"redstone::network::flattened"],[129,"redstone::network::from_bytes_repr"],[133,"redstone::network::specific"],[149,"redstone::protocol"],[154,"redstone::protocol::constants"],[165,"redstone::protocol::data_package"],[185,"redstone::protocol::data_point"],[204,"redstone::protocol::marker"],[205,"redstone::protocol::payload"],[223,"redstone::utils"],[227,"redstone::utils::filter"],[229,"redstone::utils::median"],[236,"redstone::utils::trim"],[238,"redstone::utils::trim_zeros"],[240,"core::option"],[241,"alloc::vec"],[242,"core::ops::function"],[243,"core::fmt"],[244,"core::result"],[245,"core::any"],[246,"alloc::boxed"],[247,"alloc::string"],[248,"core::cmp"]],"i":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,20,20,20,20,20,20,20,20,20,20,20,20,20,0,23,23,23,23,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,27,0,33,0,0,30,0,33,0,48,48,0,48,0,48,48,48,48,48,48,48,8,8,8,0,8,0,8,8,8,8,8,8,8,8,8,8,8,8,35,8,8,8,8,8,8,35,8,8,8,8,8,8,0,37,0,0,38,39,0,49,0,0,0,0,49,49,49,1,1,1,0,49,0,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,5,5,5,5,0,40,40,40,40,40,40,40,40,40,40,40,0,0,40,40,40,40,40,0,0,19,19,19,19,19,19,19,19,19,19,19,0,0,19,19,19,19,0,0,0,0,0,41,0,0,45,0,42,0,45,0,46,0,47],"f":"`````````````{{{f{{f{{d{b}}}}}}h}{{f{b}}}}{{h{f{j}}}{{f{b}}}}{{{l{h}}{f{j}}}{{f{{f{{d{b}}}}}}}}`{{cei}g{}{}{}{{Ab{{l{g}}}{{n{A`}}}}}}`{{{l{c}}}{{l{e}}}{}{}}{{{l{Adc}}}{{l{Ade}}}{}{}}`{{{l{h}}b}{{d{Af}}}}{{{l{h}}{l{AdAh}}}Aj}{cc{}}{ce{}{}}`{{{l{h}}{l{{An{Al}}}}}{{d{Af}}}}`{c{{B`{e}}}{}{}}0{{{l{c}}}Bb{}}{{{l{h}}Af{l{{An{{d{b}}}}}}}{{f{b}}}}{{{l{h}}AfBd}Bd}5{{hBf}Bh}{{hBj}Bh}`=<;{{{l{Bh}}{l{Bh}}}Bl}{{{l{Bh}}{l{AdAh}}}Aj}:9`776`9`{{{l{Bn}}b}{{d{Af}}}}{{{l{Bn}}{l{{An{Al}}}}}{{d{Af}}}}{{{l{Bn}}Af{l{{An{{d{b}}}}}}}{{f{b}}}}{{{l{Bn}}AfBd}Bd}``{{{l{{An{Al}}}}}{{C`{{An{Al}}}}}}`{{{f{Al}}{f{Al}}}{{f{Al}}}}{{{C`{{An{Al}}}}{l{{An{Al}}}}Al}{{C`{{An{Al}}}}}}```````````{{{l{Cb}}}Cd}{{{l{Cf}}}Cd}```{{ceg}cCh{{Cj{{l{c}}}{{n{Bl}}}}}{{Ab{{l{c}}}{{n{A`}}}}}}{{Clce}Cl{}{{Cj{{l{Cl}}}{{n{A`}}}}}}{{Blc}Cn{{Ab{}{{n{A`}}}}}}{{{Db{}{{D`{c}}}}e}g{}{{Cj{{l{c}}}{{n{A`}}}}}{}}`{{{l{c}}}{{l{e}}}{}{}}{{{l{Adc}}}{{l{Ade}}}{}{}}`{cc{}}`{ce{}{}}{CdCn}{A`Dd}{c{{B`{e}}}{}{}}0{{{l{c}}}Bb{}}4`````````````{{cei}g{}{}{}{{Ab{{l{g}}}{{n{A`}}}}}}87{{{l{A`}}}A`}{{{l{c}}{l{Ade}}}Cn{}{}}{{{l{Df}}}Al}{{{l{A`}}}Dh}{cA`Df}{{{l{A`}}{l{AdAh}}}Aj}0<;{{{l{Df}}}Cd}{{{l{c}}}e{}{}}{{{l{c}}}Cd{}};;:>`{{{l{Dj}}}c{}}``{cDl{}}{DnDn}`````````{{{l{b}}}Cd}0{{{f{Al}}}b}{CdCn}0{A`Dd}0`````````````````{{cei}g{}{}{}{{Ab{{l{g}}}{{n{A`}}}}}}{{{l{c}}}{{l{e}}}{}{}}{{{l{Adc}}}{{l{Ade}}}{}{}}{{{l{j}}}j}{{{l{c}}{l{Ade}}}Cn{}{}}`{{{l{j}}{l{j}}}Bl}{{{l{j}}{l{AdAh}}}Aj}{cc{}}{ce{}{}}``{{{l{c}}}e{}{}}{{{l{Ad{f{Al}}}}}j}{{{l{Ad{f{Al}}}}Af}{{f{j}}}}{c{{B`{e}}}{}{}}0{{{l{c}}}Bb{}}5`=<;{{{l{E`}}}E`}:{{{l{E`}}{l{E`}}}Bl}`{{{l{E`}}{l{AdAh}}}Aj}987{{{l{Ad{f{Al}}}}Af}E`}{{{l{Ad{f{Al}}}}AfAf}{{f{E`}}}}665`:{{{l{Ad{f{Al}}}}}Cn}`{{cei}g{}{}{}{{Ab{{l{g}}}{{n{A`}}}}}}{{{l{c}}}{{l{e}}}{}{}}{{{l{Adc}}}{{l{Ade}}}{}{}}{{{l{Bf}}}Bf}{{{l{c}}{l{Ade}}}Cn{}{}}`{{{l{Bf}}{l{AdAh}}}Aj}{cc{}}{ce{}{}}{{{l{Ad{f{Al}}}}}Bf}{{{l{c}}}e{}{}}{{{l{Ad{f{Al}}}}}Af}2{c{{B`{e}}}{}{}}0{{{l{c}}}Bb{}}5`````{{{l{Eb}}}c{}}````{{EdEd}Ed}{{ccc}{{d{c}}}Ef}{{{Ej{}{{Eh{c}}}}}c{}}`{{{l{AdEl}}Af}c{}}`{EnEn}","D":"Ed","p":[[8,"U256",133],[6,"Option",240],[5,"Vec",241],[5,"Config",16],[5,"DataPackage",165],[1,"reference"],[17,"Output"],[6,"Error",95],[10,"FnOnce",242],[0,"mut"],[1,"usize"],[5,"Formatter",243],[8,"Result",243],[1,"u8"],[1,"slice"],[6,"Result",244],[5,"TypeId",245],[1,"u64"],[5,"Payload",205],[5,"ProcessorResult",37],[8,"Bytes",133],[1,"bool"],[10,"Validator",51],[5,"Box",246],[10,"AsAsciiStr",71],[5,"String",247],[10,"AsHexStr",71],[10,"Debug",243],[10,"Fn",242],[10,"Assert",75],[1,"unit"],[17,"ErrorArg"],[10,"Unwrap",75],[1,"never"],[10,"ContractErrorContent",95],[1,"u16"],[10,"Flattened",127],[10,"FromBytesRepr",129],[10,"Sanitized",129],[5,"DataPoint",185],[10,"FilterSome",227],[10,"Avg",229],[10,"PartialOrd",248],[17,"Item"],[10,"Median",229],[10,"Trim",236],[10,"TrimZeros",238],[5,"Casper",82],[10,"NetworkSpecific",133]],"r":[],"b":[[116,"impl-Display-for-Error"],[117,"impl-Debug-for-Error"]],"c":"OjAAAAAAAAA=","e":"OzAAAAEAAMYAEwABAA0AEAAAABIAAAAUAAEAFwABABwAAAAeAAYAJwAEAC8AAgAzAAAAOQAdAFgAAABaAAUAYwAAAG0ACQB5ADUAsQARAMUAEADYABgA"}]\ +["redstone",{"t":"CCCQQCCCCCCCIHHHFNONNONNNNONONNNNNNHHFNNNNNNNONNNONKMMMMIIICCHCHHICCCCCCCCKKMMKRKHMHMFNNCNCNNNNNNNPPPKPGPPPPPPPNNNNNNMNNNNNNMNNNNNNKMKKMMIRIKISTRRNNNHMHMCCCCCSSSSSSSSSSSFNNNNNNONNNNOONHHNNNNFNNNNNNNONNNNHHNNNONHFNNNNNNONNNNNHHNNNNCCCCKMKKRKMHMKMKM","n":["core","crypto","network","print_and_panic","print_debug","protocol","utils","aggregator","config","processor","processor_result","validator","Matrix","aggregate_matrix","aggregate_values","make_value_signer_matrix","Config","assert_or_revert","block_timestamp","borrow","borrow_mut","feed_ids","feed_index","fmt","from","into","signer_count_threshold","signer_index","signers","try_from","try_into","type_id","validate_signer_count_threshold","validate_timestamp","vzip","make_processor_result","process_payload","ProcessorResult","assert_or_revert","borrow","borrow_mut","eq","fmt","from","into","min_timestamp","try_from","try_into","type_id","values","vzip","Validator","feed_index","signer_index","validate_signer_count_threshold","validate_timestamp","EcdsaUncompressedPublicKey","Keccak256Hash","Secp256SigRs","keccak256","recover","keccak256","crypto256","recover_address","recover_public_key","_Network","as_str","assert","casper","error","flattened","from_bytes_repr","print_debug","specific","AsAsciiStr","AsHexStr","as_ascii_str","as_hex_str","Assert","ErrorArg","Unwrap","assert_or_revert","assert_or_revert","assert_or_revert_bool_with","unwrap_or_revert","Casper","borrow","borrow_mut","error","from","from_bytes_repr","into","print","revert","try_from","try_into","type_id","vzip","ArrayIsEmpty","ClonedContractError","ContractError","ContractErrorContent","CryptographicError","Error","InsufficientSignerCount","NonEmptyPayloadRemainder","NumberOverflow","SizeNotSupported","TimestampTooFuture","TimestampTooOld","WrongRedStoneMarker","assert_or_revert","borrow","borrow_mut","clone","clone_into","clone_to_uninit","code","code","contract_error","fmt","fmt","from","into","message","to_owned","to_string","try_from","try_into","type_id","vzip","Flattened","flattened","FromBytesRepr","Sanitized","from_bytes_repr","sanitized","Bytes","BytesRepr","Network","NetworkSpecific","U256","VALUE_SIZE","VALUE_SIZE","ValueRepr","_Self","as_ascii_str","as_hex_str","from_bytes_repr","print","print","revert","revert","constants","data_package","data_point","marker","payload","DATA_FEED_ID_BS","DATA_PACKAGES_COUNT_BS","DATA_POINTS_COUNT_BS","DATA_POINT_VALUE_BYTE_SIZE_BS","MAX_TIMESTAMP_AHEAD_MS","MAX_TIMESTAMP_DELAY_MS","REDSTONE_MARKER","REDSTONE_MARKER_BS","SIGNATURE_BS","TIMESTAMP_BS","UNSIGNED_METADATA_BYTE_SIZE_BS","DataPackage","assert_or_revert","borrow","borrow_mut","clone","clone_into","clone_to_uninit","data_points","eq","fmt","from","into","signer_address","timestamp","to_owned","trim_data_package","trim_data_packages","try_from","try_into","type_id","vzip","DataPoint","assert_or_revert","borrow","borrow_mut","clone","clone_into","clone_to_uninit","eq","feed_id","fmt","from","into","to_owned","trim_data_point","trim_data_points","try_from","try_into","type_id","value","vzip","trim_redstone_marker","Payload","assert_or_revert","borrow","borrow_mut","clone","clone_into","clone_to_uninit","data_packages","fmt","from","into","make","to_owned","trim_metadata","trim_payload","try_from","try_into","type_id","vzip","filter","median","trim","trim_zeros","FilterSome","filter_some","Averageable","Avg","Item","Median","avg","maybe_pick_median","median","Trim","trim_end","TrimZeros","trim_zeros"],"q":[[0,"redstone"],[7,"redstone::core"],[12,"redstone::core::aggregator"],[16,"redstone::core::config"],[35,"redstone::core::processor"],[37,"redstone::core::processor_result"],[51,"redstone::core::validator"],[56,"redstone::crypto"],[61,"redstone::crypto::keccak256"],[62,"redstone::crypto::recover"],[64,"redstone::crypto::recover::crypto256"],[65,"redstone::network"],[74,"redstone::network::as_str"],[78,"redstone::network::assert"],[85,"redstone::network::casper"],[98,"redstone::network::error"],[131,"redstone::network::flattened"],[133,"redstone::network::from_bytes_repr"],[137,"redstone::network::specific"],[153,"redstone::protocol"],[158,"redstone::protocol::constants"],[169,"redstone::protocol::data_package"],[190,"redstone::protocol::data_point"],[210,"redstone::protocol::marker"],[211,"redstone::protocol::payload"],[230,"redstone::utils"],[234,"redstone::utils::filter"],[236,"redstone::utils::median"],[243,"redstone::utils::trim"],[245,"redstone::utils::trim_zeros"],[247,"core::option"],[248,"alloc::vec"],[249,"core::ops::function"],[250,"core::fmt"],[251,"core::result"],[252,"core::any"],[253,"alloc::string"],[254,"core::cmp"]],"i":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,20,20,20,20,20,20,20,20,20,20,20,20,20,0,23,23,23,23,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,27,0,33,0,0,30,0,33,0,48,48,0,48,0,48,48,48,48,48,48,48,8,8,8,0,8,0,8,8,8,8,8,8,8,8,8,8,8,8,8,35,8,8,8,8,8,8,35,8,8,8,8,8,8,0,37,0,0,38,39,0,49,0,0,0,0,49,49,49,1,1,1,0,49,0,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,5,5,5,5,0,40,40,40,40,40,40,40,40,40,40,40,40,0,0,40,40,40,40,40,0,0,19,19,19,19,19,19,19,19,19,19,19,19,0,0,19,19,19,19,0,0,0,0,0,41,0,0,45,0,42,0,45,0,46,0,47],"f":"`````````````{{{f{{f{{d{b}}}}}}h}{{f{b}}}}{{h{f{j}}}{{f{b}}}}{{{l{h}}{f{j}}}{{f{{f{{d{b}}}}}}}}`{{cei}g{}{}{}{{Ab{{l{g}}}{{n{A`}}}}}}`{{{l{c}}}{{l{e}}}{}{}}{{{l{Adc}}}{{l{Ade}}}{}{}}`{{{l{h}}b}{{d{Af}}}}{{{l{h}}{l{AdAh}}}Aj}{cc{}}{ce{}{}}`{{{l{h}}{l{{An{Al}}}}}{{d{Af}}}}`{c{{B`{e}}}{}{}}0{{{l{c}}}Bb{}}{{{l{h}}Af{l{{An{{d{b}}}}}}}{{f{b}}}}{{{l{h}}AfBd}Bd}5{{hBf}Bh}{{hBj}Bh}`=<;{{{l{Bh}}{l{Bh}}}Bl}{{{l{Bh}}{l{AdAh}}}Aj}:9`776`9`{{{l{Bn}}b}{{d{Af}}}}{{{l{Bn}}{l{{An{Al}}}}}{{d{Af}}}}{{{l{Bn}}Af{l{{An{{d{b}}}}}}}{{f{b}}}}{{{l{Bn}}AfBd}Bd}`````{{{l{{An{Al}}}}}{{C`{Al}}}}`{{{f{Al}}{f{Al}}}{{f{Al}}}}{{{C`{Al}}{C`{Al}}Al}{{C`{Al}}}}```````````{{{l{Cb}}}Cd}{{{l{Cf}}}Cd}```{{ceg}cCh{{Cj{{l{c}}}{{n{Bl}}}}}{{Ab{{l{c}}}{{n{A`}}}}}}{{Clce}Cl{}{{Cj{{l{Cl}}}{{n{A`}}}}}}{{Blc}Cn{{Ab{}{{n{A`}}}}}}{{{Db{}{{D`{c}}}}e}g{}{{Cj{{l{c}}}{{n{A`}}}}}{}}`{{{l{c}}}{{l{e}}}{}{}}{{{l{Adc}}}{{l{Ade}}}{}{}}`{cc{}}`{ce{}{}}{CdCn}{A`Dd}{c{{B`{e}}}{}{}}0{{{l{c}}}Bb{}}4`````````````{{cei}g{}{}{}{{Ab{{l{g}}}{{n{A`}}}}}}87{{{l{A`}}}A`}{{{l{c}}{l{Ade}}}Cn{}{}}{{{l{c}}}Cn{}}{{{l{Df}}}Al}{{{l{A`}}}Dh}{cA`Df}{{{l{A`}}{l{AdAh}}}Aj}0=<{{{l{Df}}}Cd}{{{l{c}}}e{}{}}{{{l{c}}}Cd{}}<<;?`{{{l{Dj}}}c{}}``{cDl{}}{DnDn}`````````{{{l{b}}}Cd}0{{{f{Al}}}b}{CdCn}0{A`Dd}0`````````````````{{cei}g{}{}{}{{Ab{{l{g}}}{{n{A`}}}}}}{{{l{c}}}{{l{e}}}{}{}}{{{l{Adc}}}{{l{Ade}}}{}{}}{{{l{j}}}j}{{{l{c}}{l{Ade}}}Cn{}{}}{{{l{c}}}Cn{}}`{{{l{j}}{l{j}}}Bl}{{{l{j}}{l{AdAh}}}Aj}{cc{}}{ce{}{}}``{{{l{c}}}e{}{}}{{{l{Ad{f{Al}}}}}j}{{{l{Ad{f{Al}}}}Af}{{f{j}}}}{c{{B`{e}}}{}{}}0{{{l{c}}}Bb{}}5`>=<{{{l{E`}}}E`};:{{{l{E`}}{l{E`}}}Bl}`{{{l{E`}}{l{AdAh}}}Aj}987{{{l{Ad{f{Al}}}}Af}E`}{{{l{Ad{f{Al}}}}AfAf}{{f{E`}}}}665`:{{{l{Ad{f{Al}}}}}Cn}`{{cei}g{}{}{}{{Ab{{l{g}}}{{n{A`}}}}}}{{{l{c}}}{{l{e}}}{}{}}{{{l{Adc}}}{{l{Ade}}}{}{}}{{{l{Bf}}}Bf}{{{l{c}}{l{Ade}}}Cn{}{}}{{{l{c}}}Cn{}}`{{{l{Bf}}{l{AdAh}}}Aj}{cc{}}{ce{}{}}{{{l{Ad{f{Al}}}}}Bf}{{{l{c}}}e{}{}}{{{l{Ad{f{Al}}}}}Af}2{c{{B`{e}}}{}{}}0{{{l{c}}}Bb{}}5`````{{{l{Eb}}}c{}}````{{EdEd}Ed}{{ccc}{{d{c}}}Ef}{{{Ej{}{{Eh{c}}}}}c{}}`{{{l{AdEl}}Af}c{}}`{EnEn}","D":"Ed","p":[[8,"U256",137],[6,"Option",247],[5,"Vec",248],[5,"Config",16],[5,"DataPackage",169],[1,"reference"],[17,"Output"],[6,"Error",98],[10,"FnOnce",249],[0,"mut"],[1,"usize"],[5,"Formatter",250],[8,"Result",250],[1,"u8"],[1,"slice"],[6,"Result",251],[5,"TypeId",252],[1,"u64"],[5,"Payload",211],[5,"ProcessorResult",37],[8,"Bytes",137],[1,"bool"],[10,"Validator",51],[1,"array"],[10,"AsAsciiStr",74],[5,"String",253],[10,"AsHexStr",74],[10,"Debug",250],[10,"Fn",249],[10,"Assert",78],[1,"unit"],[17,"ErrorArg"],[10,"Unwrap",78],[1,"never"],[10,"ContractErrorContent",98],[1,"u16"],[10,"Flattened",131],[10,"FromBytesRepr",133],[10,"Sanitized",133],[5,"DataPoint",190],[10,"FilterSome",234],[10,"Avg",236],[10,"PartialOrd",254],[17,"Item"],[10,"Median",236],[10,"Trim",243],[10,"TrimZeros",245],[5,"Casper",85],[10,"NetworkSpecific",137]],"r":[],"b":[[120,"impl-Debug-for-Error"],[121,"impl-Display-for-Error"]],"c":"OjAAAAAAAAA=","e":"OzAAAAEAAM0AEwABAA0AEAAAABIAAAAUAAEAFwABABwAAAAeAAYAJwAEAC8AAgAzAAAAOQAgAFsAAABdAAUAZgAAAHAACgB9ADYAtgASAMsAEQDfABgA"}]\ ]')); if (typeof exports !== 'undefined') exports.searchIndex = searchIndex; else if (window.initSearch) window.initSearch(searchIndex); diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/settings.html b/static/rust/redstone/crypto_secp256k1,network_casper/settings.html index 9631dcb2..6da7f2d5 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/settings.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/settings.html @@ -1 +1 @@ -Settings

Rustdoc settings

Back
\ No newline at end of file +Settings

Rustdoc settings

Back
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/core/aggregator.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/core/aggregator.rs.html index e839b506..ed9efa50 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/core/aggregator.rs.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/core/aggregator.rs.html @@ -1,4 +1,4 @@ -aggregator.rs - source
1
+aggregator.rs - source
1
 2
 3
 4
@@ -289,6 +289,12 @@
 289
 290
 291
+292
+293
+294
+295
+296
+297
 
use crate::{
     core::{config::Config, validator::Validator},
     network::specific::U256,
@@ -368,6 +374,9 @@
         helpers::iter_into::{IterInto, IterIntoOpt, OptIterIntoOpt},
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_aggregate_matrix() {
         let matrix = vec![
@@ -445,6 +454,9 @@
         protocol::data_package::DataPackage,
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_make_value_signer_matrix_empty() {
         let config = Config::test();
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/core/config.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/core/config.rs.html
index 0b9ca7f7..a5b2ec60 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/core/config.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/core/config.rs.html
@@ -1,4 +1,4 @@
-config.rs - source
1
+config.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/core/mod.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/core/mod.rs.html
index f278fb16..3aa3fec4 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/core/mod.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/core/mod.rs.html
@@ -1,4 +1,4 @@
-mod.rs - source
1
+mod.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/core/processor.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/core/processor.rs.html
index 2e92e10d..15860266 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/core/processor.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/core/processor.rs.html
@@ -1,4 +1,4 @@
-processor.rs - source
1
+processor.rs - source
1
 2
 3
 4
@@ -99,6 +99,9 @@
 99
 100
 101
+102
+103
+104
 
use crate::{
     core::{
         aggregator::aggregate_values, config::Config, processor_result::ProcessorResult,
@@ -160,6 +163,9 @@
         protocol::{data_package::DataPackage, payload::Payload},
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_make_processor_result() {
         let data_packages = vec![
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/core/processor_result.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/core/processor_result.rs.html
index ecdffb37..8352b915 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/core/processor_result.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/core/processor_result.rs.html
@@ -1,4 +1,4 @@
-processor_result.rs - source
1
+processor_result.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/core/validator.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/core/validator.rs.html
index 1fed8ca0..30f7ee53 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/core/validator.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/core/validator.rs.html
@@ -1,4 +1,4 @@
-validator.rs - source
1
+validator.rs - source
1
 2
 3
 4
@@ -284,6 +284,9 @@
 284
 285
 286
+287
+288
+289
 
use crate::{
     core::config::Config,
     network::{
@@ -421,6 +424,9 @@
     };
     use itertools::Itertools;
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_feed_index() {
         let config = Config::test();
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/crypto/keccak256.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/crypto/keccak256.rs.html
index 7e62e207..aadbac5d 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/crypto/keccak256.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/crypto/keccak256.rs.html
@@ -1,4 +1,4 @@
-keccak256.rs - source
1
+keccak256.rs - source
1
 2
 3
 4
@@ -34,20 +34,46 @@
 34
 35
 36
-
use sha3::{Digest, Keccak256};
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+
use crate::crypto::Keccak256Hash;
+#[cfg(not(all(feature = "crypto_radix", target_arch = "wasm32")))]
+use sha3::Digest;
 
-pub fn keccak256(data: &[u8]) -> Box<[u8]> {
-    Keccak256::new_with_prefix(data)
+#[cfg(not(all(feature = "crypto_radix", target_arch = "wasm32")))]
+pub fn keccak256(data: &[u8]) -> Keccak256Hash {
+    sha3::Keccak256::new_with_prefix(data)
         .finalize()
         .as_slice()
-        .into()
+        .try_into()
+        .unwrap()
 }
 
-#[cfg(feature = "helpers")]
+#[cfg(all(feature = "crypto_radix", target_arch = "wasm32"))]
+pub fn keccak256(data: &[u8]) -> Keccak256Hash {
+    scrypto::prelude::CryptoUtils::keccak256_hash(data).0
+}
+
+#[cfg(not(all(feature = "crypto_radix", target_arch = "wasm32")))]
+#[cfg(feature = "helpers")]
 #[cfg(test)]
 mod tests {
     use crate::{crypto::keccak256::keccak256, helpers::hex::hex_to_bytes};
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const MESSAGE: &str = "415641580000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d394303d018d79bf0ba000000020000001";
     const MESSAGE_HASH: &str = "f0805644755393876d0e917e553f0c206f8bc68b7ebfe73a79d2a9e7f5a4cea6";
     const EMPTY_MESSAGE_HASH: &str =
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/crypto/mod.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/crypto/mod.rs.html
index fa282223..c3470603 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/crypto/mod.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/crypto/mod.rs.html
@@ -1,5 +1,13 @@
-mod.rs - source
1
+mod.rs - source
1
 2
+3
+4
+5
+6
 
mod keccak256;
 pub(crate) mod recover;
+
+pub(crate) type Keccak256Hash = [u8; 32];
+pub(crate) type Secp256SigRs = [u8; 64];
+pub(crate) type EcdsaUncompressedPublicKey = [u8; 65];
 
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/crypto/recover.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/crypto/recover.rs.html index f03e84b0..3b917f5c 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/crypto/recover.rs.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/crypto/recover.rs.html @@ -1,4 +1,4 @@ -recover.rs - source
1
+recover.rs - source
1
 2
 3
 4
@@ -131,14 +131,59 @@
 131
 132
 133
-
use crate::crypto::{keccak256, recover::crypto256::recover_public_key};
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+
use crate::crypto::{
+    keccak256, recover::crypto256::recover_public_key, EcdsaUncompressedPublicKey, Keccak256Hash,
+    Secp256SigRs,
+};
 
 pub fn recover_address(message: Vec<u8>, signature: Vec<u8>) -> Vec<u8> {
-    let recovery_byte = signature[64]; // 65-byte representation
+    //TODO: check malleability support by the libraries
+    let recovery_byte = signature[64]; // 65-byte representation
     let msg_hash = keccak256::keccak256(message.as_slice());
     let key = recover_public_key(
         msg_hash,
-        &signature[..64],
+        signature[..64].try_into().unwrap(),
         recovery_byte - (if recovery_byte >= 27 { 27 } else { 0 }),
     );
     let key_hash = keccak256::keccak256(&key[1..]); // skip first uncompressed-key byte
@@ -148,66 +193,100 @@
 
 #[cfg(feature = "crypto_secp256k1")]
 pub(crate) mod crypto256 {
+    use super::{EcdsaUncompressedPublicKey, Keccak256Hash, Secp256SigRs};
     use crate::network::{assert::Unwrap, error::Error};
     use secp256k1::{ecdsa::RecoverableSignature, Message, Secp256k1 as Secp256k1Curve};
 
     pub(crate) fn recover_public_key(
-        message_hash: Box<[u8]>,
-        signature_bytes: &[u8],
+        message_hash: Keccak256Hash,
+        signature_bytes: Secp256SigRs,
         recovery_byte: u8,
-    ) -> Box<[u8]> {
-        let msg = Message::from_digest_slice(message_hash.as_ref())
-            .unwrap_or_revert(|_| Error::CryptographicError(message_hash.len()));
+    ) -> EcdsaUncompressedPublicKey {
+        let msg = Message::from_digest(message_hash);
 
         let recovery_id = secp256k1::ecdsa::RecoveryId::from_i32(recovery_byte.into())
             .unwrap_or_revert(|_| Error::CryptographicError(recovery_byte.into()));
 
         let sig: RecoverableSignature =
-            RecoverableSignature::from_compact(signature_bytes, recovery_id)
+            RecoverableSignature::from_compact(signature_bytes.as_slice(), recovery_id)
                 .unwrap_or_revert(|_| Error::CryptographicError(signature_bytes.len()));
 
         let public_key = Secp256k1Curve::new().recover_ecdsa(&msg, &sig);
 
-        public_key.unwrap().serialize_uncompressed().into()
+        public_key.unwrap().serialize_uncompressed()
     }
 }
 
 #[cfg(feature = "crypto_k256")]
 pub(crate) mod crypto256 {
+    use super::{EcdsaUncompressedPublicKey, Keccak256Hash, Secp256SigRs};
     use crate::network::{assert::Unwrap, error::Error};
     use k256::ecdsa::{RecoveryId, Signature, VerifyingKey};
 
     pub(crate) fn recover_public_key(
-        message_hash: Box<[u8]>,
-        signature_bytes: &[u8],
+        message_hash: Keccak256Hash,
+        signature_bytes: Secp256SigRs,
         recovery_byte: u8,
-    ) -> Box<[u8]> {
+    ) -> EcdsaUncompressedPublicKey {
         let recovery_id = RecoveryId::from_byte(recovery_byte)
             .unwrap_or_revert(|_| Error::CryptographicError(recovery_byte.into()));
 
-        let signature = Signature::try_from(signature_bytes)
+        let signature = Signature::try_from(signature_bytes.as_slice())
             .unwrap_or_revert(|_| Error::CryptographicError(signature_bytes.len()));
 
         let recovered_key =
             VerifyingKey::recover_from_prehash(message_hash.as_ref(), &signature, recovery_id)
-                .map(|key| key.to_encoded_point(false).to_bytes());
+                .map(|key| key.to_encoded_point(false).to_bytes())
+                .unwrap_or_revert(|_| Error::CryptographicError(0));
 
-        recovered_key.unwrap()
+        recovered_key.as_ref().try_into().unwrap()
     }
 }
 
-#[cfg(all(not(feature = "crypto_k256"), not(feature = "crypto_secp256k1")))]
+#[cfg(all(feature = "crypto_radix", target_arch = "wasm32"))]
 pub(crate) mod crypto256 {
+    use super::{EcdsaUncompressedPublicKey, Keccak256Hash, Secp256SigRs};
+    use crate::network::assert::Unwrap;
+    use crate::network::error::Error;
+    use radix_common::crypto::{Hash, IsHash, Secp256k1Signature};
+    use scrypto::crypto_utils::CryptoUtils;
+
     pub(crate) fn recover_public_key(
-        _message_hash: Box<[u8]>,
-        _signature_bytes: &[u8],
+        message_hash: Keccak256Hash,
+        signature_bytes: Secp256SigRs,
+        recovery_byte: u8,
+    ) -> EcdsaUncompressedPublicKey {
+        let hash = Hash::from_bytes(message_hash);
+
+        let mut sig_vec = Vec::with_capacity(65);
+        sig_vec.push(recovery_byte);
+        sig_vec.extend(signature_bytes);
+        let signature = Secp256k1Signature::try_from(sig_vec.as_slice())
+            .unwrap_or_revert(|_| Error::CryptographicError(signature_bytes.len()));
+
+        CryptoUtils::secp256k1_ecdsa_verify_and_key_recover_uncompressed(hash, signature).0
+    }
+}
+
+#[cfg(all(
+    not(feature = "crypto_k256"),
+    not(feature = "crypto_secp256k1"),
+    not(all(feature = "crypto_radix", target_arch = "wasm32"))
+))]
+pub(crate) mod crypto256 {
+    use super::{EcdsaUncompressedPublicKey, Keccak256Hash, Secp256SigRs};
+
+    pub(crate) fn recover_public_key(
+        _message_hash: Keccak256Hash,
+        _signature_bytes: Secp256SigRs,
         _recovery_byte: u8,
-    ) -> Box<[u8]> {
+    ) -> EcdsaUncompressedPublicKey {
         panic!("Not implemented!")
     }
 }
 
-#[cfg(feature = "helpers")]
+#[cfg(not(all(feature = "crypto_radix", target_arch = "wasm32")))]
+#[cfg(feature = "helpers")]
 #[cfg(test)]
 mod tests {
     use crate::{
@@ -215,6 +294,9 @@
         helpers::hex::hex_to_bytes,
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const MESSAGE: &str = "415641580000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d394303d018d79bf0ba000000020000001";
     const MESSAGE_HASH: &str = "f0805644755393876d0e917e553f0c206f8bc68b7ebfe73a79d2a9e7f5a4cea6";
     const SIG_V27: &str = "475195641dae43318e194c3d9e5fc308773d6fdf5e197e02644dfd9ca3d19e3e2bd7d8656428f7f02e658a16b8f83722169c57126cc50bec8fad188b1bac6d19";
@@ -228,16 +310,16 @@
 
     #[test]
     fn test_recover_public_key_v27() {
-        let public_key = recover_public_key(u8_box(MESSAGE_HASH), &u8_box(SIG_V27), 0);
+        let public_key = recover_public_key(u8_slice(MESSAGE_HASH), u8_slice(SIG_V27), 0);
 
-        assert_eq!(u8_box(PUBLIC_KEY_V27), public_key);
+        assert_eq!(u8_slice(PUBLIC_KEY_V27), public_key);
     }
 
     #[test]
     fn test_recover_public_key_v28() {
-        let public_key = recover_public_key(u8_box(MESSAGE_HASH), &u8_box(SIG_V28), 1);
+        let public_key = recover_public_key(u8_slice(MESSAGE_HASH), u8_slice(SIG_V28), 1);
 
-        assert_eq!(u8_box(PUBLIC_KEY_V28), public_key);
+        assert_eq!(u8_slice(PUBLIC_KEY_V28), public_key);
     }
 
     #[test]
@@ -260,8 +342,8 @@
         assert_eq!(hex_to_bytes(ADDRESS_V28.into()), address);
     }
 
-    fn u8_box(str: &str) -> Box<[u8]> {
-        hex_to_bytes(str.into()).as_slice().into()
+    fn u8_slice<const N: usize>(str: &str) -> [u8; N] {
+        hex_to_bytes(str.into()).as_slice().try_into().unwrap()
     }
 }
 
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/lib.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/lib.rs.html index a1f164bf..dc7e6ba2 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/lib.rs.html +++ b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/lib.rs.html @@ -1,4 +1,4 @@ -lib.rs - source
1
+lib.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/as_str.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/as_str.rs.html
index f0b58bfb..95d88b4b 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/as_str.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/as_str.rs.html
@@ -1,4 +1,4 @@
-as_str.rs - source
1
+as_str.rs - source
1
 2
 3
 4
@@ -115,6 +115,9 @@
 115
 116
 117
+118
+119
+120
 
extern crate alloc;
 
 use crate::network::specific::U256;
@@ -214,6 +217,9 @@
         specific::U256,
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const ETH: u32 = 4543560u32;
 
     #[test]
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/assert.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/assert.rs.html
index cfd43818..c6e40334 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/assert.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/assert.rs.html
@@ -1,4 +1,4 @@
-assert.rs - source
1
+assert.rs - source
1
 2
 3
 4
@@ -134,6 +134,12 @@
 134
 135
 136
+137
+138
+139
+140
+141
+142
 
use crate::{
     network::{error::Error, specific::revert},
     print_debug,
@@ -217,6 +223,9 @@
         error::Error,
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_assert_or_revert_bool_with_true() {
         assert_or_revert_bool_with(true, || Error::ArrayIsEmpty);
@@ -244,6 +253,9 @@
 mod unwrap_or_revert_tests {
     use crate::network::{assert::Unwrap, error::Error};
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_unwrap_or_revert_some() {
         let result = Some(543).unwrap_or_revert(|_| Error::CryptographicError(333));
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/casper/error.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/casper/error.rs.html
index 53deca0d..3a702daf 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/casper/error.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/casper/error.rs.html
@@ -1,4 +1,4 @@
-error.rs - source
1
+error.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/casper/from_bytes_repr.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/casper/from_bytes_repr.rs.html
index 7d4c10ab..30949a30 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/casper/from_bytes_repr.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/casper/from_bytes_repr.rs.html
@@ -1,4 +1,4 @@
-from_bytes_repr.rs - source
1
+from_bytes_repr.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/casper/mod.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/casper/mod.rs.html
index 8df66718..de5a1dd8 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/casper/mod.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/casper/mod.rs.html
@@ -1,4 +1,4 @@
-mod.rs - source
1
+mod.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/error.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/error.rs.html
index 4c0588a6..e61e278d 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/error.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/error.rs.html
@@ -1,4 +1,4 @@
-error.rs - source
1
+error.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/flattened.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/flattened.rs.html
index f8226f69..3dd50203 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/flattened.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/flattened.rs.html
@@ -1,4 +1,4 @@
-flattened.rs - source
1
+flattened.rs - source
1
 2
 3
 4
@@ -33,6 +33,9 @@
 33
 34
 35
+36
+37
+38
 
use crate::network::specific::Bytes;
 
 pub trait Flattened<T> {
@@ -50,6 +53,9 @@
 mod tests {
     use crate::network::{flattened::Flattened, specific::Bytes};
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_bytes_flattened() {
         #[allow(clippy::useless_conversion)]
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/from_bytes_repr.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/from_bytes_repr.rs.html
index 0c7663c5..46079bf7 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/from_bytes_repr.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/from_bytes_repr.rs.html
@@ -1,4 +1,4 @@
-from_bytes_repr.rs - source
1
+from_bytes_repr.rs - source
1
 2
 3
 4
@@ -126,6 +126,9 @@
 126
 127
 128
+129
+130
+131
 
use crate::network::specific::VALUE_SIZE;
 
 pub trait FromBytesRepr<T> {
@@ -160,6 +163,9 @@
         specific::{U256, VALUE_SIZE},
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[cfg(feature = "network_radix")]
     use crate::network::radix::u256_ext::U256Ext;
 
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/mod.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/mod.rs.html
index f79fb758..55e94cdf 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/mod.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/mod.rs.html
@@ -1,4 +1,4 @@
-mod.rs - source
1
+mod.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/print_debug.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/print_debug.rs.html
index 1fca4faf..52808df8 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/print_debug.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/print_debug.rs.html
@@ -1,4 +1,4 @@
-print_debug.rs - source
1
+print_debug.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/specific.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/specific.rs.html
index 8d698709..33830b2a 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/specific.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/specific.rs.html
@@ -1,4 +1,4 @@
-specific.rs - source
1
+specific.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/protocol/constants.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/protocol/constants.rs.html
index 3e2f4fd5..7b1e4887 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/protocol/constants.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/protocol/constants.rs.html
@@ -1,4 +1,4 @@
-constants.rs - source
1
+constants.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/protocol/data_package.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/protocol/data_package.rs.html
index a1d603e6..f3e8cc32 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/protocol/data_package.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/protocol/data_package.rs.html
@@ -1,4 +1,4 @@
-data_package.rs - source
1
+data_package.rs - source
1
 2
 3
 4
@@ -213,6 +213,10 @@
 213
 214
 215
+216
+217
+218
+219
 
use crate::{
     crypto::recover::recover_address,
     network::as_str::AsHexStr,
@@ -281,7 +285,8 @@
     }
 }
 
-#[cfg(feature = "helpers")]
+#[cfg(not(all(feature = "crypto_radix", target_arch = "wasm32")))]
+#[cfg(feature = "helpers")]
 #[cfg(test)]
 mod tests {
     use crate::{
@@ -297,6 +302,9 @@
         },
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const DATA_PACKAGE_BYTES_1: &str = "4554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000360cafc94e018d79bf0ba00000002000000151afa8c5c3caf6004b42c0fb17723e524f993b9ecbad3b9bce5ec74930fa436a3660e8edef10e96ee5f222de7ef5787c02ca467c0ec18daa2907b43ac20c63c11c";
     const DATA_PACKAGE_BYTES_2: &str = "4554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000360cdd851e018d79bf0ba000000020000001473fd9dc72e6814a7de719b403cf4c9eba08934a643fd0666c433b806b31e69904f2226ffd3c8ef75861b11b5e32a1fda4b1458e0da4605a772dfba2a812f3ee1b";
 
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/protocol/data_point.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/protocol/data_point.rs.html
index e643085a..b9e92d43 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/protocol/data_point.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/protocol/data_point.rs.html
@@ -1,4 +1,4 @@
-data_point.rs - source
1
+data_point.rs - source
1
 2
 3
 4
@@ -155,6 +155,9 @@
 155
 156
 157
+158
+159
+160
 
use crate::{
     network::{
         as_str::{AsAsciiStr, AsHexStr},
@@ -229,6 +232,9 @@
     };
     use std::ops::Shr;
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const DATA_POINT_BYTES_TAIL: &str = "4554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000360cafc94e";
     const VALUE: u128 = 232141080910;
 
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/protocol/marker.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/protocol/marker.rs.html
index 15b31817..7646024c 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/protocol/marker.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/protocol/marker.rs.html
@@ -1,4 +1,4 @@
-marker.rs - source
1
+marker.rs - source
1
 2
 3
 4
@@ -64,6 +64,9 @@
 64
 65
 66
+67
+68
+69
 
use crate::{
     network::{assert::Assert, error::Error},
     protocol::constants::{REDSTONE_MARKER, REDSTONE_MARKER_BS},
@@ -87,6 +90,9 @@
         protocol::{constants::REDSTONE_MARKER_BS, marker::trim_redstone_marker},
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const PAYLOAD_TAIL: &str = "1c000f000000000002ed57011e0000";
 
     #[test]
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/protocol/mod.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/protocol/mod.rs.html
index fbd60f5b..e7d0b176 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/protocol/mod.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/protocol/mod.rs.html
@@ -1,4 +1,4 @@
-mod.rs - source
1
+mod.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/protocol/payload.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/protocol/payload.rs.html
index 1cd14131..bfb8b9b0 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/protocol/payload.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/protocol/payload.rs.html
@@ -1,4 +1,4 @@
-payload.rs - source
1
+payload.rs - source
1
 2
 3
 4
@@ -102,6 +102,10 @@
 102
 103
 104
+105
+106
+107
+108
 
use crate::{
     network::{assert::Assert, error::Error},
     protocol::{
@@ -145,7 +149,8 @@
     payload.trim_end(DATA_PACKAGES_COUNT_BS)
 }
 
-#[cfg(feature = "helpers")]
+#[cfg(not(all(feature = "crypto_radix", target_arch = "wasm32")))]
+#[cfg(feature = "helpers")]
 #[cfg(test)]
 mod tests {
     use crate::{
@@ -156,6 +161,9 @@
         },
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const PAYLOAD_METADATA_BYTES: &str = "000f000000";
     const PAYLOAD_METADATA_WITH_UNSIGNED_BYTE: &str = "000f55000001";
     const PAYLOAD_METADATA_WITH_UNSIGNED_BYTES: &str = "000f11223344556677889900aabbccddeeff000010";
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/utils/filter.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/utils/filter.rs.html
index f28b29ef..7043d176 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/utils/filter.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/utils/filter.rs.html
@@ -1,4 +1,4 @@
-filter.rs - source
1
+filter.rs - source
1
 2
 3
 4
@@ -19,6 +19,9 @@
 19
 20
 21
+22
+23
+24
 
pub(crate) trait FilterSome<Output> {
     fn filter_some(&self) -> Output;
 }
@@ -33,6 +36,9 @@
 mod filter_some_tests {
     use crate::utils::filter::FilterSome;
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_filter_some() {
         let values = [None, Some(23u64), None, Some(12), Some(12), None, Some(23)];
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/utils/median.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/utils/median.rs.html
index c329ff3b..62b2749e 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/utils/median.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/utils/median.rs.html
@@ -1,4 +1,4 @@
-median.rs - source
1
+median.rs - source
1
 2
 3
 4
@@ -185,6 +185,9 @@
 185
 186
 187
+188
+189
+190
 
use crate::network::{assert::Assert, error::Error::ArrayIsEmpty, specific::U256};
 use std::ops::{Add, Rem, Shr};
 
@@ -281,6 +284,9 @@
     use itertools::Itertools;
     use std::fmt::Debug;
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[cfg(feature = "network_radix")]
     use crate::network::radix::u256_ext::U256Ext;
 
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/utils/mod.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/utils/mod.rs.html
index 44258e67..a99c109d 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/utils/mod.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/utils/mod.rs.html
@@ -1,4 +1,4 @@
-mod.rs - source
1
+mod.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/utils/trim.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/utils/trim.rs.html
index 551a41a8..63a6ae2c 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/utils/trim.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/utils/trim.rs.html
@@ -1,4 +1,4 @@
-trim.rs - source
1
+trim.rs - source
1
 2
 3
 4
@@ -147,6 +147,19 @@
 147
 148
 149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
 
use crate::network::{
     assert::Unwrap, error::Error, from_bytes_repr::FromBytesRepr, specific::U256,
 };
@@ -196,6 +209,9 @@
         utils::trim::Trim,
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const MARKER_DECIMAL: u64 = 823907890102272;
 
     fn redstone_marker_bytes() -> Vec<u8> {
@@ -253,8 +269,11 @@
         let (_, result): (_, u64) = test_trim_end(size);
         assert_eq!(result, MARKER_DECIMAL);
 
-        let (_, result): (_, usize) = test_trim_end(size);
-        assert_eq!(result, 823907890102272usize);
+        #[cfg(not(target_arch = "wasm32"))]
+        {
+            let (_, result): (_, usize) = test_trim_end(size);
+            assert_eq!(result, 823907890102272usize);
+        }
 
         let (_rest, result): (_, Vec<u8>) = test_trim_end(size);
         assert_eq!(result.as_slice().len(), size.min(REDSTONE_MARKER_BS));
@@ -271,9 +290,16 @@
         assert_eq!(x, 18446744073709551615);
     }
 
+    #[cfg(target_arch = "wasm32")]
+    #[should_panic(expected = "Number overflow: 823907890102272")]
+    #[test]
+    fn test_trim_end_u64_overflow_usize_wasm32() {
+        let (_, _): (_, usize) = test_trim_end(REDSTONE_MARKER_BS);
+    }
+
     #[should_panic(expected = "Number overflow: 18591708106338011145")]
     #[test]
-    fn test_trim_end_u64_overflow() {
+    fn test_trim_end_u64_overflow_u64() {
         let mut bytes = vec![1u8, 2, 3, 4, 5, 6, 7, 8, 9];
 
         let _: u64 = bytes.trim_end(9);
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/utils/trim_zeros.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/utils/trim_zeros.rs.html
index 0d223de1..9be0496f 100644
--- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/utils/trim_zeros.rs.html
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/utils/trim_zeros.rs.html
@@ -1,4 +1,4 @@
-trim_zeros.rs - source
1
+trim_zeros.rs - source
1
 2
 3
 4
@@ -43,6 +43,9 @@
 43
 44
 45
+46
+47
+48
 
pub trait TrimZeros {
     fn trim_zeros(self) -> Self;
 }
@@ -69,6 +72,9 @@
 mod tests {
     use crate::{protocol::constants::REDSTONE_MARKER, utils::trim_zeros::TrimZeros};
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     fn redstone_marker_bytes() -> Vec<u8> {
         REDSTONE_MARKER.as_slice().into()
     }
diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/main-d2fab2bf619172d3.js b/static/rust/redstone/crypto_secp256k1,network_casper/static.files/main-d2fab2bf619172d3.js
new file mode 100644
index 00000000..8fc48ede
--- /dev/null
+++ b/static/rust/redstone/crypto_secp256k1,network_casper/static.files/main-d2fab2bf619172d3.js
@@ -0,0 +1,11 @@
+"use strict";window.RUSTDOC_TOOLTIP_HOVER_MS=300;window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS=450;function resourcePath(basename,extension){return getVar("root-path")+basename+getVar("resource-suffix")+extension}function hideMain(){addClass(document.getElementById(MAIN_ID),"hidden")}function showMain(){removeClass(document.getElementById(MAIN_ID),"hidden")}function blurHandler(event,parentElem,hideCallback){if(!parentElem.contains(document.activeElement)&&!parentElem.contains(event.relatedTarget)){hideCallback()}}window.rootPath=getVar("root-path");window.currentCrate=getVar("current-crate");function setMobileTopbar(){const mobileTopbar=document.querySelector(".mobile-topbar");const locationTitle=document.querySelector(".sidebar h2.location");if(mobileTopbar){const mobileTitle=document.createElement("h2");mobileTitle.className="location";if(hasClass(document.querySelector(".rustdoc"),"crate")){mobileTitle.innerHTML=`Crate ${window.currentCrate}`}else if(locationTitle){mobileTitle.innerHTML=locationTitle.innerHTML}mobileTopbar.appendChild(mobileTitle)}}function getVirtualKey(ev){if("key"in ev&&typeof ev.key!=="undefined"){return ev.key}const c=ev.charCode||ev.keyCode;if(c===27){return"Escape"}return String.fromCharCode(c)}const MAIN_ID="main-content";const SETTINGS_BUTTON_ID="settings-menu";const ALTERNATIVE_DISPLAY_ID="alternative-display";const NOT_DISPLAYED_ID="not-displayed";const HELP_BUTTON_ID="help-button";function getSettingsButton(){return document.getElementById(SETTINGS_BUTTON_ID)}function getHelpButton(){return document.getElementById(HELP_BUTTON_ID)}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}function insertAfter(newNode,referenceNode){referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling)}function getOrCreateSection(id,classes){let el=document.getElementById(id);if(!el){el=document.createElement("section");el.id=id;el.className=classes;insertAfter(el,document.getElementById(MAIN_ID))}return el}function getAlternativeDisplayElem(){return getOrCreateSection(ALTERNATIVE_DISPLAY_ID,"content hidden")}function getNotDisplayedElem(){return getOrCreateSection(NOT_DISPLAYED_ID,"hidden")}function switchDisplayedElement(elemToDisplay){const el=getAlternativeDisplayElem();if(el.children.length>0){getNotDisplayedElem().appendChild(el.firstElementChild)}if(elemToDisplay===null){addClass(el,"hidden");showMain();return}el.appendChild(elemToDisplay);hideMain();removeClass(el,"hidden")}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}function preLoadCss(cssUrl){const link=document.createElement("link");link.href=cssUrl;link.rel="preload";link.as="style";document.getElementsByTagName("head")[0].appendChild(link)}(function(){const isHelpPage=window.location.pathname.endsWith("/help.html");function loadScript(url,errorCallback){const script=document.createElement("script");script.src=url;if(errorCallback!==undefined){script.onerror=errorCallback}document.head.append(script)}getSettingsButton().onclick=event=>{if(event.ctrlKey||event.altKey||event.metaKey){return}window.hideAllModals(false);addClass(getSettingsButton(),"rotate");event.preventDefault();loadScript(getVar("static-root-path")+getVar("settings-js"));setTimeout(()=>{const themes=getVar("themes").split(",");for(const theme of themes){if(theme!==""){preLoadCss(getVar("root-path")+theme+".css")}}},0)};window.searchState={loadingText:"Loading search results...",input:document.getElementsByClassName("search-input")[0],outputElement:()=>{let el=document.getElementById("search");if(!el){el=document.createElement("section");el.id="search";getNotDisplayedElem().appendChild(el)}return el},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:()=>{if(searchState.timeout!==null){clearTimeout(searchState.timeout);searchState.timeout=null}},isDisplayed:()=>searchState.outputElement().parentElement.id===ALTERNATIVE_DISPLAY_ID,focus:()=>{searchState.input.focus()},defocus:()=>{searchState.input.blur()},showResults:search=>{if(search===null||typeof search==="undefined"){search=searchState.outputElement()}switchDisplayedElement(search);searchState.mouseMovedAfterSearch=false;document.title=searchState.title},removeQueryParameters:()=>{document.title=searchState.titleBeforeSearch;if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.hash)}},hideResults:()=>{switchDisplayedElement(null);searchState.removeQueryParameters()},getQueryStringParams:()=>{const params={};window.location.search.substring(1).split("&").map(s=>{const pair=s.split("=").map(x=>x.replace(/\+/g," "));params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params},setup:()=>{const search_input=searchState.input;if(!searchState.input){return}let searchLoaded=false;function sendSearchForm(){document.getElementsByClassName("search-form")[0].submit()}function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(getVar("static-root-path")+getVar("search-js"),sendSearchForm);loadScript(resourcePath("search-index",".js"),sendSearchForm)}}search_input.addEventListener("focus",()=>{search_input.origPlaceholder=search_input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});if(search_input.value!==""){loadSearch()}const params=searchState.getQueryStringParams();if(params.search!==undefined){searchState.setLoadingSearch();loadSearch()}},setLoadingSearch:()=>{const search=searchState.outputElement();search.innerHTML="

"+searchState.loadingText+"

";searchState.showResults(search)},descShards:new Map(),loadDesc:async function({descShard,descIndex}){if(descShard.promise===null){descShard.promise=new Promise((resolve,reject)=>{descShard.resolve=resolve;const ds=descShard;const fname=`${ds.crate}-desc-${ds.shard}-`;const url=resourcePath(`search.desc/${descShard.crate}/${fname}`,".js",);loadScript(url,reject)})}const list=await descShard.promise;return list[descIndex]},loadedDescShard:function(crate,shard,data){this.descShards.get(crate)[shard].resolve(data.split("\n"))},};const toggleAllDocsId="toggle-all-docs";let savedHash="";function handleHashes(ev){if(ev!==null&&searchState.isDisplayed()&&ev.newURL){switchDisplayedElement(null);const hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.search+"#"+hash)}const elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}const pageId=window.location.hash.replace(/^#/,"");if(savedHash!==pageId){savedHash=pageId;if(pageId!==""){expandSection(pageId)}}if(savedHash.startsWith("impl-")){const splitAt=savedHash.indexOf("/");if(splitAt!==-1){const implId=savedHash.slice(0,splitAt);const assocId=savedHash.slice(splitAt+1);const implElem=document.getElementById(implId);if(implElem&&implElem.parentElement.tagName==="SUMMARY"&&implElem.parentElement.parentElement.tagName==="DETAILS"){onEachLazy(implElem.parentElement.parentElement.querySelectorAll(`[id^="${assocId}"]`),item=>{const numbered=/([^-]+)-([0-9]+)/.exec(item.id);if(item.id===assocId||(numbered&&numbered[1]===assocId)){openParentDetails(item);item.scrollIntoView();setTimeout(()=>{window.location.replace("#"+item.id)},0)}},)}}}}function onHashChange(ev){hideSidebar();handleHashes(ev)}function openParentDetails(elem){while(elem){if(elem.tagName==="DETAILS"){elem.open=true}elem=elem.parentNode}}function expandSection(id){openParentDetails(document.getElementById(id))}function handleEscape(ev){searchState.clearInputTimeout();searchState.hideResults();ev.preventDefault();searchState.defocus();window.hideAllModals(true)}function handleShortcut(ev){const disableShortcuts=getSettingValue("disable-shortcuts")==="true";if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts){return}if(document.activeElement.tagName==="INPUT"&&document.activeElement.type!=="checkbox"&&document.activeElement.type!=="radio"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":case"/":ev.preventDefault();searchState.focus();break;case"+":ev.preventDefault();expandAllDocs();break;case"-":ev.preventDefault();collapseAllDocs();break;case"?":showHelp();break;default:break}}}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);function addSidebarItems(){if(!window.SIDEBAR_ITEMS){return}const sidebar=document.getElementsByClassName("sidebar-elems")[0];function block(shortty,id,longty){const filtered=window.SIDEBAR_ITEMS[shortty];if(!filtered){return}const modpath=hasClass(document.querySelector(".rustdoc"),"mod")?"../":"";const h3=document.createElement("h3");h3.innerHTML=`${longty}`;const ul=document.createElement("ul");ul.className="block "+shortty;for(const name of filtered){let path;if(shortty==="mod"){path=`${modpath}${name}/index.html`}else{path=`${modpath}${shortty}.${name}.html`}let current_page=document.location.href.toString();if(current_page.endsWith("/")){current_page+="index.html"}const link=document.createElement("a");link.href=path;link.textContent=name;const li=document.createElement("li");if(link.href===current_page){li.classList.add("current")}li.appendChild(link);ul.appendChild(li)}sidebar.appendChild(h3);sidebar.appendChild(ul)}if(sidebar){block("primitive","primitives","Primitive Types");block("mod","modules","Modules");block("macro","macros","Macros");block("struct","structs","Structs");block("enum","enums","Enums");block("constant","constants","Constants");block("static","static","Statics");block("trait","traits","Traits");block("fn","functions","Functions");block("type","types","Type Aliases");block("union","unions","Unions");block("foreigntype","foreign-types","Foreign Types");block("keyword","keywords","Keywords");block("opaque","opaque-types","Opaque Types");block("attr","attributes","Attribute Macros");block("derive","derives","Derive Macros");block("traitalias","trait-aliases","Trait Aliases")}}window.register_implementors=imp=>{const implementors=document.getElementById("implementors-list");const synthetic_implementors=document.getElementById("synthetic-implementors-list");const inlined_types=new Set();const TEXT_IDX=0;const SYNTHETIC_IDX=1;const TYPES_IDX=2;if(synthetic_implementors){onEachLazy(synthetic_implementors.getElementsByClassName("impl"),el=>{const aliases=el.getAttribute("data-aliases");if(!aliases){return}aliases.split(",").forEach(alias=>{inlined_types.add(alias)})})}let currentNbImpls=implementors.getElementsByClassName("impl").length;const traitName=document.querySelector(".main-heading h1 > .trait").textContent;const baseIdName="impl-"+traitName+"-";const libs=Object.getOwnPropertyNames(imp);const script=document.querySelector("script[data-ignore-extern-crates]");const ignoreExternCrates=new Set((script?script.getAttribute("data-ignore-extern-crates"):"").split(","),);for(const lib of libs){if(lib===window.currentCrate||ignoreExternCrates.has(lib)){continue}const structs=imp[lib];struct_loop:for(const struct of structs){const list=struct[SYNTHETIC_IDX]?synthetic_implementors:implementors;if(struct[SYNTHETIC_IDX]){for(const struct_type of struct[TYPES_IDX]){if(inlined_types.has(struct_type)){continue struct_loop}inlined_types.add(struct_type)}}const code=document.createElement("h3");code.innerHTML=struct[TEXT_IDX];addClass(code,"code-header");onEachLazy(code.getElementsByTagName("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});const currentId=baseIdName+currentNbImpls;const anchor=document.createElement("a");anchor.href="#"+currentId;addClass(anchor,"anchor");const display=document.createElement("div");display.id=currentId;addClass(display,"impl");display.appendChild(anchor);display.appendChild(code);list.appendChild(display);currentNbImpls+=1}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}window.register_type_impls=imp=>{if(!imp||!imp[window.currentCrate]){return}window.pending_type_impls=null;const idMap=new Map();let implementations=document.getElementById("implementations-list");let trait_implementations=document.getElementById("trait-implementations-list");let trait_implementations_header=document.getElementById("trait-implementations");const script=document.querySelector("script[data-self-path]");const selfPath=script?script.getAttribute("data-self-path"):null;const mainContent=document.querySelector("#main-content");const sidebarSection=document.querySelector(".sidebar section");let methods=document.querySelector(".sidebar .block.method");let associatedTypes=document.querySelector(".sidebar .block.associatedtype");let associatedConstants=document.querySelector(".sidebar .block.associatedconstant");let sidebarTraitList=document.querySelector(".sidebar .block.trait-implementation");for(const impList of imp[window.currentCrate]){const types=impList.slice(2);const text=impList[0];const isTrait=impList[1]!==0;const traitName=impList[1];if(types.indexOf(selfPath)===-1){continue}let outputList=isTrait?trait_implementations:implementations;if(outputList===null){const outputListName=isTrait?"Trait Implementations":"Implementations";const outputListId=isTrait?"trait-implementations-list":"implementations-list";const outputListHeaderId=isTrait?"trait-implementations":"implementations";const outputListHeader=document.createElement("h2");outputListHeader.id=outputListHeaderId;outputListHeader.innerText=outputListName;outputList=document.createElement("div");outputList.id=outputListId;if(isTrait){const link=document.createElement("a");link.href=`#${outputListHeaderId}`;link.innerText="Trait Implementations";const h=document.createElement("h3");h.appendChild(link);trait_implementations=outputList;trait_implementations_header=outputListHeader;sidebarSection.appendChild(h);sidebarTraitList=document.createElement("ul");sidebarTraitList.className="block trait-implementation";sidebarSection.appendChild(sidebarTraitList);mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList)}else{implementations=outputList;if(trait_implementations){mainContent.insertBefore(outputListHeader,trait_implementations_header);mainContent.insertBefore(outputList,trait_implementations_header)}else{const mainContent=document.querySelector("#main-content");mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList)}}}const template=document.createElement("template");template.innerHTML=text;onEachLazy(template.content.querySelectorAll("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});onEachLazy(template.content.querySelectorAll("[id]"),el=>{let i=0;if(idMap.has(el.id)){i=idMap.get(el.id)}else if(document.getElementById(el.id)){i=1;while(document.getElementById(`${el.id}-${2 * i}`)){i=2*i}while(document.getElementById(`${el.id}-${i}`)){i+=1}}if(i!==0){const oldHref=`#${el.id}`;const newHref=`#${el.id}-${i}`;el.id=`${el.id}-${i}`;onEachLazy(template.content.querySelectorAll("a[href]"),link=>{if(link.getAttribute("href")===oldHref){link.href=newHref}})}idMap.set(el.id,i+1)});const templateAssocItems=template.content.querySelectorAll("section.tymethod, "+"section.method, section.associatedtype, section.associatedconstant");if(isTrait){const li=document.createElement("li");const a=document.createElement("a");a.href=`#${template.content.querySelector(".impl").id}`;a.textContent=traitName;li.appendChild(a);sidebarTraitList.append(li)}else{onEachLazy(templateAssocItems,item=>{let block=hasClass(item,"associatedtype")?associatedTypes:(hasClass(item,"associatedconstant")?associatedConstants:(methods));if(!block){const blockTitle=hasClass(item,"associatedtype")?"Associated Types":(hasClass(item,"associatedconstant")?"Associated Constants":("Methods"));const blockClass=hasClass(item,"associatedtype")?"associatedtype":(hasClass(item,"associatedconstant")?"associatedconstant":("method"));const blockHeader=document.createElement("h3");const blockLink=document.createElement("a");blockLink.href="#implementations";blockLink.innerText=blockTitle;blockHeader.appendChild(blockLink);block=document.createElement("ul");block.className=`block ${blockClass}`;const insertionReference=methods||sidebarTraitList;if(insertionReference){const insertionReferenceH=insertionReference.previousElementSibling;sidebarSection.insertBefore(blockHeader,insertionReferenceH);sidebarSection.insertBefore(block,insertionReferenceH)}else{sidebarSection.appendChild(blockHeader);sidebarSection.appendChild(block)}if(hasClass(item,"associatedtype")){associatedTypes=block}else if(hasClass(item,"associatedconstant")){associatedConstants=block}else{methods=block}}const li=document.createElement("li");const a=document.createElement("a");a.innerText=item.id.split("-")[0].split(".")[1];a.href=`#${item.id}`;li.appendChild(a);block.appendChild(li)})}outputList.appendChild(template.content)}for(const list of[methods,associatedTypes,associatedConstants,sidebarTraitList]){if(!list){continue}const newChildren=Array.prototype.slice.call(list.children);newChildren.sort((a,b)=>{const aI=a.innerText;const bI=b.innerText;return aIbI?1:0});list.replaceChildren(...newChildren)}};if(window.pending_type_impls){window.register_type_impls(window.pending_type_impls)}function addSidebarCrates(){if(!window.ALL_CRATES){return}const sidebarElems=document.getElementsByClassName("sidebar-elems")[0];if(!sidebarElems){return}const h3=document.createElement("h3");h3.innerHTML="Crates";const ul=document.createElement("ul");ul.className="block crate";for(const crate of window.ALL_CRATES){const link=document.createElement("a");link.href=window.rootPath+crate+"/index.html";link.textContent=crate;const li=document.createElement("li");if(window.rootPath!=="./"&&crate===window.currentCrate){li.className="current"}li.appendChild(link);ul.appendChild(li)}sidebarElems.appendChild(h3);sidebarElems.appendChild(ul)}function expandAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);removeClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hasClass(e,"type-contents-toggle")&&!hasClass(e,"more-examples-toggle")){e.open=true}});innerToggle.title="collapse all docs";innerToggle.children[0].innerText="\u2212"}function collapseAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);addClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(e.parentNode.id!=="implementations-list"||(!hasClass(e,"implementors-toggle")&&!hasClass(e,"type-contents-toggle"))){e.open=false}});innerToggle.title="expand all docs";innerToggle.children[0].innerText="+"}function toggleAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);if(!innerToggle){return}if(hasClass(innerToggle,"will-expand")){expandAllDocs()}else{collapseAllDocs()}}(function(){const toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}const hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";const hideImplementations=getSettingValue("auto-hide-trait-implementations")==="true";const hideLargeItemContents=getSettingValue("auto-hide-large-items")!=="false";function setImplementorsTogglesOpen(id,open){const list=document.getElementById(id);if(list!==null){onEachLazy(list.getElementsByClassName("implementors-toggle"),e=>{e.open=open})}}if(hideImplementations){setImplementorsTogglesOpen("trait-implementations-list",false);setImplementorsTogglesOpen("blanket-implementations-list",false)}onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hideLargeItemContents&&hasClass(e,"type-contents-toggle")){e.open=true}if(hideMethodDocs&&hasClass(e,"method-toggle")){e.open=false}})}());window.rustdoc_add_line_numbers_to_examples=()=>{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");if(line_numbers.length>0){return}const count=x.textContent.split("\n").length;const elems=[];for(let i=0;i{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");for(const node of line_numbers){parent.removeChild(node)}})};if(getSettingValue("line-numbers")==="true"){window.rustdoc_add_line_numbers_to_examples()}function showSidebar(){window.hideAllModals(false);const sidebar=document.getElementsByClassName("sidebar")[0];addClass(sidebar,"shown")}function hideSidebar(){const sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"shown")}window.addEventListener("resize",()=>{if(window.CURRENT_TOOLTIP_ELEMENT){const base=window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE;const force_visible=base.TOOLTIP_FORCE_VISIBLE;hideTooltip(false);if(force_visible){showTooltip(base);base.TOOLTIP_FORCE_VISIBLE=true}}});const mainElem=document.getElementById(MAIN_ID);if(mainElem){mainElem.addEventListener("click",hideSidebar)}onEachLazy(document.querySelectorAll("a[href^='#']"),el=>{el.addEventListener("click",()=>{expandSection(el.hash.slice(1));hideSidebar()})});onEachLazy(document.querySelectorAll(".toggle > summary:not(.hideme)"),el=>{el.addEventListener("click",e=>{if(e.target.tagName!=="SUMMARY"&&e.target.tagName!=="A"){e.preventDefault()}})});function showTooltip(e){const notable_ty=e.getAttribute("data-notable-ty");if(!window.NOTABLE_TRAITS&¬able_ty){const data=document.getElementById("notable-traits-data");if(data){window.NOTABLE_TRAITS=JSON.parse(data.innerText)}else{throw new Error("showTooltip() called with notable without any notable traits!")}}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE===e){clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);return}window.hideAllModals(false);const wrapper=document.createElement("div");if(notable_ty){wrapper.innerHTML="
"+window.NOTABLE_TRAITS[notable_ty]+"
"}else{if(e.getAttribute("title")!==null){e.setAttribute("data-title",e.getAttribute("title"));e.removeAttribute("title")}if(e.getAttribute("data-title")!==null){const titleContent=document.createElement("div");titleContent.className="content";titleContent.appendChild(document.createTextNode(e.getAttribute("data-title")));wrapper.appendChild(titleContent)}}wrapper.className="tooltip popover";const focusCatcher=document.createElement("div");focusCatcher.setAttribute("tabindex","0");focusCatcher.onfocus=hideTooltip;wrapper.appendChild(focusCatcher);const pos=e.getBoundingClientRect();wrapper.style.top=(pos.top+window.scrollY+pos.height)+"px";wrapper.style.left=0;wrapper.style.right="auto";wrapper.style.visibility="hidden";const body=document.getElementsByTagName("body")[0];body.appendChild(wrapper);const wrapperPos=wrapper.getBoundingClientRect();const finalPos=pos.left+window.scrollX-wrapperPos.width+24;if(finalPos>0){wrapper.style.left=finalPos+"px"}else{wrapper.style.setProperty("--popover-arrow-offset",(wrapperPos.right-pos.right+4)+"px",)}wrapper.style.visibility="";window.CURRENT_TOOLTIP_ELEMENT=wrapper;window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE=e;clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);wrapper.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}clearTooltipHoverTimeout(e)};wrapper.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&!e.contains(ev.relatedTarget)){setTooltipHoverTimeout(e,false);addClass(wrapper,"fade-out")}}}function setTooltipHoverTimeout(element,show){clearTooltipHoverTimeout(element);if(!show&&!window.CURRENT_TOOLTIP_ELEMENT){return}if(show&&window.CURRENT_TOOLTIP_ELEMENT){return}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE!==element){return}element.TOOLTIP_HOVER_TIMEOUT=setTimeout(()=>{if(show){showTooltip(element)}else if(!element.TOOLTIP_FORCE_VISIBLE){hideTooltip(false)}},show?window.RUSTDOC_TOOLTIP_HOVER_MS:window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS)}function clearTooltipHoverTimeout(element){if(element.TOOLTIP_HOVER_TIMEOUT!==undefined){removeClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out");clearTimeout(element.TOOLTIP_HOVER_TIMEOUT);delete element.TOOLTIP_HOVER_TIMEOUT}}function tooltipBlurHandler(event){if(window.CURRENT_TOOLTIP_ELEMENT&&!window.CURRENT_TOOLTIP_ELEMENT.contains(document.activeElement)&&!window.CURRENT_TOOLTIP_ELEMENT.contains(event.relatedTarget)&&!window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.contains(document.activeElement)&&!window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.contains(event.relatedTarget)){setTimeout(()=>hideTooltip(false),0)}}function hideTooltip(focus){if(window.CURRENT_TOOLTIP_ELEMENT){if(window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE){if(focus){window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.focus()}window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE=false}const body=document.getElementsByTagName("body")[0];body.removeChild(window.CURRENT_TOOLTIP_ELEMENT);clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);window.CURRENT_TOOLTIP_ELEMENT=null}}onEachLazy(document.getElementsByClassName("tooltip"),e=>{e.onclick=()=>{e.TOOLTIP_FORCE_VISIBLE=e.TOOLTIP_FORCE_VISIBLE?false:true;if(window.CURRENT_TOOLTIP_ELEMENT&&!e.TOOLTIP_FORCE_VISIBLE){hideTooltip(true)}else{showTooltip(e);window.CURRENT_TOOLTIP_ELEMENT.setAttribute("tabindex","0");window.CURRENT_TOOLTIP_ELEMENT.focus();window.CURRENT_TOOLTIP_ELEMENT.onblur=tooltipBlurHandler}return false};e.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointermove=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&window.CURRENT_TOOLTIP_ELEMENT&&!window.CURRENT_TOOLTIP_ELEMENT.contains(ev.relatedTarget)){setTooltipHoverTimeout(e,false);addClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out")}}});const sidebar_menu_toggle=document.getElementsByClassName("sidebar-menu-toggle")[0];if(sidebar_menu_toggle){sidebar_menu_toggle.addEventListener("click",()=>{const sidebar=document.getElementsByClassName("sidebar")[0];if(!hasClass(sidebar,"shown")){showSidebar()}else{hideSidebar()}})}function helpBlurHandler(event){blurHandler(event,getHelpButton(),window.hidePopoverMenus)}function buildHelpMenu(){const book_info=document.createElement("span");const channel=getVar("channel");book_info.className="top";book_info.innerHTML=`You can find more information in \ +the rustdoc book.`;const shortcuts=[["?","Show this help dialog"],["S / /","Focus the search field"],["↑","Move up in search results"],["↓","Move down in search results"],["← / →","Switch result tab (when results focused)"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(x=>"
"+x[0].split(" ").map((y,index)=>((index&1)===0?""+y+"":" "+y+" ")).join("")+"
"+x[1]+"
").join("");const div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

"+shortcuts+"
";const infos=[`For a full list of all search features, take a look here.`,"Prefix searches with a type followed by a colon (e.g., fn:) to \ + restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ + enum, trait, type, macro, \ + and const.","Search functions by type signature (e.g., vec -> usize or \ + -> vec or String, enum:Cow -> bool)","You can look for items with an exact name by putting double quotes around \ + your request: \"string\"","Look for functions that accept or return \ + slices and \ + arrays by writing \ + square brackets (e.g., -> [u8] or [] -> Option)","Look for items inside another one by searching for a path: vec::Vec",].map(x=>"

"+x+"

").join("");const div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="

Search Tricks

"+infos;const rustdoc_version=document.createElement("span");rustdoc_version.className="bottom";const rustdoc_version_code=document.createElement("code");rustdoc_version_code.innerText="rustdoc "+getVar("rustdoc-version");rustdoc_version.appendChild(rustdoc_version_code);const container=document.createElement("div");if(!isHelpPage){container.className="popover"}container.id="help";container.style.display="none";const side_by_side=document.createElement("div");side_by_side.className="side-by-side";side_by_side.appendChild(div_shortcuts);side_by_side.appendChild(div_infos);container.appendChild(book_info);container.appendChild(side_by_side);container.appendChild(rustdoc_version);if(isHelpPage){const help_section=document.createElement("section");help_section.appendChild(container);document.getElementById("main-content").appendChild(help_section);container.style.display="block"}else{const help_button=getHelpButton();help_button.appendChild(container);container.onblur=helpBlurHandler;help_button.onblur=helpBlurHandler;help_button.children[0].onblur=helpBlurHandler}return container}window.hideAllModals=switchFocus=>{hideSidebar();window.hidePopoverMenus();hideTooltip(switchFocus)};window.hidePopoverMenus=()=>{onEachLazy(document.querySelectorAll(".search-form .popover"),elem=>{elem.style.display="none"})};function getHelpMenu(buildNeeded){let menu=getHelpButton().querySelector(".popover");if(!menu&&buildNeeded){menu=buildHelpMenu()}return menu}function showHelp(){getHelpButton().querySelector("a").focus();const menu=getHelpMenu(true);if(menu.style.display==="none"){window.hideAllModals();menu.style.display=""}}if(isHelpPage){showHelp();document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault()})}else{document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault();const menu=getHelpMenu(true);const shouldShowHelp=menu.style.display==="none";if(shouldShowHelp){showHelp()}else{window.hidePopoverMenus()}})}setMobileTopbar();addSidebarItems();addSidebarCrates();onHashChange(null);window.addEventListener("hashchange",onHashChange);searchState.setup()}());(function(){const SIDEBAR_MIN=100;const SIDEBAR_MAX=500;const RUSTDOC_MOBILE_BREAKPOINT=700;const BODY_MIN=400;const SIDEBAR_VANISH_THRESHOLD=SIDEBAR_MIN/2;const sidebarButton=document.getElementById("sidebar-button");if(sidebarButton){sidebarButton.addEventListener("click",e=>{removeClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","false");if(document.querySelector(".rustdoc.src")){window.rustdocToggleSrcSidebar()}e.preventDefault()})}let currentPointerId=null;let desiredSidebarSize=null;let pendingSidebarResizingFrame=false;const resizer=document.querySelector(".sidebar-resizer");const sidebar=document.querySelector(".sidebar");if(!resizer||!sidebar){return}const isSrcPage=hasClass(document.body,"src");function hideSidebar(){if(isSrcPage){window.rustdocCloseSourceSidebar();updateLocalStorage("src-sidebar-width",null);document.documentElement.style.removeProperty("--src-sidebar-width");sidebar.style.removeProperty("--src-sidebar-width");resizer.style.removeProperty("--src-sidebar-width")}else{addClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","true");updateLocalStorage("desktop-sidebar-width",null);document.documentElement.style.removeProperty("--desktop-sidebar-width");sidebar.style.removeProperty("--desktop-sidebar-width");resizer.style.removeProperty("--desktop-sidebar-width")}}function showSidebar(){if(isSrcPage){window.rustdocShowSourceSidebar()}else{removeClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","false")}}function changeSidebarSize(size){if(isSrcPage){updateLocalStorage("src-sidebar-width",size);sidebar.style.setProperty("--src-sidebar-width",size+"px");resizer.style.setProperty("--src-sidebar-width",size+"px")}else{updateLocalStorage("desktop-sidebar-width",size);sidebar.style.setProperty("--desktop-sidebar-width",size+"px");resizer.style.setProperty("--desktop-sidebar-width",size+"px")}}function isSidebarHidden(){return isSrcPage?!hasClass(document.documentElement,"src-sidebar-expanded"):hasClass(document.documentElement,"hide-sidebar")}function resize(e){if(currentPointerId===null||currentPointerId!==e.pointerId){return}e.preventDefault();const pos=e.clientX-3;if(pos=SIDEBAR_MIN){if(isSidebarHidden()){showSidebar()}const constrainedPos=Math.min(pos,window.innerWidth-BODY_MIN,SIDEBAR_MAX);changeSidebarSize(constrainedPos);desiredSidebarSize=constrainedPos;if(pendingSidebarResizingFrame!==false){clearTimeout(pendingSidebarResizingFrame)}pendingSidebarResizingFrame=setTimeout(()=>{if(currentPointerId===null||pendingSidebarResizingFrame===false){return}pendingSidebarResizingFrame=false;document.documentElement.style.setProperty("--resizing-sidebar-width",desiredSidebarSize+"px",)},100)}}window.addEventListener("resize",()=>{if(window.innerWidth=(window.innerWidth-BODY_MIN)){changeSidebarSize(window.innerWidth-BODY_MIN)}else if(desiredSidebarSize!==null&&desiredSidebarSize>SIDEBAR_MIN){changeSidebarSize(desiredSidebarSize)}});function stopResize(e){if(currentPointerId===null){return}if(e){e.preventDefault()}desiredSidebarSize=sidebar.getBoundingClientRect().width;removeClass(resizer,"active");window.removeEventListener("pointermove",resize,false);window.removeEventListener("pointerup",stopResize,false);removeClass(document.documentElement,"sidebar-resizing");document.documentElement.style.removeProperty("--resizing-sidebar-width");if(resizer.releasePointerCapture){resizer.releasePointerCapture(currentPointerId);currentPointerId=null}}function initResize(e){if(currentPointerId!==null||e.altKey||e.ctrlKey||e.metaKey||e.button!==0){return}if(resizer.setPointerCapture){resizer.setPointerCapture(e.pointerId);if(!resizer.hasPointerCapture(e.pointerId)){resizer.releasePointerCapture(e.pointerId);return}currentPointerId=e.pointerId}window.hideAllModals(false);e.preventDefault();window.addEventListener("pointermove",resize,false);window.addEventListener("pointercancel",stopResize,false);window.addEventListener("pointerup",stopResize,false);addClass(resizer,"active");addClass(document.documentElement,"sidebar-resizing");const pos=e.clientX-sidebar.offsetLeft-3;document.documentElement.style.setProperty("--resizing-sidebar-width",pos+"px");desiredSidebarSize=null}resizer.addEventListener("pointerdown",initResize,false)}());(function(){let reset_button_timeout=null;const but=document.getElementById("copy-path");if(!but){return}but.onclick=()=>{const parent=but.parentElement;const path=[];onEach(parent.childNodes,child=>{if(child.tagName==="A"){path.push(child.textContent)}});const el=document.createElement("textarea");el.value=path.join("::");el.setAttribute("readonly","");el.style.position="absolute";el.style.left="-9999px";document.body.appendChild(el);el.select();document.execCommand("copy");document.body.removeChild(el);but.classList.add("clicked");if(reset_button_timeout!==null){window.clearTimeout(reset_button_timeout)}function reset_button(){reset_button_timeout=null;but.classList.remove("clicked")}reset_button_timeout=window.setTimeout(reset_button,1000)}}()) \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/rustdoc-c5d6553a23f1e5a6.css b/static/rust/redstone/crypto_secp256k1,network_casper/static.files/rustdoc-c5d6553a23f1e5a6.css new file mode 100644 index 00000000..9f64990b --- /dev/null +++ b/static/rust/redstone/crypto_secp256k1,network_casper/static.files/rustdoc-c5d6553a23f1e5a6.css @@ -0,0 +1,46 @@ + :root{--nav-sub-mobile-padding:8px;--search-typename-width:6.75rem;--desktop-sidebar-width:200px;--src-sidebar-width:300px;--desktop-sidebar-z-index:100;--sidebar-elems-left-padding:24px;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular-018c141bf0843ffd.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium-8f9a781e4970d388.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular-46f98efaafac5295.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:italic;font-weight:400;src:local('Source Serif 4 Italic'),url("SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:700;src:local('Source Serif 4 Bold'),url("SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'NanumBarunGothic';src:url("NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2") format("woff2");font-display:swap;unicode-range:U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF;}*{box-sizing:border-box;}body{font:1rem/1.5 "Source Serif 4",NanumBarunGothic,serif;margin:0;position:relative;overflow-wrap:break-word;overflow-wrap:anywhere;font-feature-settings:"kern","liga";background-color:var(--main-background-color);color:var(--main-color);}h1{font-size:1.5rem;}h2{font-size:1.375rem;}h3{font-size:1.25rem;}h1,h2,h3,h4,h5,h6{font-weight:500;}h1,h2,h3,h4{margin:25px 0 15px 0;padding-bottom:6px;}.docblock h3,.docblock h4,h5,h6{margin:15px 0 5px 0;}.docblock>h2:first-child,.docblock>h3:first-child,.docblock>h4:first-child,.docblock>h5:first-child,.docblock>h6:first-child{margin-top:0;}.main-heading h1{margin:0;padding:0;flex-grow:1;overflow-wrap:break-word;overflow-wrap:anywhere;}.main-heading{display:flex;flex-wrap:wrap;padding-bottom:6px;margin-bottom:15px;}.content h2,.top-doc .docblock>h3,.top-doc .docblock>h4{border-bottom:1px solid var(--headings-border-bottom-color);}h1,h2{line-height:1.25;padding-top:3px;padding-bottom:9px;}h3.code-header{font-size:1.125rem;}h4.code-header{font-size:1rem;}.code-header{font-weight:600;margin:0;padding:0;white-space:pre-wrap;}#crate-search,h1,h2,h3,h4,h5,h6,.sidebar,.mobile-topbar,.search-input,.search-results .result-name,.item-name>a,.out-of-band,span.since,a.src,#help-button>a,summary.hideme,.scraped-example-list,ul.all-items{font-family:"Fira Sans",Arial,NanumBarunGothic,sans-serif;}#toggle-all-docs,a.anchor,.section-header a,#src-sidebar a,.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,h1 a,.search-results a,.stab,.result-name i{color:var(--main-color);}span.enum,a.enum,span.struct,a.struct,span.union,a.union,span.primitive,a.primitive,span.type,a.type,span.foreigntype,a.foreigntype{color:var(--type-link-color);}span.trait,a.trait,span.traitalias,a.traitalias{color:var(--trait-link-color);}span.associatedtype,a.associatedtype,span.constant,a.constant,span.static,a.static{color:var(--assoc-item-link-color);}span.fn,a.fn,span.method,a.method,span.tymethod,a.tymethod{color:var(--function-link-color);}span.attr,a.attr,span.derive,a.derive,span.macro,a.macro{color:var(--macro-link-color);}span.mod,a.mod{color:var(--mod-link-color);}span.keyword,a.keyword{color:var(--keyword-link-color);}a{color:var(--link-color);text-decoration:none;}ol,ul{padding-left:24px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.625em;}p,.docblock>.warning{margin:0 0 .75em 0;}p:last-child,.docblock>.warning:last-child{margin:0;}button{padding:1px 6px;cursor:pointer;}button#toggle-all-docs{padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.rustdoc{display:flex;flex-direction:row;flex-wrap:nowrap;}main{position:relative;flex-grow:1;padding:10px 15px 40px 45px;min-width:0;}.src main{padding:15px;}.width-limiter{max-width:960px;margin-right:auto;}details:not(.toggle) summary{margin-bottom:.6em;}code,pre,a.test-arrow,.code-header{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.125em;}.docblock pre code,.docblock-short pre code{padding:0;}pre{padding:14px;line-height:1.5;}pre.item-decl{overflow-x:auto;}.item-decl .type-contents-toggle{contain:initial;}.src .content pre{padding:20px;}.rustdoc.src .example-wrap pre.src-line-numbers{padding:20px 0 20px 4px;}img{max-width:100%;}.logo-container{line-height:0;display:block;}.rust-logo{filter:var(--rust-logo-filter);}.sidebar{font-size:0.875rem;flex:0 0 var(--desktop-sidebar-width);width:var(--desktop-sidebar-width);overflow-y:scroll;overscroll-behavior:contain;position:sticky;height:100vh;top:0;left:0;z-index:var(--desktop-sidebar-z-index);}.rustdoc.src .sidebar{flex-basis:50px;width:50px;border-right:1px solid;overflow-x:hidden;overflow-y:hidden;}.hide-sidebar .sidebar,.hide-sidebar .sidebar-resizer{display:none;}.sidebar-resizer{touch-action:none;width:9px;cursor:col-resize;z-index:calc(var(--desktop-sidebar-z-index) + 1);position:fixed;height:100%;left:calc(var(--desktop-sidebar-width) + 1px);}.rustdoc.src .sidebar-resizer{left:49px;}.src-sidebar-expanded .src .sidebar-resizer{left:var(--src-sidebar-width);}.sidebar-resizing{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;}.sidebar-resizing*{cursor:col-resize !important;}.sidebar-resizing .sidebar{position:fixed;}.sidebar-resizing>body{padding-left:var(--resizing-sidebar-width);}.sidebar-resizer:hover,.sidebar-resizer:active,.sidebar-resizer:focus,.sidebar-resizer.active{width:10px;margin:0;left:var(--desktop-sidebar-width);border-left:solid 1px var(--sidebar-resizer-hover);}.src-sidebar-expanded .rustdoc.src .sidebar-resizer:hover,.src-sidebar-expanded .rustdoc.src .sidebar-resizer:active,.src-sidebar-expanded .rustdoc.src .sidebar-resizer:focus,.src-sidebar-expanded .rustdoc.src .sidebar-resizer.active{left:calc(var(--src-sidebar-width) - 1px);}@media (pointer:coarse){.sidebar-resizer{display:none !important;}}.sidebar-resizer.active{padding:0 140px;width:2px;margin-left:-140px;border-left:none;}.sidebar-resizer.active:before{border-left:solid 2px var(--sidebar-resizer-active);display:block;height:100%;content:"";}.sidebar,.mobile-topbar,.sidebar-menu-toggle,#src-sidebar{background-color:var(--sidebar-background-color);}.src .sidebar>*{visibility:hidden;}.src-sidebar-expanded .src .sidebar{overflow-y:auto;flex-basis:var(--src-sidebar-width);width:var(--src-sidebar-width);}.src-sidebar-expanded .src .sidebar>*{visibility:visible;}#all-types{margin-top:1em;}*{scrollbar-width:initial;scrollbar-color:var(--scrollbar-color);}.sidebar{scrollbar-width:thin;scrollbar-color:var(--scrollbar-color);}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;background-color:var(--scrollbar-track-background-color);}.sidebar::-webkit-scrollbar-track{background-color:var(--scrollbar-track-background-color);}::-webkit-scrollbar-thumb,.sidebar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-background-color);}.hidden{display:none !important;}.logo-container>img{height:48px;width:48px;}ul.block,.block li{padding:0;margin:0;list-style:none;}.sidebar-elems a,.sidebar>h2 a{display:block;padding:0.25rem;margin-right:0.25rem;border-left:solid var(--sidebar-elems-left-padding) transparent;margin-left:calc(-0.25rem - var(--sidebar-elems-left-padding));background-clip:border-box;}.sidebar h2{overflow-wrap:anywhere;padding:0;margin:0.7rem 0;}.sidebar h3{font-size:1.125rem;padding:0;margin:0;}.sidebar-elems,.sidebar>.version,.sidebar>h2{padding-left:var(--sidebar-elems-left-padding);}.sidebar a{color:var(--sidebar-link-color);}.sidebar .current,.sidebar .current a,.sidebar-crate a.logo-container:hover+h2 a,.sidebar a:hover:not(.logo-container){background-color:var(--sidebar-current-link-background-color);}.sidebar-elems .block{margin-bottom:2em;}.sidebar-elems .block li a{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}.sidebar-crate{display:flex;align-items:center;justify-content:center;margin:14px 32px 1rem;row-gap:10px;column-gap:32px;flex-wrap:wrap;}.sidebar-crate h2{flex-grow:1;margin:0 -8px;align-self:start;}.sidebar-crate .logo-container{margin:0 calc(-16px - var(--sidebar-elems-left-padding));padding:0 var(--sidebar-elems-left-padding);text-align:center;}.sidebar-crate .logo-container img{margin-top:-16px;border-top:solid 16px transparent;box-sizing:content-box;position:relative;background-clip:border-box;z-index:1;}.sidebar-crate h2 a{display:block;border-left:solid var(--sidebar-elems-left-padding) transparent;background-clip:border-box;margin:0 calc(-24px + 0.25rem) 0 calc(-0.2rem - var(--sidebar-elems-left-padding));padding:calc((16px - 0.57rem ) / 2 ) 0.25rem;padding-left:0.2rem;}.sidebar-crate h2 .version{display:block;font-weight:normal;font-size:1rem;overflow-wrap:break-word;}.sidebar-crate+.version{margin-top:-1rem;margin-bottom:1rem;}.mobile-topbar{display:none;}.rustdoc .example-wrap{display:flex;position:relative;margin-bottom:10px;}.rustdoc .example-wrap:last-child{margin-bottom:0px;}.rustdoc .example-wrap pre{margin:0;flex-grow:1;}.rustdoc:not(.src) .example-wrap pre{overflow:auto hidden;}.rustdoc .example-wrap pre.example-line-numbers,.rustdoc .example-wrap pre.src-line-numbers{flex-grow:0;min-width:fit-content;overflow:initial;text-align:right;-webkit-user-select:none;user-select:none;padding:14px 8px;color:var(--src-line-numbers-span-color);}.rustdoc .example-wrap pre.src-line-numbers{padding:14px 0;}.src-line-numbers a,.src-line-numbers span{color:var(--src-line-numbers-span-color);padding:0 8px;}.src-line-numbers :target{background-color:transparent;border-right:none;padding:0 8px;}.src-line-numbers .line-highlighted{background-color:var(--src-line-number-highlighted-background-color);}.search-loading{text-align:center;}.docblock-short{overflow-wrap:break-word;overflow-wrap:anywhere;}.docblock :not(pre)>code,.docblock-short code{white-space:pre-wrap;}.top-doc .docblock h2{font-size:1.375rem;}.top-doc .docblock h3{font-size:1.25rem;}.top-doc .docblock h4,.top-doc .docblock h5{font-size:1.125rem;}.top-doc .docblock h6{font-size:1rem;}.docblock h5{font-size:1rem;}.docblock h6{font-size:0.875rem;}.docblock{margin-left:24px;position:relative;}.docblock>:not(.more-examples-toggle):not(.example-wrap){max-width:100%;overflow-x:auto;}.out-of-band{flex-grow:0;font-size:1.125rem;}.docblock code,.docblock-short code,pre,.rustdoc.src .example-wrap{background-color:var(--code-block-background-color);}#main-content{position:relative;}.docblock table{margin:.5em 0;border-collapse:collapse;}.docblock table td,.docblock table th{padding:.5em;border:1px solid var(--border-color);}.docblock table tbody tr:nth-child(2n){background:var(--table-alt-row-background-color);}div.where{white-space:pre-wrap;font-size:0.875rem;}.item-info{display:block;margin-left:24px;}.item-info code{font-size:0.875rem;}#main-content>.item-info{margin-left:0;}nav.sub{flex-grow:1;flex-flow:row nowrap;margin:4px 0 25px 0;display:flex;align-items:center;}.search-form{position:relative;display:flex;height:34px;flex-grow:1;}.src nav.sub{margin:0 0 15px 0;}.section-header{display:block;position:relative;}.section-header:hover>.anchor,.impl:hover>.anchor,.trait-impl:hover>.anchor,.variant:hover>.anchor{display:initial;}.anchor{display:none;position:absolute;left:-0.5em;background:none !important;}.anchor.field{left:-5px;}.section-header>.anchor{left:-15px;padding-right:8px;}h2.section-header>.anchor{padding-right:6px;}a.doc-anchor{color:var(--main-color);display:none;position:absolute;left:-17px;padding-right:5px;padding-left:3px;}*:hover>.doc-anchor{display:block;}.top-doc>.docblock>*:first-child>.doc-anchor{display:none !important;}.main-heading a:hover,.example-wrap .rust a:hover,.all-items a:hover,.docblock a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover:not(.doc-anchor),.docblock-short a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover,.item-info a{text-decoration:underline;}.crate.block li.current a{font-weight:500;}table,.item-table{overflow-wrap:break-word;}.item-table{display:table;padding:0;margin:0;}.item-table>li{display:table-row;}.item-table>li>div{display:table-cell;}.item-table>li>.item-name{padding-right:1.25rem;}.search-results-title{margin-top:0;white-space:nowrap;display:flex;align-items:baseline;}#crate-search-div{position:relative;min-width:5em;}#crate-search{min-width:115px;padding:0 23px 0 4px;max-width:100%;text-overflow:ellipsis;border:1px solid var(--border-color);border-radius:4px;outline:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;background-color:var(--main-background-color);color:inherit;line-height:1.5;font-weight:500;}#crate-search:hover,#crate-search:focus{border-color:var(--crate-search-hover-border);}#crate-search-div::after{pointer-events:none;width:100%;height:100%;position:absolute;top:0;left:0;content:"";background-repeat:no-repeat;background-size:20px;background-position:calc(100% - 2px) 56%;background-image:url('data:image/svg+xml, \ + ');filter:var(--crate-search-div-filter);}#crate-search-div:hover::after,#crate-search-div:focus-within::after{filter:var(--crate-search-div-hover-filter);}#crate-search>option{font-size:1rem;}.search-input{-webkit-appearance:none;outline:none;border:1px solid var(--border-color);border-radius:2px;padding:8px;font-size:1rem;flex-grow:1;background-color:var(--button-background-color);color:var(--search-color);}.search-input:focus{border-color:var(--search-input-focused-border-color);}.search-results{display:none;}.search-results.active{display:block;}.search-results>a{display:flex;margin-left:2px;margin-right:2px;border-bottom:1px solid var(--search-result-border-color);gap:1em;}.search-results>a>div.desc{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex:2;}.search-results a:hover,.search-results a:focus{background-color:var(--search-result-link-focus-background-color);}.search-results .result-name{display:flex;align-items:center;justify-content:start;flex:3;}.search-results .result-name .alias{color:var(--search-results-alias-color);}.search-results .result-name .grey{color:var(--search-results-grey-color);}.search-results .result-name .typename{color:var(--search-results-grey-color);font-size:0.875rem;width:var(--search-typename-width);}.search-results .result-name .path{word-break:break-all;max-width:calc(100% - var(--search-typename-width));display:inline-block;}.search-results .result-name .path>*{display:inline;}.popover{position:absolute;top:100%;right:0;z-index:calc(var(--desktop-sidebar-z-index) + 1);margin-top:7px;border-radius:3px;border:1px solid var(--border-color);background-color:var(--main-background-color);color:var(--main-color);--popover-arrow-offset:11px;}.popover::before{content:'';position:absolute;right:var(--popover-arrow-offset);border:solid var(--border-color);border-width:1px 1px 0 0;background-color:var(--main-background-color);padding:4px;transform:rotate(-45deg);top:-5px;}.setting-line{margin:1.2em 0.6em;}.setting-radio input,.setting-check input{margin-right:0.3em;height:1.2rem;width:1.2rem;border:2px solid var(--settings-input-border-color);outline:none;-webkit-appearance:none;cursor:pointer;}.setting-radio input{border-radius:50%;}.setting-radio span,.setting-check span{padding-bottom:1px;}.setting-radio{margin-top:0.1em;margin-bottom:0.1em;min-width:3.8em;padding:0.3em;display:inline-flex;align-items:center;cursor:pointer;}.setting-radio+.setting-radio{margin-left:0.5em;}.setting-check{margin-right:20px;display:flex;align-items:center;cursor:pointer;}.setting-radio input:checked{box-shadow:inset 0 0 0 3px var(--main-background-color);background-color:var(--settings-input-color);}.setting-check input:checked{background-color:var(--settings-input-color);border-width:1px;content:url('data:image/svg+xml,\ + \ + ');}.setting-radio input:focus,.setting-check input:focus{box-shadow:0 0 1px 1px var(--settings-input-color);}.setting-radio input:checked:focus{box-shadow:inset 0 0 0 3px var(--main-background-color),0 0 2px 2px var(--settings-input-color);}.setting-radio input:hover,.setting-check input:hover{border-color:var(--settings-input-color) !important;}#help.popover{max-width:600px;--popover-arrow-offset:48px;}#help dt{float:left;clear:left;margin-right:0.5rem;}#help span.top,#help span.bottom{text-align:center;display:block;font-size:1.125rem;}#help span.top{margin:10px 0;border-bottom:1px solid var(--border-color);padding-bottom:4px;margin-bottom:6px;}#help span.bottom{clear:both;border-top:1px solid var(--border-color);}.side-by-side>div{width:50%;float:left;padding:0 20px 20px 17px;}.item-info .stab{display:block;padding:3px;margin-bottom:5px;}.item-name .stab{margin-left:0.3125em;}.stab{padding:0 2px;font-size:0.875rem;font-weight:normal;color:var(--main-color);background-color:var(--stab-background-color);width:fit-content;white-space:pre-wrap;border-radius:3px;display:inline;vertical-align:baseline;}.stab.portability>code{background:none;color:var(--stab-code-color);}.stab .emoji,.item-info .stab::before{font-size:1.25rem;}.stab .emoji{margin-right:0.3rem;}.item-info .stab::before{content:"\0";width:0;display:inline-block;color:transparent;}.emoji{text-shadow:1px 0 0 black,-1px 0 0 black,0 1px 0 black,0 -1px 0 black;}.since{font-weight:normal;font-size:initial;}.rightside{padding-left:12px;float:right;}.rightside:not(a),.out-of-band{color:var(--right-side-color);}pre.rust{tab-size:4;-moz-tab-size:4;}pre.rust .kw{color:var(--code-highlight-kw-color);}pre.rust .kw-2{color:var(--code-highlight-kw-2-color);}pre.rust .lifetime{color:var(--code-highlight-lifetime-color);}pre.rust .prelude-ty{color:var(--code-highlight-prelude-color);}pre.rust .prelude-val{color:var(--code-highlight-prelude-val-color);}pre.rust .string{color:var(--code-highlight-string-color);}pre.rust .number{color:var(--code-highlight-number-color);}pre.rust .bool-val{color:var(--code-highlight-literal-color);}pre.rust .self{color:var(--code-highlight-self-color);}pre.rust .attr{color:var(--code-highlight-attribute-color);}pre.rust .macro,pre.rust .macro-nonterminal{color:var(--code-highlight-macro-color);}pre.rust .question-mark{font-weight:bold;color:var(--code-highlight-question-mark-color);}pre.rust .comment{color:var(--code-highlight-comment-color);}pre.rust .doccomment{color:var(--code-highlight-doc-comment-color);}.rustdoc.src .example-wrap pre.rust a{background:var(--codeblock-link-background);}.example-wrap.compile_fail,.example-wrap.should_panic{border-left:2px solid var(--codeblock-error-color);}.ignore.example-wrap{border-left:2px solid var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover,.example-wrap.should_panic:hover{border-left:2px solid var(--codeblock-error-hover-color);}.example-wrap.ignore:hover{border-left:2px solid var(--codeblock-ignore-hover-color);}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip{color:var(--codeblock-error-color);}.example-wrap.ignore .tooltip{color:var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover .tooltip,.example-wrap.should_panic:hover .tooltip{color:var(--codeblock-error-hover-color);}.example-wrap.ignore:hover .tooltip{color:var(--codeblock-ignore-hover-color);}.example-wrap .tooltip{position:absolute;display:block;left:-25px;top:5px;margin:0;line-height:1;}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip,.example-wrap.ignore .tooltip{font-weight:bold;font-size:1.25rem;}.content .docblock .warning{border-left:2px solid var(--warning-border-color);padding:14px;position:relative;overflow-x:visible !important;}.content .docblock .warning::before{color:var(--warning-border-color);content:"ⓘ";position:absolute;left:-25px;top:5px;font-weight:bold;font-size:1.25rem;}.top-doc>.docblock>.warning:first-child::before{top:20px;}a.test-arrow{visibility:hidden;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:1.375rem;top:5px;right:5px;z-index:1;color:var(--test-arrow-color);background-color:var(--test-arrow-background-color);}a.test-arrow:hover{color:var(--test-arrow-hover-color);background-color:var(--test-arrow-hover-background-color);}.example-wrap:hover .test-arrow{visibility:visible;}.code-attribute{font-weight:300;color:var(--code-attribute-color);}.item-spacer{width:100%;height:12px;display:block;}.out-of-band>span.since{font-size:1.25rem;}.sub-variant h4{font-size:1rem;font-weight:400;margin-top:0;margin-bottom:0;}.sub-variant{margin-left:24px;margin-bottom:40px;}.sub-variant>.sub-variant-field{margin-left:24px;}:target{padding-right:3px;background-color:var(--target-background-color);border-right:3px solid var(--target-border-color);}.code-header a.tooltip{color:inherit;margin-right:15px;position:relative;}.code-header a.tooltip:hover{color:var(--link-color);}a.tooltip:hover::after{position:absolute;top:calc(100% - 10px);left:-15px;right:-15px;height:20px;content:"\00a0";}.fade-out{opacity:0;transition:opacity 0.45s cubic-bezier(0,0,0.1,1.0);}.popover.tooltip .content{margin:0.25em 0.5em;}.popover.tooltip .content pre,.popover.tooltip .content code{background:transparent;margin:0;padding:0;font-size:1.25rem;white-space:pre-wrap;}.popover.tooltip .content>h3:first-child{margin:0 0 5px 0;}.search-failed{text-align:center;margin-top:20px;display:none;}.search-failed.active{display:block;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#search-tabs{display:flex;flex-direction:row;gap:1px;margin-bottom:4px;}#search-tabs button{text-align:center;font-size:1.125rem;border:0;border-top:2px solid;flex:1;line-height:1.5;color:inherit;}#search-tabs button:not(.selected){background-color:var(--search-tab-button-not-selected-background);border-top-color:var(--search-tab-button-not-selected-border-top-color);}#search-tabs button:hover,#search-tabs button.selected{background-color:var(--search-tab-button-selected-background);border-top-color:var(--search-tab-button-selected-border-top-color);}#search-tabs .count{font-size:1rem;font-variant-numeric:tabular-nums;color:var(--search-tab-title-count-color);}#search .error code{border-radius:3px;background-color:var(--search-error-code-background-color);}.search-corrections{font-weight:normal;}#src-sidebar{width:100%;overflow:auto;}#src-sidebar div.files>a:hover,details.dir-entry summary:hover,#src-sidebar div.files>a:focus,details.dir-entry summary:focus{background-color:var(--src-sidebar-background-hover);}#src-sidebar div.files>a.selected{background-color:var(--src-sidebar-background-selected);}.src-sidebar-title{position:sticky;top:0;display:flex;padding:8px 8px 0 48px;margin-bottom:7px;background:var(--sidebar-background-color);border-bottom:1px solid var(--border-color);}#settings-menu,#help-button{margin-left:4px;display:flex;}#sidebar-button{display:none;line-height:0;}.hide-sidebar #sidebar-button,.src #sidebar-button{display:flex;margin-right:4px;position:fixed;left:6px;height:34px;width:34px;background-color:var(--main-background-color);z-index:1;}.src #sidebar-button{left:8px;z-index:calc(var(--desktop-sidebar-z-index) + 1);}.hide-sidebar .src #sidebar-button{position:static;}#settings-menu>a,#help-button>a,#sidebar-button>a{display:flex;align-items:center;justify-content:center;background-color:var(--button-background-color);border:1px solid var(--border-color);border-radius:2px;color:var(--settings-button-color);font-size:20px;width:33px;}#settings-menu>a:hover,#settings-menu>a:focus,#help-button>a:hover,#help-button>a:focus,#sidebar-button>a:hover,#sidebar-button>a:focus{border-color:var(--settings-button-border-focus);}#settings-menu>a{line-height:0;font-size:0;}#settings-menu>a:before{content:url('data:image/svg+xml,\ + ');width:22px;height:22px;filter:var(--settings-menu-filter);}#sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');width:22px;height:22px;}#copy-path{color:var(--copy-path-button-color);background:var(--main-background-color);height:34px;width:33px;margin-left:10px;padding:0;padding-left:2px;border:0;font-size:0;}#copy-path::before{filter:var(--copy-path-img-filter);content:url('data:image/svg+xml,\ +\ +\ +');width:19px;height:18px;}#copy-path:hover::before{filter:var(--copy-path-img-hover-filter);}#copy-path.clicked::before{content:url('data:image/svg+xml,\ + \ + ');}@keyframes rotating{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}#settings-menu.rotate>a img{animation:rotating 2s linear infinite;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px var(--border-color);border-radius:3px;color:var(--kbd-color);background-color:var(--kbd-background);box-shadow:inset 0 -1px 0 var(--kbd-box-shadow-color);}ul.all-items>li{list-style:none;}details.dir-entry{padding-left:4px;}details.dir-entry>summary{margin:0 0 0 -4px;padding:0 0 0 4px;cursor:pointer;}details.dir-entry div.folders,details.dir-entry div.files{padding-left:23px;}details.dir-entry a{display:block;}details.toggle{contain:layout;position:relative;}details.toggle>summary.hideme{cursor:pointer;font-size:1rem;}details.toggle>summary{list-style:none;outline:none;}details.toggle>summary::-webkit-details-marker,details.toggle>summary::marker{display:none;}details.toggle>summary.hideme>span{margin-left:9px;}details.toggle>summary::before{background:url('data:image/svg+xml,') no-repeat top left;content:"";cursor:pointer;width:16px;height:16px;display:inline-block;vertical-align:middle;opacity:.5;filter:var(--toggle-filter);}details.toggle>summary.hideme>span,.more-examples-toggle summary,.more-examples-toggle .hide-more{color:var(--toggles-color);}details.toggle>summary::after{content:"Expand";overflow:hidden;width:0;height:0;position:absolute;}details.toggle>summary.hideme::after{content:"";}details.toggle>summary:focus::before,details.toggle>summary:hover::before{opacity:1;}details.toggle>summary:focus-visible::before{outline:1px dotted #000;outline-offset:1px;}details.non-exhaustive{margin-bottom:8px;}details.toggle>summary.hideme::before{position:relative;}details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;top:4px;}.impl-items>details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;}details.toggle[open] >summary.hideme{position:absolute;}details.toggle[open] >summary.hideme>span{display:none;}details.toggle[open] >summary::before{background:url('data:image/svg+xml,') no-repeat top left;}details.toggle[open] >summary::after{content:"Collapse";}.docblock summary>*{display:inline-block;}.docblock>.example-wrap:first-child .tooltip{margin-top:16px;}.src #sidebar-button>a:before,.sidebar-menu-toggle:before{content:url('data:image/svg+xml,\ + ');opacity:0.75;}.sidebar-menu-toggle:hover:before,.sidebar-menu-toggle:active:before,.sidebar-menu-toggle:focus:before{opacity:1;}.src #sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');opacity:0.75;}@media (max-width:850px){#search-tabs .count{display:block;}}@media (max-width:700px){*[id]{scroll-margin-top:45px;}.rustdoc{display:block;}main{padding-left:15px;padding-top:0px;}.main-heading{flex-direction:column;}.out-of-band{text-align:left;margin-left:initial;padding:initial;}.out-of-band .since::before{content:"Since ";}.sidebar .logo-container,.sidebar .location,.sidebar-resizer{display:none;}.sidebar{position:fixed;top:45px;left:-1000px;z-index:11;height:calc(100vh - 45px);width:200px;}.src main,.rustdoc.src .sidebar{top:0;padding:0;height:100vh;border:0;}.src .search-form{margin-left:40px;}.hide-sidebar .search-form{margin-left:32px;}.hide-sidebar .src .search-form{margin-left:0;}.sidebar.shown,.src-sidebar-expanded .src .sidebar,.rustdoc:not(.src) .sidebar:focus-within{left:0;}.mobile-topbar h2{padding-bottom:0;margin:auto 0.5em auto auto;overflow:hidden;font-size:24px;white-space:nowrap;text-overflow:ellipsis;}.mobile-topbar .logo-container>img{max-width:35px;max-height:35px;margin:5px 0 5px 20px;}.mobile-topbar{display:flex;flex-direction:row;position:sticky;z-index:10;font-size:2rem;height:45px;width:100%;left:0;top:0;}.hide-sidebar .mobile-topbar{display:none;}.sidebar-menu-toggle{width:45px;border:none;line-height:0;}.hide-sidebar .sidebar-menu-toggle{display:none;}.sidebar-elems{margin-top:1em;}.anchor{display:none !important;}#main-content>details.toggle>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}#copy-path,#help-button{display:none;}#sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');width:22px;height:22px;}.sidebar-menu-toggle:before{filter:var(--mobile-sidebar-menu-filter);}.sidebar-menu-toggle:hover{background:var(--main-background-color);}.item-table,.item-row,.item-table>li,.item-table>li>div,.search-results>a,.search-results>a>div{display:block;}.search-results>a{padding:5px 0px;}.search-results>a>div.desc,.item-table>li>div.desc{padding-left:2em;}.search-results .result-name{display:block;}.search-results .result-name .typename{width:initial;margin-right:0;}.search-results .result-name .typename,.search-results .result-name .path{display:inline;}.src-sidebar-expanded .src .sidebar{position:fixed;max-width:100vw;width:100vw;}.src .src-sidebar-title{padding-top:0;}details.toggle:not(.top-doc)>summary{margin-left:10px;}.impl-items>details.toggle>summary:not(.hideme)::before,#main-content>details.toggle:not(.top-doc)>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}.impl-items>.item-info{margin-left:34px;}.src nav.sub{margin:0;padding:var(--nav-sub-mobile-padding);}}@media (min-width:701px){.scraped-example-title{position:absolute;z-index:10;background:var(--main-background-color);bottom:8px;right:5px;padding:2px 4px;box-shadow:0 0 4px var(--main-background-color);}.item-table>li>.item-name{width:33%;}.item-table>li>div{padding-bottom:5px;word-break:break-all;}}@media print{nav.sidebar,nav.sub,.out-of-band,a.src,#copy-path,details.toggle[open] >summary::before,details.toggle>summary::before,details.toggle.top-doc>summary{display:none;}.docblock{margin-left:0;}main{padding:10px;}}@media (max-width:464px){.docblock{margin-left:12px;}.docblock code{overflow-wrap:break-word;overflow-wrap:anywhere;}nav.sub{flex-direction:column;}.search-form{align-self:stretch;}}.variant,.implementors-toggle>summary,.impl,#implementors-list>.docblock,.impl-items>section,.impl-items>.toggle>summary,.methods>section,.methods>.toggle>summary{margin-bottom:0.75em;}.variants>.docblock,.implementors-toggle>.docblock,.impl-items>.toggle[open]:not(:last-child),.methods>.toggle[open]:not(:last-child),.implementors-toggle[open]:not(:last-child){margin-bottom:2em;}#trait-implementations-list .impl-items>.toggle:not(:last-child),#synthetic-implementations-list .impl-items>.toggle:not(:last-child),#blanket-implementations-list .impl-items>.toggle:not(:last-child){margin-bottom:1em;}.scraped-example-list .scrape-help{margin-left:10px;padding:0 4px;font-weight:normal;font-size:12px;position:relative;bottom:1px;border:1px solid var(--scrape-example-help-border-color);border-radius:50px;color:var(--scrape-example-help-color);}.scraped-example-list .scrape-help:hover{border-color:var(--scrape-example-help-hover-border-color);color:var(--scrape-example-help-hover-color);}.scraped-example{position:relative;}.scraped-example .code-wrapper{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;}.scraped-example:not(.expanded) .code-wrapper{max-height:calc(1.5em * 5 + 10px);}.scraped-example:not(.expanded) .code-wrapper pre{overflow-y:hidden;padding-bottom:0;max-height:calc(1.5em * 5 + 10px);}.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper,.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper pre{max-height:calc(1.5em * 10 + 10px);}.scraped-example .code-wrapper .next,.scraped-example .code-wrapper .prev,.scraped-example .code-wrapper .expand{color:var(--main-color);position:absolute;top:0.25em;z-index:1;padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.scraped-example .code-wrapper .prev{right:2.25em;}.scraped-example .code-wrapper .next{right:1.25em;}.scraped-example .code-wrapper .expand{right:0.25em;}.scraped-example:not(.expanded) .code-wrapper::before,.scraped-example:not(.expanded) .code-wrapper::after{content:" ";width:100%;height:5px;position:absolute;z-index:1;}.scraped-example:not(.expanded) .code-wrapper::before{top:0;background:linear-gradient(to bottom,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example:not(.expanded) .code-wrapper::after{bottom:0;background:linear-gradient(to top,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example .code-wrapper .example-wrap{width:100%;overflow-y:hidden;margin-bottom:0;}.scraped-example:not(.expanded) .code-wrapper .example-wrap{overflow-x:hidden;}.scraped-example .example-wrap .rust span.highlight{background:var(--scrape-example-code-line-highlight);}.scraped-example .example-wrap .rust span.highlight.focus{background:var(--scrape-example-code-line-highlight-focus);}.more-examples-toggle{max-width:calc(100% + 25px);margin-top:10px;margin-left:-25px;}.more-examples-toggle .hide-more{margin-left:25px;cursor:pointer;}.more-scraped-examples{margin-left:25px;position:relative;}.toggle-line{position:absolute;top:5px;bottom:0;right:calc(100% + 10px);padding:0 4px;cursor:pointer;}.toggle-line-inner{min-width:2px;height:100%;background:var(--scrape-example-toggle-line-background);}.toggle-line:hover .toggle-line-inner{background:var(--scrape-example-toggle-line-hover-background);}.more-scraped-examples .scraped-example,.example-links{margin-top:20px;}.more-scraped-examples .scraped-example:first-child{margin-top:5px;}.example-links ul{margin-bottom:0;}:root[data-theme="light"],:root:not([data-theme]){--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#f5f5f5;--sidebar-background-color-hover:#e0e0e0;--code-block-background-color:#f5f5f5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--mobile-sidebar-menu-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#fff;--settings-menu-filter:none;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--test-arrow-color:#f5f5f5;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#f5f5f5;--test-arrow-hover-background-color:rgb(78,139,202);--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#f5f5f5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);--sidebar-resizer-hover:hsl(207,90%,66%);--sidebar-resizer-active:hsl(207,90%,54%);}:root[data-theme="dark"]{--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--mobile-sidebar-menu-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--settings-menu-filter:none;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--test-arrow-color:#dedede;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#dedede;--test-arrow-hover-background-color:#4e8bca;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2a2a2a;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);--sidebar-resizer-hover:hsl(207,30%,54%);--sidebar-resizer-active:hsl(207,90%,54%);}:root[data-theme="ayu"]{--main-background-color:#0f1419;--main-color:#c5c5c5;--settings-input-color:#ffb454;--settings-input-border-color:#999;--settings-button-color:#fff;--settings-button-border-focus:#e0e0e0;--sidebar-background-color:#14191f;--sidebar-background-color-hover:rgba(70,70,70,0.33);--code-block-background-color:#191f26;--scrollbar-track-background-color:transparent;--scrollbar-thumb-background-color:#5c6773;--scrollbar-color:#5c6773 #24292f;--headings-border-bottom-color:#5c6773;--border-color:#5c6773;--button-background-color:#141920;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--mobile-sidebar-menu-filter:invert(100%);--search-input-focused-border-color:#5c6773;--copy-path-button-color:#fff;--copy-path-img-filter:invert(70%);--copy-path-img-hover-filter:invert(100%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ffa0a5;--trait-link-color:#39afd7;--assoc-item-link-color:#39afd7;--function-link-color:#fdd687;--macro-link-color:#a37acc;--keyword-link-color:#39afd7;--mod-link-color:#39afd7;--link-color:#39afd7;--sidebar-link-color:#53b1db;--sidebar-current-link-background-color:transparent;--search-result-link-focus-background-color:#3c3c3c;--search-result-border-color:#aaa3;--search-color:#fff;--search-error-code-background-color:#4f4c4c;--search-results-alias-color:#c5c5c5;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:none;--search-tab-button-not-selected-background:transparent !important;--search-tab-button-selected-border-top-color:none;--search-tab-button-selected-background:#141920 !important;--settings-menu-filter:invert(100%);--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ff7733;--code-highlight-kw-2-color:#ff7733;--code-highlight-lifetime-color:#ff7733;--code-highlight-prelude-color:#69f2df;--code-highlight-prelude-val-color:#ff7733;--code-highlight-number-color:#b8cc52;--code-highlight-string-color:#b8cc52;--code-highlight-literal-color:#ff7733;--code-highlight-attribute-color:#e6e1cf;--code-highlight-self-color:#36a3d9;--code-highlight-macro-color:#a37acc;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#788797;--code-highlight-doc-comment-color:#a1ac88;--src-line-numbers-span-color:#5c6773;--src-line-number-highlighted-background-color:rgba(255,236,164,0.06);--test-arrow-color:#788797;--test-arrow-background-color:rgba(57,175,215,0.09);--test-arrow-hover-color:#c5c5c5;--test-arrow-hover-background-color:rgba(57,175,215,0.368);--target-background-color:rgba(255,236,164,0.06);--target-border-color:rgba(255,180,76,0.85);--kbd-color:#c5c5c5;--kbd-background:#314559;--kbd-box-shadow-color:#5c6773;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(41%) sepia(12%) saturate(487%) hue-rotate(171deg) brightness(94%) contrast(94%);--crate-search-div-hover-filter:invert(98%) sepia(12%) saturate(81%) hue-rotate(343deg) brightness(113%) contrast(76%);--crate-search-hover-border:#e0e0e0;--src-sidebar-background-selected:#14191f;--src-sidebar-background-hover:#14191f;--table-alt-row-background-color:#191f26;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(15,20,25,1);--scrape-example-code-wrapper-background-end:rgba(15,20,25,0);--sidebar-resizer-hover:hsl(34,50%,33%);--sidebar-resizer-active:hsl(34,100%,66%);}:root[data-theme="ayu"] h1,:root[data-theme="ayu"] h2,:root[data-theme="ayu"] h3,:root[data-theme="ayu"] h4,:where(:root[data-theme="ayu"]) h1 a,:root[data-theme="ayu"] .sidebar h2 a,:root[data-theme="ayu"] .sidebar h3 a{color:#fff;}:root[data-theme="ayu"] .docblock code{color:#ffb454;}:root[data-theme="ayu"] .docblock a>code{color:#39AFD7 !important;}:root[data-theme="ayu"] .code-header,:root[data-theme="ayu"] .docblock pre>code,:root[data-theme="ayu"] pre,:root[data-theme="ayu"] pre>code,:root[data-theme="ayu"] .item-info code,:root[data-theme="ayu"] .rustdoc.source .example-wrap{color:#e6e1cf;}:root[data-theme="ayu"] .sidebar .current,:root[data-theme="ayu"] .sidebar .current a,:root[data-theme="ayu"] .sidebar a:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:hover,:root[data-theme="ayu"] details.dir-entry summary:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:focus,:root[data-theme="ayu"] details.dir-entry summary:focus,:root[data-theme="ayu"] #src-sidebar div.files>a.selected{color:#ffb44c;}:root[data-theme="ayu"] .sidebar-elems .location{color:#ff7733;}:root[data-theme="ayu"] .src-line-numbers .line-highlighted{color:#708090;padding-right:7px;border-right:1px solid #ffb44c;}:root[data-theme="ayu"] .search-results a:hover,:root[data-theme="ayu"] .search-results a:focus{color:#fff !important;background-color:#3c3c3c;}:root[data-theme="ayu"] .search-results a{color:#0096cf;}:root[data-theme="ayu"] .search-results a div.desc{color:#c5c5c5;}:root[data-theme="ayu"] .result-name .primitive>i,:root[data-theme="ayu"] .result-name .keyword>i{color:#788797;}:root[data-theme="ayu"] #search-tabs>button.selected{border-bottom:1px solid #ffb44c !important;border-top:none;}:root[data-theme="ayu"] #search-tabs>button:not(.selected){border:none;background-color:transparent !important;}:root[data-theme="ayu"] #search-tabs>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}:root[data-theme="ayu"] #settings-menu>a img,:root[data-theme="ayu"] #sidebar-button>a:before{filter:invert(100);} \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/search-d234aafac6c221dd.js b/static/rust/redstone/crypto_secp256k1,network_casper/static.files/search-d234aafac6c221dd.js new file mode 100644 index 00000000..3f587f65 --- /dev/null +++ b/static/rust/redstone/crypto_secp256k1,network_casper/static.files/search-d234aafac6c221dd.js @@ -0,0 +1,5 @@ +"use strict";if(!Array.prototype.toSpliced){Array.prototype.toSpliced=function(){const me=this.slice();Array.prototype.splice.apply(me,arguments);return me}}(function(){const itemTypes=["keyword","primitive","mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","associatedtype","constant","associatedconstant","union","foreigntype","existential","attr","derive","traitalias","generic",];const longItemTypes=["keyword","primitive type","module","extern crate","re-export","struct","enum","function","type alias","static","trait","","trait method","method","struct field","enum variant","macro","assoc type","constant","assoc const","union","foreign type","existential type","attribute macro","derive macro","trait alias",];const TY_GENERIC=itemTypes.indexOf("generic");const TY_IMPORT=itemTypes.indexOf("import");const ROOT_PATH=typeof window!=="undefined"?window.rootPath:"../";const UNBOXING_LIMIT=5;const REGEX_IDENT=/\p{ID_Start}\p{ID_Continue}*|_\p{ID_Continue}+/uy;const REGEX_INVALID_TYPE_FILTER=/[^a-z]/ui;function printTab(nb){let iter=0;let foundCurrentTab=false;let foundCurrentResultSet=false;onEachLazy(document.getElementById("search-tabs").childNodes,elem=>{if(nb===iter){addClass(elem,"selected");foundCurrentTab=true}else{removeClass(elem,"selected")}iter+=1});const isTypeSearch=(nb>0||iter===1);iter=0;onEachLazy(document.getElementById("results").childNodes,elem=>{if(nb===iter){addClass(elem,"active");foundCurrentResultSet=true}else{removeClass(elem,"active")}iter+=1});if(foundCurrentTab&&foundCurrentResultSet){searchState.currentTab=nb;const correctionsElem=document.getElementsByClassName("search-corrections");if(isTypeSearch){removeClass(correctionsElem[0],"hidden")}else{addClass(correctionsElem[0],"hidden")}}else if(nb!==0){printTab(0)}}const editDistanceState={current:[],prev:[],prevPrev:[],calculate:function calculate(a,b,limit){if(a.lengthlimit){return limit+1}while(b.length>0&&b[0]===a[0]){a=a.substring(1);b=b.substring(1)}while(b.length>0&&b[b.length-1]===a[a.length-1]){a=a.substring(0,a.length-1);b=b.substring(0,b.length-1)}if(b.length===0){return minDist}const aLength=a.length;const bLength=b.length;for(let i=0;i<=bLength;++i){this.current[i]=0;this.prev[i]=i;this.prevPrev[i]=Number.MAX_VALUE}for(let i=1;i<=aLength;++i){this.current[0]=i;const aIdx=i-1;for(let j=1;j<=bLength;++j){const bIdx=j-1;const substitutionCost=a[aIdx]===b[bIdx]?0:1;this.current[j]=Math.min(this.prev[j]+1,this.current[j-1]+1,this.prev[j-1]+substitutionCost,);if((i>1)&&(j>1)&&(a[aIdx]===b[bIdx-1])&&(a[aIdx-1]===b[bIdx])){this.current[j]=Math.min(this.current[j],this.prevPrev[j-2]+1,)}}const prevPrevTmp=this.prevPrev;this.prevPrev=this.prev;this.prev=this.current;this.current=prevPrevTmp}const distance=this.prev[bLength];return distance<=limit?distance:(limit+1)},};function editDistance(a,b,limit){return editDistanceState.calculate(a,b,limit)}function initSearch(rawSearchIndex){const MAX_RESULTS=200;const NO_TYPE_FILTER=-1;let searchIndex;let searchIndexDeprecated;let searchIndexEmptyDesc;let functionTypeFingerprint;let currentResults;const typeNameIdMap=new Map();const ALIASES=new Map();const typeNameIdOfArray=buildTypeMapIndex("array");const typeNameIdOfSlice=buildTypeMapIndex("slice");const typeNameIdOfArrayOrSlice=buildTypeMapIndex("[]");const typeNameIdOfTuple=buildTypeMapIndex("tuple");const typeNameIdOfUnit=buildTypeMapIndex("unit");const typeNameIdOfTupleOrUnit=buildTypeMapIndex("()");const typeNameIdOfFn=buildTypeMapIndex("fn");const typeNameIdOfFnMut=buildTypeMapIndex("fnmut");const typeNameIdOfFnOnce=buildTypeMapIndex("fnonce");const typeNameIdOfHof=buildTypeMapIndex("->");function buildTypeMapIndex(name,isAssocType){if(name===""||name===null){return null}if(typeNameIdMap.has(name)){const obj=typeNameIdMap.get(name);obj.assocOnly=isAssocType&&obj.assocOnly;return obj.id}else{const id=typeNameIdMap.size;typeNameIdMap.set(name,{id,assocOnly:isAssocType});return id}}function isSpecialStartCharacter(c){return"<\"".indexOf(c)!==-1}function isEndCharacter(c){return"=,>-])".indexOf(c)!==-1}function itemTypeFromName(typename){const index=itemTypes.findIndex(i=>i===typename);if(index<0){throw["Unknown type filter ",typename]}return index}function getStringElem(query,parserState,isInGenerics){if(isInGenerics){throw["Unexpected ","\""," in generics"]}else if(query.literalSearch){throw["Cannot have more than one literal search element"]}else if(parserState.totalElems-parserState.genericsElems>0){throw["Cannot use literal search when there is more than one element"]}parserState.pos+=1;const start=parserState.pos;const end=getIdentEndPosition(parserState);if(parserState.pos>=parserState.length){throw["Unclosed ","\""]}else if(parserState.userQuery[end]!=="\""){throw["Unexpected ",parserState.userQuery[end]," in a string element"]}else if(start===end){throw["Cannot have empty string element"]}parserState.pos+=1;query.literalSearch=true}function isPathStart(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="::"}function isReturnArrow(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="->"}function consumeIdent(parserState){REGEX_IDENT.lastIndex=parserState.pos;const match=parserState.userQuery.match(REGEX_IDENT);if(match){parserState.pos+=match[0].length;return true}return false}function isSeparatorCharacter(c){return c===","||c==="="}function isPathSeparator(c){return c===":"||c===" "}function prevIs(parserState,lookingFor){let pos=parserState.pos;while(pos>0){const c=parserState.userQuery[pos-1];if(c===lookingFor){return true}else if(c!==" "){break}pos-=1}return false}function isLastElemGeneric(elems,parserState){return(elems.length>0&&elems[elems.length-1].generics.length>0)||prevIs(parserState,">")}function skipWhitespace(parserState){while(parserState.pos0){throw["Cannot have more than one element if you use quotes"]}const typeFilter=parserState.typeFilter;parserState.typeFilter=null;if(name==="!"){if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive never type ","!"," and ",typeFilter," both specified",]}if(generics.length!==0){throw["Never type ","!"," does not accept generic parameters",]}const bindingName=parserState.isInBinding;parserState.isInBinding=null;return makePrimitiveElement("never",{bindingName})}const quadcolon=/::\s*::/.exec(path);if(path.startsWith("::")){throw["Paths cannot start with ","::"]}else if(path.endsWith("::")){throw["Paths cannot end with ","::"]}else if(quadcolon!==null){throw["Unexpected ",quadcolon[0]]}const pathSegments=path.split(/(?:::\s*)|(?:\s+(?:::\s*)?)/);if(pathSegments.length===0||(pathSegments.length===1&&pathSegments[0]==="")){if(generics.length>0||prevIs(parserState,">")){throw["Found generics without a path"]}else{throw["Unexpected ",parserState.userQuery[parserState.pos]]}}for(const[i,pathSegment]of pathSegments.entries()){if(pathSegment==="!"){if(i!==0){throw["Never type ","!"," is not associated item"]}pathSegments[i]="never"}}parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1}const bindingName=parserState.isInBinding;parserState.isInBinding=null;const bindings=new Map();const pathLast=pathSegments[pathSegments.length-1];return{name:name.trim(),id:null,fullPath:pathSegments,pathWithoutLast:pathSegments.slice(0,pathSegments.length-1),pathLast,normalizedPathLast:pathLast.replace(/_/g,""),generics:generics.filter(gen=>{if(gen.bindingName!==null){if(gen.name!==null){gen.bindingName.generics.unshift(gen)}bindings.set(gen.bindingName.name,gen.bindingName.generics);return false}return true}),bindings,typeFilter,bindingName,}}function getIdentEndPosition(parserState){let afterIdent=consumeIdent(parserState);let end=parserState.pos;let macroExclamation=-1;while(parserState.pos0){throw["Unexpected ",c," after ",parserState.userQuery[parserState.pos-1]," (not a valid identifier)"]}else{throw["Unexpected ",c," (not a valid identifier)"]}parserState.pos+=1;afterIdent=consumeIdent(parserState);end=parserState.pos}if(macroExclamation!==-1){if(parserState.typeFilter===null){parserState.typeFilter="macro"}else if(parserState.typeFilter!=="macro"){throw["Invalid search type: macro ","!"," and ",parserState.typeFilter," both specified",]}end=macroExclamation}return end}function getFilteredNextElem(query,parserState,elems,isInGenerics){const start=parserState.pos;if(parserState.userQuery[parserState.pos]===":"&&!isPathStart(parserState)){throw["Expected type filter before ",":"]}getNextElem(query,parserState,elems,isInGenerics);if(parserState.userQuery[parserState.pos]===":"&&!isPathStart(parserState)){if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}if(elems.length===0){throw["Expected type filter before ",":"]}else if(query.literalSearch){throw["Cannot use quotes on type filter"]}const typeFilterElem=elems.pop();checkExtraTypeFilterCharacters(start,parserState);parserState.typeFilter=typeFilterElem.name;parserState.pos+=1;parserState.totalElems-=1;query.literalSearch=false;getNextElem(query,parserState,elems,isInGenerics)}}function getNextElem(query,parserState,elems,isInGenerics){const generics=[];skipWhitespace(parserState);let start=parserState.pos;let end;if("[(".indexOf(parserState.userQuery[parserState.pos])!==-1){let endChar=")";let name="()";let friendlyName="tuple";if(parserState.userQuery[parserState.pos]==="["){endChar="]";name="[]";friendlyName="slice"}parserState.pos+=1;const{foundSeparator}=getItemsBefore(query,parserState,generics,endChar);const typeFilter=parserState.typeFilter;const bindingName=parserState.isInBinding;parserState.typeFilter=null;parserState.isInBinding=null;for(const gen of generics){if(gen.bindingName!==null){throw["Type parameter ","=",` cannot be within ${friendlyName} `,name]}}if(name==="()"&&!foundSeparator&&generics.length===1&&typeFilter===null){elems.push(generics[0])}else if(name==="()"&&generics.length===1&&generics[0].name==="->"){generics[0].typeFilter=typeFilter;elems.push(generics[0])}else{if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive ",name," and ",typeFilter," both specified",]}parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1}elems.push(makePrimitiveElement(name,{bindingName,generics}))}}else if(parserState.userQuery[parserState.pos]==="&"){if(parserState.typeFilter!==null&&parserState.typeFilter!=="primitive"){throw["Invalid search type: primitive ","&"," and ",parserState.typeFilter," both specified",]}parserState.typeFilter=null;parserState.pos+=1;let c=parserState.userQuery[parserState.pos];while(c===" "&&parserState.pos=end){throw["Found generics without a path"]}parserState.pos+=1;getItemsBefore(query,parserState,generics,">")}else if(parserState.pos=end){throw["Found generics without a path"]}if(parserState.isInBinding){throw["Unexpected ","("," after ","="]}parserState.pos+=1;const typeFilter=parserState.typeFilter;parserState.typeFilter=null;getItemsBefore(query,parserState,generics,")");skipWhitespace(parserState);if(isReturnArrow(parserState)){parserState.pos+=2;skipWhitespace(parserState);getFilteredNextElem(query,parserState,generics,isInGenerics);generics[generics.length-1].bindingName=makePrimitiveElement("output")}else{generics.push(makePrimitiveElement(null,{bindingName:makePrimitiveElement("output"),typeFilter:null,}))}parserState.typeFilter=typeFilter}if(isStringElem){skipWhitespace(parserState)}if(start>=end&&generics.length===0){return}if(parserState.userQuery[parserState.pos]==="="){if(parserState.isInBinding){throw["Cannot write ","="," twice in a binding"]}if(!isInGenerics){throw["Type parameter ","="," must be within generics list"]}const name=parserState.userQuery.slice(start,end).trim();if(name==="!"){throw["Type parameter ","="," key cannot be ","!"," never type"]}if(name.includes("!")){throw["Type parameter ","="," key cannot be ","!"," macro"]}if(name.includes("::")){throw["Type parameter ","="," key cannot contain ","::"," path"]}if(name.includes(":")){throw["Type parameter ","="," key cannot contain ",":"," type"]}parserState.isInBinding={name,generics}}else{elems.push(createQueryElement(query,parserState,parserState.userQuery.slice(start,end),generics,isInGenerics,),)}}}function getItemsBefore(query,parserState,elems,endChar){let foundStopChar=true;let foundSeparator=false;const oldTypeFilter=parserState.typeFilter;parserState.typeFilter=null;const oldIsInBinding=parserState.isInBinding;parserState.isInBinding=null;let hofParameters=null;let extra="";if(endChar===">"){extra="<"}else if(endChar==="]"){extra="["}else if(endChar===")"){extra="("}else if(endChar===""){extra="->"}else{extra=endChar}while(parserState.pos"," after ","="]}hofParameters=[...elems];elems.length=0;parserState.pos+=2;foundStopChar=true;foundSeparator=false;continue}else if(c===" "){parserState.pos+=1;continue}else if(isSeparatorCharacter(c)){parserState.pos+=1;foundStopChar=true;foundSeparator=true;continue}else if(c===":"&&isPathStart(parserState)){throw["Unexpected ","::",": paths cannot start with ","::"]}else if(isEndCharacter(c)){throw["Unexpected ",c," after ",extra]}if(!foundStopChar){let extra=[];if(isLastElemGeneric(query.elems,parserState)){extra=[" after ",">"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(endChar!==""){throw["Expected ",",",", ","=",", or ",endChar,...extra,", found ",c,]}throw["Expected ",","," or ","=",...extra,", found ",c,]}const posBefore=parserState.pos;getFilteredNextElem(query,parserState,elems,endChar!=="");if(endChar!==""&&parserState.pos>=parserState.length){throw["Unclosed ",extra]}if(posBefore===parserState.pos){parserState.pos+=1}foundStopChar=false}if(parserState.pos>=parserState.length&&endChar!==""){throw["Unclosed ",extra]}parserState.pos+=1;if(hofParameters){foundSeparator=false;if([...elems,...hofParameters].some(x=>x.bindingName)||parserState.isInBinding){throw["Unexpected ","="," within ","->"]}const hofElem=makePrimitiveElement("->",{generics:hofParameters,bindings:new Map([["output",[...elems]]]),typeFilter:null,});elems.length=0;elems[0]=hofElem}parserState.typeFilter=oldTypeFilter;parserState.isInBinding=oldIsInBinding;return{foundSeparator}}function checkExtraTypeFilterCharacters(start,parserState){const query=parserState.userQuery.slice(start,parserState.pos).trim();const match=query.match(REGEX_INVALID_TYPE_FILTER);if(match){throw["Unexpected ",match[0]," in type filter (before ",":",")",]}}function parseInput(query,parserState){let foundStopChar=true;while(parserState.pos"){if(isReturnArrow(parserState)){break}throw["Unexpected ",c," (did you mean ","->","?)"]}else if(parserState.pos>0){throw["Unexpected ",c," after ",parserState.userQuery[parserState.pos-1]]}throw["Unexpected ",c]}else if(c===" "){skipWhitespace(parserState);continue}if(!foundStopChar){let extra="";if(isLastElemGeneric(query.elems,parserState)){extra=[" after ",">"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(parserState.typeFilter!==null){throw["Expected ",","," or ","->",...extra,", found ",c,]}throw["Expected ",",",", ",":"," or ","->",...extra,", found ",c,]}const before=query.elems.length;getFilteredNextElem(query,parserState,query.elems,false);if(query.elems.length===before){parserState.pos+=1}foundStopChar=false}if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}while(parserState.pos"]}break}else{parserState.pos+=1}}}function newParsedQuery(userQuery){return{original:userQuery,userQuery:userQuery.toLowerCase(),elems:[],returned:[],foundElems:0,totalElems:0,literalSearch:false,error:null,correction:null,proposeCorrectionFrom:null,proposeCorrectionTo:null,typeFingerprint:new Uint32Array(4),}}function buildUrl(search,filterCrates){let extra="?search="+encodeURIComponent(search);if(filterCrates!==null){extra+="&filter-crate="+encodeURIComponent(filterCrates)}return getNakedUrl()+extra+window.location.hash}function getFilterCrates(){const elem=document.getElementById("crate-search");if(elem&&elem.value!=="all crates"&&rawSearchIndex.has(elem.value)){return elem.value}return null}function parseQuery(userQuery){function convertTypeFilterOnElem(elem){if(elem.typeFilter!==null){let typeFilter=elem.typeFilter;if(typeFilter==="const"){typeFilter="constant"}elem.typeFilter=itemTypeFromName(typeFilter)}else{elem.typeFilter=NO_TYPE_FILTER}for(const elem2 of elem.generics){convertTypeFilterOnElem(elem2)}for(const constraints of elem.bindings.values()){for(const constraint of constraints){convertTypeFilterOnElem(constraint)}}}userQuery=userQuery.trim().replace(/\r|\n|\t/g," ");const parserState={length:userQuery.length,pos:0,totalElems:0,genericsElems:0,typeFilter:null,isInBinding:null,userQuery:userQuery.toLowerCase(),};let query=newParsedQuery(userQuery);try{parseInput(query,parserState);for(const elem of query.elems){convertTypeFilterOnElem(elem)}for(const elem of query.returned){convertTypeFilterOnElem(elem)}}catch(err){query=newParsedQuery(userQuery);query.error=err;return query}if(!query.literalSearch){query.literalSearch=parserState.totalElems>1}query.foundElems=query.elems.length+query.returned.length;query.totalElems=parserState.totalElems;return query}function createQueryResults(results_in_args,results_returned,results_others,parsedQuery){return{"in_args":results_in_args,"returned":results_returned,"others":results_others,"query":parsedQuery,}}async function execQuery(parsedQuery,filterCrates,currentCrate){const results_others=new Map(),results_in_args=new Map(),results_returned=new Map();function transformResults(results){const duplicates=new Set();const out=[];for(const result of results){if(result.id!==-1){const obj=searchIndex[result.id];obj.dist=result.dist;const res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=res[2]+"|"+obj.ty;if(duplicates.has(obj.fullPath)){continue}if(obj.ty===TY_IMPORT&&duplicates.has(res[2])){continue}if(duplicates.has(res[2]+"|"+TY_IMPORT)){continue}duplicates.add(obj.fullPath);duplicates.add(res[2]);obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}return out}async function sortResults(results,isType,preferredCrate){const userQuery=parsedQuery.userQuery;const result_list=[];for(const result of results.values()){result.item=searchIndex[result.id];result.word=searchIndex[result.id].word;result_list.push(result)}result_list.sort((aaa,bbb)=>{let a,b;a=(aaa.word!==userQuery);b=(bbb.word!==userQuery);if(a!==b){return a-b}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.path_dist;b=bbb.path_dist;if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}a=(aaa.dist);b=(bbb.dist);if(a!==b){return a-b}a=searchIndexDeprecated.get(aaa.item.crate).contains(aaa.item.bitIndex);b=searchIndexDeprecated.get(bbb.item.crate).contains(bbb.item.bitIndex);if(a!==b){return a-b}a=(aaa.item.crate!==preferredCrate);b=(bbb.item.crate!==preferredCrate);if(a!==b){return a-b}a=aaa.word.length;b=bbb.word.length;if(a!==b){return a-b}a=aaa.word;b=bbb.word;if(a!==b){return(a>b?+1:-1)}a=searchIndexEmptyDesc.get(aaa.item.crate).contains(aaa.item.bitIndex);b=searchIndexEmptyDesc.get(bbb.item.crate).contains(bbb.item.bitIndex);if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});return transformResults(result_list)}function unifyFunctionTypes(fnTypesIn,queryElems,whereClause,mgensIn,solutionCb,unboxingDepth,){if(unboxingDepth>=UNBOXING_LIMIT){return false}const mgens=mgensIn===null?null:new Map(mgensIn);if(queryElems.length===0){return!solutionCb||solutionCb(mgens)}if(!fnTypesIn||fnTypesIn.length===0){return false}const ql=queryElems.length;const fl=fnTypesIn.length;if(ql===1&&queryElems[0].generics.length===0&&queryElems[0].bindings.size===0){const queryElem=queryElems[0];for(const fnType of fnTypesIn){if(!unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgens)){continue}if(fnType.id<0&&queryElem.id<0){if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==queryElem.id){continue}const mgensScratch=new Map(mgens);mgensScratch.set(fnType.id,queryElem.id);if(!solutionCb||solutionCb(mgensScratch)){return true}}else if(!solutionCb||solutionCb(mgens?new Map(mgens):null)){return true}}for(const fnType of fnTypesIn){if(!unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth+1,)){continue}if(fnType.id<0){if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==0){continue}const mgensScratch=new Map(mgens);mgensScratch.set(fnType.id,0);if(unifyFunctionTypes(whereClause[(-fnType.id)-1],queryElems,whereClause,mgensScratch,solutionCb,unboxingDepth+1,)){return true}}else if(unifyFunctionTypes([...fnType.generics,...Array.from(fnType.bindings.values()).flat()],queryElems,whereClause,mgens?new Map(mgens):null,solutionCb,unboxingDepth+1,)){return true}}return false}const fnTypes=fnTypesIn.slice();const flast=fl-1;const qlast=ql-1;const queryElem=queryElems[qlast];let queryElemsTmp=null;for(let i=flast;i>=0;i-=1){const fnType=fnTypes[i];if(!unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgens)){continue}let mgensScratch;if(fnType.id<0){mgensScratch=new Map(mgens);if(mgensScratch.has(fnType.id)&&mgensScratch.get(fnType.id)!==queryElem.id){continue}mgensScratch.set(fnType.id,queryElem.id)}else{mgensScratch=mgens}fnTypes[i]=fnTypes[flast];fnTypes.length=flast;if(!queryElemsTmp){queryElemsTmp=queryElems.slice(0,qlast)}const passesUnification=unifyFunctionTypes(fnTypes,queryElemsTmp,whereClause,mgensScratch,mgensScratch=>{if(fnType.generics.length===0&&queryElem.generics.length===0&&fnType.bindings.size===0&&queryElem.bindings.size===0){return!solutionCb||solutionCb(mgensScratch)}const solution=unifyFunctionTypeCheckBindings(fnType,queryElem,whereClause,mgensScratch,unboxingDepth,);if(!solution){return false}const simplifiedGenerics=solution.simplifiedGenerics;for(const simplifiedMgens of solution.mgens){const passesUnification=unifyFunctionTypes(simplifiedGenerics,queryElem.generics,whereClause,simplifiedMgens,solutionCb,unboxingDepth,);if(passesUnification){return true}}return false},unboxingDepth,);if(passesUnification){return true}fnTypes[flast]=fnTypes[i];fnTypes[i]=fnType;fnTypes.length=fl}for(let i=flast;i>=0;i-=1){const fnType=fnTypes[i];if(!unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth+1,)){continue}let mgensScratch;if(fnType.id<0){mgensScratch=new Map(mgens);if(mgensScratch.has(fnType.id)&&mgensScratch.get(fnType.id)!==0){continue}mgensScratch.set(fnType.id,0)}else{mgensScratch=mgens}const generics=fnType.id<0?whereClause[(-fnType.id)-1]:fnType.generics;const bindings=fnType.bindings?Array.from(fnType.bindings.values()).flat():[];const passesUnification=unifyFunctionTypes(fnTypes.toSpliced(i,1,...generics,...bindings),queryElems,whereClause,mgensScratch,solutionCb,unboxingDepth+1,);if(passesUnification){return true}}return false}function unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgensIn){if(!typePassesFilter(queryElem.typeFilter,fnType.ty)){return false}if(fnType.id<0&&queryElem.id<0){if(mgensIn){if(mgensIn.has(fnType.id)&&mgensIn.get(fnType.id)!==queryElem.id){return false}for(const[fid,qid]of mgensIn.entries()){if(fnType.id!==fid&&queryElem.id===qid){return false}if(fnType.id===fid&&queryElem.id!==qid){return false}}}return true}else{if(queryElem.id===typeNameIdOfArrayOrSlice&&(fnType.id===typeNameIdOfSlice||fnType.id===typeNameIdOfArray)){}else if(queryElem.id===typeNameIdOfTupleOrUnit&&(fnType.id===typeNameIdOfTuple||fnType.id===typeNameIdOfUnit)){}else if(queryElem.id===typeNameIdOfHof&&(fnType.id===typeNameIdOfFn||fnType.id===typeNameIdOfFnMut||fnType.id===typeNameIdOfFnOnce)){}else if(fnType.id!==queryElem.id||queryElem.id===null){return false}if((fnType.generics.length+fnType.bindings.size)===0&&queryElem.generics.length!==0){return false}if(fnType.bindings.size0){const fnTypePath=fnType.path!==undefined&&fnType.path!==null?fnType.path.split("::"):[];if(queryElemPathLength>fnTypePath.length){return false}let i=0;for(const path of fnTypePath){if(path===queryElem.pathWithoutLast[i]){i+=1;if(i>=queryElemPathLength){break}}}if(i0){let mgensSolutionSet=[mgensIn];for(const[name,constraints]of queryElem.bindings.entries()){if(mgensSolutionSet.length===0){return false}if(!fnType.bindings.has(name)){return false}const fnTypeBindings=fnType.bindings.get(name);mgensSolutionSet=mgensSolutionSet.flatMap(mgens=>{const newSolutions=[];unifyFunctionTypes(fnTypeBindings,constraints,whereClause,mgens,newMgens=>{newSolutions.push(newMgens);return false},unboxingDepth,);return newSolutions})}if(mgensSolutionSet.length===0){return false}const binds=Array.from(fnType.bindings.entries()).flatMap(entry=>{const[name,constraints]=entry;if(queryElem.bindings.has(name)){return[]}else{return constraints}});if(simplifiedGenerics.length>0){simplifiedGenerics=[...simplifiedGenerics,...binds]}else{simplifiedGenerics=binds}return{simplifiedGenerics,mgens:mgensSolutionSet}}return{simplifiedGenerics,mgens:[mgensIn]}}function unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth,){if(unboxingDepth>=UNBOXING_LIMIT){return false}if(fnType.id<0&&queryElem.id>=0){if(!whereClause){return false}if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==0){return false}const mgensTmp=new Map(mgens);mgensTmp.set(fnType.id,null);return checkIfInList(whereClause[(-fnType.id)-1],queryElem,whereClause,mgensTmp,unboxingDepth,)}else if(fnType.generics.length>0||fnType.bindings.size>0){const simplifiedGenerics=[...fnType.generics,...Array.from(fnType.bindings.values()).flat(),];return checkIfInList(simplifiedGenerics,queryElem,whereClause,mgens,unboxingDepth,)}return false}function checkIfInList(list,elem,whereClause,mgens,unboxingDepth){for(const entry of list){if(checkType(entry,elem,whereClause,mgens,unboxingDepth)){return true}}return false}function checkType(row,elem,whereClause,mgens,unboxingDepth){if(unboxingDepth>=UNBOXING_LIMIT){return false}if(row.bindings.size===0&&elem.bindings.size===0){if(elem.id<0&&mgens===null){return row.id<0||checkIfInList(row.generics,elem,whereClause,mgens,unboxingDepth+1,)}if(row.id>0&&elem.id>0&&elem.pathWithoutLast.length===0&&typePassesFilter(elem.typeFilter,row.ty)&&elem.generics.length===0&&elem.id!==typeNameIdOfArrayOrSlice&&elem.id!==typeNameIdOfTupleOrUnit&&elem.id!==typeNameIdOfHof){return row.id===elem.id||checkIfInList(row.generics,elem,whereClause,mgens,unboxingDepth,)}}return unifyFunctionTypes([row],[elem],whereClause,mgens,null,unboxingDepth)}function checkPath(contains,ty){if(contains.length===0){return 0}const maxPathEditDistance=Math.floor(contains.reduce((acc,next)=>acc+next.length,0)/3,);let ret_dist=maxPathEditDistance+1;const path=ty.path.split("::");if(ty.parent&&ty.parent.name){path.push(ty.parent.name.toLowerCase())}const length=path.length;const clength=contains.length;pathiter:for(let i=length-clength;i>=0;i-=1){let dist_total=0;for(let x=0;xmaxPathEditDistance){continue pathiter}dist_total+=dist}}ret_dist=Math.min(ret_dist,Math.round(dist_total/clength))}return ret_dist>maxPathEditDistance?null:ret_dist}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER||filter===type)return true;const name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,descShard:item.descShard,descIndex:item.descIndex,exactPath:item.exactPath,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,bitIndex:item.bitIndex,implDisambiguator:item.implDisambiguator,}}async function handleAliases(ret,query,filterCrates,currentCrate){const lowerQuery=query.toLowerCase();const aliases=[];const crateAliases=[];if(filterCrates!==null){if(ALIASES.has(filterCrates)&&ALIASES.get(filterCrates).has(lowerQuery)){const query_aliases=ALIASES.get(filterCrates).get(lowerQuery);for(const alias of query_aliases){aliases.push(createAliasFromItem(searchIndex[alias]))}}}else{for(const[crate,crateAliasesIndex]of ALIASES){if(crateAliasesIndex.has(lowerQuery)){const pushTo=crate===currentCrate?crateAliases:aliases;const query_aliases=crateAliasesIndex.get(lowerQuery);for(const alias of query_aliases){pushTo.push(createAliasFromItem(searchIndex[alias]))}}}}const sortFunc=(aaa,bbb)=>{if(aaa.path{return searchIndexEmptyDesc.get(alias.crate).contains(alias.bitIndex)?"":searchState.loadDesc(alias)};const[crateDescs,descs]=await Promise.all([Promise.all(crateAliases.map(fetchDesc)),Promise.all(aliases.map(fetchDesc)),]);const pushFunc=alias=>{alias.alias=query;const res=buildHrefAndPath(alias);alias.displayPath=pathSplitter(res[0]);alias.fullPath=alias.displayPath+alias.name;alias.href=res[1];ret.others.unshift(alias);if(ret.others.length>MAX_RESULTS){ret.others.pop()}};aliases.forEach((alias,i)=>{alias.desc=descs[i]});aliases.forEach(pushFunc);crateAliases.forEach((alias,i)=>{alias.desc=crateDescs[i]});crateAliases.forEach(pushFunc)}function addIntoResults(results,fullId,id,index,dist,path_dist,maxEditDistance){if(dist<=maxEditDistance||index!==-1){if(results.has(fullId)){const result=results.get(fullId);if(result.dontValidate||result.dist<=dist){return}}results.set(fullId,{id:id,index:index,dontValidate:parsedQuery.literalSearch,dist:dist,path_dist:path_dist,})}}function handleSingleArg(row,pos,elem,results_others,results_in_args,results_returned,maxEditDistance,){if(!row||(filterCrates!==null&&row.crate!==filterCrates)){return}let path_dist=0;const fullId=row.id;const tfpDist=compareTypeFingerprints(fullId,parsedQuery.typeFingerprint,);if(tfpDist!==null){const in_args=row.type&&row.type.inputs&&checkIfInList(row.type.inputs,elem,row.type.where_clause,null,0);const returned=row.type&&row.type.output&&checkIfInList(row.type.output,elem,row.type.where_clause,null,0);if(in_args){results_in_args.max_dist=Math.max(results_in_args.max_dist||0,tfpDist);const maxDist=results_in_args.sizenormalizedIndex&&normalizedIndex!==-1)){index=normalizedIndex}if(elem.fullPath.length>1){path_dist=checkPath(elem.pathWithoutLast,row);if(path_dist===null){return}}if(parsedQuery.literalSearch){if(row.word===elem.pathLast){addIntoResults(results_others,fullId,pos,index,0,path_dist)}return}const dist=editDistance(row.normalizedName,elem.normalizedPathLast,maxEditDistance);if(index===-1&&dist>maxEditDistance){return}addIntoResults(results_others,fullId,pos,index,dist,path_dist,maxEditDistance)}function handleArgs(row,pos,results){if(!row||(filterCrates!==null&&row.crate!==filterCrates)||!row.type){return}const tfpDist=compareTypeFingerprints(row.id,parsedQuery.typeFingerprint,);if(tfpDist===null){return}if(results.size>=MAX_RESULTS&&tfpDist>results.max_dist){return}if(!unifyFunctionTypes(row.type.inputs,parsedQuery.elems,row.type.where_clause,null,mgens=>{return unifyFunctionTypes(row.type.output,parsedQuery.returned,row.type.where_clause,mgens,null,0,)},0,)){return}results.max_dist=Math.max(results.max_dist||0,tfpDist);addIntoResults(results,row.id,pos,0,tfpDist,0,Number.MAX_VALUE)}function innerRunQuery(){const queryLen=parsedQuery.elems.reduce((acc,next)=>acc+next.pathLast.length,0)+parsedQuery.returned.reduce((acc,next)=>acc+next.pathLast.length,0);const maxEditDistance=Math.floor(queryLen/3);const genericSymbols=new Map();function convertNameToId(elem,isAssocType){const loweredName=elem.pathLast.toLowerCase();if(typeNameIdMap.has(loweredName)&&(isAssocType||!typeNameIdMap.get(loweredName).assocOnly)){elem.id=typeNameIdMap.get(loweredName).id}else if(!parsedQuery.literalSearch){let match=null;let matchDist=maxEditDistance+1;let matchName="";for(const[name,{id,assocOnly}]of typeNameIdMap){const dist=Math.min(editDistance(name,loweredName,maxEditDistance),editDistance(name,elem.normalizedPathLast,maxEditDistance),);if(dist<=matchDist&&dist<=maxEditDistance&&(isAssocType||!assocOnly)){if(dist===matchDist&&matchName>name){continue}match=id;matchDist=dist;matchName=name}}if(match!==null){parsedQuery.correction=matchName}elem.id=match}if((elem.id===null&&parsedQuery.totalElems>1&&elem.typeFilter===-1&&elem.generics.length===0&&elem.bindings.size===0)||elem.typeFilter===TY_GENERIC){if(genericSymbols.has(elem.name)){elem.id=genericSymbols.get(elem.name)}else{elem.id=-(genericSymbols.size+1);genericSymbols.set(elem.name,elem.id)}if(elem.typeFilter===-1&&elem.name.length>=3){const maxPartDistance=Math.floor(elem.name.length/3);let matchDist=maxPartDistance+1;let matchName="";for(const name of typeNameIdMap.keys()){const dist=editDistance(name,elem.name,maxPartDistance);if(dist<=matchDist&&dist<=maxPartDistance){if(dist===matchDist&&matchName>name){continue}matchDist=dist;matchName=name}}if(matchName!==""){parsedQuery.proposeCorrectionFrom=elem.name;parsedQuery.proposeCorrectionTo=matchName}}elem.typeFilter=TY_GENERIC}if(elem.generics.length>0&&elem.typeFilter===TY_GENERIC){parsedQuery.error=["Generic type parameter ",elem.name," does not accept generic parameters",]}for(const elem2 of elem.generics){convertNameToId(elem2)}elem.bindings=new Map(Array.from(elem.bindings.entries()).map(entry=>{const[name,constraints]=entry;if(!typeNameIdMap.has(name)){parsedQuery.error=["Type parameter ",name," does not exist",];return[null,[]]}for(const elem2 of constraints){convertNameToId(elem2)}return[typeNameIdMap.get(name).id,constraints]}),)}const fps=new Set();for(const elem of parsedQuery.elems){convertNameToId(elem);buildFunctionTypeFingerprint(elem,parsedQuery.typeFingerprint,fps)}for(const elem of parsedQuery.returned){convertNameToId(elem);buildFunctionTypeFingerprint(elem,parsedQuery.typeFingerprint,fps)}if(parsedQuery.foundElems===1&&parsedQuery.returned.length===0){if(parsedQuery.elems.length===1){const elem=parsedQuery.elems[0];for(let i=0,nSearchIndex=searchIndex.length;i0){const sortQ=(a,b)=>{const ag=a.generics.length===0&&a.bindings.size===0;const bg=b.generics.length===0&&b.bindings.size===0;if(ag!==bg){return ag-bg}const ai=a.id>0;const bi=b.id>0;return ai-bi};parsedQuery.elems.sort(sortQ);parsedQuery.returned.sort(sortQ);for(let i=0,nSearchIndex=searchIndex.length;i{const descs=await Promise.all(list.map(result=>{return searchIndexEmptyDesc.get(result.crate).contains(result.bitIndex)?"":searchState.loadDesc(result)}));for(const[i,result]of list.entries()){result.desc=descs[i]}}));if(parsedQuery.error!==null&&ret.others.length!==0){ret.query.error=null}return ret}function nextTab(direction){const next=(searchState.currentTab+direction+3)%searchState.focusedByTab.length;searchState.focusedByTab[searchState.currentTab]=document.activeElement;printTab(next);focusSearchResult()}function focusSearchResult(){const target=searchState.focusedByTab[searchState.currentTab]||document.querySelectorAll(".search-results.active a").item(0)||document.querySelectorAll("#search-tabs button").item(searchState.currentTab);searchState.focusedByTab[searchState.currentTab]=null;if(target){target.focus()}}function buildHrefAndPath(item){let displayPath;let href;const type=itemTypes[item.ty];const name=item.name;let path=item.path;let exactPath=item.exactPath;if(type==="mod"){displayPath=path+"::";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="import"){displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/index.html#reexport."+name}else if(type==="primitive"||type==="keyword"){displayPath="";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=ROOT_PATH+name+"/index.html"}else if(item.parent!==undefined){const myparent=item.parent;let anchor=type+"."+name;const parentType=itemTypes[myparent.ty];let pageType=parentType;let pageName=myparent.name;exactPath=`${myparent.exactPath}::${myparent.name}`;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){const enumNameIdx=item.path.lastIndexOf("::");const enumName=item.path.substr(enumNameIdx+2);path=item.path.substr(0,enumNameIdx);displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}if(item.implDisambiguator!==null){anchor=item.implDisambiguator+"/"+anchor}href=ROOT_PATH+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html#"+anchor}else{displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href,`${exactPath}::${name}`]}function pathSplitter(path){const tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}async function addTab(array,query,display){const extraClass=display?" active":"";const output=document.createElement("div");if(array.length>0){output.className="search-results "+extraClass;for(const item of array){const name=item.name;const type=itemTypes[item.ty];const longType=longItemTypes[item.ty];const typeName=longType.length!==0?`${longType}`:"?";const link=document.createElement("a");link.className="result-"+type;link.href=item.href;const resultName=document.createElement("div");resultName.className="result-name";resultName.insertAdjacentHTML("beforeend",`${typeName}`);link.appendChild(resultName);let alias=" ";if(item.is_alias){alias=`
\ +${item.alias} - see \ +
`}resultName.insertAdjacentHTML("beforeend",`
${alias}\ +${item.displayPath}${name}\ +
`);const description=document.createElement("div");description.className="desc";description.insertAdjacentHTML("beforeend",item.desc);link.appendChild(description);output.appendChild(link)}}else if(query.error===null){output.className="search-failed"+extraClass;output.innerHTML="No results :(
"+"Try on DuckDuckGo?

"+"Or try looking in one of these:"}return[output,array.length]}function makeTabHeader(tabNb,text,nbElems){const fmtNbElems=nbElems<10?`\u{2007}(${nbElems})\u{2007}\u{2007}`:nbElems<100?`\u{2007}(${nbElems})\u{2007}`:`\u{2007}(${nbElems})`;if(searchState.currentTab===tabNb){return""}return""}async function showResults(results,go_to_first,filterCrates){const search=searchState.outputElement();if(go_to_first||(results.others.length===1&&getSettingValue("go-to-only-result")==="true")){window.onunload=()=>{};searchState.removeQueryParameters();const elem=document.createElement("a");elem.href=results.others[0].href;removeClass(elem,"active");document.body.appendChild(elem);elem.click();return}if(results.query===undefined){results.query=parseQuery(searchState.input.value)}currentResults=results.query.userQuery;const[ret_others,ret_in_args,ret_returned]=await Promise.all([addTab(results.others,results.query,true),addTab(results.in_args,results.query,false),addTab(results.returned,results.query,false),]);let currentTab=searchState.currentTab;if((currentTab===0&&ret_others[1]===0)||(currentTab===1&&ret_in_args[1]===0)||(currentTab===2&&ret_returned[1]===0)){if(ret_others[1]!==0){currentTab=0}else if(ret_in_args[1]!==0){currentTab=1}else if(ret_returned[1]!==0){currentTab=2}}let crates="";if(rawSearchIndex.size>1){crates=" in 
"}let output=`

Results${crates}

`;if(results.query.error!==null){const error=results.query.error;error.forEach((value,index)=>{value=value.split("<").join("<").split(">").join(">");if(index%2!==0){error[index]=`${value.replaceAll(" ", " ")}`}else{error[index]=value}});output+=`

Query parser error: "${error.join("")}".

`;output+="
"+makeTabHeader(0,"In Names",ret_others[1])+"
";currentTab=0}else if(results.query.foundElems<=1&&results.query.returned.length===0){output+="
"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
"}else{const signatureTabTitle=results.query.elems.length===0?"In Function Return Types":results.query.returned.length===0?"In Function Parameters":"In Function Signatures";output+="
"+makeTabHeader(0,signatureTabTitle,ret_others[1])+"
";currentTab=0}if(results.query.correction!==null){const orig=results.query.returned.length>0?results.query.returned[0].name:results.query.elems[0].name;output+="

"+`Type "${orig}" not found. `+"Showing results for closest type name "+`"${results.query.correction}" instead.

`}if(results.query.proposeCorrectionFrom!==null){const orig=results.query.proposeCorrectionFrom;const targ=results.query.proposeCorrectionTo;output+="

"+`Type "${orig}" not found and used as generic parameter. `+`Consider searching for "${targ}" instead.

`}const resultsElem=document.createElement("div");resultsElem.id="results";resultsElem.appendChild(ret_others[0]);resultsElem.appendChild(ret_in_args[0]);resultsElem.appendChild(ret_returned[0]);search.innerHTML=output;const crateSearch=document.getElementById("crate-search");if(crateSearch){crateSearch.addEventListener("input",updateCrate)}search.appendChild(resultsElem);searchState.showResults(search);const elems=document.getElementById("search-tabs").childNodes;searchState.focusedByTab=[];let i=0;for(const elem of elems){const j=i;elem.onclick=()=>printTab(j);searchState.focusedByTab.push(null);i+=1}printTab(currentTab)}function updateSearchHistory(url){if(!browserSupportsHistoryApi()){return}const params=searchState.getQueryStringParams();if(!history.state&&!params.search){history.pushState(null,"",url)}else{history.replaceState(null,"",url)}}async function search(forced){const query=parseQuery(searchState.input.value.trim());let filterCrates=getFilterCrates();if(!forced&&query.userQuery===currentResults){if(query.userQuery.length>0){putBackSearch()}return}searchState.setLoadingSearch();const params=searchState.getQueryStringParams();if(filterCrates===null&¶ms["filter-crate"]!==undefined){filterCrates=params["filter-crate"]}searchState.title="Results for "+query.original+" - Rust";updateSearchHistory(buildUrl(query.original,filterCrates));await showResults(await execQuery(query,filterCrates,window.currentCrate),params.go_to_first,filterCrates)}function buildItemSearchTypeAll(types,lowercasePaths){return types.length>0?types.map(type=>buildItemSearchType(type,lowercasePaths)):EMPTY_GENERICS_ARRAY}const EMPTY_BINDINGS_MAP=new Map();const EMPTY_GENERICS_ARRAY=[];let TYPES_POOL=new Map();function buildItemSearchType(type,lowercasePaths,isAssocType){const PATH_INDEX_DATA=0;const GENERICS_DATA=1;const BINDINGS_DATA=2;let pathIndex,generics,bindings;if(typeof type==="number"){pathIndex=type;generics=EMPTY_GENERICS_ARRAY;bindings=EMPTY_BINDINGS_MAP}else{pathIndex=type[PATH_INDEX_DATA];generics=buildItemSearchTypeAll(type[GENERICS_DATA],lowercasePaths,);if(type.length>BINDINGS_DATA&&type[BINDINGS_DATA].length>0){bindings=new Map(type[BINDINGS_DATA].map(binding=>{const[assocType,constraints]=binding;return[buildItemSearchType(assocType,lowercasePaths,true).id,buildItemSearchTypeAll(constraints,lowercasePaths),]}))}else{bindings=EMPTY_BINDINGS_MAP}}let result;if(pathIndex<0){result={id:pathIndex,ty:TY_GENERIC,path:null,exactPath:null,generics,bindings,}}else if(pathIndex===0){result={id:null,ty:null,path:null,exactPath:null,generics,bindings,}}else{const item=lowercasePaths[pathIndex-1];result={id:buildTypeMapIndex(item.name,isAssocType),ty:item.ty,path:item.path,exactPath:item.exactPath,generics,bindings,}}const cr=TYPES_POOL.get(result.id);if(cr){if(cr.generics.length===result.generics.length&&cr.generics!==result.generics&&cr.generics.every((x,i)=>result.generics[i]===x)){result.generics=cr.generics}if(cr.bindings.size===result.bindings.size&&cr.bindings!==result.bindings){let ok=true;for(const[k,v]of cr.bindings.entries()){const v2=result.bindings.get(v);if(!v2){ok=false;break}if(v!==v2&&v.length===v2.length&&v.every((x,i)=>v2[i]===x)){result.bindings.set(k,v)}else if(v!==v2){ok=false;break}}if(ok){result.bindings=cr.bindings}}if(cr.ty===result.ty&&cr.path===result.path&&cr.bindings===result.bindings&&cr.generics===result.generics&&cr.ty===result.ty){return cr}}TYPES_POOL.set(result.id,result);return result}function buildFunctionSearchTypeCallback(lowercasePaths){return functionSearchType=>{if(functionSearchType===0){return null}const INPUTS_DATA=0;const OUTPUT_DATA=1;let inputs,output;if(typeof functionSearchType[INPUTS_DATA]==="number"){inputs=[buildItemSearchType(functionSearchType[INPUTS_DATA],lowercasePaths)]}else{inputs=buildItemSearchTypeAll(functionSearchType[INPUTS_DATA],lowercasePaths,)}if(functionSearchType.length>1){if(typeof functionSearchType[OUTPUT_DATA]==="number"){output=[buildItemSearchType(functionSearchType[OUTPUT_DATA],lowercasePaths)]}else{output=buildItemSearchTypeAll(functionSearchType[OUTPUT_DATA],lowercasePaths,)}}else{output=[]}const where_clause=[];const l=functionSearchType.length;for(let i=2;i{k=(~~k+0x7ed55d16)+(k<<12);k=(k ^ 0xc761c23c)^(k>>>19);k=(~~k+0x165667b1)+(k<<5);k=(~~k+0xd3a2646c)^(k<<9);k=(~~k+0xfd7046c5)+(k<<3);return(k ^ 0xb55a4f09)^(k>>>16)};const hashint2=k=>{k=~k+(k<<15);k ^=k>>>12;k+=k<<2;k ^=k>>>4;k=Math.imul(k,2057);return k ^(k>>16)};if(input!==null){const h0a=hashint1(input);const h0b=hashint2(input);const h1a=~~(h0a+Math.imul(h0b,2));const h1b=~~(h0a+Math.imul(h0b,3));const h2a=~~(h0a+Math.imul(h0b,4));const h2b=~~(h0a+Math.imul(h0b,5));output[0]|=(1<<(h0a%32))|(1<<(h1b%32));output[1]|=(1<<(h1a%32))|(1<<(h2b%32));output[2]|=(1<<(h2a%32))|(1<<(h0b%32));fps.add(input)}for(const g of type.generics){buildFunctionTypeFingerprint(g,output,fps)}const fb={id:null,ty:0,generics:EMPTY_GENERICS_ARRAY,bindings:EMPTY_BINDINGS_MAP,};for(const[k,v]of type.bindings.entries()){fb.id=k;fb.generics=v;buildFunctionTypeFingerprint(fb,output,fps)}output[3]=fps.size}function compareTypeFingerprints(fullId,queryFingerprint){const fh0=functionTypeFingerprint[fullId*4];const fh1=functionTypeFingerprint[(fullId*4)+1];const fh2=functionTypeFingerprint[(fullId*4)+2];const[qh0,qh1,qh2]=queryFingerprint;const[in0,in1,in2]=[fh0&qh0,fh1&qh1,fh2&qh2];if((in0 ^ qh0)||(in1 ^ qh1)||(in2 ^ qh2)){return null}return functionTypeFingerprint[(fullId*4)+3]}class VlqHexDecoder{constructor(string,cons){this.string=string;this.cons=cons;this.offset=0;this.backrefQueue=[]}decodeList(){let c=this.string.charCodeAt(this.offset);const ret=[];while(c!==125){ret.push(this.decode());c=this.string.charCodeAt(this.offset)}this.offset+=1;return ret}decode(){let n=0;let c=this.string.charCodeAt(this.offset);if(c===123){this.offset+=1;return this.decodeList()}while(c<96){n=(n<<4)|(c&0xF);this.offset+=1;c=this.string.charCodeAt(this.offset)}n=(n<<4)|(c&0xF);const[sign,value]=[n&1,n>>1];this.offset+=1;return sign?-value:value}next(){const c=this.string.charCodeAt(this.offset);if(c>=48&&c<64){this.offset+=1;return this.backrefQueue[c-48]}if(c===96){this.offset+=1;return this.cons(0)}const result=this.cons(this.decode());this.backrefQueue.unshift(result);if(this.backrefQueue.length>16){this.backrefQueue.pop()}return result}}class RoaringBitmap{constructor(str){const strdecoded=atob(str);const u8array=new Uint8Array(strdecoded.length);for(let j=0;j=4){offsets=[];for(let j=0;j>3]&(1<<(j&0x7))){const runcount=(u8array[i]|(u8array[i+1]<<8));i+=2;this.containers.push(new RoaringBitmapRun(runcount,u8array.slice(i,i+(runcount*4)),));i+=runcount*4}else if(this.cardinalities[j]>=4096){this.containers.push(new RoaringBitmapBits(u8array.slice(i,i+8192)));i+=8192}else{const end=this.cardinalities[j]*2;this.containers.push(new RoaringBitmapArray(this.cardinalities[j],u8array.slice(i,i+end),));i+=end}}}contains(keyvalue){const key=keyvalue>>16;const value=keyvalue&0xFFFF;for(let i=0;i=start&&value<=(start+lenm1)){return true}}return false}}class RoaringBitmapArray{constructor(cardinality,array){this.cardinality=cardinality;this.array=array}contains(value){const l=this.cardinality*2;for(let i=0;i>3]&(1<<(value&7)))}}function buildIndex(rawSearchIndex){searchIndex=[];searchIndexDeprecated=new Map();searchIndexEmptyDesc=new Map();let currentIndex=0;let id=0;for(const crate of rawSearchIndex.values()){id+=crate.t.length+1}functionTypeFingerprint=new Uint32Array((id+1)*4);id=0;for(const[crate,crateCorpus]of rawSearchIndex){const itemDescShardDecoder=new VlqHexDecoder(crateCorpus.D,noop=>noop);let descShard={crate,shard:0,start:0,len:itemDescShardDecoder.next(),promise:null,resolve:null,};const descShardList=[descShard];searchIndexDeprecated.set(crate,new RoaringBitmap(crateCorpus.c));searchIndexEmptyDesc.set(crate,new RoaringBitmap(crateCorpus.e));let descIndex=0;const crateRow={crate,ty:3,name:crate,path:"",descShard,descIndex,exactPath:"",desc:crateCorpus.doc,parent:undefined,type:null,id,word:crate,normalizedName:crate.indexOf("_")===-1?crate:crate.replace(/_/g,""),bitIndex:0,implDisambiguator:null,};id+=1;searchIndex.push(crateRow);currentIndex+=1;if(!searchIndexEmptyDesc.get(crate).contains(0)){descIndex+=1}const itemTypes=crateCorpus.t;const itemNames=crateCorpus.n;const itemPaths=new Map(crateCorpus.q);const itemReexports=new Map(crateCorpus.r);const itemParentIdxs=crateCorpus.i;const implDisambiguator=new Map(crateCorpus.b);const paths=crateCorpus.p;const aliases=crateCorpus.a;const lowercasePaths=[];const itemFunctionDecoder=new VlqHexDecoder(crateCorpus.f,buildFunctionSearchTypeCallback(lowercasePaths),);let len=paths.length;let lastPath=itemPaths.get(0);for(let i=0;i2){path=itemPaths.has(elem[2])?itemPaths.get(elem[2]):lastPath;lastPath=path}const exactPath=elem.length>3?itemPaths.get(elem[3]):path;lowercasePaths.push({ty,name:name.toLowerCase(),path,exactPath});paths[i]={ty,name,path,exactPath}}lastPath="";len=itemTypes.length;for(let i=0;i=descShard.len&&!searchIndexEmptyDesc.get(crate).contains(bitIndex)){descShard={crate,shard:descShard.shard+1,start:descShard.start+descShard.len,len:itemDescShardDecoder.next(),promise:null,resolve:null,};descIndex=0;descShardList.push(descShard)}let word="";if(typeof itemNames[i]==="string"){word=itemNames[i].toLowerCase()}const path=itemPaths.has(i)?itemPaths.get(i):lastPath;const type=itemFunctionDecoder.next();if(type!==null){if(type){const fp=functionTypeFingerprint.subarray(id*4,(id+1)*4);const fps=new Set();for(const t of type.inputs){buildFunctionTypeFingerprint(t,fp,fps)}for(const t of type.output){buildFunctionTypeFingerprint(t,fp,fps)}for(const w of type.where_clause){for(const t of w){buildFunctionTypeFingerprint(t,fp,fps)}}}}const row={crate,ty:itemTypes.charCodeAt(i)-65,name:itemNames[i],path,descShard,descIndex,exactPath:itemReexports.has(i)?itemPaths.get(itemReexports.get(i)):path,parent:itemParentIdxs[i]>0?paths[itemParentIdxs[i]-1]:undefined,type,id,word,normalizedName:word.indexOf("_")===-1?word:word.replace(/_/g,""),bitIndex,implDisambiguator:implDisambiguator.has(i)?implDisambiguator.get(i):null,};id+=1;searchIndex.push(row);lastPath=row.path;if(!searchIndexEmptyDesc.get(crate).contains(bitIndex)){descIndex+=1}}if(aliases){const currentCrateAliases=new Map();ALIASES.set(crate,currentCrateAliases);for(const alias_name in aliases){if(!Object.prototype.hasOwnProperty.call(aliases,alias_name)){continue}let currentNameAliases;if(currentCrateAliases.has(alias_name)){currentNameAliases=currentCrateAliases.get(alias_name)}else{currentNameAliases=[];currentCrateAliases.set(alias_name,currentNameAliases)}for(const local_alias of aliases[alias_name]){currentNameAliases.push(local_alias+currentIndex)}}}currentIndex+=itemTypes.length;searchState.descShards.set(crate,descShardList)}TYPES_POOL=new Map()}function onSearchSubmit(e){e.preventDefault();searchState.clearInputTimeout();search()}function putBackSearch(){const search_input=searchState.input;if(!searchState.input){return}if(search_input.value!==""&&!searchState.isDisplayed()){searchState.showResults();if(browserSupportsHistoryApi()){history.replaceState(null,"",buildUrl(search_input.value,getFilterCrates()))}document.title=searchState.title}}function registerSearchEvents(){const params=searchState.getQueryStringParams();if(searchState.input.value===""){searchState.input.value=params.search||""}const searchAfter500ms=()=>{searchState.clearInputTimeout();if(searchState.input.value.length===0){searchState.hideResults()}else{searchState.timeout=setTimeout(search,500)}};searchState.input.onkeyup=searchAfter500ms;searchState.input.oninput=searchAfter500ms;document.getElementsByClassName("search-form")[0].onsubmit=onSearchSubmit;searchState.input.onchange=e=>{if(e.target!==document.activeElement){return}searchState.clearInputTimeout();setTimeout(search,0)};searchState.input.onpaste=searchState.input.onchange;searchState.outputElement().addEventListener("keydown",e=>{if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey){return}if(e.which===38){const previous=document.activeElement.previousElementSibling;if(previous){previous.focus()}else{searchState.focus()}e.preventDefault()}else if(e.which===40){const next=document.activeElement.nextElementSibling;if(next){next.focus()}const rect=document.activeElement.getBoundingClientRect();if(window.innerHeight-rect.bottom{if(e.which===40){focusSearchResult();e.preventDefault()}});searchState.input.addEventListener("focus",()=>{putBackSearch()});searchState.input.addEventListener("blur",()=>{searchState.input.placeholder=searchState.input.origPlaceholder});if(browserSupportsHistoryApi()){const previousTitle=document.title;window.addEventListener("popstate",e=>{const params=searchState.getQueryStringParams();document.title=previousTitle;currentResults=null;if(params.search&¶ms.search.length>0){searchState.input.value=params.search;e.preventDefault();search()}else{searchState.input.value="";searchState.hideResults()}})}window.onpageshow=()=>{const qSearch=searchState.getQueryStringParams().search;if(searchState.input.value===""&&qSearch){searchState.input.value=qSearch}search()}}function updateCrate(ev){if(ev.target.value==="all crates"){const query=searchState.input.value.trim();updateSearchHistory(buildUrl(query,null))}currentResults=null;search(true)}buildIndex(rawSearchIndex);if(typeof window!=="undefined"){registerSearchEvents();if(window.searchState.getQueryStringParams().search){search()}}if(typeof exports!=="undefined"){exports.initSearch=initSearch;exports.execQuery=execQuery;exports.parseQuery=parseQuery}}if(typeof window!=="undefined"){window.initSearch=initSearch;if(window.searchIndex!==undefined){initSearch(window.searchIndex)}}else{initSearch(new Map())}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/clone/trait.Clone.js b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/clone/trait.Clone.js index 270a1587..f3493485 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/clone/trait.Clone.js +++ b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/clone/trait.Clone.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl Clone for Error"],["impl Clone for DataPackage"],["impl Clone for DataPoint"],["impl Clone for Payload"]] +"redstone":[["impl Clone for Error"],["impl Clone for DataPackage"],["impl Clone for DataPoint"],["impl Clone for Payload"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/cmp/trait.Eq.js b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/cmp/trait.Eq.js index a573550b..65c9074b 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/cmp/trait.Eq.js +++ b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/cmp/trait.Eq.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl Eq for ProcessorResult"],["impl Eq for DataPackage"],["impl Eq for DataPoint"]] +"redstone":[["impl Eq for ProcessorResult"],["impl Eq for DataPackage"],["impl Eq for DataPoint"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/cmp/trait.PartialEq.js b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/cmp/trait.PartialEq.js index 695eda8f..694c39aa 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/cmp/trait.PartialEq.js +++ b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/cmp/trait.PartialEq.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl PartialEq for ProcessorResult"],["impl PartialEq for DataPackage"],["impl PartialEq for DataPoint"]] +"redstone":[["impl PartialEq for ProcessorResult"],["impl PartialEq for DataPackage"],["impl PartialEq for DataPoint"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/convert/trait.From.js b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/convert/trait.From.js index 28d42f05..efdca1d7 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/convert/trait.From.js +++ b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/convert/trait.From.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl From<Error> for ApiError"],["impl From<ProcessorResult> for (u64, Vec<U256>)"]] +"redstone":[["impl From<Error> for ApiError"],["impl From<ProcessorResult> for (u64, Vec<U256>)"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/fmt/trait.Debug.js b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/fmt/trait.Debug.js index f544c767..00b02dec 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/fmt/trait.Debug.js +++ b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/fmt/trait.Debug.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl Debug for Error"],["impl Debug for Config"],["impl Debug for ProcessorResult"],["impl Debug for DataPackage"],["impl Debug for DataPoint"],["impl Debug for Payload"]] +"redstone":[["impl Debug for Error"],["impl Debug for Config"],["impl Debug for ProcessorResult"],["impl Debug for DataPackage"],["impl Debug for DataPoint"],["impl Debug for Payload"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/fmt/trait.Display.js b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/fmt/trait.Display.js index 899cd7d8..99ad5f7c 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/fmt/trait.Display.js +++ b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/fmt/trait.Display.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl Display for Error"]] +"redstone":[["impl Display for Error"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/marker/trait.Freeze.js b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/marker/trait.Freeze.js index 3152e387..813f6177 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/marker/trait.Freeze.js +++ b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/marker/trait.Freeze.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl Freeze for Error",1,["redstone::network::error::Error"]],["impl Freeze for Config",1,["redstone::core::config::Config"]],["impl Freeze for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Freeze for Casper",1,["redstone::network::casper::Casper"]],["impl Freeze for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Freeze for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Freeze for Payload",1,["redstone::protocol::payload::Payload"]]] +"redstone":[["impl Freeze for Error",1,["redstone::network::error::Error"]],["impl Freeze for Config",1,["redstone::core::config::Config"]],["impl Freeze for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Freeze for Casper",1,["redstone::network::casper::Casper"]],["impl Freeze for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Freeze for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Freeze for Payload",1,["redstone::protocol::payload::Payload"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/marker/trait.Send.js b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/marker/trait.Send.js index 2e259f12..bc0b7373 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/marker/trait.Send.js +++ b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/marker/trait.Send.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl !Send for Error",1,["redstone::network::error::Error"]],["impl Send for Config",1,["redstone::core::config::Config"]],["impl Send for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Send for Casper",1,["redstone::network::casper::Casper"]],["impl Send for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Send for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Send for Payload",1,["redstone::protocol::payload::Payload"]]] +"redstone":[["impl !Send for Error",1,["redstone::network::error::Error"]],["impl Send for Config",1,["redstone::core::config::Config"]],["impl Send for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Send for Casper",1,["redstone::network::casper::Casper"]],["impl Send for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Send for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Send for Payload",1,["redstone::protocol::payload::Payload"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/marker/trait.StructuralPartialEq.js b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/marker/trait.StructuralPartialEq.js index 19408b71..e4ec763f 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/marker/trait.StructuralPartialEq.js +++ b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/marker/trait.StructuralPartialEq.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl StructuralPartialEq for ProcessorResult"],["impl StructuralPartialEq for DataPackage"],["impl StructuralPartialEq for DataPoint"]] +"redstone":[["impl StructuralPartialEq for ProcessorResult"],["impl StructuralPartialEq for DataPackage"],["impl StructuralPartialEq for DataPoint"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/marker/trait.Sync.js b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/marker/trait.Sync.js index 22784882..f07f6942 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/marker/trait.Sync.js +++ b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/marker/trait.Sync.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl !Sync for Error",1,["redstone::network::error::Error"]],["impl Sync for Config",1,["redstone::core::config::Config"]],["impl Sync for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Sync for Casper",1,["redstone::network::casper::Casper"]],["impl Sync for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Sync for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Sync for Payload",1,["redstone::protocol::payload::Payload"]]] +"redstone":[["impl !Sync for Error",1,["redstone::network::error::Error"]],["impl Sync for Config",1,["redstone::core::config::Config"]],["impl Sync for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Sync for Casper",1,["redstone::network::casper::Casper"]],["impl Sync for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Sync for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Sync for Payload",1,["redstone::protocol::payload::Payload"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/marker/trait.Unpin.js b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/marker/trait.Unpin.js index 3e63cbc0..e3df1d1f 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/marker/trait.Unpin.js +++ b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/marker/trait.Unpin.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl Unpin for Error",1,["redstone::network::error::Error"]],["impl Unpin for Config",1,["redstone::core::config::Config"]],["impl Unpin for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Unpin for Casper",1,["redstone::network::casper::Casper"]],["impl Unpin for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Unpin for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Unpin for Payload",1,["redstone::protocol::payload::Payload"]]] +"redstone":[["impl Unpin for Error",1,["redstone::network::error::Error"]],["impl Unpin for Config",1,["redstone::core::config::Config"]],["impl Unpin for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Unpin for Casper",1,["redstone::network::casper::Casper"]],["impl Unpin for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Unpin for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Unpin for Payload",1,["redstone::protocol::payload::Payload"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js index 6f8f3bd3..646a886b 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js +++ b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl !RefUnwindSafe for Error",1,["redstone::network::error::Error"]],["impl RefUnwindSafe for Config",1,["redstone::core::config::Config"]],["impl RefUnwindSafe for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl RefUnwindSafe for Casper",1,["redstone::network::casper::Casper"]],["impl RefUnwindSafe for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl RefUnwindSafe for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl RefUnwindSafe for Payload",1,["redstone::protocol::payload::Payload"]]] +"redstone":[["impl !RefUnwindSafe for Error",1,["redstone::network::error::Error"]],["impl RefUnwindSafe for Config",1,["redstone::core::config::Config"]],["impl RefUnwindSafe for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl RefUnwindSafe for Casper",1,["redstone::network::casper::Casper"]],["impl RefUnwindSafe for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl RefUnwindSafe for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl RefUnwindSafe for Payload",1,["redstone::protocol::payload::Payload"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js index a29a861a..ee026d94 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js +++ b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl !UnwindSafe for Error",1,["redstone::network::error::Error"]],["impl UnwindSafe for Config",1,["redstone::core::config::Config"]],["impl UnwindSafe for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl UnwindSafe for Casper",1,["redstone::network::casper::Casper"]],["impl UnwindSafe for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl UnwindSafe for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl UnwindSafe for Payload",1,["redstone::protocol::payload::Payload"]]] +"redstone":[["impl !UnwindSafe for Error",1,["redstone::network::error::Error"]],["impl UnwindSafe for Config",1,["redstone::core::config::Config"]],["impl UnwindSafe for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl UnwindSafe for Casper",1,["redstone::network::casper::Casper"]],["impl UnwindSafe for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl UnwindSafe for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl UnwindSafe for Payload",1,["redstone::protocol::payload::Payload"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/type.impl/alloc/vec/struct.Vec.js b/static/rust/redstone/crypto_secp256k1,network_casper/type.impl/alloc/vec/struct.Vec.js index 1d91fcbc..e4879074 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/type.impl/alloc/vec/struct.Vec.js +++ b/static/rust/redstone/crypto_secp256k1,network_casper/type.impl/alloc/vec/struct.Vec.js @@ -1,3 +1,3 @@ (function() {var type_impls = { -"redstone":[["
1.5.0 · source§

impl<T, A> AsMut<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn as_mut(&mut self) -> &mut [T]

Converts this type into a mutable reference of the (usually inferred) input type.
","AsMut<[T]>","redstone::core::aggregator::Matrix"],["
1.5.0 · source§

impl<T, A> AsMut<Vec<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn as_mut(&mut self) -> &mut Vec<T, A>

Converts this type into a mutable reference of the (usually inferred) input type.
","AsMut>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> AsRef<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn as_ref(&self) -> &[T]

Converts this type into a shared reference of the (usually inferred) input type.
","AsRef<[T]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> AsRef<Vec<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn as_ref(&self) -> &Vec<T, A>

Converts this type into a shared reference of the (usually inferred) input type.
","AsRef>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Borrow<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn borrow(&self) -> &[T]

Immutably borrows from an owned value. Read more
","Borrow<[T]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> BorrowMut<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn borrow_mut(&mut self) -> &mut [T]

Mutably borrows from an owned value. Read more
","BorrowMut<[T]>","redstone::core::aggregator::Matrix"],["
source§

impl<T> CLTyped for Vec<T>
where\n T: CLTyped,

source§

fn cl_type() -> CLType

The CLType of Self.
","CLTyped","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Clone for Vec<T, A>
where\n T: Clone,\n A: Allocator + Clone,

source§

fn clone_from(&mut self, source: &Vec<T, A>)

Overwrites the contents of self with a clone of the contents of source.

\n

This method is preferred over simply assigning source.clone() to self,\nas it avoids reallocation if possible. Additionally, if the element type\nT overrides clone_from(), this will reuse the resources of self’s\nelements as well.

\n
§Examples
\n
let x = vec![5, 6, 7];\nlet mut y = vec![8, 9, 10];\nlet yp: *const i32 = y.as_ptr();\n\ny.clone_from(&x);\n\n// The value is the same\nassert_eq!(x, y);\n\n// And no reallocation occurred\nassert_eq!(yp, y.as_ptr());
\n
source§

fn clone(&self) -> Vec<T, A>

Returns a copy of the value. Read more
","Clone","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Debug for Vec<T, A>
where\n T: Debug,\n A: Allocator,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T> Default for Vec<T>

source§

fn default() -> Vec<T>

Creates an empty Vec<T>.

\n

The vector will not allocate until elements are pushed onto it.

\n
","Default","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Deref for Vec<T, A>
where\n A: Allocator,

§

type Target = [T]

The resulting type after dereferencing.
source§

fn deref(&self) -> &[T]

Dereferences the value.
","Deref","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> DerefMut for Vec<T, A>
where\n A: Allocator,

source§

fn deref_mut(&mut self) -> &mut [T]

Mutably dereferences the value.
","DerefMut","redstone::core::aggregator::Matrix"],["
source§

impl<'de, T> Deserialize<'de> for Vec<T>
where\n T: Deserialize<'de>,

source§

fn deserialize<D>(\n deserializer: D,\n) -> Result<Vec<T>, <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Drop for Vec<T, A>
where\n A: Allocator,

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
","Drop","redstone::core::aggregator::Matrix"],["
1.2.0 · source§

impl<'a, T, A> Extend<&'a T> for Vec<T, A>
where\n T: Copy + 'a,\n A: Allocator,

Extend implementation that copies elements out of references before pushing them onto the Vec.

\n

This implementation is specialized for slice iterators, where it uses copy_from_slice to\nappend the entire slice at once.

\n
source§

fn extend<I>(&mut self, iter: I)
where\n I: IntoIterator<Item = &'a T>,

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, _: &'a T)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
","Extend<&'a T>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Extend<T> for Vec<T, A>
where\n A: Allocator,

source§

fn extend<I>(&mut self, iter: I)
where\n I: IntoIterator<Item = T>,

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: T)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
","Extend","redstone::core::aggregator::Matrix"],["
source§

impl Flattened<<Casper as NetworkSpecific>::BytesRepr> for Vec<Bytes>

","Flattened<::BytesRepr>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T> From<&[T]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &[T]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&[1, 2, 3][..]), vec![1, 2, 3]);
\n
","From<&[T]>","redstone::core::aggregator::Matrix"],["
1.74.0 · source§

impl<T, const N: usize> From<&[T; N]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &[T; N]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&[1, 2, 3]), vec![1, 2, 3]);
\n
","From<&[T; N]>","redstone::core::aggregator::Matrix"],["
1.19.0 · source§

impl<T> From<&mut [T]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &mut [T]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&mut [1, 2, 3][..]), vec![1, 2, 3]);
\n
","From<&mut [T]>","redstone::core::aggregator::Matrix"],["
1.74.0 · source§

impl<T, const N: usize> From<&mut [T; N]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &mut [T; N]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&mut [1, 2, 3]), vec![1, 2, 3]);
\n
","From<&mut [T; N]>","redstone::core::aggregator::Matrix"],["
1.44.0 · source§

impl<T, const N: usize> From<[T; N]> for Vec<T>

source§

fn from(s: [T; N]) -> Vec<T>

Allocate a Vec<T> and move s’s items into it.

\n
§Examples
\n
assert_eq!(Vec::from([1, 2, 3]), vec![1, 2, 3]);
\n
","From<[T; N]>","redstone::core::aggregator::Matrix"],["
1.5.0 · source§

impl<T, A> From<BinaryHeap<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn from(heap: BinaryHeap<T, A>) -> Vec<T, A>

Converts a BinaryHeap<T> into a Vec<T>.

\n

This conversion requires no data movement or allocation, and has\nconstant time complexity.

\n
","From>","redstone::core::aggregator::Matrix"],["
1.18.0 · source§

impl<T, A> From<Box<[T], A>> for Vec<T, A>
where\n A: Allocator,

source§

fn from(s: Box<[T], A>) -> Vec<T, A>

Convert a boxed slice into a vector by transferring ownership of\nthe existing heap allocation.

\n
§Examples
\n
let b: Box<[i32]> = vec![1, 2, 3].into_boxed_slice();\nassert_eq!(Vec::from(b), vec![1, 2, 3]);
\n
","From>","redstone::core::aggregator::Matrix"],["
1.14.0 · source§

impl<'a, T> From<Cow<'a, [T]>> for Vec<T>
where\n [T]: ToOwned<Owned = Vec<T>>,

source§

fn from(s: Cow<'a, [T]>) -> Vec<T>

Convert a clone-on-write slice into a vector.

\n

If s already owns a Vec<T>, it will be returned directly.\nIf s is borrowing a slice, a new Vec<T> will be allocated and\nfilled by cloning s’s items into it.

\n
§Examples
\n
let o: Cow<'_, [i32]> = Cow::Owned(vec![1, 2, 3]);\nlet b: Cow<'_, [i32]> = Cow::Borrowed(&[1, 2, 3]);\nassert_eq!(Vec::from(o), Vec::from(b));
\n
","From>","redstone::core::aggregator::Matrix"],["
1.10.0 · source§

impl<T, A> From<VecDeque<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn from(other: VecDeque<T, A>) -> Vec<T, A>

Turn a VecDeque<T> into a Vec<T>.

\n

This never needs to re-allocate, but does need to do O(n) data movement if\nthe circular buffer doesn’t happen to be at the beginning of the allocation.

\n
§Examples
\n
use std::collections::VecDeque;\n\n// This one is *O*(1).\nlet deque: VecDeque<_> = (1..5).collect();\nlet ptr = deque.as_slices().0.as_ptr();\nlet vec = Vec::from(deque);\nassert_eq!(vec, [1, 2, 3, 4]);\nassert_eq!(vec.as_ptr(), ptr);\n\n// This one needs data rearranging.\nlet mut deque: VecDeque<_> = (1..5).collect();\ndeque.push_front(9);\ndeque.push_front(8);\nlet ptr = deque.as_slices().1.as_ptr();\nlet vec = Vec::from(deque);\nassert_eq!(vec, [8, 9, 1, 2, 3, 4]);\nassert_eq!(vec.as_ptr(), ptr);
\n
","From>","redstone::core::aggregator::Matrix"],["
source§

impl<T> FromBytes for Vec<T>
where\n T: FromBytes,

source§

fn from_bytes(bytes: &[u8]) -> Result<(Vec<T>, &[u8]), Error>

Deserializes the slice into Self.
source§

fn from_vec(bytes: Vec<u8>) -> Result<(Vec<T>, Vec<u8>), Error>

Deserializes the Vec<u8> into Self.
","FromBytes","redstone::core::aggregator::Matrix"],["
source§

impl FromBytesRepr<Vec<u8>> for U256

source§

fn from_bytes_repr(bytes: Vec<u8>) -> Self

","FromBytesRepr>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T> FromIterator<T> for Vec<T>

Collects an iterator into a Vec, commonly called via Iterator::collect()

\n

§Allocation behavior

\n

In general Vec does not guarantee any particular growth or allocation strategy.\nThat also applies to this trait impl.

\n

Note: This section covers implementation details and is therefore exempt from\nstability guarantees.

\n

Vec may use any or none of the following strategies,\ndepending on the supplied iterator:

\n
    \n
  • preallocate based on Iterator::size_hint()\n
      \n
    • and panic if the number of items is outside the provided lower/upper bounds
    • \n
    \n
  • \n
  • use an amortized growth strategy similar to pushing one item at a time
  • \n
  • perform the iteration in-place on the original allocation backing the iterator
  • \n
\n

The last case warrants some attention. It is an optimization that in many cases reduces peak memory\nconsumption and improves cache locality. But when big, short-lived allocations are created,\nonly a small fraction of their items get collected, no further use is made of the spare capacity\nand the resulting Vec is moved into a longer-lived structure, then this can lead to the large\nallocations having their lifetimes unnecessarily extended which can result in increased memory\nfootprint.

\n

In cases where this is an issue, the excess capacity can be discarded with Vec::shrink_to(),\nVec::shrink_to_fit() or by collecting into Box<[T]> instead, which additionally reduces\nthe size of the long-lived struct.

\n\n
static LONG_LIVED: Mutex<Vec<Vec<u16>>> = Mutex::new(Vec::new());\n\nfor i in 0..10 {\n    let big_temporary: Vec<u16> = (0..1024).collect();\n    // discard most items\n    let mut result: Vec<_> = big_temporary.into_iter().filter(|i| i % 100 == 0).collect();\n    // without this a lot of unused capacity might be moved into the global\n    result.shrink_to_fit();\n    LONG_LIVED.lock().unwrap().push(result);\n}
\n
source§

fn from_iter<I>(iter: I) -> Vec<T>
where\n I: IntoIterator<Item = T>,

Creates a value from an iterator. Read more
","FromIterator","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Hash for Vec<T, A>
where\n T: Hash,\n A: Allocator,

The hash of a vector is the same as that of the corresponding slice,\nas required by the core::borrow::Borrow implementation.

\n\n
use std::hash::BuildHasher;\n\nlet b = std::hash::RandomState::new();\nlet v: Vec<u8> = vec![0xa8, 0x3c, 0x09];\nlet s: &[u8] = &[0xa8, 0x3c, 0x09];\nassert_eq!(b.hash_one(v), b.hash_one(s));
\n
source§

fn hash<H>(&self, state: &mut H)
where\n H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, I, A> Index<I> for Vec<T, A>
where\n I: SliceIndex<[T]>,\n A: Allocator,

§

type Output = <I as SliceIndex<[T]>>::Output

The returned type after indexing.
source§

fn index(&self, index: I) -> &<Vec<T, A> as Index<I>>::Output

Performs the indexing (container[index]) operation. Read more
","Index","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, I, A> IndexMut<I> for Vec<T, A>
where\n I: SliceIndex<[T]>,\n A: Allocator,

source§

fn index_mut(&mut self, index: I) -> &mut <Vec<T, A> as Index<I>>::Output

Performs the mutable indexing (container[index]) operation. Read more
","IndexMut","redstone::core::aggregator::Matrix"],["
source§

impl<'de, T, E> IntoDeserializer<'de, E> for Vec<T>
where\n T: IntoDeserializer<'de, E>,\n E: Error,

§

type Deserializer = SeqDeserializer<<Vec<T> as IntoIterator>::IntoIter, E>

The type of the deserializer being converted into.
source§

fn into_deserializer(self) -> <Vec<T> as IntoDeserializer<'de, E>>::Deserializer

Convert this value into a deserializer.
","IntoDeserializer<'de, E>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> IntoIterator for Vec<T, A>
where\n A: Allocator,

source§

fn into_iter(self) -> <Vec<T, A> as IntoIterator>::IntoIter

Creates a consuming iterator, that is, one that moves each value out of\nthe vector (from start to end). The vector cannot be used after calling\nthis.

\n
§Examples
\n
let v = vec![\"a\".to_string(), \"b\".to_string()];\nlet mut v_iter = v.into_iter();\n\nlet first_element: Option<String> = v_iter.next();\n\nassert_eq!(first_element, Some(\"a\".to_string()));\nassert_eq!(v_iter.next(), Some(\"b\".to_string()));\nassert_eq!(v_iter.next(), None);
\n
§

type Item = T

The type of the elements being iterated over.
§

type IntoIter = IntoIter<T, A>

Which kind of iterator are we turning this into?
","IntoIterator","redstone::core::aggregator::Matrix"],["
source§

impl<T> Median for Vec<T>
where\n T: Copy + Ord + Avg,

§

type Item = T

source§

fn median(self) -> Self::Item

","Median","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Ord for Vec<T, A>
where\n T: Ord,\n A: Allocator,

Implements ordering of vectors, lexicographically.

\n
source§

fn cmp(&self, other: &Vec<T, A>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
","Ord","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A> PartialEq<&[U]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &&[U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&[U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&[U]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A, const N: usize> PartialEq<&[U; N]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &&[U; N]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&[U; N]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&[U; N]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A> PartialEq<&mut [U]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &&mut [U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&mut [U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&mut [U]>","redstone::core::aggregator::Matrix"],["
1.48.0 · source§

impl<T, U, A> PartialEq<[U]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &[U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &[U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<[U]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A, const N: usize> PartialEq<[U; N]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &[U; N]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &[U; N]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<[U; N]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A1, A2> PartialEq<Vec<U, A2>> for Vec<T, A1>
where\n A1: Allocator,\n A2: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &Vec<U, A2>) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &Vec<U, A2>) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A1, A2> PartialOrd<Vec<T, A2>> for Vec<T, A1>
where\n T: PartialOrd,\n A1: Allocator,\n A2: Allocator,

Implements comparison of vectors, lexicographically.

\n
source§

fn partial_cmp(&self, other: &Vec<T, A2>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <=\noperator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >=\noperator. Read more
","PartialOrd>","redstone::core::aggregator::Matrix"],["
source§

impl<T> Serialize for Vec<T>
where\n T: Serialize,

source§

fn serialize<S>(\n &self,\n serializer: S,\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","redstone::core::aggregator::Matrix"],["
source§

impl<T> ToBytes for Vec<T>
where\n T: ToBytes,

source§

fn to_bytes(&self) -> Result<Vec<u8>, Error>

Serializes &self to a Vec<u8>.
source§

fn into_bytes(self) -> Result<Vec<u8>, Error>

Consumes self and serializes to a Vec<u8>.
source§

fn serialized_length(&self) -> usize

Returns the length of the Vec<u8> which would be returned from a successful call to\nto_bytes() or into_bytes(). The data is not actually serialized, so this call is\nrelatively cheap.
source§

fn write_bytes(&self, writer: &mut Vec<u8>) -> Result<(), Error>

Writes &self into a mutable writer.
","ToBytes","redstone::core::aggregator::Matrix"],["
source§

impl<T> Vec<T>

1.0.0 (const: 1.39.0) · source

pub const fn new() -> Vec<T>

Constructs a new, empty Vec<T>.

\n

The vector will not allocate until elements are pushed onto it.

\n
§Examples
\n
let mut vec: Vec<i32> = Vec::new();
\n
1.0.0 · source

pub fn with_capacity(capacity: usize) -> Vec<T>

Constructs a new, empty Vec<T> with at least the specified capacity.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n

It is important to note that although the returned vector has the\nminimum capacity specified, the vector will have a zero length. For\nan explanation of the difference between length and capacity, see\nCapacity and reallocation.

\n

If it is important to know the exact allocated capacity of a Vec,\nalways use the capacity method after construction.

\n

For Vec<T> where T is a zero-sized type, there will be no allocation\nand the capacity will always be usize::MAX.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = Vec::with_capacity(10);\n\n// The vector contains no items, even though it has capacity for more\nassert_eq!(vec.len(), 0);\nassert!(vec.capacity() >= 10);\n\n// These are all done without reallocating...\nfor i in 0..10 {\n    vec.push(i);\n}\nassert_eq!(vec.len(), 10);\nassert!(vec.capacity() >= 10);\n\n// ...but this may make the vector reallocate\nvec.push(11);\nassert_eq!(vec.len(), 11);\nassert!(vec.capacity() >= 11);\n\n// A vector of a zero-sized type will always over-allocate, since no\n// allocation is necessary\nlet vec_units = Vec::<()>::with_capacity(10);\nassert_eq!(vec_units.capacity(), usize::MAX);
\n
source

pub fn try_with_capacity(capacity: usize) -> Result<Vec<T>, TryReserveError>

🔬This is a nightly-only experimental API. (try_with_capacity)

Constructs a new, empty Vec<T> with at least the specified capacity.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n
§Errors
\n

Returns an error if the capacity exceeds isize::MAX bytes,\nor if the allocator reports allocation failure.

\n
1.0.0 · source

pub unsafe fn from_raw_parts(\n ptr: *mut T,\n length: usize,\n capacity: usize,\n) -> Vec<T>

Creates a Vec<T> directly from a pointer, a length, and a capacity.

\n
§Safety
\n

This is highly unsafe, due to the number of invariants that aren’t\nchecked:

\n
    \n
  • ptr must have been allocated using the global allocator, such as via\nthe alloc::alloc function.
  • \n
  • T needs to have the same alignment as what ptr was allocated with.\n(T having a less strict alignment is not sufficient, the alignment really\nneeds to be equal to satisfy the dealloc requirement that memory must be\nallocated and deallocated with the same layout.)
  • \n
  • The size of T times the capacity (ie. the allocated size in bytes) needs\nto be the same size as the pointer was allocated with. (Because similar to\nalignment, dealloc must be called with the same layout size.)
  • \n
  • length needs to be less than or equal to capacity.
  • \n
  • The first length values must be properly initialized values of type T.
  • \n
  • capacity needs to be the capacity that the pointer was allocated with.
  • \n
  • The allocated size in bytes must be no larger than isize::MAX.\nSee the safety documentation of pointer::offset.
  • \n
\n

These requirements are always upheld by any ptr that has been allocated\nvia Vec<T>. Other allocation sources are allowed if the invariants are\nupheld.

\n

Violating these may cause problems like corrupting the allocator’s\ninternal data structures. For example it is normally not safe\nto build a Vec<u8> from a pointer to a C char array with length\nsize_t, doing so is only safe if the array was initially allocated by\na Vec or String.\nIt’s also not safe to build one from a Vec<u16> and its length, because\nthe allocator cares about the alignment, and these two types have different\nalignments. The buffer was allocated with alignment 2 (for u16), but after\nturning it into a Vec<u8> it’ll be deallocated with alignment 1. To avoid\nthese issues, it is often preferable to do casting/transmuting using\nslice::from_raw_parts instead.

\n

The ownership of ptr is effectively transferred to the\nVec<T> which may then deallocate, reallocate or change the\ncontents of memory pointed to by the pointer at will. Ensure\nthat nothing else uses the pointer after calling this\nfunction.

\n
§Examples
\n
use std::ptr;\nuse std::mem;\n\nlet v = vec![1, 2, 3];\n\n// Prevent running `v`'s destructor so we are in complete control\n// of the allocation.\nlet mut v = mem::ManuallyDrop::new(v);\n\n// Pull out the various important pieces of information about `v`\nlet p = v.as_mut_ptr();\nlet len = v.len();\nlet cap = v.capacity();\n\nunsafe {\n    // Overwrite memory with 4, 5, 6\n    for i in 0..len {\n        ptr::write(p.add(i), 4 + i);\n    }\n\n    // Put everything back together into a Vec\n    let rebuilt = Vec::from_raw_parts(p, len, cap);\n    assert_eq!(rebuilt, [4, 5, 6]);\n}
\n

Using memory that was allocated elsewhere:

\n\n
use std::alloc::{alloc, Layout};\n\nfn main() {\n    let layout = Layout::array::<u32>(16).expect(\"overflow cannot happen\");\n\n    let vec = unsafe {\n        let mem = alloc(layout).cast::<u32>();\n        if mem.is_null() {\n            return;\n        }\n\n        mem.write(1_000_000);\n\n        Vec::from_raw_parts(mem, 1, 16)\n    };\n\n    assert_eq!(vec, &[1_000_000]);\n    assert_eq!(vec.capacity(), 16);\n}
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n T: Clone,\n A: Allocator,

1.5.0 · source

pub fn resize(&mut self, new_len: usize, value: T)

Resizes the Vec in-place so that len is equal to new_len.

\n

If new_len is greater than len, the Vec is extended by the\ndifference, with each additional slot filled with value.\nIf new_len is less than len, the Vec is simply truncated.

\n

This method requires T to implement Clone,\nin order to be able to clone the passed value.\nIf you need more flexibility (or want to rely on Default instead of\nClone), use Vec::resize_with.\nIf you only need to resize to a smaller size, use Vec::truncate.

\n
§Examples
\n
let mut vec = vec![\"hello\"];\nvec.resize(3, \"world\");\nassert_eq!(vec, [\"hello\", \"world\", \"world\"]);\n\nlet mut vec = vec![1, 2, 3, 4];\nvec.resize(2, 0);\nassert_eq!(vec, [1, 2]);
\n
1.6.0 · source

pub fn extend_from_slice(&mut self, other: &[T])

Clones and appends all elements in a slice to the Vec.

\n

Iterates over the slice other, clones each element, and then appends\nit to this Vec. The other slice is traversed in-order.

\n

Note that this function is same as extend except that it is\nspecialized to work with slices instead. If and when Rust gets\nspecialization this function will likely be deprecated (but still\navailable).

\n
§Examples
\n
let mut vec = vec![1];\nvec.extend_from_slice(&[2, 3, 4]);\nassert_eq!(vec, [1, 2, 3, 4]);
\n
1.53.0 · source

pub fn extend_from_within<R>(&mut self, src: R)
where\n R: RangeBounds<usize>,

Copies elements from src range to the end of the vector.

\n
§Panics
\n

Panics if the starting point is greater than the end point or if\nthe end point is greater than the length of the vector.

\n
§Examples
\n
let mut vec = vec![0, 1, 2, 3, 4];\n\nvec.extend_from_within(2..);\nassert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4]);\n\nvec.extend_from_within(..2);\nassert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4, 0, 1]);\n\nvec.extend_from_within(4..8);\nassert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4, 0, 1, 4, 2, 3, 4]);
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n T: PartialEq,\n A: Allocator,

1.0.0 · source

pub fn dedup(&mut self)

Removes consecutive repeated elements in the vector according to the\nPartialEq trait implementation.

\n

If the vector is sorted, this removes all duplicates.

\n
§Examples
\n
let mut vec = vec![1, 2, 2, 3, 2];\n\nvec.dedup();\n\nassert_eq!(vec, [1, 2, 3, 2]);
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n A: Allocator,

1.21.0 · source

pub fn splice<R, I>(\n &mut self,\n range: R,\n replace_with: I,\n) -> Splice<'_, <I as IntoIterator>::IntoIter, A>
where\n R: RangeBounds<usize>,\n I: IntoIterator<Item = T>,

Creates a splicing iterator that replaces the specified range in the vector\nwith the given replace_with iterator and yields the removed items.\nreplace_with does not need to be the same length as range.

\n

range is removed even if the iterator is not consumed until the end.

\n

It is unspecified how many elements are removed from the vector\nif the Splice value is leaked.

\n

The input iterator replace_with is only consumed when the Splice value is dropped.

\n

This is optimal if:

\n
    \n
  • The tail (elements in the vector after range) is empty,
  • \n
  • or replace_with yields fewer or equal elements than range’s length
  • \n
  • or the lower bound of its size_hint() is exact.
  • \n
\n

Otherwise, a temporary vector is allocated and the tail is moved twice.

\n
§Panics
\n

Panics if the starting point is greater than the end point or if\nthe end point is greater than the length of the vector.

\n
§Examples
\n
let mut v = vec![1, 2, 3, 4];\nlet new = [7, 8, 9];\nlet u: Vec<_> = v.splice(1..3, new).collect();\nassert_eq!(v, &[1, 7, 8, 9, 4]);\nassert_eq!(u, &[2, 3]);
\n
source

pub fn extract_if<F>(&mut self, filter: F) -> ExtractIf<'_, T, F, A>
where\n F: FnMut(&mut T) -> bool,

🔬This is a nightly-only experimental API. (extract_if)

Creates an iterator which uses a closure to determine if an element should be removed.

\n

If the closure returns true, then the element is removed and yielded.\nIf the closure returns false, the element will remain in the vector and will not be yielded\nby the iterator.

\n

If the returned ExtractIf is not exhausted, e.g. because it is dropped without iterating\nor the iteration short-circuits, then the remaining elements will be retained.\nUse retain with a negated predicate if you do not need the returned iterator.

\n

Using this method is equivalent to the following code:

\n\n
let mut i = 0;\nwhile i < vec.len() {\n    if some_predicate(&mut vec[i]) {\n        let val = vec.remove(i);\n        // your code here\n    } else {\n        i += 1;\n    }\n}\n
\n

But extract_if is easier to use. extract_if is also more efficient,\nbecause it can backshift the elements of the array in bulk.

\n

Note that extract_if also lets you mutate every element in the filter closure,\nregardless of whether you choose to keep or remove it.

\n
§Examples
\n

Splitting an array into evens and odds, reusing the original allocation:

\n\n
#![feature(extract_if)]\nlet mut numbers = vec![1, 2, 3, 4, 5, 6, 8, 9, 11, 13, 14, 15];\n\nlet evens = numbers.extract_if(|x| *x % 2 == 0).collect::<Vec<_>>();\nlet odds = numbers;\n\nassert_eq!(evens, vec![2, 4, 6, 8, 14]);\nassert_eq!(odds, vec![1, 3, 5, 9, 11, 13, 15]);
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n A: Allocator,

source

pub const fn new_in(alloc: A) -> Vec<T, A>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new, empty Vec<T, A>.

\n

The vector will not allocate until elements are pushed onto it.

\n
§Examples
\n
#![feature(allocator_api)]\n\nuse std::alloc::System;\n\nlet mut vec: Vec<i32, _> = Vec::new_in(System);
\n
source

pub fn with_capacity_in(capacity: usize, alloc: A) -> Vec<T, A>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new, empty Vec<T, A> with at least the specified capacity\nwith the provided allocator.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n

It is important to note that although the returned vector has the\nminimum capacity specified, the vector will have a zero length. For\nan explanation of the difference between length and capacity, see\nCapacity and reallocation.

\n

If it is important to know the exact allocated capacity of a Vec,\nalways use the capacity method after construction.

\n

For Vec<T, A> where T is a zero-sized type, there will be no allocation\nand the capacity will always be usize::MAX.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
#![feature(allocator_api)]\n\nuse std::alloc::System;\n\nlet mut vec = Vec::with_capacity_in(10, System);\n\n// The vector contains no items, even though it has capacity for more\nassert_eq!(vec.len(), 0);\nassert!(vec.capacity() >= 10);\n\n// These are all done without reallocating...\nfor i in 0..10 {\n    vec.push(i);\n}\nassert_eq!(vec.len(), 10);\nassert!(vec.capacity() >= 10);\n\n// ...but this may make the vector reallocate\nvec.push(11);\nassert_eq!(vec.len(), 11);\nassert!(vec.capacity() >= 11);\n\n// A vector of a zero-sized type will always over-allocate, since no\n// allocation is necessary\nlet vec_units = Vec::<(), System>::with_capacity_in(10, System);\nassert_eq!(vec_units.capacity(), usize::MAX);
\n
source

pub fn try_with_capacity_in(\n capacity: usize,\n alloc: A,\n) -> Result<Vec<T, A>, TryReserveError>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new, empty Vec<T, A> with at least the specified capacity\nwith the provided allocator.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n
§Errors
\n

Returns an error if the capacity exceeds isize::MAX bytes,\nor if the allocator reports allocation failure.

\n
source

pub unsafe fn from_raw_parts_in(\n ptr: *mut T,\n length: usize,\n capacity: usize,\n alloc: A,\n) -> Vec<T, A>

🔬This is a nightly-only experimental API. (allocator_api)

Creates a Vec<T, A> directly from a pointer, a length, a capacity,\nand an allocator.

\n
§Safety
\n

This is highly unsafe, due to the number of invariants that aren’t\nchecked:

\n
    \n
  • ptr must be currently allocated via the given allocator alloc.
  • \n
  • T needs to have the same alignment as what ptr was allocated with.\n(T having a less strict alignment is not sufficient, the alignment really\nneeds to be equal to satisfy the dealloc requirement that memory must be\nallocated and deallocated with the same layout.)
  • \n
  • The size of T times the capacity (ie. the allocated size in bytes) needs\nto be the same size as the pointer was allocated with. (Because similar to\nalignment, dealloc must be called with the same layout size.)
  • \n
  • length needs to be less than or equal to capacity.
  • \n
  • The first length values must be properly initialized values of type T.
  • \n
  • capacity needs to fit the layout size that the pointer was allocated with.
  • \n
  • The allocated size in bytes must be no larger than isize::MAX.\nSee the safety documentation of pointer::offset.
  • \n
\n

These requirements are always upheld by any ptr that has been allocated\nvia Vec<T, A>. Other allocation sources are allowed if the invariants are\nupheld.

\n

Violating these may cause problems like corrupting the allocator’s\ninternal data structures. For example it is not safe\nto build a Vec<u8> from a pointer to a C char array with length size_t.\nIt’s also not safe to build one from a Vec<u16> and its length, because\nthe allocator cares about the alignment, and these two types have different\nalignments. The buffer was allocated with alignment 2 (for u16), but after\nturning it into a Vec<u8> it’ll be deallocated with alignment 1.

\n

The ownership of ptr is effectively transferred to the\nVec<T> which may then deallocate, reallocate or change the\ncontents of memory pointed to by the pointer at will. Ensure\nthat nothing else uses the pointer after calling this\nfunction.

\n
§Examples
\n
#![feature(allocator_api)]\n\nuse std::alloc::System;\n\nuse std::ptr;\nuse std::mem;\n\nlet mut v = Vec::with_capacity_in(3, System);\nv.push(1);\nv.push(2);\nv.push(3);\n\n// Prevent running `v`'s destructor so we are in complete control\n// of the allocation.\nlet mut v = mem::ManuallyDrop::new(v);\n\n// Pull out the various important pieces of information about `v`\nlet p = v.as_mut_ptr();\nlet len = v.len();\nlet cap = v.capacity();\nlet alloc = v.allocator();\n\nunsafe {\n    // Overwrite memory with 4, 5, 6\n    for i in 0..len {\n        ptr::write(p.add(i), 4 + i);\n    }\n\n    // Put everything back together into a Vec\n    let rebuilt = Vec::from_raw_parts_in(p, len, cap, alloc.clone());\n    assert_eq!(rebuilt, [4, 5, 6]);\n}
\n

Using memory that was allocated elsewhere:

\n\n
#![feature(allocator_api)]\n\nuse std::alloc::{AllocError, Allocator, Global, Layout};\n\nfn main() {\n    let layout = Layout::array::<u32>(16).expect(\"overflow cannot happen\");\n\n    let vec = unsafe {\n        let mem = match Global.allocate(layout) {\n            Ok(mem) => mem.cast::<u32>().as_ptr(),\n            Err(AllocError) => return,\n        };\n\n        mem.write(1_000_000);\n\n        Vec::from_raw_parts_in(mem, 1, 16, Global)\n    };\n\n    assert_eq!(vec, &[1_000_000]);\n    assert_eq!(vec.capacity(), 16);\n}
\n
source

pub fn into_raw_parts(self) -> (*mut T, usize, usize)

🔬This is a nightly-only experimental API. (vec_into_raw_parts)

Decomposes a Vec<T> into its raw components: (pointer, length, capacity).

\n

Returns the raw pointer to the underlying data, the length of\nthe vector (in elements), and the allocated capacity of the\ndata (in elements). These are the same arguments in the same\norder as the arguments to from_raw_parts.

\n

After calling this function, the caller is responsible for the\nmemory previously managed by the Vec. The only way to do\nthis is to convert the raw pointer, length, and capacity back\ninto a Vec with the from_raw_parts function, allowing\nthe destructor to perform the cleanup.

\n
§Examples
\n
#![feature(vec_into_raw_parts)]\nlet v: Vec<i32> = vec![-1, 0, 1];\n\nlet (ptr, len, cap) = v.into_raw_parts();\n\nlet rebuilt = unsafe {\n    // We can now make changes to the components, such as\n    // transmuting the raw pointer to a compatible type.\n    let ptr = ptr as *mut u32;\n\n    Vec::from_raw_parts(ptr, len, cap)\n};\nassert_eq!(rebuilt, [4294967295, 0, 1]);
\n
source

pub fn into_raw_parts_with_alloc(self) -> (*mut T, usize, usize, A)

🔬This is a nightly-only experimental API. (allocator_api)

Decomposes a Vec<T> into its raw components: (pointer, length, capacity, allocator).

\n

Returns the raw pointer to the underlying data, the length of the vector (in elements),\nthe allocated capacity of the data (in elements), and the allocator. These are the same\narguments in the same order as the arguments to from_raw_parts_in.

\n

After calling this function, the caller is responsible for the\nmemory previously managed by the Vec. The only way to do\nthis is to convert the raw pointer, length, and capacity back\ninto a Vec with the from_raw_parts_in function, allowing\nthe destructor to perform the cleanup.

\n
§Examples
\n
#![feature(allocator_api, vec_into_raw_parts)]\n\nuse std::alloc::System;\n\nlet mut v: Vec<i32, System> = Vec::new_in(System);\nv.push(-1);\nv.push(0);\nv.push(1);\n\nlet (ptr, len, cap, alloc) = v.into_raw_parts_with_alloc();\n\nlet rebuilt = unsafe {\n    // We can now make changes to the components, such as\n    // transmuting the raw pointer to a compatible type.\n    let ptr = ptr as *mut u32;\n\n    Vec::from_raw_parts_in(ptr, len, cap, alloc)\n};\nassert_eq!(rebuilt, [4294967295, 0, 1]);
\n
1.0.0 · source

pub fn capacity(&self) -> usize

Returns the total number of elements the vector can hold without\nreallocating.

\n
§Examples
\n
let mut vec: Vec<i32> = Vec::with_capacity(10);\nvec.push(42);\nassert!(vec.capacity() >= 10);
\n
1.0.0 · source

pub fn reserve(&mut self, additional: usize)

Reserves capacity for at least additional more elements to be inserted\nin the given Vec<T>. The collection may reserve more space to\nspeculatively avoid frequent reallocations. After calling reserve,\ncapacity will be greater than or equal to self.len() + additional.\nDoes nothing if capacity is already sufficient.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1];\nvec.reserve(10);\nassert!(vec.capacity() >= 11);
\n
1.0.0 · source

pub fn reserve_exact(&mut self, additional: usize)

Reserves the minimum capacity for at least additional more elements to\nbe inserted in the given Vec<T>. Unlike reserve, this will not\ndeliberately over-allocate to speculatively avoid frequent allocations.\nAfter calling reserve_exact, capacity will be greater than or equal to\nself.len() + additional. Does nothing if the capacity is already\nsufficient.

\n

Note that the allocator may give the collection more space than it\nrequests. Therefore, capacity can not be relied upon to be precisely\nminimal. Prefer reserve if future insertions are expected.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1];\nvec.reserve_exact(10);\nassert!(vec.capacity() >= 11);
\n
1.57.0 · source

pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>

Tries to reserve capacity for at least additional more elements to be inserted\nin the given Vec<T>. The collection may reserve more space to speculatively avoid\nfrequent reallocations. After calling try_reserve, capacity will be\ngreater than or equal to self.len() + additional if it returns\nOk(()). Does nothing if capacity is already sufficient. This method\npreserves the contents even if an error occurs.

\n
§Errors
\n

If the capacity overflows, or the allocator reports a failure, then an error\nis returned.

\n
§Examples
\n
use std::collections::TryReserveError;\n\nfn process_data(data: &[u32]) -> Result<Vec<u32>, TryReserveError> {\n    let mut output = Vec::new();\n\n    // Pre-reserve the memory, exiting if we can't\n    output.try_reserve(data.len())?;\n\n    // Now we know this can't OOM in the middle of our complex work\n    output.extend(data.iter().map(|&val| {\n        val * 2 + 5 // very complicated\n    }));\n\n    Ok(output)\n}
\n
1.57.0 · source

pub fn try_reserve_exact(\n &mut self,\n additional: usize,\n) -> Result<(), TryReserveError>

Tries to reserve the minimum capacity for at least additional\nelements to be inserted in the given Vec<T>. Unlike try_reserve,\nthis will not deliberately over-allocate to speculatively avoid frequent\nallocations. After calling try_reserve_exact, capacity will be greater\nthan or equal to self.len() + additional if it returns Ok(()).\nDoes nothing if the capacity is already sufficient.

\n

Note that the allocator may give the collection more space than it\nrequests. Therefore, capacity can not be relied upon to be precisely\nminimal. Prefer try_reserve if future insertions are expected.

\n
§Errors
\n

If the capacity overflows, or the allocator reports a failure, then an error\nis returned.

\n
§Examples
\n
use std::collections::TryReserveError;\n\nfn process_data(data: &[u32]) -> Result<Vec<u32>, TryReserveError> {\n    let mut output = Vec::new();\n\n    // Pre-reserve the memory, exiting if we can't\n    output.try_reserve_exact(data.len())?;\n\n    // Now we know this can't OOM in the middle of our complex work\n    output.extend(data.iter().map(|&val| {\n        val * 2 + 5 // very complicated\n    }));\n\n    Ok(output)\n}
\n
1.0.0 · source

pub fn shrink_to_fit(&mut self)

Shrinks the capacity of the vector as much as possible.

\n

The behavior of this method depends on the allocator, which may either shrink the vector\nin-place or reallocate. The resulting vector might still have some excess capacity, just as\nis the case for with_capacity. See Allocator::shrink for more details.

\n
§Examples
\n
let mut vec = Vec::with_capacity(10);\nvec.extend([1, 2, 3]);\nassert!(vec.capacity() >= 10);\nvec.shrink_to_fit();\nassert!(vec.capacity() >= 3);
\n
1.56.0 · source

pub fn shrink_to(&mut self, min_capacity: usize)

Shrinks the capacity of the vector with a lower bound.

\n

The capacity will remain at least as large as both the length\nand the supplied value.

\n

If the current capacity is less than the lower limit, this is a no-op.

\n
§Examples
\n
let mut vec = Vec::with_capacity(10);\nvec.extend([1, 2, 3]);\nassert!(vec.capacity() >= 10);\nvec.shrink_to(4);\nassert!(vec.capacity() >= 4);\nvec.shrink_to(0);\nassert!(vec.capacity() >= 3);
\n
1.0.0 · source

pub fn into_boxed_slice(self) -> Box<[T], A>

Converts the vector into Box<[T]>.

\n

Before doing the conversion, this method discards excess capacity like shrink_to_fit.

\n
§Examples
\n
let v = vec![1, 2, 3];\n\nlet slice = v.into_boxed_slice();
\n

Any excess capacity is removed:

\n\n
let mut vec = Vec::with_capacity(10);\nvec.extend([1, 2, 3]);\n\nassert!(vec.capacity() >= 10);\nlet slice = vec.into_boxed_slice();\nassert_eq!(slice.into_vec().capacity(), 3);
\n
1.0.0 · source

pub fn truncate(&mut self, len: usize)

Shortens the vector, keeping the first len elements and dropping\nthe rest.

\n

If len is greater or equal to the vector’s current length, this has\nno effect.

\n

The drain method can emulate truncate, but causes the excess\nelements to be returned instead of dropped.

\n

Note that this method has no effect on the allocated capacity\nof the vector.

\n
§Examples
\n

Truncating a five element vector to two elements:

\n\n
let mut vec = vec![1, 2, 3, 4, 5];\nvec.truncate(2);\nassert_eq!(vec, [1, 2]);
\n

No truncation occurs when len is greater than the vector’s current\nlength:

\n\n
let mut vec = vec![1, 2, 3];\nvec.truncate(8);\nassert_eq!(vec, [1, 2, 3]);
\n

Truncating when len == 0 is equivalent to calling the clear\nmethod.

\n\n
let mut vec = vec![1, 2, 3];\nvec.truncate(0);\nassert_eq!(vec, []);
\n
1.7.0 · source

pub fn as_slice(&self) -> &[T]

Extracts a slice containing the entire vector.

\n

Equivalent to &s[..].

\n
§Examples
\n
use std::io::{self, Write};\nlet buffer = vec![1, 2, 3, 5, 8];\nio::sink().write(buffer.as_slice()).unwrap();
\n
1.7.0 · source

pub fn as_mut_slice(&mut self) -> &mut [T]

Extracts a mutable slice of the entire vector.

\n

Equivalent to &mut s[..].

\n
§Examples
\n
use std::io::{self, Read};\nlet mut buffer = vec![0; 3];\nio::repeat(0b101).read_exact(buffer.as_mut_slice()).unwrap();
\n
1.37.0 · source

pub fn as_ptr(&self) -> *const T

Returns a raw pointer to the vector’s buffer, or a dangling raw pointer\nvalid for zero sized reads if the vector didn’t allocate.

\n

The caller must ensure that the vector outlives the pointer this\nfunction returns, or else it will end up pointing to garbage.\nModifying the vector may cause its buffer to be reallocated,\nwhich would also make any pointers to it invalid.

\n

The caller must also ensure that the memory the pointer (non-transitively) points to\nis never written to (except inside an UnsafeCell) using this pointer or any pointer\nderived from it. If you need to mutate the contents of the slice, use as_mut_ptr.

\n

This method guarantees that for the purpose of the aliasing model, this method\ndoes not materialize a reference to the underlying slice, and thus the returned pointer\nwill remain valid when mixed with other calls to as_ptr and as_mut_ptr.\nNote that calling other methods that materialize mutable references to the slice,\nor mutable references to specific elements you are planning on accessing through this pointer,\nas well as writing to those elements, may still invalidate this pointer.\nSee the second example below for how this guarantee can be used.

\n
§Examples
\n
let x = vec![1, 2, 4];\nlet x_ptr = x.as_ptr();\n\nunsafe {\n    for i in 0..x.len() {\n        assert_eq!(*x_ptr.add(i), 1 << i);\n    }\n}
\n

Due to the aliasing guarantee, the following code is legal:

\n\n
unsafe {\n    let mut v = vec![0, 1, 2];\n    let ptr1 = v.as_ptr();\n    let _ = ptr1.read();\n    let ptr2 = v.as_mut_ptr().offset(2);\n    ptr2.write(2);\n    // Notably, the write to `ptr2` did *not* invalidate `ptr1`\n    // because it mutated a different element:\n    let _ = ptr1.read();\n}
\n
1.37.0 · source

pub fn as_mut_ptr(&mut self) -> *mut T

Returns an unsafe mutable pointer to the vector’s buffer, or a dangling\nraw pointer valid for zero sized reads if the vector didn’t allocate.

\n

The caller must ensure that the vector outlives the pointer this\nfunction returns, or else it will end up pointing to garbage.\nModifying the vector may cause its buffer to be reallocated,\nwhich would also make any pointers to it invalid.

\n

This method guarantees that for the purpose of the aliasing model, this method\ndoes not materialize a reference to the underlying slice, and thus the returned pointer\nwill remain valid when mixed with other calls to as_ptr and as_mut_ptr.\nNote that calling other methods that materialize references to the slice,\nor references to specific elements you are planning on accessing through this pointer,\nmay still invalidate this pointer.\nSee the second example below for how this guarantee can be used.

\n
§Examples
\n
// Allocate vector big enough for 4 elements.\nlet size = 4;\nlet mut x: Vec<i32> = Vec::with_capacity(size);\nlet x_ptr = x.as_mut_ptr();\n\n// Initialize elements via raw pointer writes, then set length.\nunsafe {\n    for i in 0..size {\n        *x_ptr.add(i) = i as i32;\n    }\n    x.set_len(size);\n}\nassert_eq!(&*x, &[0, 1, 2, 3]);
\n

Due to the aliasing guarantee, the following code is legal:

\n\n
unsafe {\n    let mut v = vec![0];\n    let ptr1 = v.as_mut_ptr();\n    ptr1.write(1);\n    let ptr2 = v.as_mut_ptr();\n    ptr2.write(2);\n    // Notably, the write to `ptr2` did *not* invalidate `ptr1`:\n    ptr1.write(3);\n}
\n
source

pub fn allocator(&self) -> &A

🔬This is a nightly-only experimental API. (allocator_api)

Returns a reference to the underlying allocator.

\n
1.0.0 · source

pub unsafe fn set_len(&mut self, new_len: usize)

Forces the length of the vector to new_len.

\n

This is a low-level operation that maintains none of the normal\ninvariants of the type. Normally changing the length of a vector\nis done using one of the safe operations instead, such as\ntruncate, resize, extend, or clear.

\n
§Safety
\n
    \n
  • new_len must be less than or equal to capacity().
  • \n
  • The elements at old_len..new_len must be initialized.
  • \n
\n
§Examples
\n

This method can be useful for situations in which the vector\nis serving as a buffer for other code, particularly over FFI:

\n\n
pub fn get_dictionary(&self) -> Option<Vec<u8>> {\n    // Per the FFI method's docs, \"32768 bytes is always enough\".\n    let mut dict = Vec::with_capacity(32_768);\n    let mut dict_length = 0;\n    // SAFETY: When `deflateGetDictionary` returns `Z_OK`, it holds that:\n    // 1. `dict_length` elements were initialized.\n    // 2. `dict_length` <= the capacity (32_768)\n    // which makes `set_len` safe to call.\n    unsafe {\n        // Make the FFI call...\n        let r = deflateGetDictionary(self.strm, dict.as_mut_ptr(), &mut dict_length);\n        if r == Z_OK {\n            // ...and update the length to what was initialized.\n            dict.set_len(dict_length);\n            Some(dict)\n        } else {\n            None\n        }\n    }\n}
\n

While the following example is sound, there is a memory leak since\nthe inner vectors were not freed prior to the set_len call:

\n\n
let mut vec = vec![vec![1, 0, 0],\n                   vec![0, 1, 0],\n                   vec![0, 0, 1]];\n// SAFETY:\n// 1. `old_len..0` is empty so no elements need to be initialized.\n// 2. `0 <= capacity` always holds whatever `capacity` is.\nunsafe {\n    vec.set_len(0);\n}
\n

Normally, here, one would use clear instead to correctly drop\nthe contents and thus not leak memory.

\n
1.0.0 · source

pub fn swap_remove(&mut self, index: usize) -> T

Removes an element from the vector and returns it.

\n

The removed element is replaced by the last element of the vector.

\n

This does not preserve ordering of the remaining elements, but is O(1).\nIf you need to preserve the element order, use remove instead.

\n
§Panics
\n

Panics if index is out of bounds.

\n
§Examples
\n
let mut v = vec![\"foo\", \"bar\", \"baz\", \"qux\"];\n\nassert_eq!(v.swap_remove(1), \"bar\");\nassert_eq!(v, [\"foo\", \"qux\", \"baz\"]);\n\nassert_eq!(v.swap_remove(0), \"foo\");\nassert_eq!(v, [\"baz\", \"qux\"]);
\n
1.0.0 · source

pub fn insert(&mut self, index: usize, element: T)

Inserts an element at position index within the vector, shifting all\nelements after it to the right.

\n
§Panics
\n

Panics if index > len.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nvec.insert(1, 4);\nassert_eq!(vec, [1, 4, 2, 3]);\nvec.insert(4, 5);\nassert_eq!(vec, [1, 4, 2, 3, 5]);
\n
§Time complexity
\n

Takes O(Vec::len) time. All items after the insertion index must be\nshifted to the right. In the worst case, all elements are shifted when\nthe insertion index is 0.

\n
1.0.0 · source

pub fn remove(&mut self, index: usize) -> T

Removes and returns the element at position index within the vector,\nshifting all elements after it to the left.

\n

Note: Because this shifts over the remaining elements, it has a\nworst-case performance of O(n). If you don’t need the order of elements\nto be preserved, use swap_remove instead. If you’d like to remove\nelements from the beginning of the Vec, consider using\nVecDeque::pop_front instead.

\n
§Panics
\n

Panics if index is out of bounds.

\n
§Examples
\n
let mut v = vec![1, 2, 3];\nassert_eq!(v.remove(1), 2);\nassert_eq!(v, [1, 3]);
\n
1.0.0 · source

pub fn retain<F>(&mut self, f: F)
where\n F: FnMut(&T) -> bool,

Retains only the elements specified by the predicate.

\n

In other words, remove all elements e for which f(&e) returns false.\nThis method operates in place, visiting each element exactly once in the\noriginal order, and preserves the order of the retained elements.

\n
§Examples
\n
let mut vec = vec![1, 2, 3, 4];\nvec.retain(|&x| x % 2 == 0);\nassert_eq!(vec, [2, 4]);
\n

Because the elements are visited exactly once in the original order,\nexternal state may be used to decide which elements to keep.

\n\n
let mut vec = vec![1, 2, 3, 4, 5];\nlet keep = [false, true, true, false, true];\nlet mut iter = keep.iter();\nvec.retain(|_| *iter.next().unwrap());\nassert_eq!(vec, [2, 3, 5]);
\n
1.61.0 · source

pub fn retain_mut<F>(&mut self, f: F)
where\n F: FnMut(&mut T) -> bool,

Retains only the elements specified by the predicate, passing a mutable reference to it.

\n

In other words, remove all elements e such that f(&mut e) returns false.\nThis method operates in place, visiting each element exactly once in the\noriginal order, and preserves the order of the retained elements.

\n
§Examples
\n
let mut vec = vec![1, 2, 3, 4];\nvec.retain_mut(|x| if *x <= 3 {\n    *x += 1;\n    true\n} else {\n    false\n});\nassert_eq!(vec, [2, 3, 4]);
\n
1.16.0 · source

pub fn dedup_by_key<F, K>(&mut self, key: F)
where\n F: FnMut(&mut T) -> K,\n K: PartialEq,

Removes all but the first of consecutive elements in the vector that resolve to the same\nkey.

\n

If the vector is sorted, this removes all duplicates.

\n
§Examples
\n
let mut vec = vec![10, 20, 21, 30, 20];\n\nvec.dedup_by_key(|i| *i / 10);\n\nassert_eq!(vec, [10, 20, 30, 20]);
\n
1.16.0 · source

pub fn dedup_by<F>(&mut self, same_bucket: F)
where\n F: FnMut(&mut T, &mut T) -> bool,

Removes all but the first of consecutive elements in the vector satisfying a given equality\nrelation.

\n

The same_bucket function is passed references to two elements from the vector and\nmust determine if the elements compare equal. The elements are passed in opposite order\nfrom their order in the slice, so if same_bucket(a, b) returns true, a is removed.

\n

If the vector is sorted, this removes all duplicates.

\n
§Examples
\n
let mut vec = vec![\"foo\", \"bar\", \"Bar\", \"baz\", \"bar\"];\n\nvec.dedup_by(|a, b| a.eq_ignore_ascii_case(b));\n\nassert_eq!(vec, [\"foo\", \"bar\", \"baz\", \"bar\"]);
\n
1.0.0 · source

pub fn push(&mut self, value: T)

Appends an element to the back of a collection.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1, 2];\nvec.push(3);\nassert_eq!(vec, [1, 2, 3]);
\n
§Time complexity
\n

Takes amortized O(1) time. If the vector’s length would exceed its\ncapacity after the push, O(capacity) time is taken to copy the\nvector’s elements to a larger allocation. This expensive operation is\noffset by the capacity O(1) insertions it allows.

\n
source

pub fn push_within_capacity(&mut self, value: T) -> Result<(), T>

🔬This is a nightly-only experimental API. (vec_push_within_capacity)

Appends an element if there is sufficient spare capacity, otherwise an error is returned\nwith the element.

\n

Unlike push this method will not reallocate when there’s insufficient capacity.\nThe caller should use reserve or try_reserve to ensure that there is enough capacity.

\n
§Examples
\n

A manual, panic-free alternative to FromIterator:

\n\n
#![feature(vec_push_within_capacity)]\n\nuse std::collections::TryReserveError;\nfn from_iter_fallible<T>(iter: impl Iterator<Item=T>) -> Result<Vec<T>, TryReserveError> {\n    let mut vec = Vec::new();\n    for value in iter {\n        if let Err(value) = vec.push_within_capacity(value) {\n            vec.try_reserve(1)?;\n            // this cannot fail, the previous line either returned or added at least 1 free slot\n            let _ = vec.push_within_capacity(value);\n        }\n    }\n    Ok(vec)\n}\nassert_eq!(from_iter_fallible(0..100), Ok(Vec::from_iter(0..100)));
\n
§Time complexity
\n

Takes O(1) time.

\n
1.0.0 · source

pub fn pop(&mut self) -> Option<T>

Removes the last element from a vector and returns it, or None if it\nis empty.

\n

If you’d like to pop the first element, consider using\nVecDeque::pop_front instead.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nassert_eq!(vec.pop(), Some(3));\nassert_eq!(vec, [1, 2]);
\n
§Time complexity
\n

Takes O(1) time.

\n
source

pub fn pop_if<F>(&mut self, f: F) -> Option<T>
where\n F: FnOnce(&mut T) -> bool,

🔬This is a nightly-only experimental API. (vec_pop_if)

Removes and returns the last element in a vector if the predicate\nreturns true, or None if the predicate returns false or the vector\nis empty.

\n
§Examples
\n
#![feature(vec_pop_if)]\n\nlet mut vec = vec![1, 2, 3, 4];\nlet pred = |x: &mut i32| *x % 2 == 0;\n\nassert_eq!(vec.pop_if(pred), Some(4));\nassert_eq!(vec, [1, 2, 3]);\nassert_eq!(vec.pop_if(pred), None);
\n
1.4.0 · source

pub fn append(&mut self, other: &mut Vec<T, A>)

Moves all the elements of other into self, leaving other empty.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nlet mut vec2 = vec![4, 5, 6];\nvec.append(&mut vec2);\nassert_eq!(vec, [1, 2, 3, 4, 5, 6]);\nassert_eq!(vec2, []);
\n
1.6.0 · source

pub fn drain<R>(&mut self, range: R) -> Drain<'_, T, A>
where\n R: RangeBounds<usize>,

Removes the specified range from the vector in bulk, returning all\nremoved elements as an iterator. If the iterator is dropped before\nbeing fully consumed, it drops the remaining removed elements.

\n

The returned iterator keeps a mutable borrow on the vector to optimize\nits implementation.

\n
§Panics
\n

Panics if the starting point is greater than the end point or if\nthe end point is greater than the length of the vector.

\n
§Leaking
\n

If the returned iterator goes out of scope without being dropped (due to\nmem::forget, for example), the vector may have lost and leaked\nelements arbitrarily, including elements outside the range.

\n
§Examples
\n
let mut v = vec![1, 2, 3];\nlet u: Vec<_> = v.drain(1..).collect();\nassert_eq!(v, &[1]);\nassert_eq!(u, &[2, 3]);\n\n// A full range clears the vector, like `clear()` does\nv.drain(..);\nassert_eq!(v, &[]);
\n
1.0.0 · source

pub fn clear(&mut self)

Clears the vector, removing all values.

\n

Note that this method has no effect on the allocated capacity\nof the vector.

\n
§Examples
\n
let mut v = vec![1, 2, 3];\n\nv.clear();\n\nassert!(v.is_empty());
\n
1.0.0 · source

pub fn len(&self) -> usize

Returns the number of elements in the vector, also referred to\nas its ‘length’.

\n
§Examples
\n
let a = vec![1, 2, 3];\nassert_eq!(a.len(), 3);
\n
1.0.0 · source

pub fn is_empty(&self) -> bool

Returns true if the vector contains no elements.

\n
§Examples
\n
let mut v = Vec::new();\nassert!(v.is_empty());\n\nv.push(1);\nassert!(!v.is_empty());
\n
1.4.0 · source

pub fn split_off(&mut self, at: usize) -> Vec<T, A>
where\n A: Clone,

Splits the collection into two at the given index.

\n

Returns a newly allocated vector containing the elements in the range\n[at, len). After the call, the original vector will be left containing\nthe elements [0, at) with its previous capacity unchanged.

\n
    \n
  • If you want to take ownership of the entire contents and capacity of\nthe vector, see mem::take or mem::replace.
  • \n
  • If you don’t need the returned vector at all, see Vec::truncate.
  • \n
  • If you want to take ownership of an arbitrary subslice, or you don’t\nnecessarily want to store the removed items in a vector, see Vec::drain.
  • \n
\n
§Panics
\n

Panics if at > len.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nlet vec2 = vec.split_off(1);\nassert_eq!(vec, [1]);\nassert_eq!(vec2, [2, 3]);
\n
1.33.0 · source

pub fn resize_with<F>(&mut self, new_len: usize, f: F)
where\n F: FnMut() -> T,

Resizes the Vec in-place so that len is equal to new_len.

\n

If new_len is greater than len, the Vec is extended by the\ndifference, with each additional slot filled with the result of\ncalling the closure f. The return values from f will end up\nin the Vec in the order they have been generated.

\n

If new_len is less than len, the Vec is simply truncated.

\n

This method uses a closure to create new values on every push. If\nyou’d rather Clone a given value, use Vec::resize. If you\nwant to use the Default trait to generate values, you can\npass Default::default as the second argument.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nvec.resize_with(5, Default::default);\nassert_eq!(vec, [1, 2, 3, 0, 0]);\n\nlet mut vec = vec![];\nlet mut p = 1;\nvec.resize_with(4, || { p *= 2; p });\nassert_eq!(vec, [2, 4, 8, 16]);
\n
1.47.0 · source

pub fn leak<'a>(self) -> &'a mut [T]
where\n A: 'a,

Consumes and leaks the Vec, returning a mutable reference to the contents,\n&'a mut [T]. Note that the type T must outlive the chosen lifetime\n'a. If the type has only static references, or none at all, then this\nmay be chosen to be 'static.

\n

As of Rust 1.57, this method does not reallocate or shrink the Vec,\nso the leaked allocation may include unused capacity that is not part\nof the returned slice.

\n

This function is mainly useful for data that lives for the remainder of\nthe program’s life. Dropping the returned reference will cause a memory\nleak.

\n
§Examples
\n

Simple usage:

\n\n
let x = vec![1, 2, 3];\nlet static_ref: &'static mut [usize] = x.leak();\nstatic_ref[0] += 1;\nassert_eq!(static_ref, &[2, 2, 3]);
\n
1.60.0 · source

pub fn spare_capacity_mut(&mut self) -> &mut [MaybeUninit<T>]

Returns the remaining spare capacity of the vector as a slice of\nMaybeUninit<T>.

\n

The returned slice can be used to fill the vector with data (e.g. by\nreading from a file) before marking the data as initialized using the\nset_len method.

\n
§Examples
\n
// Allocate vector big enough for 10 elements.\nlet mut v = Vec::with_capacity(10);\n\n// Fill in the first 3 elements.\nlet uninit = v.spare_capacity_mut();\nuninit[0].write(0);\nuninit[1].write(1);\nuninit[2].write(2);\n\n// Mark the first 3 elements of the vector as being initialized.\nunsafe {\n    v.set_len(3);\n}\n\nassert_eq!(&v, &[0, 1, 2]);
\n
source

pub fn split_at_spare_mut(&mut self) -> (&mut [T], &mut [MaybeUninit<T>])

🔬This is a nightly-only experimental API. (vec_split_at_spare)

Returns vector content as a slice of T, along with the remaining spare\ncapacity of the vector as a slice of MaybeUninit<T>.

\n

The returned spare capacity slice can be used to fill the vector with data\n(e.g. by reading from a file) before marking the data as initialized using\nthe set_len method.

\n

Note that this is a low-level API, which should be used with care for\noptimization purposes. If you need to append data to a Vec\nyou can use push, extend, extend_from_slice,\nextend_from_within, insert, append, resize or\nresize_with, depending on your exact needs.

\n
§Examples
\n
#![feature(vec_split_at_spare)]\n\nlet mut v = vec![1, 1, 2];\n\n// Reserve additional space big enough for 10 elements.\nv.reserve(10);\n\nlet (init, uninit) = v.split_at_spare_mut();\nlet sum = init.iter().copied().sum::<u32>();\n\n// Fill in the next 4 elements.\nuninit[0].write(sum);\nuninit[1].write(sum * 2);\nuninit[2].write(sum * 3);\nuninit[3].write(sum * 4);\n\n// Mark the 4 elements of the vector as being initialized.\nunsafe {\n    let len = v.len();\n    v.set_len(len + 4);\n}\n\nassert_eq!(&v, &[1, 1, 2, 4, 8, 12, 16]);
\n
",0,"redstone::core::aggregator::Matrix"],["
§

impl<Z> Zeroize for Vec<Z>
where\n Z: Zeroize,

§

fn zeroize(&mut self)

“Best effort” zeroization for Vec.

\n

Ensures the entire capacity of the Vec is zeroed. Cannot ensure that\nprevious reallocations did not leave values on the heap.

\n
","Zeroize","redstone::core::aggregator::Matrix"],["
source§

impl<T, A> DerefPure for Vec<T, A>
where\n A: Allocator,

","DerefPure","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Eq for Vec<T, A>
where\n T: Eq,\n A: Allocator,

","Eq","redstone::core::aggregator::Matrix"],["
§

impl<Z> ZeroizeOnDrop for Vec<Z>
where\n Z: ZeroizeOnDrop,

","ZeroizeOnDrop","redstone::core::aggregator::Matrix"]] +"redstone":[["
1.5.0 · source§

impl<T, A> AsMut<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn as_mut(&mut self) -> &mut [T]

Converts this type into a mutable reference of the (usually inferred) input type.
","AsMut<[T]>","redstone::core::aggregator::Matrix"],["
1.5.0 · source§

impl<T, A> AsMut<Vec<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn as_mut(&mut self) -> &mut Vec<T, A>

Converts this type into a mutable reference of the (usually inferred) input type.
","AsMut>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> AsRef<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn as_ref(&self) -> &[T]

Converts this type into a shared reference of the (usually inferred) input type.
","AsRef<[T]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> AsRef<Vec<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn as_ref(&self) -> &Vec<T, A>

Converts this type into a shared reference of the (usually inferred) input type.
","AsRef>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Borrow<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn borrow(&self) -> &[T]

Immutably borrows from an owned value. Read more
","Borrow<[T]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> BorrowMut<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn borrow_mut(&mut self) -> &mut [T]

Mutably borrows from an owned value. Read more
","BorrowMut<[T]>","redstone::core::aggregator::Matrix"],["
source§

impl<T> CLTyped for Vec<T>
where\n T: CLTyped,

source§

fn cl_type() -> CLType

The CLType of Self.
","CLTyped","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Clone for Vec<T, A>
where\n T: Clone,\n A: Allocator + Clone,

source§

fn clone_from(&mut self, source: &Vec<T, A>)

Overwrites the contents of self with a clone of the contents of source.

\n

This method is preferred over simply assigning source.clone() to self,\nas it avoids reallocation if possible. Additionally, if the element type\nT overrides clone_from(), this will reuse the resources of self’s\nelements as well.

\n
§Examples
\n
let x = vec![5, 6, 7];\nlet mut y = vec![8, 9, 10];\nlet yp: *const i32 = y.as_ptr();\n\ny.clone_from(&x);\n\n// The value is the same\nassert_eq!(x, y);\n\n// And no reallocation occurred\nassert_eq!(yp, y.as_ptr());
\n
source§

fn clone(&self) -> Vec<T, A>

Returns a copy of the value. Read more
","Clone","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Debug for Vec<T, A>
where\n T: Debug,\n A: Allocator,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T> Default for Vec<T>

source§

fn default() -> Vec<T>

Creates an empty Vec<T>.

\n

The vector will not allocate until elements are pushed onto it.

\n
","Default","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Deref for Vec<T, A>
where\n A: Allocator,

§

type Target = [T]

The resulting type after dereferencing.
source§

fn deref(&self) -> &[T]

Dereferences the value.
","Deref","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> DerefMut for Vec<T, A>
where\n A: Allocator,

source§

fn deref_mut(&mut self) -> &mut [T]

Mutably dereferences the value.
","DerefMut","redstone::core::aggregator::Matrix"],["
source§

impl<'de, T> Deserialize<'de> for Vec<T>
where\n T: Deserialize<'de>,

source§

fn deserialize<D>(\n deserializer: D,\n) -> Result<Vec<T>, <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Drop for Vec<T, A>
where\n A: Allocator,

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
","Drop","redstone::core::aggregator::Matrix"],["
1.2.0 · source§

impl<'a, T, A> Extend<&'a T> for Vec<T, A>
where\n T: Copy + 'a,\n A: Allocator,

Extend implementation that copies elements out of references before pushing them onto the Vec.

\n

This implementation is specialized for slice iterators, where it uses copy_from_slice to\nappend the entire slice at once.

\n
source§

fn extend<I>(&mut self, iter: I)
where\n I: IntoIterator<Item = &'a T>,

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, _: &'a T)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
","Extend<&'a T>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Extend<T> for Vec<T, A>
where\n A: Allocator,

source§

fn extend<I>(&mut self, iter: I)
where\n I: IntoIterator<Item = T>,

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: T)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
","Extend","redstone::core::aggregator::Matrix"],["
source§

impl Flattened<<Casper as NetworkSpecific>::BytesRepr> for Vec<Bytes>

","Flattened<::BytesRepr>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T> From<&[T]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &[T]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&[1, 2, 3][..]), vec![1, 2, 3]);
\n
","From<&[T]>","redstone::core::aggregator::Matrix"],["
1.74.0 · source§

impl<T, const N: usize> From<&[T; N]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &[T; N]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&[1, 2, 3]), vec![1, 2, 3]);
\n
","From<&[T; N]>","redstone::core::aggregator::Matrix"],["
1.19.0 · source§

impl<T> From<&mut [T]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &mut [T]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&mut [1, 2, 3][..]), vec![1, 2, 3]);
\n
","From<&mut [T]>","redstone::core::aggregator::Matrix"],["
1.74.0 · source§

impl<T, const N: usize> From<&mut [T; N]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &mut [T; N]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&mut [1, 2, 3]), vec![1, 2, 3]);
\n
","From<&mut [T; N]>","redstone::core::aggregator::Matrix"],["
1.44.0 · source§

impl<T, const N: usize> From<[T; N]> for Vec<T>

source§

fn from(s: [T; N]) -> Vec<T>

Allocate a Vec<T> and move s’s items into it.

\n
§Examples
\n
assert_eq!(Vec::from([1, 2, 3]), vec![1, 2, 3]);
\n
","From<[T; N]>","redstone::core::aggregator::Matrix"],["
1.5.0 · source§

impl<T, A> From<BinaryHeap<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn from(heap: BinaryHeap<T, A>) -> Vec<T, A>

Converts a BinaryHeap<T> into a Vec<T>.

\n

This conversion requires no data movement or allocation, and has\nconstant time complexity.

\n
","From>","redstone::core::aggregator::Matrix"],["
1.18.0 · source§

impl<T, A> From<Box<[T], A>> for Vec<T, A>
where\n A: Allocator,

source§

fn from(s: Box<[T], A>) -> Vec<T, A>

Convert a boxed slice into a vector by transferring ownership of\nthe existing heap allocation.

\n
§Examples
\n
let b: Box<[i32]> = vec![1, 2, 3].into_boxed_slice();\nassert_eq!(Vec::from(b), vec![1, 2, 3]);
\n
","From>","redstone::core::aggregator::Matrix"],["
1.14.0 · source§

impl<'a, T> From<Cow<'a, [T]>> for Vec<T>
where\n [T]: ToOwned<Owned = Vec<T>>,

source§

fn from(s: Cow<'a, [T]>) -> Vec<T>

Convert a clone-on-write slice into a vector.

\n

If s already owns a Vec<T>, it will be returned directly.\nIf s is borrowing a slice, a new Vec<T> will be allocated and\nfilled by cloning s’s items into it.

\n
§Examples
\n
let o: Cow<'_, [i32]> = Cow::Owned(vec![1, 2, 3]);\nlet b: Cow<'_, [i32]> = Cow::Borrowed(&[1, 2, 3]);\nassert_eq!(Vec::from(o), Vec::from(b));
\n
","From>","redstone::core::aggregator::Matrix"],["
1.10.0 · source§

impl<T, A> From<VecDeque<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn from(other: VecDeque<T, A>) -> Vec<T, A>

Turn a VecDeque<T> into a Vec<T>.

\n

This never needs to re-allocate, but does need to do O(n) data movement if\nthe circular buffer doesn’t happen to be at the beginning of the allocation.

\n
§Examples
\n
use std::collections::VecDeque;\n\n// This one is *O*(1).\nlet deque: VecDeque<_> = (1..5).collect();\nlet ptr = deque.as_slices().0.as_ptr();\nlet vec = Vec::from(deque);\nassert_eq!(vec, [1, 2, 3, 4]);\nassert_eq!(vec.as_ptr(), ptr);\n\n// This one needs data rearranging.\nlet mut deque: VecDeque<_> = (1..5).collect();\ndeque.push_front(9);\ndeque.push_front(8);\nlet ptr = deque.as_slices().1.as_ptr();\nlet vec = Vec::from(deque);\nassert_eq!(vec, [8, 9, 1, 2, 3, 4]);\nassert_eq!(vec.as_ptr(), ptr);
\n
","From>","redstone::core::aggregator::Matrix"],["
source§

impl<T> FromBytes for Vec<T>
where\n T: FromBytes,

source§

fn from_bytes(bytes: &[u8]) -> Result<(Vec<T>, &[u8]), Error>

Deserializes the slice into Self.
source§

fn from_vec(bytes: Vec<u8>) -> Result<(Vec<T>, Vec<u8>), Error>

Deserializes the Vec<u8> into Self.
","FromBytes","redstone::core::aggregator::Matrix"],["
source§

impl FromBytesRepr<Vec<u8>> for U256

source§

fn from_bytes_repr(bytes: Vec<u8>) -> Self

","FromBytesRepr>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T> FromIterator<T> for Vec<T>

Collects an iterator into a Vec, commonly called via Iterator::collect()

\n

§Allocation behavior

\n

In general Vec does not guarantee any particular growth or allocation strategy.\nThat also applies to this trait impl.

\n

Note: This section covers implementation details and is therefore exempt from\nstability guarantees.

\n

Vec may use any or none of the following strategies,\ndepending on the supplied iterator:

\n
    \n
  • preallocate based on Iterator::size_hint()\n
      \n
    • and panic if the number of items is outside the provided lower/upper bounds
    • \n
    \n
  • \n
  • use an amortized growth strategy similar to pushing one item at a time
  • \n
  • perform the iteration in-place on the original allocation backing the iterator
  • \n
\n

The last case warrants some attention. It is an optimization that in many cases reduces peak memory\nconsumption and improves cache locality. But when big, short-lived allocations are created,\nonly a small fraction of their items get collected, no further use is made of the spare capacity\nand the resulting Vec is moved into a longer-lived structure, then this can lead to the large\nallocations having their lifetimes unnecessarily extended which can result in increased memory\nfootprint.

\n

In cases where this is an issue, the excess capacity can be discarded with Vec::shrink_to(),\nVec::shrink_to_fit() or by collecting into Box<[T]> instead, which additionally reduces\nthe size of the long-lived struct.

\n\n
static LONG_LIVED: Mutex<Vec<Vec<u16>>> = Mutex::new(Vec::new());\n\nfor i in 0..10 {\n    let big_temporary: Vec<u16> = (0..1024).collect();\n    // discard most items\n    let mut result: Vec<_> = big_temporary.into_iter().filter(|i| i % 100 == 0).collect();\n    // without this a lot of unused capacity might be moved into the global\n    result.shrink_to_fit();\n    LONG_LIVED.lock().unwrap().push(result);\n}
\n
source§

fn from_iter<I>(iter: I) -> Vec<T>
where\n I: IntoIterator<Item = T>,

Creates a value from an iterator. Read more
","FromIterator","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Hash for Vec<T, A>
where\n T: Hash,\n A: Allocator,

The hash of a vector is the same as that of the corresponding slice,\nas required by the core::borrow::Borrow implementation.

\n\n
use std::hash::BuildHasher;\n\nlet b = std::hash::RandomState::new();\nlet v: Vec<u8> = vec![0xa8, 0x3c, 0x09];\nlet s: &[u8] = &[0xa8, 0x3c, 0x09];\nassert_eq!(b.hash_one(v), b.hash_one(s));
\n
source§

fn hash<H>(&self, state: &mut H)
where\n H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, I, A> Index<I> for Vec<T, A>
where\n I: SliceIndex<[T]>,\n A: Allocator,

§

type Output = <I as SliceIndex<[T]>>::Output

The returned type after indexing.
source§

fn index(&self, index: I) -> &<Vec<T, A> as Index<I>>::Output

Performs the indexing (container[index]) operation. Read more
","Index","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, I, A> IndexMut<I> for Vec<T, A>
where\n I: SliceIndex<[T]>,\n A: Allocator,

source§

fn index_mut(&mut self, index: I) -> &mut <Vec<T, A> as Index<I>>::Output

Performs the mutable indexing (container[index]) operation. Read more
","IndexMut","redstone::core::aggregator::Matrix"],["
source§

impl<'de, T, E> IntoDeserializer<'de, E> for Vec<T>
where\n T: IntoDeserializer<'de, E>,\n E: Error,

§

type Deserializer = SeqDeserializer<<Vec<T> as IntoIterator>::IntoIter, E>

The type of the deserializer being converted into.
source§

fn into_deserializer(self) -> <Vec<T> as IntoDeserializer<'de, E>>::Deserializer

Convert this value into a deserializer.
","IntoDeserializer<'de, E>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> IntoIterator for Vec<T, A>
where\n A: Allocator,

source§

fn into_iter(self) -> <Vec<T, A> as IntoIterator>::IntoIter

Creates a consuming iterator, that is, one that moves each value out of\nthe vector (from start to end). The vector cannot be used after calling\nthis.

\n
§Examples
\n
let v = vec![\"a\".to_string(), \"b\".to_string()];\nlet mut v_iter = v.into_iter();\n\nlet first_element: Option<String> = v_iter.next();\n\nassert_eq!(first_element, Some(\"a\".to_string()));\nassert_eq!(v_iter.next(), Some(\"b\".to_string()));\nassert_eq!(v_iter.next(), None);
\n
§

type Item = T

The type of the elements being iterated over.
§

type IntoIter = IntoIter<T, A>

Which kind of iterator are we turning this into?
","IntoIterator","redstone::core::aggregator::Matrix"],["
source§

impl<T> Median for Vec<T>
where\n T: Copy + Ord + Avg,

§

type Item = T

source§

fn median(self) -> Self::Item

","Median","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Ord for Vec<T, A>
where\n T: Ord,\n A: Allocator,

Implements ordering of vectors, lexicographically.

\n
source§

fn cmp(&self, other: &Vec<T, A>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
","Ord","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A> PartialEq<&[U]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &&[U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&[U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&[U]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A, const N: usize> PartialEq<&[U; N]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &&[U; N]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&[U; N]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&[U; N]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A> PartialEq<&mut [U]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &&mut [U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&mut [U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&mut [U]>","redstone::core::aggregator::Matrix"],["
1.48.0 · source§

impl<T, U, A> PartialEq<[U]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &[U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &[U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<[U]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A, const N: usize> PartialEq<[U; N]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &[U; N]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &[U; N]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<[U; N]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A1, A2> PartialEq<Vec<U, A2>> for Vec<T, A1>
where\n A1: Allocator,\n A2: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &Vec<U, A2>) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &Vec<U, A2>) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A1, A2> PartialOrd<Vec<T, A2>> for Vec<T, A1>
where\n T: PartialOrd,\n A1: Allocator,\n A2: Allocator,

Implements comparison of vectors, lexicographically.

\n
source§

fn partial_cmp(&self, other: &Vec<T, A2>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <=\noperator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >=\noperator. Read more
","PartialOrd>","redstone::core::aggregator::Matrix"],["
source§

impl<T> Serialize for Vec<T>
where\n T: Serialize,

source§

fn serialize<S>(\n &self,\n serializer: S,\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","redstone::core::aggregator::Matrix"],["
source§

impl<T> ToBytes for Vec<T>
where\n T: ToBytes,

source§

fn to_bytes(&self) -> Result<Vec<u8>, Error>

Serializes &self to a Vec<u8>.
source§

fn into_bytes(self) -> Result<Vec<u8>, Error>

Consumes self and serializes to a Vec<u8>.
source§

fn serialized_length(&self) -> usize

Returns the length of the Vec<u8> which would be returned from a successful call to\nto_bytes() or into_bytes(). The data is not actually serialized, so this call is\nrelatively cheap.
source§

fn write_bytes(&self, writer: &mut Vec<u8>) -> Result<(), Error>

Writes &self into a mutable writer.
","ToBytes","redstone::core::aggregator::Matrix"],["
source§

impl<T> Vec<T>

1.0.0 (const: 1.39.0) · source

pub const fn new() -> Vec<T>

Constructs a new, empty Vec<T>.

\n

The vector will not allocate until elements are pushed onto it.

\n
§Examples
\n
let mut vec: Vec<i32> = Vec::new();
\n
1.0.0 · source

pub fn with_capacity(capacity: usize) -> Vec<T>

Constructs a new, empty Vec<T> with at least the specified capacity.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n

It is important to note that although the returned vector has the\nminimum capacity specified, the vector will have a zero length. For\nan explanation of the difference between length and capacity, see\nCapacity and reallocation.

\n

If it is important to know the exact allocated capacity of a Vec,\nalways use the capacity method after construction.

\n

For Vec<T> where T is a zero-sized type, there will be no allocation\nand the capacity will always be usize::MAX.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = Vec::with_capacity(10);\n\n// The vector contains no items, even though it has capacity for more\nassert_eq!(vec.len(), 0);\nassert!(vec.capacity() >= 10);\n\n// These are all done without reallocating...\nfor i in 0..10 {\n    vec.push(i);\n}\nassert_eq!(vec.len(), 10);\nassert!(vec.capacity() >= 10);\n\n// ...but this may make the vector reallocate\nvec.push(11);\nassert_eq!(vec.len(), 11);\nassert!(vec.capacity() >= 11);\n\n// A vector of a zero-sized type will always over-allocate, since no\n// allocation is necessary\nlet vec_units = Vec::<()>::with_capacity(10);\nassert_eq!(vec_units.capacity(), usize::MAX);
\n
source

pub fn try_with_capacity(capacity: usize) -> Result<Vec<T>, TryReserveError>

🔬This is a nightly-only experimental API. (try_with_capacity)

Constructs a new, empty Vec<T> with at least the specified capacity.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n
§Errors
\n

Returns an error if the capacity exceeds isize::MAX bytes,\nor if the allocator reports allocation failure.

\n
1.0.0 · source

pub unsafe fn from_raw_parts(\n ptr: *mut T,\n length: usize,\n capacity: usize,\n) -> Vec<T>

Creates a Vec<T> directly from a pointer, a length, and a capacity.

\n
§Safety
\n

This is highly unsafe, due to the number of invariants that aren’t\nchecked:

\n
    \n
  • ptr must have been allocated using the global allocator, such as via\nthe alloc::alloc function.
  • \n
  • T needs to have the same alignment as what ptr was allocated with.\n(T having a less strict alignment is not sufficient, the alignment really\nneeds to be equal to satisfy the dealloc requirement that memory must be\nallocated and deallocated with the same layout.)
  • \n
  • The size of T times the capacity (ie. the allocated size in bytes) needs\nto be the same size as the pointer was allocated with. (Because similar to\nalignment, dealloc must be called with the same layout size.)
  • \n
  • length needs to be less than or equal to capacity.
  • \n
  • The first length values must be properly initialized values of type T.
  • \n
  • capacity needs to be the capacity that the pointer was allocated with.
  • \n
  • The allocated size in bytes must be no larger than isize::MAX.\nSee the safety documentation of pointer::offset.
  • \n
\n

These requirements are always upheld by any ptr that has been allocated\nvia Vec<T>. Other allocation sources are allowed if the invariants are\nupheld.

\n

Violating these may cause problems like corrupting the allocator’s\ninternal data structures. For example it is normally not safe\nto build a Vec<u8> from a pointer to a C char array with length\nsize_t, doing so is only safe if the array was initially allocated by\na Vec or String.\nIt’s also not safe to build one from a Vec<u16> and its length, because\nthe allocator cares about the alignment, and these two types have different\nalignments. The buffer was allocated with alignment 2 (for u16), but after\nturning it into a Vec<u8> it’ll be deallocated with alignment 1. To avoid\nthese issues, it is often preferable to do casting/transmuting using\nslice::from_raw_parts instead.

\n

The ownership of ptr is effectively transferred to the\nVec<T> which may then deallocate, reallocate or change the\ncontents of memory pointed to by the pointer at will. Ensure\nthat nothing else uses the pointer after calling this\nfunction.

\n
§Examples
\n
use std::ptr;\nuse std::mem;\n\nlet v = vec![1, 2, 3];\n\n// Prevent running `v`'s destructor so we are in complete control\n// of the allocation.\nlet mut v = mem::ManuallyDrop::new(v);\n\n// Pull out the various important pieces of information about `v`\nlet p = v.as_mut_ptr();\nlet len = v.len();\nlet cap = v.capacity();\n\nunsafe {\n    // Overwrite memory with 4, 5, 6\n    for i in 0..len {\n        ptr::write(p.add(i), 4 + i);\n    }\n\n    // Put everything back together into a Vec\n    let rebuilt = Vec::from_raw_parts(p, len, cap);\n    assert_eq!(rebuilt, [4, 5, 6]);\n}
\n

Using memory that was allocated elsewhere:

\n\n
use std::alloc::{alloc, Layout};\n\nfn main() {\n    let layout = Layout::array::<u32>(16).expect(\"overflow cannot happen\");\n\n    let vec = unsafe {\n        let mem = alloc(layout).cast::<u32>();\n        if mem.is_null() {\n            return;\n        }\n\n        mem.write(1_000_000);\n\n        Vec::from_raw_parts(mem, 1, 16)\n    };\n\n    assert_eq!(vec, &[1_000_000]);\n    assert_eq!(vec.capacity(), 16);\n}
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n T: Clone,\n A: Allocator,

1.5.0 · source

pub fn resize(&mut self, new_len: usize, value: T)

Resizes the Vec in-place so that len is equal to new_len.

\n

If new_len is greater than len, the Vec is extended by the\ndifference, with each additional slot filled with value.\nIf new_len is less than len, the Vec is simply truncated.

\n

This method requires T to implement Clone,\nin order to be able to clone the passed value.\nIf you need more flexibility (or want to rely on Default instead of\nClone), use Vec::resize_with.\nIf you only need to resize to a smaller size, use Vec::truncate.

\n
§Examples
\n
let mut vec = vec![\"hello\"];\nvec.resize(3, \"world\");\nassert_eq!(vec, [\"hello\", \"world\", \"world\"]);\n\nlet mut vec = vec![1, 2, 3, 4];\nvec.resize(2, 0);\nassert_eq!(vec, [1, 2]);
\n
1.6.0 · source

pub fn extend_from_slice(&mut self, other: &[T])

Clones and appends all elements in a slice to the Vec.

\n

Iterates over the slice other, clones each element, and then appends\nit to this Vec. The other slice is traversed in-order.

\n

Note that this function is same as extend except that it is\nspecialized to work with slices instead. If and when Rust gets\nspecialization this function will likely be deprecated (but still\navailable).

\n
§Examples
\n
let mut vec = vec![1];\nvec.extend_from_slice(&[2, 3, 4]);\nassert_eq!(vec, [1, 2, 3, 4]);
\n
1.53.0 · source

pub fn extend_from_within<R>(&mut self, src: R)
where\n R: RangeBounds<usize>,

Copies elements from src range to the end of the vector.

\n
§Panics
\n

Panics if the starting point is greater than the end point or if\nthe end point is greater than the length of the vector.

\n
§Examples
\n
let mut vec = vec![0, 1, 2, 3, 4];\n\nvec.extend_from_within(2..);\nassert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4]);\n\nvec.extend_from_within(..2);\nassert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4, 0, 1]);\n\nvec.extend_from_within(4..8);\nassert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4, 0, 1, 4, 2, 3, 4]);
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n T: PartialEq,\n A: Allocator,

1.0.0 · source

pub fn dedup(&mut self)

Removes consecutive repeated elements in the vector according to the\nPartialEq trait implementation.

\n

If the vector is sorted, this removes all duplicates.

\n
§Examples
\n
let mut vec = vec![1, 2, 2, 3, 2];\n\nvec.dedup();\n\nassert_eq!(vec, [1, 2, 3, 2]);
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n A: Allocator,

1.21.0 · source

pub fn splice<R, I>(\n &mut self,\n range: R,\n replace_with: I,\n) -> Splice<'_, <I as IntoIterator>::IntoIter, A>
where\n R: RangeBounds<usize>,\n I: IntoIterator<Item = T>,

Creates a splicing iterator that replaces the specified range in the vector\nwith the given replace_with iterator and yields the removed items.\nreplace_with does not need to be the same length as range.

\n

range is removed even if the iterator is not consumed until the end.

\n

It is unspecified how many elements are removed from the vector\nif the Splice value is leaked.

\n

The input iterator replace_with is only consumed when the Splice value is dropped.

\n

This is optimal if:

\n
    \n
  • The tail (elements in the vector after range) is empty,
  • \n
  • or replace_with yields fewer or equal elements than range’s length
  • \n
  • or the lower bound of its size_hint() is exact.
  • \n
\n

Otherwise, a temporary vector is allocated and the tail is moved twice.

\n
§Panics
\n

Panics if the starting point is greater than the end point or if\nthe end point is greater than the length of the vector.

\n
§Examples
\n
let mut v = vec![1, 2, 3, 4];\nlet new = [7, 8, 9];\nlet u: Vec<_> = v.splice(1..3, new).collect();\nassert_eq!(v, &[1, 7, 8, 9, 4]);\nassert_eq!(u, &[2, 3]);
\n
source

pub fn extract_if<F>(&mut self, filter: F) -> ExtractIf<'_, T, F, A>
where\n F: FnMut(&mut T) -> bool,

🔬This is a nightly-only experimental API. (extract_if)

Creates an iterator which uses a closure to determine if an element should be removed.

\n

If the closure returns true, then the element is removed and yielded.\nIf the closure returns false, the element will remain in the vector and will not be yielded\nby the iterator.

\n

If the returned ExtractIf is not exhausted, e.g. because it is dropped without iterating\nor the iteration short-circuits, then the remaining elements will be retained.\nUse retain with a negated predicate if you do not need the returned iterator.

\n

Using this method is equivalent to the following code:

\n\n
let mut i = 0;\nwhile i < vec.len() {\n    if some_predicate(&mut vec[i]) {\n        let val = vec.remove(i);\n        // your code here\n    } else {\n        i += 1;\n    }\n}\n
\n

But extract_if is easier to use. extract_if is also more efficient,\nbecause it can backshift the elements of the array in bulk.

\n

Note that extract_if also lets you mutate every element in the filter closure,\nregardless of whether you choose to keep or remove it.

\n
§Examples
\n

Splitting an array into evens and odds, reusing the original allocation:

\n\n
#![feature(extract_if)]\nlet mut numbers = vec![1, 2, 3, 4, 5, 6, 8, 9, 11, 13, 14, 15];\n\nlet evens = numbers.extract_if(|x| *x % 2 == 0).collect::<Vec<_>>();\nlet odds = numbers;\n\nassert_eq!(evens, vec![2, 4, 6, 8, 14]);\nassert_eq!(odds, vec![1, 3, 5, 9, 11, 13, 15]);
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n A: Allocator,

source

pub const fn new_in(alloc: A) -> Vec<T, A>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new, empty Vec<T, A>.

\n

The vector will not allocate until elements are pushed onto it.

\n
§Examples
\n
#![feature(allocator_api)]\n\nuse std::alloc::System;\n\nlet mut vec: Vec<i32, _> = Vec::new_in(System);
\n
source

pub fn with_capacity_in(capacity: usize, alloc: A) -> Vec<T, A>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new, empty Vec<T, A> with at least the specified capacity\nwith the provided allocator.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n

It is important to note that although the returned vector has the\nminimum capacity specified, the vector will have a zero length. For\nan explanation of the difference between length and capacity, see\nCapacity and reallocation.

\n

If it is important to know the exact allocated capacity of a Vec,\nalways use the capacity method after construction.

\n

For Vec<T, A> where T is a zero-sized type, there will be no allocation\nand the capacity will always be usize::MAX.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
#![feature(allocator_api)]\n\nuse std::alloc::System;\n\nlet mut vec = Vec::with_capacity_in(10, System);\n\n// The vector contains no items, even though it has capacity for more\nassert_eq!(vec.len(), 0);\nassert!(vec.capacity() >= 10);\n\n// These are all done without reallocating...\nfor i in 0..10 {\n    vec.push(i);\n}\nassert_eq!(vec.len(), 10);\nassert!(vec.capacity() >= 10);\n\n// ...but this may make the vector reallocate\nvec.push(11);\nassert_eq!(vec.len(), 11);\nassert!(vec.capacity() >= 11);\n\n// A vector of a zero-sized type will always over-allocate, since no\n// allocation is necessary\nlet vec_units = Vec::<(), System>::with_capacity_in(10, System);\nassert_eq!(vec_units.capacity(), usize::MAX);
\n
source

pub fn try_with_capacity_in(\n capacity: usize,\n alloc: A,\n) -> Result<Vec<T, A>, TryReserveError>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new, empty Vec<T, A> with at least the specified capacity\nwith the provided allocator.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n
§Errors
\n

Returns an error if the capacity exceeds isize::MAX bytes,\nor if the allocator reports allocation failure.

\n
source

pub unsafe fn from_raw_parts_in(\n ptr: *mut T,\n length: usize,\n capacity: usize,\n alloc: A,\n) -> Vec<T, A>

🔬This is a nightly-only experimental API. (allocator_api)

Creates a Vec<T, A> directly from a pointer, a length, a capacity,\nand an allocator.

\n
§Safety
\n

This is highly unsafe, due to the number of invariants that aren’t\nchecked:

\n
    \n
  • ptr must be currently allocated via the given allocator alloc.
  • \n
  • T needs to have the same alignment as what ptr was allocated with.\n(T having a less strict alignment is not sufficient, the alignment really\nneeds to be equal to satisfy the dealloc requirement that memory must be\nallocated and deallocated with the same layout.)
  • \n
  • The size of T times the capacity (ie. the allocated size in bytes) needs\nto be the same size as the pointer was allocated with. (Because similar to\nalignment, dealloc must be called with the same layout size.)
  • \n
  • length needs to be less than or equal to capacity.
  • \n
  • The first length values must be properly initialized values of type T.
  • \n
  • capacity needs to fit the layout size that the pointer was allocated with.
  • \n
  • The allocated size in bytes must be no larger than isize::MAX.\nSee the safety documentation of pointer::offset.
  • \n
\n

These requirements are always upheld by any ptr that has been allocated\nvia Vec<T, A>. Other allocation sources are allowed if the invariants are\nupheld.

\n

Violating these may cause problems like corrupting the allocator’s\ninternal data structures. For example it is not safe\nto build a Vec<u8> from a pointer to a C char array with length size_t.\nIt’s also not safe to build one from a Vec<u16> and its length, because\nthe allocator cares about the alignment, and these two types have different\nalignments. The buffer was allocated with alignment 2 (for u16), but after\nturning it into a Vec<u8> it’ll be deallocated with alignment 1.

\n

The ownership of ptr is effectively transferred to the\nVec<T> which may then deallocate, reallocate or change the\ncontents of memory pointed to by the pointer at will. Ensure\nthat nothing else uses the pointer after calling this\nfunction.

\n
§Examples
\n
#![feature(allocator_api)]\n\nuse std::alloc::System;\n\nuse std::ptr;\nuse std::mem;\n\nlet mut v = Vec::with_capacity_in(3, System);\nv.push(1);\nv.push(2);\nv.push(3);\n\n// Prevent running `v`'s destructor so we are in complete control\n// of the allocation.\nlet mut v = mem::ManuallyDrop::new(v);\n\n// Pull out the various important pieces of information about `v`\nlet p = v.as_mut_ptr();\nlet len = v.len();\nlet cap = v.capacity();\nlet alloc = v.allocator();\n\nunsafe {\n    // Overwrite memory with 4, 5, 6\n    for i in 0..len {\n        ptr::write(p.add(i), 4 + i);\n    }\n\n    // Put everything back together into a Vec\n    let rebuilt = Vec::from_raw_parts_in(p, len, cap, alloc.clone());\n    assert_eq!(rebuilt, [4, 5, 6]);\n}
\n

Using memory that was allocated elsewhere:

\n\n
#![feature(allocator_api)]\n\nuse std::alloc::{AllocError, Allocator, Global, Layout};\n\nfn main() {\n    let layout = Layout::array::<u32>(16).expect(\"overflow cannot happen\");\n\n    let vec = unsafe {\n        let mem = match Global.allocate(layout) {\n            Ok(mem) => mem.cast::<u32>().as_ptr(),\n            Err(AllocError) => return,\n        };\n\n        mem.write(1_000_000);\n\n        Vec::from_raw_parts_in(mem, 1, 16, Global)\n    };\n\n    assert_eq!(vec, &[1_000_000]);\n    assert_eq!(vec.capacity(), 16);\n}
\n
source

pub fn into_raw_parts(self) -> (*mut T, usize, usize)

🔬This is a nightly-only experimental API. (vec_into_raw_parts)

Decomposes a Vec<T> into its raw components: (pointer, length, capacity).

\n

Returns the raw pointer to the underlying data, the length of\nthe vector (in elements), and the allocated capacity of the\ndata (in elements). These are the same arguments in the same\norder as the arguments to from_raw_parts.

\n

After calling this function, the caller is responsible for the\nmemory previously managed by the Vec. The only way to do\nthis is to convert the raw pointer, length, and capacity back\ninto a Vec with the from_raw_parts function, allowing\nthe destructor to perform the cleanup.

\n
§Examples
\n
#![feature(vec_into_raw_parts)]\nlet v: Vec<i32> = vec![-1, 0, 1];\n\nlet (ptr, len, cap) = v.into_raw_parts();\n\nlet rebuilt = unsafe {\n    // We can now make changes to the components, such as\n    // transmuting the raw pointer to a compatible type.\n    let ptr = ptr as *mut u32;\n\n    Vec::from_raw_parts(ptr, len, cap)\n};\nassert_eq!(rebuilt, [4294967295, 0, 1]);
\n
source

pub fn into_raw_parts_with_alloc(self) -> (*mut T, usize, usize, A)

🔬This is a nightly-only experimental API. (allocator_api)

Decomposes a Vec<T> into its raw components: (pointer, length, capacity, allocator).

\n

Returns the raw pointer to the underlying data, the length of the vector (in elements),\nthe allocated capacity of the data (in elements), and the allocator. These are the same\narguments in the same order as the arguments to from_raw_parts_in.

\n

After calling this function, the caller is responsible for the\nmemory previously managed by the Vec. The only way to do\nthis is to convert the raw pointer, length, and capacity back\ninto a Vec with the from_raw_parts_in function, allowing\nthe destructor to perform the cleanup.

\n
§Examples
\n
#![feature(allocator_api, vec_into_raw_parts)]\n\nuse std::alloc::System;\n\nlet mut v: Vec<i32, System> = Vec::new_in(System);\nv.push(-1);\nv.push(0);\nv.push(1);\n\nlet (ptr, len, cap, alloc) = v.into_raw_parts_with_alloc();\n\nlet rebuilt = unsafe {\n    // We can now make changes to the components, such as\n    // transmuting the raw pointer to a compatible type.\n    let ptr = ptr as *mut u32;\n\n    Vec::from_raw_parts_in(ptr, len, cap, alloc)\n};\nassert_eq!(rebuilt, [4294967295, 0, 1]);
\n
1.0.0 · source

pub fn capacity(&self) -> usize

Returns the total number of elements the vector can hold without\nreallocating.

\n
§Examples
\n
let mut vec: Vec<i32> = Vec::with_capacity(10);\nvec.push(42);\nassert!(vec.capacity() >= 10);
\n
1.0.0 · source

pub fn reserve(&mut self, additional: usize)

Reserves capacity for at least additional more elements to be inserted\nin the given Vec<T>. The collection may reserve more space to\nspeculatively avoid frequent reallocations. After calling reserve,\ncapacity will be greater than or equal to self.len() + additional.\nDoes nothing if capacity is already sufficient.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1];\nvec.reserve(10);\nassert!(vec.capacity() >= 11);
\n
1.0.0 · source

pub fn reserve_exact(&mut self, additional: usize)

Reserves the minimum capacity for at least additional more elements to\nbe inserted in the given Vec<T>. Unlike reserve, this will not\ndeliberately over-allocate to speculatively avoid frequent allocations.\nAfter calling reserve_exact, capacity will be greater than or equal to\nself.len() + additional. Does nothing if the capacity is already\nsufficient.

\n

Note that the allocator may give the collection more space than it\nrequests. Therefore, capacity can not be relied upon to be precisely\nminimal. Prefer reserve if future insertions are expected.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1];\nvec.reserve_exact(10);\nassert!(vec.capacity() >= 11);
\n
1.57.0 · source

pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>

Tries to reserve capacity for at least additional more elements to be inserted\nin the given Vec<T>. The collection may reserve more space to speculatively avoid\nfrequent reallocations. After calling try_reserve, capacity will be\ngreater than or equal to self.len() + additional if it returns\nOk(()). Does nothing if capacity is already sufficient. This method\npreserves the contents even if an error occurs.

\n
§Errors
\n

If the capacity overflows, or the allocator reports a failure, then an error\nis returned.

\n
§Examples
\n
use std::collections::TryReserveError;\n\nfn process_data(data: &[u32]) -> Result<Vec<u32>, TryReserveError> {\n    let mut output = Vec::new();\n\n    // Pre-reserve the memory, exiting if we can't\n    output.try_reserve(data.len())?;\n\n    // Now we know this can't OOM in the middle of our complex work\n    output.extend(data.iter().map(|&val| {\n        val * 2 + 5 // very complicated\n    }));\n\n    Ok(output)\n}
\n
1.57.0 · source

pub fn try_reserve_exact(\n &mut self,\n additional: usize,\n) -> Result<(), TryReserveError>

Tries to reserve the minimum capacity for at least additional\nelements to be inserted in the given Vec<T>. Unlike try_reserve,\nthis will not deliberately over-allocate to speculatively avoid frequent\nallocations. After calling try_reserve_exact, capacity will be greater\nthan or equal to self.len() + additional if it returns Ok(()).\nDoes nothing if the capacity is already sufficient.

\n

Note that the allocator may give the collection more space than it\nrequests. Therefore, capacity can not be relied upon to be precisely\nminimal. Prefer try_reserve if future insertions are expected.

\n
§Errors
\n

If the capacity overflows, or the allocator reports a failure, then an error\nis returned.

\n
§Examples
\n
use std::collections::TryReserveError;\n\nfn process_data(data: &[u32]) -> Result<Vec<u32>, TryReserveError> {\n    let mut output = Vec::new();\n\n    // Pre-reserve the memory, exiting if we can't\n    output.try_reserve_exact(data.len())?;\n\n    // Now we know this can't OOM in the middle of our complex work\n    output.extend(data.iter().map(|&val| {\n        val * 2 + 5 // very complicated\n    }));\n\n    Ok(output)\n}
\n
1.0.0 · source

pub fn shrink_to_fit(&mut self)

Shrinks the capacity of the vector as much as possible.

\n

The behavior of this method depends on the allocator, which may either shrink the vector\nin-place or reallocate. The resulting vector might still have some excess capacity, just as\nis the case for with_capacity. See Allocator::shrink for more details.

\n
§Examples
\n
let mut vec = Vec::with_capacity(10);\nvec.extend([1, 2, 3]);\nassert!(vec.capacity() >= 10);\nvec.shrink_to_fit();\nassert!(vec.capacity() >= 3);
\n
1.56.0 · source

pub fn shrink_to(&mut self, min_capacity: usize)

Shrinks the capacity of the vector with a lower bound.

\n

The capacity will remain at least as large as both the length\nand the supplied value.

\n

If the current capacity is less than the lower limit, this is a no-op.

\n
§Examples
\n
let mut vec = Vec::with_capacity(10);\nvec.extend([1, 2, 3]);\nassert!(vec.capacity() >= 10);\nvec.shrink_to(4);\nassert!(vec.capacity() >= 4);\nvec.shrink_to(0);\nassert!(vec.capacity() >= 3);
\n
1.0.0 · source

pub fn into_boxed_slice(self) -> Box<[T], A>

Converts the vector into Box<[T]>.

\n

Before doing the conversion, this method discards excess capacity like shrink_to_fit.

\n
§Examples
\n
let v = vec![1, 2, 3];\n\nlet slice = v.into_boxed_slice();
\n

Any excess capacity is removed:

\n\n
let mut vec = Vec::with_capacity(10);\nvec.extend([1, 2, 3]);\n\nassert!(vec.capacity() >= 10);\nlet slice = vec.into_boxed_slice();\nassert_eq!(slice.into_vec().capacity(), 3);
\n
1.0.0 · source

pub fn truncate(&mut self, len: usize)

Shortens the vector, keeping the first len elements and dropping\nthe rest.

\n

If len is greater or equal to the vector’s current length, this has\nno effect.

\n

The drain method can emulate truncate, but causes the excess\nelements to be returned instead of dropped.

\n

Note that this method has no effect on the allocated capacity\nof the vector.

\n
§Examples
\n

Truncating a five element vector to two elements:

\n\n
let mut vec = vec![1, 2, 3, 4, 5];\nvec.truncate(2);\nassert_eq!(vec, [1, 2]);
\n

No truncation occurs when len is greater than the vector’s current\nlength:

\n\n
let mut vec = vec![1, 2, 3];\nvec.truncate(8);\nassert_eq!(vec, [1, 2, 3]);
\n

Truncating when len == 0 is equivalent to calling the clear\nmethod.

\n\n
let mut vec = vec![1, 2, 3];\nvec.truncate(0);\nassert_eq!(vec, []);
\n
1.7.0 · source

pub fn as_slice(&self) -> &[T]

Extracts a slice containing the entire vector.

\n

Equivalent to &s[..].

\n
§Examples
\n
use std::io::{self, Write};\nlet buffer = vec![1, 2, 3, 5, 8];\nio::sink().write(buffer.as_slice()).unwrap();
\n
1.7.0 · source

pub fn as_mut_slice(&mut self) -> &mut [T]

Extracts a mutable slice of the entire vector.

\n

Equivalent to &mut s[..].

\n
§Examples
\n
use std::io::{self, Read};\nlet mut buffer = vec![0; 3];\nio::repeat(0b101).read_exact(buffer.as_mut_slice()).unwrap();
\n
1.37.0 · source

pub fn as_ptr(&self) -> *const T

Returns a raw pointer to the vector’s buffer, or a dangling raw pointer\nvalid for zero sized reads if the vector didn’t allocate.

\n

The caller must ensure that the vector outlives the pointer this\nfunction returns, or else it will end up pointing to garbage.\nModifying the vector may cause its buffer to be reallocated,\nwhich would also make any pointers to it invalid.

\n

The caller must also ensure that the memory the pointer (non-transitively) points to\nis never written to (except inside an UnsafeCell) using this pointer or any pointer\nderived from it. If you need to mutate the contents of the slice, use as_mut_ptr.

\n

This method guarantees that for the purpose of the aliasing model, this method\ndoes not materialize a reference to the underlying slice, and thus the returned pointer\nwill remain valid when mixed with other calls to as_ptr and as_mut_ptr.\nNote that calling other methods that materialize mutable references to the slice,\nor mutable references to specific elements you are planning on accessing through this pointer,\nas well as writing to those elements, may still invalidate this pointer.\nSee the second example below for how this guarantee can be used.

\n
§Examples
\n
let x = vec![1, 2, 4];\nlet x_ptr = x.as_ptr();\n\nunsafe {\n    for i in 0..x.len() {\n        assert_eq!(*x_ptr.add(i), 1 << i);\n    }\n}
\n

Due to the aliasing guarantee, the following code is legal:

\n\n
unsafe {\n    let mut v = vec![0, 1, 2];\n    let ptr1 = v.as_ptr();\n    let _ = ptr1.read();\n    let ptr2 = v.as_mut_ptr().offset(2);\n    ptr2.write(2);\n    // Notably, the write to `ptr2` did *not* invalidate `ptr1`\n    // because it mutated a different element:\n    let _ = ptr1.read();\n}
\n
1.37.0 · source

pub fn as_mut_ptr(&mut self) -> *mut T

Returns an unsafe mutable pointer to the vector’s buffer, or a dangling\nraw pointer valid for zero sized reads if the vector didn’t allocate.

\n

The caller must ensure that the vector outlives the pointer this\nfunction returns, or else it will end up pointing to garbage.\nModifying the vector may cause its buffer to be reallocated,\nwhich would also make any pointers to it invalid.

\n

This method guarantees that for the purpose of the aliasing model, this method\ndoes not materialize a reference to the underlying slice, and thus the returned pointer\nwill remain valid when mixed with other calls to as_ptr and as_mut_ptr.\nNote that calling other methods that materialize references to the slice,\nor references to specific elements you are planning on accessing through this pointer,\nmay still invalidate this pointer.\nSee the second example below for how this guarantee can be used.

\n
§Examples
\n
// Allocate vector big enough for 4 elements.\nlet size = 4;\nlet mut x: Vec<i32> = Vec::with_capacity(size);\nlet x_ptr = x.as_mut_ptr();\n\n// Initialize elements via raw pointer writes, then set length.\nunsafe {\n    for i in 0..size {\n        *x_ptr.add(i) = i as i32;\n    }\n    x.set_len(size);\n}\nassert_eq!(&*x, &[0, 1, 2, 3]);
\n

Due to the aliasing guarantee, the following code is legal:

\n\n
unsafe {\n    let mut v = vec![0];\n    let ptr1 = v.as_mut_ptr();\n    ptr1.write(1);\n    let ptr2 = v.as_mut_ptr();\n    ptr2.write(2);\n    // Notably, the write to `ptr2` did *not* invalidate `ptr1`:\n    ptr1.write(3);\n}
\n
source

pub fn allocator(&self) -> &A

🔬This is a nightly-only experimental API. (allocator_api)

Returns a reference to the underlying allocator.

\n
1.0.0 · source

pub unsafe fn set_len(&mut self, new_len: usize)

Forces the length of the vector to new_len.

\n

This is a low-level operation that maintains none of the normal\ninvariants of the type. Normally changing the length of a vector\nis done using one of the safe operations instead, such as\ntruncate, resize, extend, or clear.

\n
§Safety
\n
    \n
  • new_len must be less than or equal to capacity().
  • \n
  • The elements at old_len..new_len must be initialized.
  • \n
\n
§Examples
\n

This method can be useful for situations in which the vector\nis serving as a buffer for other code, particularly over FFI:

\n\n
pub fn get_dictionary(&self) -> Option<Vec<u8>> {\n    // Per the FFI method's docs, \"32768 bytes is always enough\".\n    let mut dict = Vec::with_capacity(32_768);\n    let mut dict_length = 0;\n    // SAFETY: When `deflateGetDictionary` returns `Z_OK`, it holds that:\n    // 1. `dict_length` elements were initialized.\n    // 2. `dict_length` <= the capacity (32_768)\n    // which makes `set_len` safe to call.\n    unsafe {\n        // Make the FFI call...\n        let r = deflateGetDictionary(self.strm, dict.as_mut_ptr(), &mut dict_length);\n        if r == Z_OK {\n            // ...and update the length to what was initialized.\n            dict.set_len(dict_length);\n            Some(dict)\n        } else {\n            None\n        }\n    }\n}
\n

While the following example is sound, there is a memory leak since\nthe inner vectors were not freed prior to the set_len call:

\n\n
let mut vec = vec![vec![1, 0, 0],\n                   vec![0, 1, 0],\n                   vec![0, 0, 1]];\n// SAFETY:\n// 1. `old_len..0` is empty so no elements need to be initialized.\n// 2. `0 <= capacity` always holds whatever `capacity` is.\nunsafe {\n    vec.set_len(0);\n}
\n

Normally, here, one would use clear instead to correctly drop\nthe contents and thus not leak memory.

\n
1.0.0 · source

pub fn swap_remove(&mut self, index: usize) -> T

Removes an element from the vector and returns it.

\n

The removed element is replaced by the last element of the vector.

\n

This does not preserve ordering of the remaining elements, but is O(1).\nIf you need to preserve the element order, use remove instead.

\n
§Panics
\n

Panics if index is out of bounds.

\n
§Examples
\n
let mut v = vec![\"foo\", \"bar\", \"baz\", \"qux\"];\n\nassert_eq!(v.swap_remove(1), \"bar\");\nassert_eq!(v, [\"foo\", \"qux\", \"baz\"]);\n\nassert_eq!(v.swap_remove(0), \"foo\");\nassert_eq!(v, [\"baz\", \"qux\"]);
\n
1.0.0 · source

pub fn insert(&mut self, index: usize, element: T)

Inserts an element at position index within the vector, shifting all\nelements after it to the right.

\n
§Panics
\n

Panics if index > len.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nvec.insert(1, 4);\nassert_eq!(vec, [1, 4, 2, 3]);\nvec.insert(4, 5);\nassert_eq!(vec, [1, 4, 2, 3, 5]);
\n
§Time complexity
\n

Takes O(Vec::len) time. All items after the insertion index must be\nshifted to the right. In the worst case, all elements are shifted when\nthe insertion index is 0.

\n
1.0.0 · source

pub fn remove(&mut self, index: usize) -> T

Removes and returns the element at position index within the vector,\nshifting all elements after it to the left.

\n

Note: Because this shifts over the remaining elements, it has a\nworst-case performance of O(n). If you don’t need the order of elements\nto be preserved, use swap_remove instead. If you’d like to remove\nelements from the beginning of the Vec, consider using\nVecDeque::pop_front instead.

\n
§Panics
\n

Panics if index is out of bounds.

\n
§Examples
\n
let mut v = vec![1, 2, 3];\nassert_eq!(v.remove(1), 2);\nassert_eq!(v, [1, 3]);
\n
1.0.0 · source

pub fn retain<F>(&mut self, f: F)
where\n F: FnMut(&T) -> bool,

Retains only the elements specified by the predicate.

\n

In other words, remove all elements e for which f(&e) returns false.\nThis method operates in place, visiting each element exactly once in the\noriginal order, and preserves the order of the retained elements.

\n
§Examples
\n
let mut vec = vec![1, 2, 3, 4];\nvec.retain(|&x| x % 2 == 0);\nassert_eq!(vec, [2, 4]);
\n

Because the elements are visited exactly once in the original order,\nexternal state may be used to decide which elements to keep.

\n\n
let mut vec = vec![1, 2, 3, 4, 5];\nlet keep = [false, true, true, false, true];\nlet mut iter = keep.iter();\nvec.retain(|_| *iter.next().unwrap());\nassert_eq!(vec, [2, 3, 5]);
\n
1.61.0 · source

pub fn retain_mut<F>(&mut self, f: F)
where\n F: FnMut(&mut T) -> bool,

Retains only the elements specified by the predicate, passing a mutable reference to it.

\n

In other words, remove all elements e such that f(&mut e) returns false.\nThis method operates in place, visiting each element exactly once in the\noriginal order, and preserves the order of the retained elements.

\n
§Examples
\n
let mut vec = vec![1, 2, 3, 4];\nvec.retain_mut(|x| if *x <= 3 {\n    *x += 1;\n    true\n} else {\n    false\n});\nassert_eq!(vec, [2, 3, 4]);
\n
1.16.0 · source

pub fn dedup_by_key<F, K>(&mut self, key: F)
where\n F: FnMut(&mut T) -> K,\n K: PartialEq,

Removes all but the first of consecutive elements in the vector that resolve to the same\nkey.

\n

If the vector is sorted, this removes all duplicates.

\n
§Examples
\n
let mut vec = vec![10, 20, 21, 30, 20];\n\nvec.dedup_by_key(|i| *i / 10);\n\nassert_eq!(vec, [10, 20, 30, 20]);
\n
1.16.0 · source

pub fn dedup_by<F>(&mut self, same_bucket: F)
where\n F: FnMut(&mut T, &mut T) -> bool,

Removes all but the first of consecutive elements in the vector satisfying a given equality\nrelation.

\n

The same_bucket function is passed references to two elements from the vector and\nmust determine if the elements compare equal. The elements are passed in opposite order\nfrom their order in the slice, so if same_bucket(a, b) returns true, a is removed.

\n

If the vector is sorted, this removes all duplicates.

\n
§Examples
\n
let mut vec = vec![\"foo\", \"bar\", \"Bar\", \"baz\", \"bar\"];\n\nvec.dedup_by(|a, b| a.eq_ignore_ascii_case(b));\n\nassert_eq!(vec, [\"foo\", \"bar\", \"baz\", \"bar\"]);
\n
1.0.0 · source

pub fn push(&mut self, value: T)

Appends an element to the back of a collection.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1, 2];\nvec.push(3);\nassert_eq!(vec, [1, 2, 3]);
\n
§Time complexity
\n

Takes amortized O(1) time. If the vector’s length would exceed its\ncapacity after the push, O(capacity) time is taken to copy the\nvector’s elements to a larger allocation. This expensive operation is\noffset by the capacity O(1) insertions it allows.

\n
source

pub fn push_within_capacity(&mut self, value: T) -> Result<(), T>

🔬This is a nightly-only experimental API. (vec_push_within_capacity)

Appends an element if there is sufficient spare capacity, otherwise an error is returned\nwith the element.

\n

Unlike push this method will not reallocate when there’s insufficient capacity.\nThe caller should use reserve or try_reserve to ensure that there is enough capacity.

\n
§Examples
\n

A manual, panic-free alternative to FromIterator:

\n\n
#![feature(vec_push_within_capacity)]\n\nuse std::collections::TryReserveError;\nfn from_iter_fallible<T>(iter: impl Iterator<Item=T>) -> Result<Vec<T>, TryReserveError> {\n    let mut vec = Vec::new();\n    for value in iter {\n        if let Err(value) = vec.push_within_capacity(value) {\n            vec.try_reserve(1)?;\n            // this cannot fail, the previous line either returned or added at least 1 free slot\n            let _ = vec.push_within_capacity(value);\n        }\n    }\n    Ok(vec)\n}\nassert_eq!(from_iter_fallible(0..100), Ok(Vec::from_iter(0..100)));
\n
§Time complexity
\n

Takes O(1) time.

\n
1.0.0 · source

pub fn pop(&mut self) -> Option<T>

Removes the last element from a vector and returns it, or None if it\nis empty.

\n

If you’d like to pop the first element, consider using\nVecDeque::pop_front instead.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nassert_eq!(vec.pop(), Some(3));\nassert_eq!(vec, [1, 2]);
\n
§Time complexity
\n

Takes O(1) time.

\n
source

pub fn pop_if<F>(&mut self, f: F) -> Option<T>
where\n F: FnOnce(&mut T) -> bool,

🔬This is a nightly-only experimental API. (vec_pop_if)

Removes and returns the last element in a vector if the predicate\nreturns true, or None if the predicate returns false or the vector\nis empty.

\n
§Examples
\n
#![feature(vec_pop_if)]\n\nlet mut vec = vec![1, 2, 3, 4];\nlet pred = |x: &mut i32| *x % 2 == 0;\n\nassert_eq!(vec.pop_if(pred), Some(4));\nassert_eq!(vec, [1, 2, 3]);\nassert_eq!(vec.pop_if(pred), None);
\n
1.4.0 · source

pub fn append(&mut self, other: &mut Vec<T, A>)

Moves all the elements of other into self, leaving other empty.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nlet mut vec2 = vec![4, 5, 6];\nvec.append(&mut vec2);\nassert_eq!(vec, [1, 2, 3, 4, 5, 6]);\nassert_eq!(vec2, []);
\n
1.6.0 · source

pub fn drain<R>(&mut self, range: R) -> Drain<'_, T, A>
where\n R: RangeBounds<usize>,

Removes the specified range from the vector in bulk, returning all\nremoved elements as an iterator. If the iterator is dropped before\nbeing fully consumed, it drops the remaining removed elements.

\n

The returned iterator keeps a mutable borrow on the vector to optimize\nits implementation.

\n
§Panics
\n

Panics if the starting point is greater than the end point or if\nthe end point is greater than the length of the vector.

\n
§Leaking
\n

If the returned iterator goes out of scope without being dropped (due to\nmem::forget, for example), the vector may have lost and leaked\nelements arbitrarily, including elements outside the range.

\n
§Examples
\n
let mut v = vec![1, 2, 3];\nlet u: Vec<_> = v.drain(1..).collect();\nassert_eq!(v, &[1]);\nassert_eq!(u, &[2, 3]);\n\n// A full range clears the vector, like `clear()` does\nv.drain(..);\nassert_eq!(v, &[]);
\n
1.0.0 · source

pub fn clear(&mut self)

Clears the vector, removing all values.

\n

Note that this method has no effect on the allocated capacity\nof the vector.

\n
§Examples
\n
let mut v = vec![1, 2, 3];\n\nv.clear();\n\nassert!(v.is_empty());
\n
1.0.0 · source

pub fn len(&self) -> usize

Returns the number of elements in the vector, also referred to\nas its ‘length’.

\n
§Examples
\n
let a = vec![1, 2, 3];\nassert_eq!(a.len(), 3);
\n
1.0.0 · source

pub fn is_empty(&self) -> bool

Returns true if the vector contains no elements.

\n
§Examples
\n
let mut v = Vec::new();\nassert!(v.is_empty());\n\nv.push(1);\nassert!(!v.is_empty());
\n
1.4.0 · source

pub fn split_off(&mut self, at: usize) -> Vec<T, A>
where\n A: Clone,

Splits the collection into two at the given index.

\n

Returns a newly allocated vector containing the elements in the range\n[at, len). After the call, the original vector will be left containing\nthe elements [0, at) with its previous capacity unchanged.

\n
    \n
  • If you want to take ownership of the entire contents and capacity of\nthe vector, see mem::take or mem::replace.
  • \n
  • If you don’t need the returned vector at all, see Vec::truncate.
  • \n
  • If you want to take ownership of an arbitrary subslice, or you don’t\nnecessarily want to store the removed items in a vector, see Vec::drain.
  • \n
\n
§Panics
\n

Panics if at > len.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nlet vec2 = vec.split_off(1);\nassert_eq!(vec, [1]);\nassert_eq!(vec2, [2, 3]);
\n
1.33.0 · source

pub fn resize_with<F>(&mut self, new_len: usize, f: F)
where\n F: FnMut() -> T,

Resizes the Vec in-place so that len is equal to new_len.

\n

If new_len is greater than len, the Vec is extended by the\ndifference, with each additional slot filled with the result of\ncalling the closure f. The return values from f will end up\nin the Vec in the order they have been generated.

\n

If new_len is less than len, the Vec is simply truncated.

\n

This method uses a closure to create new values on every push. If\nyou’d rather Clone a given value, use Vec::resize. If you\nwant to use the Default trait to generate values, you can\npass Default::default as the second argument.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nvec.resize_with(5, Default::default);\nassert_eq!(vec, [1, 2, 3, 0, 0]);\n\nlet mut vec = vec![];\nlet mut p = 1;\nvec.resize_with(4, || { p *= 2; p });\nassert_eq!(vec, [2, 4, 8, 16]);
\n
1.47.0 · source

pub fn leak<'a>(self) -> &'a mut [T]
where\n A: 'a,

Consumes and leaks the Vec, returning a mutable reference to the contents,\n&'a mut [T]. Note that the type T must outlive the chosen lifetime\n'a. If the type has only static references, or none at all, then this\nmay be chosen to be 'static.

\n

As of Rust 1.57, this method does not reallocate or shrink the Vec,\nso the leaked allocation may include unused capacity that is not part\nof the returned slice.

\n

This function is mainly useful for data that lives for the remainder of\nthe program’s life. Dropping the returned reference will cause a memory\nleak.

\n
§Examples
\n

Simple usage:

\n\n
let x = vec![1, 2, 3];\nlet static_ref: &'static mut [usize] = x.leak();\nstatic_ref[0] += 1;\nassert_eq!(static_ref, &[2, 2, 3]);
\n
1.60.0 · source

pub fn spare_capacity_mut(&mut self) -> &mut [MaybeUninit<T>]

Returns the remaining spare capacity of the vector as a slice of\nMaybeUninit<T>.

\n

The returned slice can be used to fill the vector with data (e.g. by\nreading from a file) before marking the data as initialized using the\nset_len method.

\n
§Examples
\n
// Allocate vector big enough for 10 elements.\nlet mut v = Vec::with_capacity(10);\n\n// Fill in the first 3 elements.\nlet uninit = v.spare_capacity_mut();\nuninit[0].write(0);\nuninit[1].write(1);\nuninit[2].write(2);\n\n// Mark the first 3 elements of the vector as being initialized.\nunsafe {\n    v.set_len(3);\n}\n\nassert_eq!(&v, &[0, 1, 2]);
\n
source

pub fn split_at_spare_mut(&mut self) -> (&mut [T], &mut [MaybeUninit<T>])

🔬This is a nightly-only experimental API. (vec_split_at_spare)

Returns vector content as a slice of T, along with the remaining spare\ncapacity of the vector as a slice of MaybeUninit<T>.

\n

The returned spare capacity slice can be used to fill the vector with data\n(e.g. by reading from a file) before marking the data as initialized using\nthe set_len method.

\n

Note that this is a low-level API, which should be used with care for\noptimization purposes. If you need to append data to a Vec\nyou can use push, extend, extend_from_slice,\nextend_from_within, insert, append, resize or\nresize_with, depending on your exact needs.

\n
§Examples
\n
#![feature(vec_split_at_spare)]\n\nlet mut v = vec![1, 1, 2];\n\n// Reserve additional space big enough for 10 elements.\nv.reserve(10);\n\nlet (init, uninit) = v.split_at_spare_mut();\nlet sum = init.iter().copied().sum::<u32>();\n\n// Fill in the next 4 elements.\nuninit[0].write(sum);\nuninit[1].write(sum * 2);\nuninit[2].write(sum * 3);\nuninit[3].write(sum * 4);\n\n// Mark the 4 elements of the vector as being initialized.\nunsafe {\n    let len = v.len();\n    v.set_len(len + 4);\n}\n\nassert_eq!(&v, &[1, 1, 2, 4, 8, 12, 16]);
\n
",0,"redstone::core::aggregator::Matrix"],["
§

impl<Z> Zeroize for Vec<Z>
where\n Z: Zeroize,

§

fn zeroize(&mut self)

“Best effort” zeroization for Vec.

\n

Ensures the entire capacity of the Vec is zeroed. Cannot ensure that\nprevious reallocations did not leave values on the heap.

\n
","Zeroize","redstone::core::aggregator::Matrix"],["
source§

impl<T, A> DerefPure for Vec<T, A>
where\n A: Allocator,

","DerefPure","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Eq for Vec<T, A>
where\n T: Eq,\n A: Allocator,

","Eq","redstone::core::aggregator::Matrix"],["
§

impl<Z> ZeroizeOnDrop for Vec<Z>
where\n Z: ZeroizeOnDrop,

","ZeroizeOnDrop","redstone::core::aggregator::Matrix"]] };if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/type.impl/redstone/network/casper/struct.Casper.js b/static/rust/redstone/crypto_secp256k1,network_casper/type.impl/redstone/network/casper/struct.Casper.js index cadcd6d3..dd6dda89 100644 --- a/static/rust/redstone/crypto_secp256k1,network_casper/type.impl/redstone/network/casper/struct.Casper.js +++ b/static/rust/redstone/crypto_secp256k1,network_casper/type.impl/redstone/network/casper/struct.Casper.js @@ -1,3 +1,3 @@ (function() {var type_impls = { -"redstone":[["
source§

impl NetworkSpecific for Casper

","NetworkSpecific","redstone::network::_Network"]] +"redstone":[["
source§

impl NetworkSpecific for Casper

","NetworkSpecific","redstone::network::_Network"]] };if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/type.impl/std/primitive.array.js b/static/rust/redstone/crypto_secp256k1,network_casper/type.impl/std/primitive.array.js new file mode 100644 index 00000000..ac9f1135 --- /dev/null +++ b/static/rust/redstone/crypto_secp256k1,network_casper/type.impl/std/primitive.array.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"redstone":[["
source§

impl<T, const N: usize> [T; N]

1.55.0 · source

pub fn map<F, U>(self, f: F) -> [U; N]
where\n F: FnMut(T) -> U,

Returns an array of the same size as self, with function f applied to each element\nin order.

\n

If you don’t necessarily need a new fixed-size array, consider using\nIterator::map instead.

\n
§Note on performance and stack usage
\n

Unfortunately, usages of this method are currently not always optimized\nas well as they could be. This mainly concerns large arrays, as mapping\nover small arrays seem to be optimized just fine. Also note that in\ndebug mode (i.e. without any optimizations), this method can use a lot\nof stack space (a few times the size of the array or more).

\n

Therefore, in performance-critical code, try to avoid using this method\non large arrays or check the emitted code. Also try to avoid chained\nmaps (e.g. arr.map(...).map(...)).

\n

In many cases, you can instead use Iterator::map by calling .iter()\nor .into_iter() on your array. [T; N]::map is only necessary if you\nreally need a new array of the same size as the result. Rust’s lazy\niterators tend to get optimized very well.

\n
§Examples
\n
let x = [1, 2, 3];\nlet y = x.map(|v| v + 1);\nassert_eq!(y, [2, 3, 4]);\n\nlet x = [1, 2, 3];\nlet mut temp = 0;\nlet y = x.map(|v| { temp += 1; v * temp });\nassert_eq!(y, [1, 4, 9]);\n\nlet x = [\"Ferris\", \"Bueller's\", \"Day\", \"Off\"];\nlet y = x.map(|v| v.len());\nassert_eq!(y, [6, 9, 3, 3]);
\n
source

pub fn try_map<R>(\n self,\n f: impl FnMut(T) -> R,\n) -> <<R as Try>::Residual as Residual<[<R as Try>::Output; N]>>::TryType
where\n R: Try,\n <R as Try>::Residual: Residual<[<R as Try>::Output; N]>,

🔬This is a nightly-only experimental API. (array_try_map)

A fallible function f applied to each element on array self in order to\nreturn an array the same size as self or the first error encountered.

\n

The return type of this function depends on the return type of the closure.\nIf you return Result<T, E> from the closure, you’ll get a Result<[T; N], E>.\nIf you return Option<T> from the closure, you’ll get an Option<[T; N]>.

\n
§Examples
\n
#![feature(array_try_map)]\n\nlet a = [\"1\", \"2\", \"3\"];\nlet b = a.try_map(|v| v.parse::<u32>()).unwrap().map(|v| v + 1);\nassert_eq!(b, [2, 3, 4]);\n\nlet a = [\"1\", \"2a\", \"3\"];\nlet b = a.try_map(|v| v.parse::<u32>());\nassert!(b.is_err());\n\nuse std::num::NonZero;\n\nlet z = [1, 2, 0, 3, 4];\nassert_eq!(z.try_map(NonZero::new), None);\n\nlet a = [1, 2, 3];\nlet b = a.try_map(NonZero::new);\nlet c = b.map(|x| x.map(NonZero::get));\nassert_eq!(c, Some(a));
\n
1.57.0 (const: 1.57.0) · source

pub const fn as_slice(&self) -> &[T]

Returns a slice containing the entire array. Equivalent to &s[..].

\n
1.57.0 · source

pub fn as_mut_slice(&mut self) -> &mut [T]

Returns a mutable slice containing the entire array. Equivalent to\n&mut s[..].

\n
1.77.0 · source

pub fn each_ref(&self) -> [&T; N]

Borrows each element and returns an array of references with the same\nsize as self.

\n
§Example
\n
let floats = [3.1, 2.7, -1.0];\nlet float_refs: [&f64; 3] = floats.each_ref();\nassert_eq!(float_refs, [&3.1, &2.7, &-1.0]);
\n

This method is particularly useful if combined with other methods, like\nmap. This way, you can avoid moving the original\narray if its elements are not Copy.

\n\n
let strings = [\"Ferris\".to_string(), \"♥\".to_string(), \"Rust\".to_string()];\nlet is_ascii = strings.each_ref().map(|s| s.is_ascii());\nassert_eq!(is_ascii, [true, false, true]);\n\n// We can still access the original array: it has not been moved.\nassert_eq!(strings.len(), 3);
\n
1.77.0 · source

pub fn each_mut(&mut self) -> [&mut T; N]

Borrows each element mutably and returns an array of mutable references\nwith the same size as self.

\n
§Example
\n
\nlet mut floats = [3.1, 2.7, -1.0];\nlet float_refs: [&mut f64; 3] = floats.each_mut();\n*float_refs[0] = 0.0;\nassert_eq!(float_refs, [&mut 0.0, &mut 2.7, &mut -1.0]);\nassert_eq!(floats, [0.0, 2.7, -1.0]);
\n
source

pub fn split_array_ref<const M: usize>(&self) -> (&[T; M], &[T])

🔬This is a nightly-only experimental API. (split_array)

Divides one array reference into two at an index.

\n

The first will contain all indices from [0, M) (excluding\nthe index M itself) and the second will contain all\nindices from [M, N) (excluding the index N itself).

\n
§Panics
\n

Panics if M > N.

\n
§Examples
\n
#![feature(split_array)]\n\nlet v = [1, 2, 3, 4, 5, 6];\n\n{\n   let (left, right) = v.split_array_ref::<0>();\n   assert_eq!(left, &[]);\n   assert_eq!(right, &[1, 2, 3, 4, 5, 6]);\n}\n\n{\n    let (left, right) = v.split_array_ref::<2>();\n    assert_eq!(left, &[1, 2]);\n    assert_eq!(right, &[3, 4, 5, 6]);\n}\n\n{\n    let (left, right) = v.split_array_ref::<6>();\n    assert_eq!(left, &[1, 2, 3, 4, 5, 6]);\n    assert_eq!(right, &[]);\n}
\n
source

pub fn split_array_mut<const M: usize>(&mut self) -> (&mut [T; M], &mut [T])

🔬This is a nightly-only experimental API. (split_array)

Divides one mutable array reference into two at an index.

\n

The first will contain all indices from [0, M) (excluding\nthe index M itself) and the second will contain all\nindices from [M, N) (excluding the index N itself).

\n
§Panics
\n

Panics if M > N.

\n
§Examples
\n
#![feature(split_array)]\n\nlet mut v = [1, 0, 3, 0, 5, 6];\nlet (left, right) = v.split_array_mut::<2>();\nassert_eq!(left, &mut [1, 0][..]);\nassert_eq!(right, &mut [3, 0, 5, 6]);\nleft[1] = 2;\nright[1] = 4;\nassert_eq!(v, [1, 2, 3, 4, 5, 6]);
\n
source

pub fn rsplit_array_ref<const M: usize>(&self) -> (&[T], &[T; M])

🔬This is a nightly-only experimental API. (split_array)

Divides one array reference into two at an index from the end.

\n

The first will contain all indices from [0, N - M) (excluding\nthe index N - M itself) and the second will contain all\nindices from [N - M, N) (excluding the index N itself).

\n
§Panics
\n

Panics if M > N.

\n
§Examples
\n
#![feature(split_array)]\n\nlet v = [1, 2, 3, 4, 5, 6];\n\n{\n   let (left, right) = v.rsplit_array_ref::<0>();\n   assert_eq!(left, &[1, 2, 3, 4, 5, 6]);\n   assert_eq!(right, &[]);\n}\n\n{\n    let (left, right) = v.rsplit_array_ref::<2>();\n    assert_eq!(left, &[1, 2, 3, 4]);\n    assert_eq!(right, &[5, 6]);\n}\n\n{\n    let (left, right) = v.rsplit_array_ref::<6>();\n    assert_eq!(left, &[]);\n    assert_eq!(right, &[1, 2, 3, 4, 5, 6]);\n}
\n
source

pub fn rsplit_array_mut<const M: usize>(&mut self) -> (&mut [T], &mut [T; M])

🔬This is a nightly-only experimental API. (split_array)

Divides one mutable array reference into two at an index from the end.

\n

The first will contain all indices from [0, N - M) (excluding\nthe index N - M itself) and the second will contain all\nindices from [N - M, N) (excluding the index N itself).

\n
§Panics
\n

Panics if M > N.

\n
§Examples
\n
#![feature(split_array)]\n\nlet mut v = [1, 0, 3, 0, 5, 6];\nlet (left, right) = v.rsplit_array_mut::<4>();\nassert_eq!(left, &mut [1, 0]);\nassert_eq!(right, &mut [3, 0, 5, 6][..]);\nleft[1] = 2;\nright[1] = 4;\nassert_eq!(v, [1, 2, 3, 4, 5, 6]);
\n
",0,"redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<const N: usize> [u8; N]

source

pub const fn as_ascii(&self) -> Option<&[AsciiChar; N]>

🔬This is a nightly-only experimental API. (ascii_char)

Converts this array of bytes into a array of ASCII characters,\nor returns None if any of the characters is non-ASCII.

\n
§Examples
\n
#![feature(ascii_char)]\n#![feature(const_option)]\n\nconst HEX_DIGITS: [std::ascii::Char; 16] =\n    *b\"0123456789abcdef\".as_ascii().unwrap();\n\nassert_eq!(HEX_DIGITS[1].as_str(), \"1\");\nassert_eq!(HEX_DIGITS[10].as_str(), \"a\");
\n
source

pub const unsafe fn as_ascii_unchecked(&self) -> &[AsciiChar; N]

🔬This is a nightly-only experimental API. (ascii_char)

Converts this array of bytes into a array of ASCII characters,\nwithout checking whether they’re valid.

\n
§Safety
\n

Every byte in the array must be in 0..=127, or else this is UB.

\n
",0,"redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
§

impl<const N: usize, T> AsBytes for [T; N]
where\n T: AsBytes,

§

fn as_bytes(&self) -> &[u8]

Gets the bytes of this value. Read more
§

fn write_to(&self, bytes: &mut [u8]) -> Option<()>

Writes a copy of self to bytes. Read more
§

fn write_to_prefix(&self, bytes: &mut [u8]) -> Option<()>

Writes a copy of self to the prefix of bytes. Read more
§

fn write_to_suffix(&self, bytes: &mut [u8]) -> Option<()>

Writes a copy of self to the suffix of bytes. Read more
","AsBytes","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.0.0 · source§

impl<T, const N: usize> AsMut<[T]> for [T; N]

source§

fn as_mut(&mut self) -> &mut [T]

Converts this type into a mutable reference of the (usually inferred) input type.
","AsMut<[T]>","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.0.0 · source§

impl<T, const N: usize> AsRef<[T]> for [T; N]

source§

fn as_ref(&self) -> &[T]

Converts this type into a shared reference of the (usually inferred) input type.
","AsRef<[T]>","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
§

impl<const N: usize, T> BatchInvert<[T; N]> for T
where\n T: Invert<Output = CtOption<T>> + Mul<Output = T> + Copy + Default + ConditionallySelectable,

§

type Output = [T; N]

The output of batch inversion. A container of field elements.
§

fn batch_invert(field_elements: &[T; N]) -> CtOption<[T; N]>

Invert a batch of field elements.
","BatchInvert<[T; N]>","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T, const N: usize> Borrow<[T]> for [T; N]

source§

fn borrow(&self) -> &[T]

Immutably borrows from an owned value. Read more
","Borrow<[T]>","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T, const N: usize> BorrowMut<[T]> for [T; N]

source§

fn borrow_mut(&mut self) -> &mut [T]

Mutably borrows from an owned value. Read more
","BorrowMut<[T]>","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<const COUNT: usize> CLTyped for [u8; COUNT]

source§

fn cl_type() -> CLType

The CLType of Self.
","CLTyped","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
§

impl CPtr for [u8; 32]

§

type Target = u8

§

fn as_c_ptr(&self) -> *const <[u8; 32] as CPtr>::Target

§

fn as_mut_c_ptr(&mut self) -> *mut <[u8; 32] as CPtr>::Target

","CPtr","redstone::crypto::Keccak256Hash"],["
1.58.0 · source§

impl<T, const N: usize> Clone for [T; N]
where\n T: Clone,

source§

fn clone(&self) -> [T; N]

Returns a copy of the value. Read more
source§

fn clone_from(&mut self, other: &[T; N])

Performs copy-assignment from source. Read more
","Clone","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.0.0 · source§

impl<T, const N: usize> Debug for [T; N]
where\n T: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
§

impl<'a, T, const N: usize> DecodeValue<'a> for [T; N]
where\n T: Decode<'a>,

§

fn decode_value<R>(reader: &mut R, header: Header) -> Result<[T; N], Error>
where\n R: Reader<'a>,

Attempt to decode this message using the provided [Reader].
","DecodeValue<'a>","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 32]
where\n T: Default,

source§

fn default() -> [T; 32]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash"],["
1.4.0 · source§

impl<T> Default for [T; 31]
where\n T: Default,

source§

fn default() -> [T; 31]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 30]
where\n T: Default,

source§

fn default() -> [T; 30]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 29]
where\n T: Default,

source§

fn default() -> [T; 29]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 28]
where\n T: Default,

source§

fn default() -> [T; 28]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 27]
where\n T: Default,

source§

fn default() -> [T; 27]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 26]
where\n T: Default,

source§

fn default() -> [T; 26]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 25]
where\n T: Default,

source§

fn default() -> [T; 25]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 24]
where\n T: Default,

source§

fn default() -> [T; 24]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 23]
where\n T: Default,

source§

fn default() -> [T; 23]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 22]
where\n T: Default,

source§

fn default() -> [T; 22]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 21]
where\n T: Default,

source§

fn default() -> [T; 21]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 20]
where\n T: Default,

source§

fn default() -> [T; 20]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 19]
where\n T: Default,

source§

fn default() -> [T; 19]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 18]
where\n T: Default,

source§

fn default() -> [T; 18]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 17]
where\n T: Default,

source§

fn default() -> [T; 17]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 16]
where\n T: Default,

source§

fn default() -> [T; 16]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 15]
where\n T: Default,

source§

fn default() -> [T; 15]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 14]
where\n T: Default,

source§

fn default() -> [T; 14]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 13]
where\n T: Default,

source§

fn default() -> [T; 13]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 12]
where\n T: Default,

source§

fn default() -> [T; 12]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 11]
where\n T: Default,

source§

fn default() -> [T; 11]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 10]
where\n T: Default,

source§

fn default() -> [T; 10]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 9]
where\n T: Default,

source§

fn default() -> [T; 9]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 8]
where\n T: Default,

source§

fn default() -> [T; 8]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 7]
where\n T: Default,

source§

fn default() -> [T; 7]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 6]
where\n T: Default,

source§

fn default() -> [T; 6]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 5]
where\n T: Default,

source§

fn default() -> [T; 5]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 4]
where\n T: Default,

source§

fn default() -> [T; 4]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 3]
where\n T: Default,

source§

fn default() -> [T; 3]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 2]
where\n T: Default,

source§

fn default() -> [T; 2]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 1]
where\n T: Default,

source§

fn default() -> [T; 1]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.4.0 · source§

impl<T> Default for [T; 0]

source§

fn default() -> [T; 0]

Returns the “default value” for a type. Read more
","Default","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<'de, T> Deserialize<'de> for [T; 32]
where\n T: Deserialize<'de>,

source§

fn deserialize<D>(\n deserializer: D,\n) -> Result<[T; 32], <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","redstone::crypto::Keccak256Hash"],["
source§

impl<'de, const N: usize> Deserialize<'de> for [u8; N]

source§

fn deserialize<D>(\n deserializer: D,\n) -> Result<[u8; N], <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

","Deserialize<'de>","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
§

impl<T, const N: usize> EncodeValue for [T; N]
where\n T: Encode,

§

fn value_len(&self) -> Result<Length, Error>

Compute the length of this value (sans [Tag]+[Length] header) when\nencoded as ASN.1 DER.
§

fn encode_value(&self, writer: &mut impl Writer) -> Result<(), Error>

Encode value (sans [Tag]+[Length] header) as ASN.1 DER using the\nprovided [Writer].
§

fn header(&self) -> Result<Header, Error>
where\n Self: Tagged,

Get the [Header] used to encode this value.
","EncodeValue","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 32]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash"],["
source§

impl<T> Fill for [T; 31]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 30]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 29]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 28]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 27]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 26]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 25]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 24]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 23]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 22]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 21]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 20]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 19]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 18]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 17]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 16]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 15]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 14]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 13]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 12]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 11]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 10]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 9]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 8]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 7]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 6]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 5]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 4]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 3]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 2]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 1]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 0]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 2048]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 1024]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 512]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 256]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 128]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Fill for [T; 64]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
§

impl<T, const N: usize> FixedTag for [T; N]

§

const TAG: Tag = Tag::Sequence

ASN.1 tag
","FixedTag","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
§

impl From<&Signature> for [u8; 64]

§

fn from(sig: &Signature) -> [u8; 64]

Converts to this type from the input type.
","From<&Signature>","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
§

impl<T> From<GenericArray<T, UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>> for [T; 64]

§

fn from(\n sel: GenericArray<T, UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>,\n) -> [T; 64]

Converts to this type from the input type.
","From, B0>, B0>, B0>, B0>, B0>, B0>>>","redstone::crypto::Secp256SigRs"],["
§

impl<T> From<GenericArray<T, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>> for [T; 32]

§

fn from(\n sel: GenericArray<T, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>,\n) -> [T; 32]

Converts to this type from the input type.
","From, B0>, B0>, B0>, B0>, B0>>>","redstone::crypto::Keccak256Hash"],["
§

impl From<Signature> for [u8; 64]

§

fn from(sig: Signature) -> [u8; 64]

Converts to this type from the input type.
","From","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T, const N: usize> From<Simd<T, N>> for [T; N]

source§

fn from(vector: Simd<T, N>) -> [T; N]

Converts to this type from the input type.
","From>","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl From<U128> for [u8; 16]

source§

fn from(number: U128) -> [u8; 16]

Converts to this type from the input type.
","From","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl From<U256> for [u8; 32]

source§

fn from(number: U256) -> [u8; 32]

Converts to this type from the input type.
","From","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl From<U512> for [u8; 64]

source§

fn from(number: U512) -> [u8; 64]

Converts to this type from the input type.
","From","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
§

impl<const N: usize, T> FromBytes for [T; N]
where\n T: FromBytes,

§

fn ref_from(bytes: &[u8]) -> Option<&Self>
where\n Self: Sized,

Interprets the given bytes as a &Self without copying. Read more
§

fn ref_from_prefix(bytes: &[u8]) -> Option<&Self>
where\n Self: Sized,

Interprets the prefix of the given bytes as a &Self without copying. Read more
§

fn ref_from_suffix(bytes: &[u8]) -> Option<&Self>
where\n Self: Sized,

Interprets the suffix of the given bytes as a &Self without copying. Read more
§

fn slice_from(bytes: &[u8]) -> Option<&[Self]>
where\n Self: Sized,

Interprets the given bytes as a &[Self] without copying. Read more
§

fn slice_from_prefix(bytes: &[u8], count: usize) -> Option<(&[Self], &[u8])>
where\n Self: Sized,

Interprets the prefix of the given bytes as a &[Self] with length\nequal to count without copying. Read more
§

fn slice_from_suffix(bytes: &[u8], count: usize) -> Option<(&[u8], &[Self])>
where\n Self: Sized,

Interprets the suffix of the given bytes as a &[Self] with length\nequal to count without copying. Read more
§

fn read_from(bytes: &[u8]) -> Option<Self>
where\n Self: Sized,

Reads a copy of Self from bytes. Read more
§

fn read_from_prefix(bytes: &[u8]) -> Option<Self>
where\n Self: Sized,

Reads a copy of Self from the prefix of bytes. Read more
§

fn read_from_suffix(bytes: &[u8]) -> Option<Self>
where\n Self: Sized,

Reads a copy of Self from the suffix of bytes. Read more
","FromBytes","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<const COUNT: usize> FromBytes for [u8; COUNT]

source§

fn from_bytes(bytes: &[u8]) -> Result<([u8; COUNT], &[u8]), Error>

Deserializes the slice into Self.
source§

fn from_vec(bytes: Vec<u8>) -> Result<(Self, Vec<u8>), Error>

Deserializes the Vec<u8> into Self.
","FromBytes","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl FromHex for [u8; 32]

§

type Error = FromHexError

source§

fn from_hex<T>(hex: T) -> Result<[u8; 32], <[u8; 32] as FromHex>::Error>
where\n T: AsRef<[u8]>,

Creates an instance of type Self from the given hex string, or fails\nwith a custom error type. Read more
","FromHex","redstone::crypto::Keccak256Hash"],["
source§

impl FromHex for [u8; 64]

§

type Error = FromHexError

source§

fn from_hex<T>(hex: T) -> Result<[u8; 64], <[u8; 64] as FromHex>::Error>
where\n T: AsRef<[u8]>,

Creates an instance of type Self from the given hex string, or fails\nwith a custom error type. Read more
","FromHex","redstone::crypto::Secp256SigRs"],["
source§

impl FromHex for [u8; 65]

§

type Error = FromHexError

source§

fn from_hex<T>(hex: T) -> Result<[u8; 65], <[u8; 65] as FromHex>::Error>
where\n T: AsRef<[u8]>,

Creates an instance of type Self from the given hex string, or fails\nwith a custom error type. Read more
","FromHex","redstone::crypto::EcdsaUncompressedPublicKey"],["
§

impl<const N: usize, T> FromZeroes for [T; N]
where\n T: FromZeroes,

§

fn zero(&mut self)

Overwrites self with zeroes. Read more
§

fn new_zeroed() -> Self
where\n Self: Sized,

Creates an instance of Self from zeroed bytes. Read more
","FromZeroes","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.0.0 · source§

impl<T, const N: usize> Hash for [T; N]
where\n T: Hash,

The hash of an array is the same as that of the corresponding slice,\nas required by the Borrow implementation.

\n\n
use std::hash::BuildHasher;\n\nlet b = std::hash::RandomState::new();\nlet a: [u8; 3] = [0xa8, 0x3c, 0x09];\nlet s: &[u8] = &[0xa8, 0x3c, 0x09];\nassert_eq!(b.hash_one(a), b.hash_one(s));
\n
source§

fn hash<H>(&self, state: &mut H)
where\n H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.50.0 · source§

impl<T, I, const N: usize> Index<I> for [T; N]
where\n [T]: Index<I>,

§

type Output = <[T] as Index<I>>::Output

The returned type after indexing.
source§

fn index(&self, index: I) -> &<[T; N] as Index<I>>::Output

Performs the indexing (container[index]) operation. Read more
","Index","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.50.0 · source§

impl<T, I, const N: usize> IndexMut<I> for [T; N]
where\n [T]: IndexMut<I>,

source§

fn index_mut(&mut self, index: I) -> &mut <[T; N] as Index<I>>::Output

Performs the mutable indexing (container[index]) operation. Read more
","IndexMut","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.53.0 · source§

impl<T, const N: usize> IntoIterator for [T; N]

source§

fn into_iter(self) -> <[T; N] as IntoIterator>::IntoIter

Creates a consuming iterator, that is, one that moves each value out of\nthe array (from start to end). The array cannot be used after calling\nthis unless T implements Copy, so the whole array is copied.

\n

Arrays have special behavior when calling .into_iter() prior to the\n2021 edition – see the array Editions section for more information.

\n
§

type Item = T

The type of the elements being iterated over.
§

type IntoIter = IntoIter<T, N>

Which kind of iterator are we turning this into?
","IntoIterator","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.0.0 · source§

impl<T, const N: usize> Ord for [T; N]
where\n T: Ord,

Implements comparison of arrays lexicographically.

\n
source§

fn cmp(&self, other: &[T; N]) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
","Ord","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.0.0 · source§

impl<T, U, const N: usize> PartialEq<&[U]> for [T; N]
where\n T: PartialEq<U>,

source§

fn eq(&self, other: &&[U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&[U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&[U]>","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.0.0 · source§

impl<T, U, const N: usize> PartialEq<&mut [U]> for [T; N]
where\n T: PartialEq<U>,

source§

fn eq(&self, other: &&mut [U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&mut [U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&mut [U]>","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.0.0 · source§

impl<T, U, const N: usize> PartialEq<[U]> for [T; N]
where\n T: PartialEq<U>,

source§

fn eq(&self, other: &[U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &[U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<[U]>","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.0.0 · source§

impl<T, U, const N: usize> PartialEq<[U; N]> for [T; N]
where\n T: PartialEq<U>,

source§

fn eq(&self, other: &[U; N]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &[U; N]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<[U; N]>","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.0.0 · source§

impl<T, const N: usize> PartialOrd for [T; N]
where\n T: PartialOrd,

Implements comparison of arrays lexicographically.

\n
source§

fn partial_cmp(&self, other: &[T; N]) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
source§

fn lt(&self, other: &[T; N]) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
source§

fn le(&self, other: &[T; N]) -> bool

This method tests less than or equal to (for self and other) and is used by the <=\noperator. Read more
source§

fn ge(&self, other: &[T; N]) -> bool

This method tests greater than or equal to (for self and other) and is used by the >=\noperator. Read more
source§

fn gt(&self, other: &[T; N]) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
","PartialOrd","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T> Serialize for [T; 32]
where\n T: Serialize,

source§

fn serialize<S>(\n &self,\n serializer: S,\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","redstone::crypto::Keccak256Hash"],["
source§

impl<const N: usize> Serialize for [u8; N]

source§

fn serialize<S>(\n &self,\n serializer: S,\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

","Serialize","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.51.0 · source§

impl<T, const N: usize> SlicePattern for [T; N]

§

type Item = T

🔬This is a nightly-only experimental API. (slice_pattern)
The element type of the slice being matched on.
source§

fn as_slice(&self) -> &[<[T; N] as SlicePattern>::Item]

🔬This is a nightly-only experimental API. (slice_pattern)
Currently, the consumers of SlicePattern need a slice.
","SlicePattern","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<const COUNT: usize> ToBytes for [u8; COUNT]

source§

fn to_bytes(&self) -> Result<Vec<u8>, Error>

Serializes &self to a Vec<u8>.
source§

fn serialized_length(&self) -> usize

Returns the length of the Vec<u8> which would be returned from a successful call to\nto_bytes() or into_bytes(). The data is not actually serialized, so this call is\nrelatively cheap.
source§

fn write_bytes(&self, writer: &mut Vec<u8>) -> Result<(), Error>

Writes &self into a mutable writer.
source§

fn into_bytes(self) -> Result<Vec<u8>, Error>
where\n Self: Sized,

Consumes self and serializes to a Vec<u8>.
","ToBytes","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.34.0 · source§

impl<T, const N: usize> TryFrom<&[T]> for [T; N]
where\n T: Copy,

Tries to create an array [T; N] by copying from a slice &[T]. Succeeds if\nslice.len() == N.

\n\n
let bytes: [u8; 3] = [1, 0, 2];\n\nlet bytes_head: [u8; 2] = <[u8; 2]>::try_from(&bytes[0..2]).unwrap();\nassert_eq!(1, u16::from_le_bytes(bytes_head));\n\nlet bytes_tail: [u8; 2] = bytes[1..3].try_into().unwrap();\nassert_eq!(512, u16::from_le_bytes(bytes_tail));
\n
§

type Error = TryFromSliceError

The type returned in the event of a conversion error.
source§

fn try_from(slice: &[T]) -> Result<[T; N], TryFromSliceError>

Performs the conversion.
","TryFrom<&[T]>","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.59.0 · source§

impl<T, const N: usize> TryFrom<&mut [T]> for [T; N]
where\n T: Copy,

Tries to create an array [T; N] by copying from a mutable slice &mut [T].\nSucceeds if slice.len() == N.

\n\n
let mut bytes: [u8; 3] = [1, 0, 2];\n\nlet bytes_head: [u8; 2] = <[u8; 2]>::try_from(&mut bytes[0..2]).unwrap();\nassert_eq!(1, u16::from_le_bytes(bytes_head));\n\nlet bytes_tail: [u8; 2] = (&mut bytes[1..3]).try_into().unwrap();\nassert_eq!(512, u16::from_le_bytes(bytes_tail));
\n
§

type Error = TryFromSliceError

The type returned in the event of a conversion error.
source§

fn try_from(slice: &mut [T]) -> Result<[T; N], TryFromSliceError>

Performs the conversion.
","TryFrom<&mut [T]>","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.48.0 · source§

impl<T, A, const N: usize> TryFrom<Vec<T, A>> for [T; N]
where\n A: Allocator,

source§

fn try_from(vec: Vec<T, A>) -> Result<[T; N], Vec<T, A>>

Gets the entire contents of the Vec<T> as an array,\nif its size exactly matches that of the requested array.

\n
§Examples
\n
assert_eq!(vec![1, 2, 3].try_into(), Ok([1, 2, 3]));\nassert_eq!(<Vec<i32>>::new().try_into(), Ok([]));
\n

If the length doesn’t match, the input comes back in Err:

\n\n
let r: Result<[i32; 4], _> = (0..10).collect::<Vec<_>>().try_into();\nassert_eq!(r, Err(vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9]));
\n

If you’re fine with just getting a prefix of the Vec<T>,\nyou can call .truncate(N) first.

\n\n
let mut v = String::from(\"hello world\").into_bytes();\nv.sort();\nv.truncate(2);\nlet [a, b]: [_; 2] = v.try_into().unwrap();\nassert_eq!(a, b' ');\nassert_eq!(b, b'd');
\n
§

type Error = Vec<T, A>

The type returned in the event of a conversion error.
","TryFrom>","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
§

impl<T, const N: usize> ValueOrd for [T; N]
where\n T: DerOrd,

§

fn value_cmp(&self, other: &[T; N]) -> Result<Ordering, Error>

Return an Ordering between value portion of TLV-encoded self and\nother when serialized as ASN.1 DER.
","ValueOrd","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
§

impl<Z, const N: usize> Zeroize for [Z; N]
where\n Z: Zeroize,

Impl [Zeroize] on arrays of types that impl [Zeroize].

\n
§

fn zeroize(&mut self)

Zero out this object from memory using Rust intrinsics which ensure the\nzeroization operation is not “optimized away” by the compiler.
","Zeroize","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T, const N: usize> ConstParamTy for [T; N]
where\n T: ConstParamTy,

","ConstParamTy","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.58.0 · source§

impl<T, const N: usize> Copy for [T; N]
where\n T: Copy,

","Copy","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
1.0.0 · source§

impl<T, const N: usize> Eq for [T; N]
where\n T: Eq,

","Eq","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
source§

impl<T, const N: usize> StructuralPartialEq for [T; N]

","StructuralPartialEq","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
§

impl<const N: usize, T> Unaligned for [T; N]
where\n T: Unaligned,

","Unaligned","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"],["
§

impl<Z, const N: usize> ZeroizeOnDrop for [Z; N]
where\n Z: ZeroizeOnDrop,

Impl [ZeroizeOnDrop] on arrays of types that impl [ZeroizeOnDrop].

\n
","ZeroizeOnDrop","redstone::crypto::Keccak256Hash","redstone::crypto::Secp256SigRs","redstone::crypto::EcdsaUncompressedPublicKey"]] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/index.html deleted file mode 100644 index 541ea6ec..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/index.html +++ /dev/null @@ -1 +0,0 @@ -redstone::crypto - Rust

Module redstone::crypto

source ·

Modules§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/sidebar-items.js deleted file mode 100644 index 521fe7cb..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["keccak256","recover"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/radix/struct.Radix.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/radix/struct.Radix.html deleted file mode 100644 index b85d42ea..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/radix/struct.Radix.html +++ /dev/null @@ -1,13 +0,0 @@ -Radix in redstone::network::radix - Rust

Struct redstone::network::radix::Radix

source ·
pub struct Radix;

Trait Implementations§

Auto Trait Implementations§

§

impl Freeze for Radix

§

impl RefUnwindSafe for Radix

§

impl Send for Radix

§

impl Sync for Radix

§

impl Unpin for Radix

§

impl UnwindSafe for Radix

Blanket Implementations§

source§

impl<T> Any for T
where - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<U> As for U

§

fn as_<T>(self) -> T
where - T: CastFrom<U>,

Casts self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read more
source§

impl<T> Borrow<T> for T
where - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for T
where - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

-

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

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where - V: MultiLane<T>,

§

fn vzip(self) -> V

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/search-index.js b/static/rust/redstone/crypto_secp256k1,network_radix/search-index.js deleted file mode 100644 index 456ed3aa..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/search-index.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchIndex = new Map(JSON.parse('[\ -["redstone",{"t":"CCCQQCCCCCCCIHHHFNNONNONNNNONONNNNNNHHFNNNNNNNNNNNONNNONKMMMMCCHCHHICCCCCCCCKKMMKRKHMHMPPPKPGPPPPPPPNNNNNNMNNNNNNMNNNNNNKMKKMMFNNNNCNNNNNNCNKMIRIKISTRRNNNNNHMHMCCCCCSSSSSSSSSSSFNNNNNNONNNNNNNOONHHNNNNFNNNNNNNNNNONNNNHHNNNONHFNNNNNNONNNNNHHNNNNCCCCKMKKRKMHMKMKM","n":["core","crypto","network","print_and_panic","print_debug","protocol","utils","aggregator","config","processor","processor_result","validator","Matrix","aggregate_matrix","aggregate_values","make_value_signer_matrix","Config","as_","assert_or_revert","block_timestamp","borrow","borrow_mut","feed_ids","feed_index","fmt","from","into","signer_count_threshold","signer_index","signers","try_from","try_into","type_id","validate_signer_count_threshold","validate_timestamp","vzip","make_processor_result","process_payload","ProcessorResult","as_","assert_or_revert","borrow","borrow_mut","eq","equivalent","equivalent","equivalent","fmt","from","into","min_timestamp","try_from","try_into","type_id","values","vzip","Validator","feed_index","signer_index","validate_signer_count_threshold","validate_timestamp","keccak256","recover","keccak256","crypto256","recover_address","recover_public_key","_Network","as_str","assert","error","flattened","from_bytes_repr","print_debug","radix","specific","AsAsciiStr","AsHexStr","as_ascii_str","as_hex_str","Assert","ErrorArg","Unwrap","assert_or_revert","assert_or_revert","assert_or_revert_bool_with","unwrap_or_revert","ArrayIsEmpty","ClonedContractError","ContractError","ContractErrorContent","CryptographicError","Error","InsufficientSignerCount","NonEmptyPayloadRemainder","NumberOverflow","SizeNotSupported","TimestampTooFuture","TimestampTooOld","WrongRedStoneMarker","as_","assert_or_revert","borrow","borrow_mut","clone","clone_into","code","code","contract_error","fmt","fmt","from","into","message","to_owned","to_string","try_from","try_into","type_id","vzip","Flattened","flattened","FromBytesRepr","Sanitized","from_bytes_repr","sanitized","Radix","as_","borrow","borrow_mut","from","from_bytes_repr","into","print","revert","try_from","try_into","type_id","u256_ext","vzip","U256Ext","max_value","Bytes","BytesRepr","Network","NetworkSpecific","U256","VALUE_SIZE","VALUE_SIZE","ValueRepr","_Self","as_ascii_str","as_hex_str","avg","from_bytes_repr","max_value","print","print","revert","revert","constants","data_package","data_point","marker","payload","DATA_FEED_ID_BS","DATA_PACKAGES_COUNT_BS","DATA_POINTS_COUNT_BS","DATA_POINT_VALUE_BYTE_SIZE_BS","MAX_TIMESTAMP_AHEAD_MS","MAX_TIMESTAMP_DELAY_MS","REDSTONE_MARKER","REDSTONE_MARKER_BS","SIGNATURE_BS","TIMESTAMP_BS","UNSIGNED_METADATA_BYTE_SIZE_BS","DataPackage","as_","assert_or_revert","borrow","borrow_mut","clone","clone_into","data_points","eq","equivalent","equivalent","equivalent","fmt","from","into","signer_address","timestamp","to_owned","trim_data_package","trim_data_packages","try_from","try_into","type_id","vzip","DataPoint","as_","assert_or_revert","borrow","borrow_mut","clone","clone_into","eq","equivalent","equivalent","equivalent","feed_id","fmt","from","into","to_owned","trim_data_point","trim_data_points","try_from","try_into","type_id","value","vzip","trim_redstone_marker","Payload","as_","assert_or_revert","borrow","borrow_mut","clone","clone_into","data_packages","fmt","from","into","make","to_owned","trim_metadata","trim_payload","try_from","try_into","type_id","vzip","filter","median","trim","trim_zeros","FilterSome","filter_some","Averageable","Avg","Item","Median","avg","maybe_pick_median","median","Trim","trim_end","TrimZeros","trim_zeros"],"q":[[0,"redstone"],[7,"redstone::core"],[12,"redstone::core::aggregator"],[16,"redstone::core::config"],[36,"redstone::core::processor"],[38,"redstone::core::processor_result"],[56,"redstone::core::validator"],[61,"redstone::crypto"],[63,"redstone::crypto::keccak256"],[64,"redstone::crypto::recover"],[66,"redstone::crypto::recover::crypto256"],[67,"redstone::network"],[76,"redstone::network::as_str"],[80,"redstone::network::assert"],[87,"redstone::network::error"],[120,"redstone::network::flattened"],[122,"redstone::network::from_bytes_repr"],[126,"redstone::network::radix"],[140,"redstone::network::radix::u256_ext"],[142,"redstone::network::specific"],[160,"redstone::protocol"],[165,"redstone::protocol::constants"],[176,"redstone::protocol::data_package"],[200,"redstone::protocol::data_point"],[223,"redstone::protocol::marker"],[224,"redstone::protocol::payload"],[243,"redstone::utils"],[247,"redstone::utils::filter"],[249,"redstone::utils::median"],[256,"redstone::utils::trim"],[258,"redstone::utils::trim_zeros"],[260,"core::option"],[261,"alloc::vec"],[262,"bnum::cast"],[263,"core::ops::function"],[264,"core::fmt"],[265,"core::result"],[266,"core::any"],[267,"alloc::boxed"],[268,"alloc::string"],[269,"core::cmp"]],"i":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,0,24,24,24,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26,28,0,34,0,0,31,0,34,9,9,9,0,9,0,9,9,9,9,9,9,9,9,9,9,9,9,9,35,9,9,9,9,9,9,35,9,9,9,9,9,9,0,37,0,0,38,39,0,50,50,50,50,0,50,50,50,50,50,50,0,50,0,41,0,51,0,0,0,0,51,51,51,1,1,1,1,1,0,51,0,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,5,5,5,5,0,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,0,0,42,42,42,42,42,0,0,20,20,20,20,20,20,20,20,20,20,20,20,0,0,20,20,20,20,0,0,0,0,0,43,0,0,47,0,44,0,47,0,48,0,49],"f":"`````````````{{{f{{f{{d{b}}}}}}h}{{f{b}}}}{{h{f{j}}}{{f{b}}}}{{{l{h}}{f{j}}}{{f{{f{{d{b}}}}}}}}`{cg{}{}{{n{e}}}}{{cei}g{}{}{}{{Ad{{l{g}}}{{A`{Ab}}}}}}`{{{l{c}}}{{l{e}}}{}{}}{{{l{Afc}}}{{l{Afe}}}{}{}}`{{{l{h}}b}{{d{Ah}}}}{{{l{h}}{l{AfAj}}}Al}{cc{}}{ce{}{}}`{{{l{h}}{l{{B`{An}}}}}{{d{Ah}}}}`{c{{Bb{e}}}{}{}}0{{{l{c}}}Bd{}}{{{l{h}}Ah{l{{B`{{d{b}}}}}}}{{f{b}}}}{{{l{h}}AhBf}Bf}5{{hBh}Bj}{{hBl}Bj}`>=<;{{{l{Bj}}{l{Bj}}}Bn}{{{l{c}}{l{e}}}Bn{}{}}00{{{l{Bj}}{l{AfAj}}}Al};:`887`:`{{{l{C`}}b}{{d{Ah}}}}{{{l{C`}}{l{{B`{An}}}}}{{d{Ah}}}}{{{l{C`}}Ah{l{{B`{{d{b}}}}}}}{{f{b}}}}{{{l{C`}}AhBf}Bf}``{{{l{{B`{An}}}}}{{Cb{{B`{An}}}}}}`{{{f{An}}{f{An}}}{{f{An}}}}{{{Cb{{B`{An}}}}{l{{B`{An}}}}An}{{Cb{{B`{An}}}}}}```````````{{{l{Cd}}}Cf}{{{l{Ch}}}Cf}```{{ceg}cCj{{Cl{{l{c}}}{{A`{Bn}}}}}{{Ad{{l{c}}}{{A`{Ab}}}}}}{{Cnce}Cn{}{{Cl{{l{Cn}}}{{A`{Ab}}}}}}{{Bnc}D`{{Ad{}{{A`{Ab}}}}}}{{{Dd{}{{Db{c}}}}e}g{}{{Cl{{l{c}}}{{A`{Ab}}}}}{}}`````````````{cg{}{}{{n{e}}}}{{cei}g{}{}{}{{Ad{{l{g}}}{{A`{Ab}}}}}}{{{l{c}}}{{l{e}}}{}{}}{{{l{Afc}}}{{l{Afe}}}{}{}}{{{l{Ab}}}Ab}{{{l{c}}{l{Afe}}}D`{}{}}{{{l{Df}}}An}{{{l{Ab}}}Dh}{cAbDf}{{{l{Ab}}{l{AfAj}}}Al}0{cc{}}{ce{}{}}{{{l{Df}}}Cf}{{{l{c}}}e{}{}}{{{l{c}}}Cf{}}{c{{Bb{e}}}{}{}}0{{{l{c}}}Bd{}}5`{{{l{Dj}}}c{}}``{cDl{}}{DnDn}`{cg{}{}{{n{e}}}}{{{l{c}}}{{l{e}}}{}{}}{{{l{Afc}}}{{l{Afe}}}{}{}}<`;{CfD`}{AbE`}998`=`{{}Eb}`````````{{{l{b}}}Cf}0{{bb}b}{{{f{An}}}b}{{}b}6655`````````````````9{{cei}g{}{}{}{{Ad{{l{g}}}{{A`{Ab}}}}}}98{{{l{j}}}j}{{{l{c}}{l{Afe}}}D`{}{}}`{{{l{j}}{l{j}}}Bn}{{{l{c}}{l{e}}}Bn{}{}}00{{{l{j}}{l{AfAj}}}Al}{cc{}}{ce{}{}}``{{{l{c}}}e{}{}}{{{l{Af{f{An}}}}}j}{{{l{Af{f{An}}}}Ah}{{f{j}}}}{c{{Bb{e}}}{}{}}0{{{l{c}}}Bd{}}5`{cg{}{}{{n{e}}}}={{{l{c}}}{{l{e}}}{}{}}{{{l{Afc}}}{{l{Afe}}}{}{}}{{{l{Ed}}}Ed}>{{{l{Ed}}{l{Ed}}}Bn}===`{{{l{Ed}}{l{AfAj}}}Al}<;:{{{l{Af{f{An}}}}Ah}Ed}{{{l{Af{f{An}}}}AhAh}{{f{Ed}}}}998`={{{l{Af{f{An}}}}}D`}`8{{cei}g{}{}{}{{Ad{{l{g}}}{{A`{Ab}}}}}}87{{{l{Bh}}}Bh}{{{l{c}}{l{Afe}}}D`{}{}}`{{{l{Bh}}{l{AfAj}}}Al}{cc{}}{ce{}{}}{{{l{Af{f{An}}}}}Bh}{{{l{c}}}e{}{}}{{{l{Af{f{An}}}}}Ah}2{c{{Bb{e}}}{}{}}0{{{l{c}}}Bd{}}5`````{{{l{Ef}}}c{}}````{{EhEh}Eh}{{ccc}{{d{c}}}Ej}{{{En{}{{El{c}}}}}c{}}`{{{l{AfF`}}Ah}c{}}`{FbFb}","D":"Ed","p":[[8,"U256",142],[6,"Option",260],[5,"Vec",261],[5,"Config",16],[5,"DataPackage",176],[1,"reference"],[10,"CastFrom",262],[17,"Output"],[6,"Error",87],[10,"FnOnce",263],[0,"mut"],[1,"usize"],[5,"Formatter",264],[8,"Result",264],[1,"u8"],[1,"slice"],[6,"Result",265],[5,"TypeId",266],[1,"u64"],[5,"Payload",224],[5,"ProcessorResult",38],[8,"Bytes",142],[1,"bool"],[10,"Validator",56],[5,"Box",267],[10,"AsAsciiStr",76],[5,"String",268],[10,"AsHexStr",76],[10,"Debug",264],[10,"Fn",263],[10,"Assert",80],[1,"unit"],[17,"ErrorArg"],[10,"Unwrap",80],[10,"ContractErrorContent",87],[1,"u16"],[10,"Flattened",120],[10,"FromBytesRepr",122],[10,"Sanitized",122],[1,"never"],[10,"U256Ext",140],[5,"DataPoint",200],[10,"FilterSome",247],[10,"Avg",249],[10,"PartialOrd",269],[17,"Item"],[10,"Median",249],[10,"Trim",256],[10,"TrimZeros",258],[5,"Radix",126],[10,"NetworkSpecific",142]],"r":[],"b":[[109,"impl-Debug-for-Error"],[110,"impl-Display-for-Error"]],"c":"OjAAAAAAAAA=","e":"OzAAAAEAANoAEwABAA0AEAAAABIAAQAVAAEAGAABAB0AAAAfAAYAKAAIADQAAgA4AAAAPgAZAFsAAABlAAoAcgAQAIQAAACGADcAwAAVANgAEQDsABgA"}]\ -]')); -if (typeof exports !== 'undefined') exports.searchIndex = searchIndex; -else if (window.initSearch) window.initSearch(searchIndex); diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/core/mod.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/core/mod.rs.html deleted file mode 100644 index f278fb16..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/core/mod.rs.html +++ /dev/null @@ -1,21 +0,0 @@ -mod.rs - source
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-
pub mod config;
-pub mod processor;
-pub mod processor_result;
-
-mod aggregator;
-mod validator;
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod test_helpers;
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/crypto/keccak256.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/crypto/keccak256.rs.html deleted file mode 100644 index 7e62e207..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/crypto/keccak256.rs.html +++ /dev/null @@ -1,73 +0,0 @@ -keccak256.rs - source
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-
use sha3::{Digest, Keccak256};
-
-pub fn keccak256(data: &[u8]) -> Box<[u8]> {
-    Keccak256::new_with_prefix(data)
-        .finalize()
-        .as_slice()
-        .into()
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{crypto::keccak256::keccak256, helpers::hex::hex_to_bytes};
-
-    const MESSAGE: &str = "415641580000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d394303d018d79bf0ba000000020000001";
-    const MESSAGE_HASH: &str = "f0805644755393876d0e917e553f0c206f8bc68b7ebfe73a79d2a9e7f5a4cea6";
-    const EMPTY_MESSAGE_HASH: &str =
-        "c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470";
-
-    #[test]
-    fn test_keccak256() {
-        let hash = keccak256(hex_to_bytes(MESSAGE.into()).as_slice());
-
-        assert_eq!(hash.as_ref(), hex_to_bytes(MESSAGE_HASH.into()).as_slice());
-    }
-
-    #[test]
-    fn test_keccak256_empty() {
-        let hash = keccak256(vec![].as_slice());
-
-        assert_eq!(
-            hash.as_ref(),
-            hex_to_bytes(EMPTY_MESSAGE_HASH.into()).as_slice()
-        );
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/crypto/mod.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/crypto/mod.rs.html deleted file mode 100644 index fa282223..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/crypto/mod.rs.html +++ /dev/null @@ -1,5 +0,0 @@ -mod.rs - source
1
-2
-
mod keccak256;
-pub(crate) mod recover;
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/lib.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/lib.rs.html deleted file mode 100644 index a1f164bf..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/lib.rs.html +++ /dev/null @@ -1,33 +0,0 @@ -lib.rs - source
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-
//! # RedStone
-//!
-//! `redstone` is a collection of utilities to make deserializing&decrypting RedStone payload.
-//! It includes a pure Rust implementation, along with extensions for certain networks.
-//!
-//! Different crypto-mechanisms are easily injectable.
-//! The current implementation contains `secp256k1`- and `k256`-based variants.
-
-pub mod core;
-mod crypto;
-pub mod network;
-mod protocol;
-mod utils;
-
-#[cfg(feature = "helpers")]
-pub mod helpers;
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/radix/from_bytes_repr.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/radix/from_bytes_repr.rs.html deleted file mode 100644 index cae6ae57..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/radix/from_bytes_repr.rs.html +++ /dev/null @@ -1,41 +0,0 @@ -from_bytes_repr.rs - source
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-
use crate::network::{
-    from_bytes_repr::{FromBytesRepr, Sanitized},
-    specific::U256,
-};
-
-impl FromBytesRepr<Vec<u8>> for U256 {
-    fn from_bytes_repr(bytes: Vec<u8>) -> Self {
-        match bytes.len() {
-            0 => U256::ZERO,
-            1 => U256::from(bytes[0]),
-            _ => {
-                // TODO: make it cheaper
-                let mut bytes_le = bytes.sanitized();
-                bytes_le.reverse();
-
-                U256::from_le_bytes(bytes_le.as_slice())
-            }
-        }
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/radix/u256_ext.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/radix/u256_ext.rs.html deleted file mode 100644 index f834b2d9..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/radix/u256_ext.rs.html +++ /dev/null @@ -1,23 +0,0 @@ -u256_ext.rs - source
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-
use crate::network::specific::U256;
-
-pub trait U256Ext {
-    fn max_value() -> Self;
-}
-
-impl U256Ext for U256 {
-    fn max_value() -> Self {
-        Self::MAX
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/protocol/mod.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/protocol/mod.rs.html deleted file mode 100644 index fbd60f5b..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/protocol/mod.rs.html +++ /dev/null @@ -1,11 +0,0 @@ -mod.rs - source
1
-2
-3
-4
-5
-
pub(crate) mod constants;
-pub(crate) mod data_package;
-pub(crate) mod data_point;
-pub(crate) mod marker;
-pub(crate) mod payload;
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/utils/mod.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/utils/mod.rs.html deleted file mode 100644 index 44258e67..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/utils/mod.rs.html +++ /dev/null @@ -1,9 +0,0 @@ -mod.rs - source
1
-2
-3
-4
-
pub(crate) mod filter;
-pub(crate) mod median;
-pub(crate) mod trim;
-pub(crate) mod trim_zeros;
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/type.impl/alloc/vec/struct.Vec.js b/static/rust/redstone/crypto_secp256k1,network_radix/type.impl/alloc/vec/struct.Vec.js deleted file mode 100644 index 00d2c4fb..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/type.impl/alloc/vec/struct.Vec.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var type_impls = { -"redstone":[["
1.5.0 · source§

impl<T, A> AsMut<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn as_mut(&mut self) -> &mut [T]

Converts this type into a mutable reference of the (usually inferred) input type.
","AsMut<[T]>","redstone::core::aggregator::Matrix"],["
1.5.0 · source§

impl<T, A> AsMut<Vec<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn as_mut(&mut self) -> &mut Vec<T, A>

Converts this type into a mutable reference of the (usually inferred) input type.
","AsMut>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> AsRef<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn as_ref(&self) -> &[T]

Converts this type into a shared reference of the (usually inferred) input type.
","AsRef<[T]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> AsRef<Vec<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn as_ref(&self) -> &Vec<T, A>

Converts this type into a shared reference of the (usually inferred) input type.
","AsRef>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Borrow<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn borrow(&self) -> &[T]

Immutably borrows from an owned value. Read more
","Borrow<[T]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> BorrowMut<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn borrow_mut(&mut self) -> &mut [T]

Mutably borrows from an owned value. Read more
","BorrowMut<[T]>","redstone::core::aggregator::Matrix"],["
§

impl<X, T> Categorize<X> for Vec<T>
where\n X: CustomValueKind,

§

fn value_kind() -> ValueKind<X>

","Categorize","redstone::core::aggregator::Matrix"],["
§

impl<T> CheckBase32<Vec<u5>> for T
where\n T: AsRef<[u8]>,

§

type Err = Error

Error type if conversion fails
§

fn check_base32(self) -> Result<Vec<u5>, <T as CheckBase32<Vec<u5>>>::Err>

Check if all values are in range and return array-like struct of u5 values
","CheckBase32>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Clone for Vec<T, A>
where\n T: Clone,\n A: Allocator + Clone,

source§

fn clone_from(&mut self, source: &Vec<T, A>)

Overwrites the contents of self with a clone of the contents of source.

\n

This method is preferred over simply assigning source.clone() to self,\nas it avoids reallocation if possible. Additionally, if the element type\nT overrides clone_from(), this will reuse the resources of self’s\nelements as well.

\n
§Examples
\n
let x = vec![5, 6, 7];\nlet mut y = vec![8, 9, 10];\nlet yp: *const i32 = y.as_ptr();\n\ny.clone_from(&x);\n\n// The value is the same\nassert_eq!(x, y);\n\n// And no reallocation occurred\nassert_eq!(yp, y.as_ptr());
\n
source§

fn clone(&self) -> Vec<T, A>

Returns a copy of the value. Read more
","Clone","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Debug for Vec<T, A>
where\n T: Debug,\n A: Allocator,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","redstone::core::aggregator::Matrix"],["
§

impl<X, D, T> Decode<X, D> for Vec<T>
where\n X: CustomValueKind,\n D: Decoder<X>,\n T: Decode<X, D> + Categorize<X>,

§

fn decode_body_with_value_kind(\n decoder: &mut D,\n value_kind: ValueKind<X>,\n) -> Result<Vec<T>, DecodeError>

Decodes the type from the decoder, which should match a preloaded value kind. Read more
","Decode","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T> Default for Vec<T>

source§

fn default() -> Vec<T>

Creates an empty Vec<T>.

\n

The vector will not allocate until elements are pushed onto it.

\n
","Default","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Deref for Vec<T, A>
where\n A: Allocator,

§

type Target = [T]

The resulting type after dereferencing.
source§

fn deref(&self) -> &[T]

Dereferences the value.
","Deref","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> DerefMut for Vec<T, A>
where\n A: Allocator,

source§

fn deref_mut(&mut self) -> &mut [T]

Mutably dereferences the value.
","DerefMut","redstone::core::aggregator::Matrix"],["
§

impl<C, T> Describe<C> for Vec<T>
where\n C: CustomTypeKind<RustTypeId>,\n T: Describe<C>,

§

const TYPE_ID: RustTypeId = <[T]>::TYPE_ID

The TYPE_ID should give a unique identifier for its SBOR schema type.\nAn SBOR schema type capture details about the SBOR payload, how it should be interpreted, validated and displayed. Read more
§

fn type_data() -> TypeData<C, RustTypeId>

Returns the local schema for the given type. Read more
§

fn add_all_dependencies(aggregator: &mut TypeAggregator<C>)

For each type referenced in get_local_type_data, we need to ensure that the type and all of its own references\nget added to the aggregator. Read more
","Describe","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Drop for Vec<T, A>
where\n A: Allocator,

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
","Drop","redstone::core::aggregator::Matrix"],["
§

impl<X, E, T> Encode<X, E> for Vec<T>
where\n X: CustomValueKind,\n E: Encoder<X>,\n T: Encode<X, E> + Categorize<X>,

§

fn encode_value_kind(&self, encoder: &mut E) -> Result<(), EncodeError>

Encodes the SBOR value’s kind to the encoder
§

fn encode_body(&self, encoder: &mut E) -> Result<(), EncodeError>

Encodes the SBOR body of the type to the encoder. Read more
","Encode","redstone::core::aggregator::Matrix"],["
1.2.0 · source§

impl<'a, T, A> Extend<&'a T> for Vec<T, A>
where\n T: Copy + 'a,\n A: Allocator,

Extend implementation that copies elements out of references before pushing them onto the Vec.

\n

This implementation is specialized for slice iterators, where it uses copy_from_slice to\nappend the entire slice at once.

\n
source§

fn extend<I>(&mut self, iter: I)
where\n I: IntoIterator<Item = &'a T>,

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, _: &'a T)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
","Extend<&'a T>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Extend<T> for Vec<T, A>
where\n A: Allocator,

source§

fn extend<I>(&mut self, iter: I)
where\n I: IntoIterator<Item = T>,

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: T)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
","Extend","redstone::core::aggregator::Matrix"],["
source§

impl Flattened<<Radix as NetworkSpecific>::BytesRepr> for Vec<Bytes>

","Flattened<::BytesRepr>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T> From<&[T]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &[T]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&[1, 2, 3][..]), vec![1, 2, 3]);
\n
","From<&[T]>","redstone::core::aggregator::Matrix"],["
1.74.0 · source§

impl<T, const N: usize> From<&[T; N]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &[T; N]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&[1, 2, 3]), vec![1, 2, 3]);
\n
","From<&[T; N]>","redstone::core::aggregator::Matrix"],["
1.19.0 · source§

impl<T> From<&mut [T]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &mut [T]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&mut [1, 2, 3][..]), vec![1, 2, 3]);
\n
","From<&mut [T]>","redstone::core::aggregator::Matrix"],["
1.74.0 · source§

impl<T, const N: usize> From<&mut [T; N]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &mut [T; N]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&mut [1, 2, 3]), vec![1, 2, 3]);
\n
","From<&mut [T; N]>","redstone::core::aggregator::Matrix"],["
1.44.0 · source§

impl<T, const N: usize> From<[T; N]> for Vec<T>

source§

fn from(s: [T; N]) -> Vec<T>

Allocate a Vec<T> and move s’s items into it.

\n
§Examples
\n
assert_eq!(Vec::from([1, 2, 3]), vec![1, 2, 3]);
\n
","From<[T; N]>","redstone::core::aggregator::Matrix"],["
1.5.0 · source§

impl<T, A> From<BinaryHeap<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn from(heap: BinaryHeap<T, A>) -> Vec<T, A>

Converts a BinaryHeap<T> into a Vec<T>.

\n

This conversion requires no data movement or allocation, and has\nconstant time complexity.

\n
","From>","redstone::core::aggregator::Matrix"],["
1.18.0 · source§

impl<T, A> From<Box<[T], A>> for Vec<T, A>
where\n A: Allocator,

source§

fn from(s: Box<[T], A>) -> Vec<T, A>

Convert a boxed slice into a vector by transferring ownership of\nthe existing heap allocation.

\n
§Examples
\n
let b: Box<[i32]> = vec![1, 2, 3].into_boxed_slice();\nassert_eq!(Vec::from(b), vec![1, 2, 3]);
\n
","From>","redstone::core::aggregator::Matrix"],["
1.14.0 · source§

impl<'a, T> From<Cow<'a, [T]>> for Vec<T>
where\n [T]: ToOwned<Owned = Vec<T>>,

source§

fn from(s: Cow<'a, [T]>) -> Vec<T>

Convert a clone-on-write slice into a vector.

\n

If s already owns a Vec<T>, it will be returned directly.\nIf s is borrowing a slice, a new Vec<T> will be allocated and\nfilled by cloning s’s items into it.

\n
§Examples
\n
let o: Cow<'_, [i32]> = Cow::Owned(vec![1, 2, 3]);\nlet b: Cow<'_, [i32]> = Cow::Borrowed(&[1, 2, 3]);\nassert_eq!(Vec::from(o), Vec::from(b));
\n
","From>","redstone::core::aggregator::Matrix"],["
1.10.0 · source§

impl<T, A> From<VecDeque<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn from(other: VecDeque<T, A>) -> Vec<T, A>

Turn a VecDeque<T> into a Vec<T>.

\n

This never needs to re-allocate, but does need to do O(n) data movement if\nthe circular buffer doesn’t happen to be at the beginning of the allocation.

\n
§Examples
\n
use std::collections::VecDeque;\n\n// This one is *O*(1).\nlet deque: VecDeque<_> = (1..5).collect();\nlet ptr = deque.as_slices().0.as_ptr();\nlet vec = Vec::from(deque);\nassert_eq!(vec, [1, 2, 3, 4]);\nassert_eq!(vec.as_ptr(), ptr);\n\n// This one needs data rearranging.\nlet mut deque: VecDeque<_> = (1..5).collect();\ndeque.push_front(9);\ndeque.push_front(8);\nlet ptr = deque.as_slices().1.as_ptr();\nlet vec = Vec::from(deque);\nassert_eq!(vec, [8, 9, 1, 2, 3, 4]);\nassert_eq!(vec.as_ptr(), ptr);
\n
","From>","redstone::core::aggregator::Matrix"],["
source§

impl FromBytesRepr<Vec<u8>> for U256

source§

fn from_bytes_repr(bytes: Vec<u8>) -> Self

","FromBytesRepr>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T> FromIterator<T> for Vec<T>

Collects an iterator into a Vec, commonly called via Iterator::collect()

\n

§Allocation behavior

\n

In general Vec does not guarantee any particular growth or allocation strategy.\nThat also applies to this trait impl.

\n

Note: This section covers implementation details and is therefore exempt from\nstability guarantees.

\n

Vec may use any or none of the following strategies,\ndepending on the supplied iterator:

\n
    \n
  • preallocate based on Iterator::size_hint()\n
      \n
    • and panic if the number of items is outside the provided lower/upper bounds
    • \n
    \n
  • \n
  • use an amortized growth strategy similar to pushing one item at a time
  • \n
  • perform the iteration in-place on the original allocation backing the iterator
  • \n
\n

The last case warrants some attention. It is an optimization that in many cases reduces peak memory\nconsumption and improves cache locality. But when big, short-lived allocations are created,\nonly a small fraction of their items get collected, no further use is made of the spare capacity\nand the resulting Vec is moved into a longer-lived structure, then this can lead to the large\nallocations having their lifetimes unnecessarily extended which can result in increased memory\nfootprint.

\n

In cases where this is an issue, the excess capacity can be discarded with Vec::shrink_to(),\nVec::shrink_to_fit() or by collecting into Box<[T]> instead, which additionally reduces\nthe size of the long-lived struct.

\n\n
static LONG_LIVED: Mutex<Vec<Vec<u16>>> = Mutex::new(Vec::new());\n\nfor i in 0..10 {\n    let big_temporary: Vec<u16> = (0..1024).collect();\n    // discard most items\n    let mut result: Vec<_> = big_temporary.into_iter().filter(|i| i % 100 == 0).collect();\n    // without this a lot of unused capacity might be moved into the global\n    result.shrink_to_fit();\n    LONG_LIVED.lock().unwrap().push(result);\n}
\n
source§

fn from_iter<I>(iter: I) -> Vec<T>
where\n I: IntoIterator<Item = T>,

Creates a value from an iterator. Read more
","FromIterator","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Hash for Vec<T, A>
where\n T: Hash,\n A: Allocator,

The hash of a vector is the same as that of the corresponding slice,\nas required by the core::borrow::Borrow implementation.

\n\n
use std::hash::BuildHasher;\n\nlet b = std::hash::RandomState::new();\nlet v: Vec<u8> = vec![0xa8, 0x3c, 0x09];\nlet s: &[u8] = &[0xa8, 0x3c, 0x09];\nassert_eq!(b.hash_one(v), b.hash_one(s));
\n
source§

fn hash<H>(&self, state: &mut H)
where\n H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, I, A> Index<I> for Vec<T, A>
where\n I: SliceIndex<[T]>,\n A: Allocator,

§

type Output = <I as SliceIndex<[T]>>::Output

The returned type after indexing.
source§

fn index(&self, index: I) -> &<Vec<T, A> as Index<I>>::Output

Performs the indexing (container[index]) operation. Read more
","Index","redstone::core::aggregator::Matrix"],["
§

impl<T> Index<PatternID> for Vec<T>

§

type Output = T

The returned type after indexing.
§

fn index(&self, index: PatternID) -> &T

Performs the indexing (container[index]) operation. Read more
","Index","redstone::core::aggregator::Matrix"],["
§

impl<T> Index<SmallIndex> for Vec<T>

§

type Output = T

The returned type after indexing.
§

fn index(&self, index: SmallIndex) -> &T

Performs the indexing (container[index]) operation. Read more
","Index","redstone::core::aggregator::Matrix"],["
§

impl<T> Index<StateID> for Vec<T>

§

type Output = T

The returned type after indexing.
§

fn index(&self, index: StateID) -> &T

Performs the indexing (container[index]) operation. Read more
","Index","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, I, A> IndexMut<I> for Vec<T, A>
where\n I: SliceIndex<[T]>,\n A: Allocator,

source§

fn index_mut(&mut self, index: I) -> &mut <Vec<T, A> as Index<I>>::Output

Performs the mutable indexing (container[index]) operation. Read more
","IndexMut","redstone::core::aggregator::Matrix"],["
§

impl<T> IndexMut<PatternID> for Vec<T>

§

fn index_mut(&mut self, index: PatternID) -> &mut T

Performs the mutable indexing (container[index]) operation. Read more
","IndexMut","redstone::core::aggregator::Matrix"],["
§

impl<T> IndexMut<SmallIndex> for Vec<T>

§

fn index_mut(&mut self, index: SmallIndex) -> &mut T

Performs the mutable indexing (container[index]) operation. Read more
","IndexMut","redstone::core::aggregator::Matrix"],["
§

impl<T> IndexMut<StateID> for Vec<T>

§

fn index_mut(&mut self, index: StateID) -> &mut T

Performs the mutable indexing (container[index]) operation. Read more
","IndexMut","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> IntoIterator for Vec<T, A>
where\n A: Allocator,

source§

fn into_iter(self) -> <Vec<T, A> as IntoIterator>::IntoIter

Creates a consuming iterator, that is, one that moves each value out of\nthe vector (from start to end). The vector cannot be used after calling\nthis.

\n
§Examples
\n
let v = vec![\"a\".to_string(), \"b\".to_string()];\nlet mut v_iter = v.into_iter();\n\nlet first_element: Option<String> = v_iter.next();\n\nassert_eq!(first_element, Some(\"a\".to_string()));\nassert_eq!(v_iter.next(), Some(\"b\".to_string()));\nassert_eq!(v_iter.next(), None);
\n
§

type Item = T

The type of the elements being iterated over.
§

type IntoIter = IntoIter<T, A>

Which kind of iterator are we turning this into?
","IntoIterator","redstone::core::aggregator::Matrix"],["
source§

impl<T> Median for Vec<T>
where\n T: Copy + Ord + Avg,

§

type Item = T

source§

fn median(self) -> Self::Item

","Median","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Ord for Vec<T, A>
where\n T: Ord,\n A: Allocator,

Implements ordering of vectors, lexicographically.

\n
source§

fn cmp(&self, other: &Vec<T, A>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
","Ord","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A> PartialEq<&[U]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &&[U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&[U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&[U]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A, const N: usize> PartialEq<&[U; N]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &&[U; N]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&[U; N]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&[U; N]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A> PartialEq<&mut [U]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &&mut [U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&mut [U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&mut [U]>","redstone::core::aggregator::Matrix"],["
1.48.0 · source§

impl<T, U, A> PartialEq<[U]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &[U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &[U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<[U]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A, const N: usize> PartialEq<[U; N]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &[U; N]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &[U; N]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<[U; N]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A1, A2> PartialEq<Vec<U, A2>> for Vec<T, A1>
where\n A1: Allocator,\n A2: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &Vec<U, A2>) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &Vec<U, A2>) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A1, A2> PartialOrd<Vec<T, A2>> for Vec<T, A1>
where\n T: PartialOrd,\n A1: Allocator,\n A2: Allocator,

Implements comparison of vectors, lexicographically.

\n
source§

fn partial_cmp(&self, other: &Vec<T, A2>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <=\noperator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >=\noperator. Read more
","PartialOrd>","redstone::core::aggregator::Matrix"],["
source§

impl<T> Vec<T>

1.0.0 (const: 1.39.0) · source

pub const fn new() -> Vec<T>

Constructs a new, empty Vec<T>.

\n

The vector will not allocate until elements are pushed onto it.

\n
§Examples
\n
let mut vec: Vec<i32> = Vec::new();
\n
1.0.0 · source

pub fn with_capacity(capacity: usize) -> Vec<T>

Constructs a new, empty Vec<T> with at least the specified capacity.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n

It is important to note that although the returned vector has the\nminimum capacity specified, the vector will have a zero length. For\nan explanation of the difference between length and capacity, see\nCapacity and reallocation.

\n

If it is important to know the exact allocated capacity of a Vec,\nalways use the capacity method after construction.

\n

For Vec<T> where T is a zero-sized type, there will be no allocation\nand the capacity will always be usize::MAX.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = Vec::with_capacity(10);\n\n// The vector contains no items, even though it has capacity for more\nassert_eq!(vec.len(), 0);\nassert!(vec.capacity() >= 10);\n\n// These are all done without reallocating...\nfor i in 0..10 {\n    vec.push(i);\n}\nassert_eq!(vec.len(), 10);\nassert!(vec.capacity() >= 10);\n\n// ...but this may make the vector reallocate\nvec.push(11);\nassert_eq!(vec.len(), 11);\nassert!(vec.capacity() >= 11);\n\n// A vector of a zero-sized type will always over-allocate, since no\n// allocation is necessary\nlet vec_units = Vec::<()>::with_capacity(10);\nassert_eq!(vec_units.capacity(), usize::MAX);
\n
source

pub fn try_with_capacity(capacity: usize) -> Result<Vec<T>, TryReserveError>

🔬This is a nightly-only experimental API. (try_with_capacity)

Constructs a new, empty Vec<T> with at least the specified capacity.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n
§Errors
\n

Returns an error if the capacity exceeds isize::MAX bytes,\nor if the allocator reports allocation failure.

\n
1.0.0 · source

pub unsafe fn from_raw_parts(\n ptr: *mut T,\n length: usize,\n capacity: usize,\n) -> Vec<T>

Creates a Vec<T> directly from a pointer, a length, and a capacity.

\n
§Safety
\n

This is highly unsafe, due to the number of invariants that aren’t\nchecked:

\n
    \n
  • ptr must have been allocated using the global allocator, such as via\nthe alloc::alloc function.
  • \n
  • T needs to have the same alignment as what ptr was allocated with.\n(T having a less strict alignment is not sufficient, the alignment really\nneeds to be equal to satisfy the dealloc requirement that memory must be\nallocated and deallocated with the same layout.)
  • \n
  • The size of T times the capacity (ie. the allocated size in bytes) needs\nto be the same size as the pointer was allocated with. (Because similar to\nalignment, dealloc must be called with the same layout size.)
  • \n
  • length needs to be less than or equal to capacity.
  • \n
  • The first length values must be properly initialized values of type T.
  • \n
  • capacity needs to be the capacity that the pointer was allocated with.
  • \n
  • The allocated size in bytes must be no larger than isize::MAX.\nSee the safety documentation of pointer::offset.
  • \n
\n

These requirements are always upheld by any ptr that has been allocated\nvia Vec<T>. Other allocation sources are allowed if the invariants are\nupheld.

\n

Violating these may cause problems like corrupting the allocator’s\ninternal data structures. For example it is normally not safe\nto build a Vec<u8> from a pointer to a C char array with length\nsize_t, doing so is only safe if the array was initially allocated by\na Vec or String.\nIt’s also not safe to build one from a Vec<u16> and its length, because\nthe allocator cares about the alignment, and these two types have different\nalignments. The buffer was allocated with alignment 2 (for u16), but after\nturning it into a Vec<u8> it’ll be deallocated with alignment 1. To avoid\nthese issues, it is often preferable to do casting/transmuting using\nslice::from_raw_parts instead.

\n

The ownership of ptr is effectively transferred to the\nVec<T> which may then deallocate, reallocate or change the\ncontents of memory pointed to by the pointer at will. Ensure\nthat nothing else uses the pointer after calling this\nfunction.

\n
§Examples
\n
use std::ptr;\nuse std::mem;\n\nlet v = vec![1, 2, 3];\n\n// Prevent running `v`'s destructor so we are in complete control\n// of the allocation.\nlet mut v = mem::ManuallyDrop::new(v);\n\n// Pull out the various important pieces of information about `v`\nlet p = v.as_mut_ptr();\nlet len = v.len();\nlet cap = v.capacity();\n\nunsafe {\n    // Overwrite memory with 4, 5, 6\n    for i in 0..len {\n        ptr::write(p.add(i), 4 + i);\n    }\n\n    // Put everything back together into a Vec\n    let rebuilt = Vec::from_raw_parts(p, len, cap);\n    assert_eq!(rebuilt, [4, 5, 6]);\n}
\n

Using memory that was allocated elsewhere:

\n\n
use std::alloc::{alloc, Layout};\n\nfn main() {\n    let layout = Layout::array::<u32>(16).expect(\"overflow cannot happen\");\n\n    let vec = unsafe {\n        let mem = alloc(layout).cast::<u32>();\n        if mem.is_null() {\n            return;\n        }\n\n        mem.write(1_000_000);\n\n        Vec::from_raw_parts(mem, 1, 16)\n    };\n\n    assert_eq!(vec, &[1_000_000]);\n    assert_eq!(vec.capacity(), 16);\n}
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n T: Clone,\n A: Allocator,

1.5.0 · source

pub fn resize(&mut self, new_len: usize, value: T)

Resizes the Vec in-place so that len is equal to new_len.

\n

If new_len is greater than len, the Vec is extended by the\ndifference, with each additional slot filled with value.\nIf new_len is less than len, the Vec is simply truncated.

\n

This method requires T to implement Clone,\nin order to be able to clone the passed value.\nIf you need more flexibility (or want to rely on Default instead of\nClone), use Vec::resize_with.\nIf you only need to resize to a smaller size, use Vec::truncate.

\n
§Examples
\n
let mut vec = vec![\"hello\"];\nvec.resize(3, \"world\");\nassert_eq!(vec, [\"hello\", \"world\", \"world\"]);\n\nlet mut vec = vec![1, 2, 3, 4];\nvec.resize(2, 0);\nassert_eq!(vec, [1, 2]);
\n
1.6.0 · source

pub fn extend_from_slice(&mut self, other: &[T])

Clones and appends all elements in a slice to the Vec.

\n

Iterates over the slice other, clones each element, and then appends\nit to this Vec. The other slice is traversed in-order.

\n

Note that this function is same as extend except that it is\nspecialized to work with slices instead. If and when Rust gets\nspecialization this function will likely be deprecated (but still\navailable).

\n
§Examples
\n
let mut vec = vec![1];\nvec.extend_from_slice(&[2, 3, 4]);\nassert_eq!(vec, [1, 2, 3, 4]);
\n
1.53.0 · source

pub fn extend_from_within<R>(&mut self, src: R)
where\n R: RangeBounds<usize>,

Copies elements from src range to the end of the vector.

\n
§Panics
\n

Panics if the starting point is greater than the end point or if\nthe end point is greater than the length of the vector.

\n
§Examples
\n
let mut vec = vec![0, 1, 2, 3, 4];\n\nvec.extend_from_within(2..);\nassert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4]);\n\nvec.extend_from_within(..2);\nassert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4, 0, 1]);\n\nvec.extend_from_within(4..8);\nassert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4, 0, 1, 4, 2, 3, 4]);
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n T: PartialEq,\n A: Allocator,

1.0.0 · source

pub fn dedup(&mut self)

Removes consecutive repeated elements in the vector according to the\nPartialEq trait implementation.

\n

If the vector is sorted, this removes all duplicates.

\n
§Examples
\n
let mut vec = vec![1, 2, 2, 3, 2];\n\nvec.dedup();\n\nassert_eq!(vec, [1, 2, 3, 2]);
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n A: Allocator,

1.21.0 · source

pub fn splice<R, I>(\n &mut self,\n range: R,\n replace_with: I,\n) -> Splice<'_, <I as IntoIterator>::IntoIter, A>
where\n R: RangeBounds<usize>,\n I: IntoIterator<Item = T>,

Creates a splicing iterator that replaces the specified range in the vector\nwith the given replace_with iterator and yields the removed items.\nreplace_with does not need to be the same length as range.

\n

range is removed even if the iterator is not consumed until the end.

\n

It is unspecified how many elements are removed from the vector\nif the Splice value is leaked.

\n

The input iterator replace_with is only consumed when the Splice value is dropped.

\n

This is optimal if:

\n
    \n
  • The tail (elements in the vector after range) is empty,
  • \n
  • or replace_with yields fewer or equal elements than range’s length
  • \n
  • or the lower bound of its size_hint() is exact.
  • \n
\n

Otherwise, a temporary vector is allocated and the tail is moved twice.

\n
§Panics
\n

Panics if the starting point is greater than the end point or if\nthe end point is greater than the length of the vector.

\n
§Examples
\n
let mut v = vec![1, 2, 3, 4];\nlet new = [7, 8, 9];\nlet u: Vec<_> = v.splice(1..3, new).collect();\nassert_eq!(v, &[1, 7, 8, 9, 4]);\nassert_eq!(u, &[2, 3]);
\n
source

pub fn extract_if<F>(&mut self, filter: F) -> ExtractIf<'_, T, F, A>
where\n F: FnMut(&mut T) -> bool,

🔬This is a nightly-only experimental API. (extract_if)

Creates an iterator which uses a closure to determine if an element should be removed.

\n

If the closure returns true, then the element is removed and yielded.\nIf the closure returns false, the element will remain in the vector and will not be yielded\nby the iterator.

\n

If the returned ExtractIf is not exhausted, e.g. because it is dropped without iterating\nor the iteration short-circuits, then the remaining elements will be retained.\nUse retain with a negated predicate if you do not need the returned iterator.

\n

Using this method is equivalent to the following code:

\n\n
let mut i = 0;\nwhile i < vec.len() {\n    if some_predicate(&mut vec[i]) {\n        let val = vec.remove(i);\n        // your code here\n    } else {\n        i += 1;\n    }\n}\n
\n

But extract_if is easier to use. extract_if is also more efficient,\nbecause it can backshift the elements of the array in bulk.

\n

Note that extract_if also lets you mutate every element in the filter closure,\nregardless of whether you choose to keep or remove it.

\n
§Examples
\n

Splitting an array into evens and odds, reusing the original allocation:

\n\n
#![feature(extract_if)]\nlet mut numbers = vec![1, 2, 3, 4, 5, 6, 8, 9, 11, 13, 14, 15];\n\nlet evens = numbers.extract_if(|x| *x % 2 == 0).collect::<Vec<_>>();\nlet odds = numbers;\n\nassert_eq!(evens, vec![2, 4, 6, 8, 14]);\nassert_eq!(odds, vec![1, 3, 5, 9, 11, 13, 15]);
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n A: Allocator,

source

pub const fn new_in(alloc: A) -> Vec<T, A>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new, empty Vec<T, A>.

\n

The vector will not allocate until elements are pushed onto it.

\n
§Examples
\n
#![feature(allocator_api)]\n\nuse std::alloc::System;\n\nlet mut vec: Vec<i32, _> = Vec::new_in(System);
\n
source

pub fn with_capacity_in(capacity: usize, alloc: A) -> Vec<T, A>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new, empty Vec<T, A> with at least the specified capacity\nwith the provided allocator.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n

It is important to note that although the returned vector has the\nminimum capacity specified, the vector will have a zero length. For\nan explanation of the difference between length and capacity, see\nCapacity and reallocation.

\n

If it is important to know the exact allocated capacity of a Vec,\nalways use the capacity method after construction.

\n

For Vec<T, A> where T is a zero-sized type, there will be no allocation\nand the capacity will always be usize::MAX.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
#![feature(allocator_api)]\n\nuse std::alloc::System;\n\nlet mut vec = Vec::with_capacity_in(10, System);\n\n// The vector contains no items, even though it has capacity for more\nassert_eq!(vec.len(), 0);\nassert!(vec.capacity() >= 10);\n\n// These are all done without reallocating...\nfor i in 0..10 {\n    vec.push(i);\n}\nassert_eq!(vec.len(), 10);\nassert!(vec.capacity() >= 10);\n\n// ...but this may make the vector reallocate\nvec.push(11);\nassert_eq!(vec.len(), 11);\nassert!(vec.capacity() >= 11);\n\n// A vector of a zero-sized type will always over-allocate, since no\n// allocation is necessary\nlet vec_units = Vec::<(), System>::with_capacity_in(10, System);\nassert_eq!(vec_units.capacity(), usize::MAX);
\n
source

pub fn try_with_capacity_in(\n capacity: usize,\n alloc: A,\n) -> Result<Vec<T, A>, TryReserveError>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new, empty Vec<T, A> with at least the specified capacity\nwith the provided allocator.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n
§Errors
\n

Returns an error if the capacity exceeds isize::MAX bytes,\nor if the allocator reports allocation failure.

\n
source

pub unsafe fn from_raw_parts_in(\n ptr: *mut T,\n length: usize,\n capacity: usize,\n alloc: A,\n) -> Vec<T, A>

🔬This is a nightly-only experimental API. (allocator_api)

Creates a Vec<T, A> directly from a pointer, a length, a capacity,\nand an allocator.

\n
§Safety
\n

This is highly unsafe, due to the number of invariants that aren’t\nchecked:

\n
    \n
  • ptr must be currently allocated via the given allocator alloc.
  • \n
  • T needs to have the same alignment as what ptr was allocated with.\n(T having a less strict alignment is not sufficient, the alignment really\nneeds to be equal to satisfy the dealloc requirement that memory must be\nallocated and deallocated with the same layout.)
  • \n
  • The size of T times the capacity (ie. the allocated size in bytes) needs\nto be the same size as the pointer was allocated with. (Because similar to\nalignment, dealloc must be called with the same layout size.)
  • \n
  • length needs to be less than or equal to capacity.
  • \n
  • The first length values must be properly initialized values of type T.
  • \n
  • capacity needs to fit the layout size that the pointer was allocated with.
  • \n
  • The allocated size in bytes must be no larger than isize::MAX.\nSee the safety documentation of pointer::offset.
  • \n
\n

These requirements are always upheld by any ptr that has been allocated\nvia Vec<T, A>. Other allocation sources are allowed if the invariants are\nupheld.

\n

Violating these may cause problems like corrupting the allocator’s\ninternal data structures. For example it is not safe\nto build a Vec<u8> from a pointer to a C char array with length size_t.\nIt’s also not safe to build one from a Vec<u16> and its length, because\nthe allocator cares about the alignment, and these two types have different\nalignments. The buffer was allocated with alignment 2 (for u16), but after\nturning it into a Vec<u8> it’ll be deallocated with alignment 1.

\n

The ownership of ptr is effectively transferred to the\nVec<T> which may then deallocate, reallocate or change the\ncontents of memory pointed to by the pointer at will. Ensure\nthat nothing else uses the pointer after calling this\nfunction.

\n
§Examples
\n
#![feature(allocator_api)]\n\nuse std::alloc::System;\n\nuse std::ptr;\nuse std::mem;\n\nlet mut v = Vec::with_capacity_in(3, System);\nv.push(1);\nv.push(2);\nv.push(3);\n\n// Prevent running `v`'s destructor so we are in complete control\n// of the allocation.\nlet mut v = mem::ManuallyDrop::new(v);\n\n// Pull out the various important pieces of information about `v`\nlet p = v.as_mut_ptr();\nlet len = v.len();\nlet cap = v.capacity();\nlet alloc = v.allocator();\n\nunsafe {\n    // Overwrite memory with 4, 5, 6\n    for i in 0..len {\n        ptr::write(p.add(i), 4 + i);\n    }\n\n    // Put everything back together into a Vec\n    let rebuilt = Vec::from_raw_parts_in(p, len, cap, alloc.clone());\n    assert_eq!(rebuilt, [4, 5, 6]);\n}
\n

Using memory that was allocated elsewhere:

\n\n
#![feature(allocator_api)]\n\nuse std::alloc::{AllocError, Allocator, Global, Layout};\n\nfn main() {\n    let layout = Layout::array::<u32>(16).expect(\"overflow cannot happen\");\n\n    let vec = unsafe {\n        let mem = match Global.allocate(layout) {\n            Ok(mem) => mem.cast::<u32>().as_ptr(),\n            Err(AllocError) => return,\n        };\n\n        mem.write(1_000_000);\n\n        Vec::from_raw_parts_in(mem, 1, 16, Global)\n    };\n\n    assert_eq!(vec, &[1_000_000]);\n    assert_eq!(vec.capacity(), 16);\n}
\n
source

pub fn into_raw_parts(self) -> (*mut T, usize, usize)

🔬This is a nightly-only experimental API. (vec_into_raw_parts)

Decomposes a Vec<T> into its raw components: (pointer, length, capacity).

\n

Returns the raw pointer to the underlying data, the length of\nthe vector (in elements), and the allocated capacity of the\ndata (in elements). These are the same arguments in the same\norder as the arguments to from_raw_parts.

\n

After calling this function, the caller is responsible for the\nmemory previously managed by the Vec. The only way to do\nthis is to convert the raw pointer, length, and capacity back\ninto a Vec with the from_raw_parts function, allowing\nthe destructor to perform the cleanup.

\n
§Examples
\n
#![feature(vec_into_raw_parts)]\nlet v: Vec<i32> = vec![-1, 0, 1];\n\nlet (ptr, len, cap) = v.into_raw_parts();\n\nlet rebuilt = unsafe {\n    // We can now make changes to the components, such as\n    // transmuting the raw pointer to a compatible type.\n    let ptr = ptr as *mut u32;\n\n    Vec::from_raw_parts(ptr, len, cap)\n};\nassert_eq!(rebuilt, [4294967295, 0, 1]);
\n
source

pub fn into_raw_parts_with_alloc(self) -> (*mut T, usize, usize, A)

🔬This is a nightly-only experimental API. (allocator_api)

Decomposes a Vec<T> into its raw components: (pointer, length, capacity, allocator).

\n

Returns the raw pointer to the underlying data, the length of the vector (in elements),\nthe allocated capacity of the data (in elements), and the allocator. These are the same\narguments in the same order as the arguments to from_raw_parts_in.

\n

After calling this function, the caller is responsible for the\nmemory previously managed by the Vec. The only way to do\nthis is to convert the raw pointer, length, and capacity back\ninto a Vec with the from_raw_parts_in function, allowing\nthe destructor to perform the cleanup.

\n
§Examples
\n
#![feature(allocator_api, vec_into_raw_parts)]\n\nuse std::alloc::System;\n\nlet mut v: Vec<i32, System> = Vec::new_in(System);\nv.push(-1);\nv.push(0);\nv.push(1);\n\nlet (ptr, len, cap, alloc) = v.into_raw_parts_with_alloc();\n\nlet rebuilt = unsafe {\n    // We can now make changes to the components, such as\n    // transmuting the raw pointer to a compatible type.\n    let ptr = ptr as *mut u32;\n\n    Vec::from_raw_parts_in(ptr, len, cap, alloc)\n};\nassert_eq!(rebuilt, [4294967295, 0, 1]);
\n
1.0.0 · source

pub fn capacity(&self) -> usize

Returns the total number of elements the vector can hold without\nreallocating.

\n
§Examples
\n
let mut vec: Vec<i32> = Vec::with_capacity(10);\nvec.push(42);\nassert!(vec.capacity() >= 10);
\n
1.0.0 · source

pub fn reserve(&mut self, additional: usize)

Reserves capacity for at least additional more elements to be inserted\nin the given Vec<T>. The collection may reserve more space to\nspeculatively avoid frequent reallocations. After calling reserve,\ncapacity will be greater than or equal to self.len() + additional.\nDoes nothing if capacity is already sufficient.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1];\nvec.reserve(10);\nassert!(vec.capacity() >= 11);
\n
1.0.0 · source

pub fn reserve_exact(&mut self, additional: usize)

Reserves the minimum capacity for at least additional more elements to\nbe inserted in the given Vec<T>. Unlike reserve, this will not\ndeliberately over-allocate to speculatively avoid frequent allocations.\nAfter calling reserve_exact, capacity will be greater than or equal to\nself.len() + additional. Does nothing if the capacity is already\nsufficient.

\n

Note that the allocator may give the collection more space than it\nrequests. Therefore, capacity can not be relied upon to be precisely\nminimal. Prefer reserve if future insertions are expected.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1];\nvec.reserve_exact(10);\nassert!(vec.capacity() >= 11);
\n
1.57.0 · source

pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>

Tries to reserve capacity for at least additional more elements to be inserted\nin the given Vec<T>. The collection may reserve more space to speculatively avoid\nfrequent reallocations. After calling try_reserve, capacity will be\ngreater than or equal to self.len() + additional if it returns\nOk(()). Does nothing if capacity is already sufficient. This method\npreserves the contents even if an error occurs.

\n
§Errors
\n

If the capacity overflows, or the allocator reports a failure, then an error\nis returned.

\n
§Examples
\n
use std::collections::TryReserveError;\n\nfn process_data(data: &[u32]) -> Result<Vec<u32>, TryReserveError> {\n    let mut output = Vec::new();\n\n    // Pre-reserve the memory, exiting if we can't\n    output.try_reserve(data.len())?;\n\n    // Now we know this can't OOM in the middle of our complex work\n    output.extend(data.iter().map(|&val| {\n        val * 2 + 5 // very complicated\n    }));\n\n    Ok(output)\n}
\n
1.57.0 · source

pub fn try_reserve_exact(\n &mut self,\n additional: usize,\n) -> Result<(), TryReserveError>

Tries to reserve the minimum capacity for at least additional\nelements to be inserted in the given Vec<T>. Unlike try_reserve,\nthis will not deliberately over-allocate to speculatively avoid frequent\nallocations. After calling try_reserve_exact, capacity will be greater\nthan or equal to self.len() + additional if it returns Ok(()).\nDoes nothing if the capacity is already sufficient.

\n

Note that the allocator may give the collection more space than it\nrequests. Therefore, capacity can not be relied upon to be precisely\nminimal. Prefer try_reserve if future insertions are expected.

\n
§Errors
\n

If the capacity overflows, or the allocator reports a failure, then an error\nis returned.

\n
§Examples
\n
use std::collections::TryReserveError;\n\nfn process_data(data: &[u32]) -> Result<Vec<u32>, TryReserveError> {\n    let mut output = Vec::new();\n\n    // Pre-reserve the memory, exiting if we can't\n    output.try_reserve_exact(data.len())?;\n\n    // Now we know this can't OOM in the middle of our complex work\n    output.extend(data.iter().map(|&val| {\n        val * 2 + 5 // very complicated\n    }));\n\n    Ok(output)\n}
\n
1.0.0 · source

pub fn shrink_to_fit(&mut self)

Shrinks the capacity of the vector as much as possible.

\n

The behavior of this method depends on the allocator, which may either shrink the vector\nin-place or reallocate. The resulting vector might still have some excess capacity, just as\nis the case for with_capacity. See Allocator::shrink for more details.

\n
§Examples
\n
let mut vec = Vec::with_capacity(10);\nvec.extend([1, 2, 3]);\nassert!(vec.capacity() >= 10);\nvec.shrink_to_fit();\nassert!(vec.capacity() >= 3);
\n
1.56.0 · source

pub fn shrink_to(&mut self, min_capacity: usize)

Shrinks the capacity of the vector with a lower bound.

\n

The capacity will remain at least as large as both the length\nand the supplied value.

\n

If the current capacity is less than the lower limit, this is a no-op.

\n
§Examples
\n
let mut vec = Vec::with_capacity(10);\nvec.extend([1, 2, 3]);\nassert!(vec.capacity() >= 10);\nvec.shrink_to(4);\nassert!(vec.capacity() >= 4);\nvec.shrink_to(0);\nassert!(vec.capacity() >= 3);
\n
1.0.0 · source

pub fn into_boxed_slice(self) -> Box<[T], A>

Converts the vector into Box<[T]>.

\n

Before doing the conversion, this method discards excess capacity like shrink_to_fit.

\n
§Examples
\n
let v = vec![1, 2, 3];\n\nlet slice = v.into_boxed_slice();
\n

Any excess capacity is removed:

\n\n
let mut vec = Vec::with_capacity(10);\nvec.extend([1, 2, 3]);\n\nassert!(vec.capacity() >= 10);\nlet slice = vec.into_boxed_slice();\nassert_eq!(slice.into_vec().capacity(), 3);
\n
1.0.0 · source

pub fn truncate(&mut self, len: usize)

Shortens the vector, keeping the first len elements and dropping\nthe rest.

\n

If len is greater or equal to the vector’s current length, this has\nno effect.

\n

The drain method can emulate truncate, but causes the excess\nelements to be returned instead of dropped.

\n

Note that this method has no effect on the allocated capacity\nof the vector.

\n
§Examples
\n

Truncating a five element vector to two elements:

\n\n
let mut vec = vec![1, 2, 3, 4, 5];\nvec.truncate(2);\nassert_eq!(vec, [1, 2]);
\n

No truncation occurs when len is greater than the vector’s current\nlength:

\n\n
let mut vec = vec![1, 2, 3];\nvec.truncate(8);\nassert_eq!(vec, [1, 2, 3]);
\n

Truncating when len == 0 is equivalent to calling the clear\nmethod.

\n\n
let mut vec = vec![1, 2, 3];\nvec.truncate(0);\nassert_eq!(vec, []);
\n
1.7.0 · source

pub fn as_slice(&self) -> &[T]

Extracts a slice containing the entire vector.

\n

Equivalent to &s[..].

\n
§Examples
\n
use std::io::{self, Write};\nlet buffer = vec![1, 2, 3, 5, 8];\nio::sink().write(buffer.as_slice()).unwrap();
\n
1.7.0 · source

pub fn as_mut_slice(&mut self) -> &mut [T]

Extracts a mutable slice of the entire vector.

\n

Equivalent to &mut s[..].

\n
§Examples
\n
use std::io::{self, Read};\nlet mut buffer = vec![0; 3];\nio::repeat(0b101).read_exact(buffer.as_mut_slice()).unwrap();
\n
1.37.0 · source

pub fn as_ptr(&self) -> *const T

Returns a raw pointer to the vector’s buffer, or a dangling raw pointer\nvalid for zero sized reads if the vector didn’t allocate.

\n

The caller must ensure that the vector outlives the pointer this\nfunction returns, or else it will end up pointing to garbage.\nModifying the vector may cause its buffer to be reallocated,\nwhich would also make any pointers to it invalid.

\n

The caller must also ensure that the memory the pointer (non-transitively) points to\nis never written to (except inside an UnsafeCell) using this pointer or any pointer\nderived from it. If you need to mutate the contents of the slice, use as_mut_ptr.

\n

This method guarantees that for the purpose of the aliasing model, this method\ndoes not materialize a reference to the underlying slice, and thus the returned pointer\nwill remain valid when mixed with other calls to as_ptr and as_mut_ptr.\nNote that calling other methods that materialize mutable references to the slice,\nor mutable references to specific elements you are planning on accessing through this pointer,\nas well as writing to those elements, may still invalidate this pointer.\nSee the second example below for how this guarantee can be used.

\n
§Examples
\n
let x = vec![1, 2, 4];\nlet x_ptr = x.as_ptr();\n\nunsafe {\n    for i in 0..x.len() {\n        assert_eq!(*x_ptr.add(i), 1 << i);\n    }\n}
\n

Due to the aliasing guarantee, the following code is legal:

\n\n
unsafe {\n    let mut v = vec![0, 1, 2];\n    let ptr1 = v.as_ptr();\n    let _ = ptr1.read();\n    let ptr2 = v.as_mut_ptr().offset(2);\n    ptr2.write(2);\n    // Notably, the write to `ptr2` did *not* invalidate `ptr1`\n    // because it mutated a different element:\n    let _ = ptr1.read();\n}
\n
1.37.0 · source

pub fn as_mut_ptr(&mut self) -> *mut T

Returns an unsafe mutable pointer to the vector’s buffer, or a dangling\nraw pointer valid for zero sized reads if the vector didn’t allocate.

\n

The caller must ensure that the vector outlives the pointer this\nfunction returns, or else it will end up pointing to garbage.\nModifying the vector may cause its buffer to be reallocated,\nwhich would also make any pointers to it invalid.

\n

This method guarantees that for the purpose of the aliasing model, this method\ndoes not materialize a reference to the underlying slice, and thus the returned pointer\nwill remain valid when mixed with other calls to as_ptr and as_mut_ptr.\nNote that calling other methods that materialize references to the slice,\nor references to specific elements you are planning on accessing through this pointer,\nmay still invalidate this pointer.\nSee the second example below for how this guarantee can be used.

\n
§Examples
\n
// Allocate vector big enough for 4 elements.\nlet size = 4;\nlet mut x: Vec<i32> = Vec::with_capacity(size);\nlet x_ptr = x.as_mut_ptr();\n\n// Initialize elements via raw pointer writes, then set length.\nunsafe {\n    for i in 0..size {\n        *x_ptr.add(i) = i as i32;\n    }\n    x.set_len(size);\n}\nassert_eq!(&*x, &[0, 1, 2, 3]);
\n

Due to the aliasing guarantee, the following code is legal:

\n\n
unsafe {\n    let mut v = vec![0];\n    let ptr1 = v.as_mut_ptr();\n    ptr1.write(1);\n    let ptr2 = v.as_mut_ptr();\n    ptr2.write(2);\n    // Notably, the write to `ptr2` did *not* invalidate `ptr1`:\n    ptr1.write(3);\n}
\n
source

pub fn allocator(&self) -> &A

🔬This is a nightly-only experimental API. (allocator_api)

Returns a reference to the underlying allocator.

\n
1.0.0 · source

pub unsafe fn set_len(&mut self, new_len: usize)

Forces the length of the vector to new_len.

\n

This is a low-level operation that maintains none of the normal\ninvariants of the type. Normally changing the length of a vector\nis done using one of the safe operations instead, such as\ntruncate, resize, extend, or clear.

\n
§Safety
\n
    \n
  • new_len must be less than or equal to capacity().
  • \n
  • The elements at old_len..new_len must be initialized.
  • \n
\n
§Examples
\n

This method can be useful for situations in which the vector\nis serving as a buffer for other code, particularly over FFI:

\n\n
pub fn get_dictionary(&self) -> Option<Vec<u8>> {\n    // Per the FFI method's docs, \"32768 bytes is always enough\".\n    let mut dict = Vec::with_capacity(32_768);\n    let mut dict_length = 0;\n    // SAFETY: When `deflateGetDictionary` returns `Z_OK`, it holds that:\n    // 1. `dict_length` elements were initialized.\n    // 2. `dict_length` <= the capacity (32_768)\n    // which makes `set_len` safe to call.\n    unsafe {\n        // Make the FFI call...\n        let r = deflateGetDictionary(self.strm, dict.as_mut_ptr(), &mut dict_length);\n        if r == Z_OK {\n            // ...and update the length to what was initialized.\n            dict.set_len(dict_length);\n            Some(dict)\n        } else {\n            None\n        }\n    }\n}
\n

While the following example is sound, there is a memory leak since\nthe inner vectors were not freed prior to the set_len call:

\n\n
let mut vec = vec![vec![1, 0, 0],\n                   vec![0, 1, 0],\n                   vec![0, 0, 1]];\n// SAFETY:\n// 1. `old_len..0` is empty so no elements need to be initialized.\n// 2. `0 <= capacity` always holds whatever `capacity` is.\nunsafe {\n    vec.set_len(0);\n}
\n

Normally, here, one would use clear instead to correctly drop\nthe contents and thus not leak memory.

\n
1.0.0 · source

pub fn swap_remove(&mut self, index: usize) -> T

Removes an element from the vector and returns it.

\n

The removed element is replaced by the last element of the vector.

\n

This does not preserve ordering of the remaining elements, but is O(1).\nIf you need to preserve the element order, use remove instead.

\n
§Panics
\n

Panics if index is out of bounds.

\n
§Examples
\n
let mut v = vec![\"foo\", \"bar\", \"baz\", \"qux\"];\n\nassert_eq!(v.swap_remove(1), \"bar\");\nassert_eq!(v, [\"foo\", \"qux\", \"baz\"]);\n\nassert_eq!(v.swap_remove(0), \"foo\");\nassert_eq!(v, [\"baz\", \"qux\"]);
\n
1.0.0 · source

pub fn insert(&mut self, index: usize, element: T)

Inserts an element at position index within the vector, shifting all\nelements after it to the right.

\n
§Panics
\n

Panics if index > len.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nvec.insert(1, 4);\nassert_eq!(vec, [1, 4, 2, 3]);\nvec.insert(4, 5);\nassert_eq!(vec, [1, 4, 2, 3, 5]);
\n
§Time complexity
\n

Takes O(Vec::len) time. All items after the insertion index must be\nshifted to the right. In the worst case, all elements are shifted when\nthe insertion index is 0.

\n
1.0.0 · source

pub fn remove(&mut self, index: usize) -> T

Removes and returns the element at position index within the vector,\nshifting all elements after it to the left.

\n

Note: Because this shifts over the remaining elements, it has a\nworst-case performance of O(n). If you don’t need the order of elements\nto be preserved, use swap_remove instead. If you’d like to remove\nelements from the beginning of the Vec, consider using\nVecDeque::pop_front instead.

\n
§Panics
\n

Panics if index is out of bounds.

\n
§Examples
\n
let mut v = vec![1, 2, 3];\nassert_eq!(v.remove(1), 2);\nassert_eq!(v, [1, 3]);
\n
1.0.0 · source

pub fn retain<F>(&mut self, f: F)
where\n F: FnMut(&T) -> bool,

Retains only the elements specified by the predicate.

\n

In other words, remove all elements e for which f(&e) returns false.\nThis method operates in place, visiting each element exactly once in the\noriginal order, and preserves the order of the retained elements.

\n
§Examples
\n
let mut vec = vec![1, 2, 3, 4];\nvec.retain(|&x| x % 2 == 0);\nassert_eq!(vec, [2, 4]);
\n

Because the elements are visited exactly once in the original order,\nexternal state may be used to decide which elements to keep.

\n\n
let mut vec = vec![1, 2, 3, 4, 5];\nlet keep = [false, true, true, false, true];\nlet mut iter = keep.iter();\nvec.retain(|_| *iter.next().unwrap());\nassert_eq!(vec, [2, 3, 5]);
\n
1.61.0 · source

pub fn retain_mut<F>(&mut self, f: F)
where\n F: FnMut(&mut T) -> bool,

Retains only the elements specified by the predicate, passing a mutable reference to it.

\n

In other words, remove all elements e such that f(&mut e) returns false.\nThis method operates in place, visiting each element exactly once in the\noriginal order, and preserves the order of the retained elements.

\n
§Examples
\n
let mut vec = vec![1, 2, 3, 4];\nvec.retain_mut(|x| if *x <= 3 {\n    *x += 1;\n    true\n} else {\n    false\n});\nassert_eq!(vec, [2, 3, 4]);
\n
1.16.0 · source

pub fn dedup_by_key<F, K>(&mut self, key: F)
where\n F: FnMut(&mut T) -> K,\n K: PartialEq,

Removes all but the first of consecutive elements in the vector that resolve to the same\nkey.

\n

If the vector is sorted, this removes all duplicates.

\n
§Examples
\n
let mut vec = vec![10, 20, 21, 30, 20];\n\nvec.dedup_by_key(|i| *i / 10);\n\nassert_eq!(vec, [10, 20, 30, 20]);
\n
1.16.0 · source

pub fn dedup_by<F>(&mut self, same_bucket: F)
where\n F: FnMut(&mut T, &mut T) -> bool,

Removes all but the first of consecutive elements in the vector satisfying a given equality\nrelation.

\n

The same_bucket function is passed references to two elements from the vector and\nmust determine if the elements compare equal. The elements are passed in opposite order\nfrom their order in the slice, so if same_bucket(a, b) returns true, a is removed.

\n

If the vector is sorted, this removes all duplicates.

\n
§Examples
\n
let mut vec = vec![\"foo\", \"bar\", \"Bar\", \"baz\", \"bar\"];\n\nvec.dedup_by(|a, b| a.eq_ignore_ascii_case(b));\n\nassert_eq!(vec, [\"foo\", \"bar\", \"baz\", \"bar\"]);
\n
1.0.0 · source

pub fn push(&mut self, value: T)

Appends an element to the back of a collection.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1, 2];\nvec.push(3);\nassert_eq!(vec, [1, 2, 3]);
\n
§Time complexity
\n

Takes amortized O(1) time. If the vector’s length would exceed its\ncapacity after the push, O(capacity) time is taken to copy the\nvector’s elements to a larger allocation. This expensive operation is\noffset by the capacity O(1) insertions it allows.

\n
source

pub fn push_within_capacity(&mut self, value: T) -> Result<(), T>

🔬This is a nightly-only experimental API. (vec_push_within_capacity)

Appends an element if there is sufficient spare capacity, otherwise an error is returned\nwith the element.

\n

Unlike push this method will not reallocate when there’s insufficient capacity.\nThe caller should use reserve or try_reserve to ensure that there is enough capacity.

\n
§Examples
\n

A manual, panic-free alternative to FromIterator:

\n\n
#![feature(vec_push_within_capacity)]\n\nuse std::collections::TryReserveError;\nfn from_iter_fallible<T>(iter: impl Iterator<Item=T>) -> Result<Vec<T>, TryReserveError> {\n    let mut vec = Vec::new();\n    for value in iter {\n        if let Err(value) = vec.push_within_capacity(value) {\n            vec.try_reserve(1)?;\n            // this cannot fail, the previous line either returned or added at least 1 free slot\n            let _ = vec.push_within_capacity(value);\n        }\n    }\n    Ok(vec)\n}\nassert_eq!(from_iter_fallible(0..100), Ok(Vec::from_iter(0..100)));
\n
§Time complexity
\n

Takes O(1) time.

\n
1.0.0 · source

pub fn pop(&mut self) -> Option<T>

Removes the last element from a vector and returns it, or None if it\nis empty.

\n

If you’d like to pop the first element, consider using\nVecDeque::pop_front instead.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nassert_eq!(vec.pop(), Some(3));\nassert_eq!(vec, [1, 2]);
\n
§Time complexity
\n

Takes O(1) time.

\n
source

pub fn pop_if<F>(&mut self, f: F) -> Option<T>
where\n F: FnOnce(&mut T) -> bool,

🔬This is a nightly-only experimental API. (vec_pop_if)

Removes and returns the last element in a vector if the predicate\nreturns true, or None if the predicate returns false or the vector\nis empty.

\n
§Examples
\n
#![feature(vec_pop_if)]\n\nlet mut vec = vec![1, 2, 3, 4];\nlet pred = |x: &mut i32| *x % 2 == 0;\n\nassert_eq!(vec.pop_if(pred), Some(4));\nassert_eq!(vec, [1, 2, 3]);\nassert_eq!(vec.pop_if(pred), None);
\n
1.4.0 · source

pub fn append(&mut self, other: &mut Vec<T, A>)

Moves all the elements of other into self, leaving other empty.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nlet mut vec2 = vec![4, 5, 6];\nvec.append(&mut vec2);\nassert_eq!(vec, [1, 2, 3, 4, 5, 6]);\nassert_eq!(vec2, []);
\n
1.6.0 · source

pub fn drain<R>(&mut self, range: R) -> Drain<'_, T, A>
where\n R: RangeBounds<usize>,

Removes the specified range from the vector in bulk, returning all\nremoved elements as an iterator. If the iterator is dropped before\nbeing fully consumed, it drops the remaining removed elements.

\n

The returned iterator keeps a mutable borrow on the vector to optimize\nits implementation.

\n
§Panics
\n

Panics if the starting point is greater than the end point or if\nthe end point is greater than the length of the vector.

\n
§Leaking
\n

If the returned iterator goes out of scope without being dropped (due to\nmem::forget, for example), the vector may have lost and leaked\nelements arbitrarily, including elements outside the range.

\n
§Examples
\n
let mut v = vec![1, 2, 3];\nlet u: Vec<_> = v.drain(1..).collect();\nassert_eq!(v, &[1]);\nassert_eq!(u, &[2, 3]);\n\n// A full range clears the vector, like `clear()` does\nv.drain(..);\nassert_eq!(v, &[]);
\n
1.0.0 · source

pub fn clear(&mut self)

Clears the vector, removing all values.

\n

Note that this method has no effect on the allocated capacity\nof the vector.

\n
§Examples
\n
let mut v = vec![1, 2, 3];\n\nv.clear();\n\nassert!(v.is_empty());
\n
1.0.0 · source

pub fn len(&self) -> usize

Returns the number of elements in the vector, also referred to\nas its ‘length’.

\n
§Examples
\n
let a = vec![1, 2, 3];\nassert_eq!(a.len(), 3);
\n
1.0.0 · source

pub fn is_empty(&self) -> bool

Returns true if the vector contains no elements.

\n
§Examples
\n
let mut v = Vec::new();\nassert!(v.is_empty());\n\nv.push(1);\nassert!(!v.is_empty());
\n
1.4.0 · source

pub fn split_off(&mut self, at: usize) -> Vec<T, A>
where\n A: Clone,

Splits the collection into two at the given index.

\n

Returns a newly allocated vector containing the elements in the range\n[at, len). After the call, the original vector will be left containing\nthe elements [0, at) with its previous capacity unchanged.

\n
    \n
  • If you want to take ownership of the entire contents and capacity of\nthe vector, see mem::take or mem::replace.
  • \n
  • If you don’t need the returned vector at all, see Vec::truncate.
  • \n
  • If you want to take ownership of an arbitrary subslice, or you don’t\nnecessarily want to store the removed items in a vector, see Vec::drain.
  • \n
\n
§Panics
\n

Panics if at > len.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nlet vec2 = vec.split_off(1);\nassert_eq!(vec, [1]);\nassert_eq!(vec2, [2, 3]);
\n
1.33.0 · source

pub fn resize_with<F>(&mut self, new_len: usize, f: F)
where\n F: FnMut() -> T,

Resizes the Vec in-place so that len is equal to new_len.

\n

If new_len is greater than len, the Vec is extended by the\ndifference, with each additional slot filled with the result of\ncalling the closure f. The return values from f will end up\nin the Vec in the order they have been generated.

\n

If new_len is less than len, the Vec is simply truncated.

\n

This method uses a closure to create new values on every push. If\nyou’d rather Clone a given value, use Vec::resize. If you\nwant to use the Default trait to generate values, you can\npass Default::default as the second argument.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nvec.resize_with(5, Default::default);\nassert_eq!(vec, [1, 2, 3, 0, 0]);\n\nlet mut vec = vec![];\nlet mut p = 1;\nvec.resize_with(4, || { p *= 2; p });\nassert_eq!(vec, [2, 4, 8, 16]);
\n
1.47.0 · source

pub fn leak<'a>(self) -> &'a mut [T]
where\n A: 'a,

Consumes and leaks the Vec, returning a mutable reference to the contents,\n&'a mut [T]. Note that the type T must outlive the chosen lifetime\n'a. If the type has only static references, or none at all, then this\nmay be chosen to be 'static.

\n

As of Rust 1.57, this method does not reallocate or shrink the Vec,\nso the leaked allocation may include unused capacity that is not part\nof the returned slice.

\n

This function is mainly useful for data that lives for the remainder of\nthe program’s life. Dropping the returned reference will cause a memory\nleak.

\n
§Examples
\n

Simple usage:

\n\n
let x = vec![1, 2, 3];\nlet static_ref: &'static mut [usize] = x.leak();\nstatic_ref[0] += 1;\nassert_eq!(static_ref, &[2, 2, 3]);
\n
1.60.0 · source

pub fn spare_capacity_mut(&mut self) -> &mut [MaybeUninit<T>]

Returns the remaining spare capacity of the vector as a slice of\nMaybeUninit<T>.

\n

The returned slice can be used to fill the vector with data (e.g. by\nreading from a file) before marking the data as initialized using the\nset_len method.

\n
§Examples
\n
// Allocate vector big enough for 10 elements.\nlet mut v = Vec::with_capacity(10);\n\n// Fill in the first 3 elements.\nlet uninit = v.spare_capacity_mut();\nuninit[0].write(0);\nuninit[1].write(1);\nuninit[2].write(2);\n\n// Mark the first 3 elements of the vector as being initialized.\nunsafe {\n    v.set_len(3);\n}\n\nassert_eq!(&v, &[0, 1, 2]);
\n
source

pub fn split_at_spare_mut(&mut self) -> (&mut [T], &mut [MaybeUninit<T>])

🔬This is a nightly-only experimental API. (vec_split_at_spare)

Returns vector content as a slice of T, along with the remaining spare\ncapacity of the vector as a slice of MaybeUninit<T>.

\n

The returned spare capacity slice can be used to fill the vector with data\n(e.g. by reading from a file) before marking the data as initialized using\nthe set_len method.

\n

Note that this is a low-level API, which should be used with care for\noptimization purposes. If you need to append data to a Vec\nyou can use push, extend, extend_from_slice,\nextend_from_within, insert, append, resize or\nresize_with, depending on your exact needs.

\n
§Examples
\n
#![feature(vec_split_at_spare)]\n\nlet mut v = vec![1, 1, 2];\n\n// Reserve additional space big enough for 10 elements.\nv.reserve(10);\n\nlet (init, uninit) = v.split_at_spare_mut();\nlet sum = init.iter().copied().sum::<u32>();\n\n// Fill in the next 4 elements.\nuninit[0].write(sum);\nuninit[1].write(sum * 2);\nuninit[2].write(sum * 3);\nuninit[3].write(sum * 4);\n\n// Mark the 4 elements of the vector as being initialized.\nunsafe {\n    let len = v.len();\n    v.set_len(len + 4);\n}\n\nassert_eq!(&v, &[1, 1, 2, 4, 8, 12, 16]);
\n
",0,"redstone::core::aggregator::Matrix"],["
§

impl<Z> Zeroize for Vec<Z>
where\n Z: Zeroize,

§

fn zeroize(&mut self)

“Best effort” zeroization for Vec.

\n

Ensures the entire capacity of the Vec is zeroed. Cannot ensure that\nprevious reallocations did not leave values on the heap.

\n
","Zeroize","redstone::core::aggregator::Matrix"],["
source§

impl<T, A> DerefPure for Vec<T, A>
where\n A: Allocator,

","DerefPure","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Eq for Vec<T, A>
where\n T: Eq,\n A: Allocator,

","Eq","redstone::core::aggregator::Matrix"],["
§

impl<Z> ZeroizeOnDrop for Vec<Z>
where\n Z: ZeroizeOnDrop,

","ZeroizeOnDrop","redstone::core::aggregator::Matrix"]] -};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/help.html b/static/rust/redstone/crypto_secp256k1/doc/help.html index f173d86a..616df0e4 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/help.html +++ b/static/rust/redstone/crypto_secp256k1/doc/help.html @@ -1 +1 @@ -Help

Rustdoc help

Back
\ No newline at end of file +Help

Rustdoc help

Back
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/all.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/all.html index b5973a6f..2d0d1d5a 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/all.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/all.html @@ -1 +1 @@ -List of all items in this crate

List of all items

Structs

Enums

Traits

Macros

Functions

Type Aliases

Constants

\ No newline at end of file +List of all items in this crate

List of all items

Structs

Enums

Traits

Macros

Functions

Type Aliases

Constants

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/aggregator/fn.aggregate_matrix.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/core/aggregator/fn.aggregate_matrix.html index 0792edbc..218d36be 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/aggregator/fn.aggregate_matrix.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/core/aggregator/fn.aggregate_matrix.html @@ -1 +1 @@ -aggregate_matrix in redstone::core::aggregator - Rust

Function redstone::core::aggregator::aggregate_matrix

source ·
fn aggregate_matrix(matrix: Vec<Vec<Option<U256>>>, config: Config) -> Vec<U256>
\ No newline at end of file +aggregate_matrix in redstone::core::aggregator - Rust

Function redstone::core::aggregator::aggregate_matrix

source ·
fn aggregate_matrix(matrix: Vec<Vec<Option<U256>>>, config: Config) -> Vec<U256>
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/aggregator/fn.aggregate_values.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/core/aggregator/fn.aggregate_values.html index 15726f8e..56391872 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/aggregator/fn.aggregate_values.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/core/aggregator/fn.aggregate_values.html @@ -1,7 +1,7 @@ -aggregate_values in redstone::core::aggregator - Rust

Function redstone::core::aggregator::aggregate_values

source ·
pub(crate) fn aggregate_values(
+aggregate_values in redstone::core::aggregator - Rust

Function redstone::core::aggregator::aggregate_values

source ·
pub(crate) fn aggregate_values(
     config: Config,
-    data_packages: Vec<DataPackage>,
-) -> Vec<U256>
Expand description

Aggregates values from a collection of data packages according to the provided configuration.

+ data_packages: Vec<DataPackage>, +) -> Vec<U256>
Expand description

Aggregates values from a collection of data packages according to the provided configuration.

This function takes a configuration and a vector of data packages, constructs a matrix of values and their corresponding signers, and then aggregates these values based on the aggregation logic defined in the provided configuration. The aggregation strategy could vary, for example, by taking diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/aggregator/fn.make_value_signer_matrix.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/core/aggregator/fn.make_value_signer_matrix.html index f3dc8819..f3c03b87 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/aggregator/fn.make_value_signer_matrix.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/core/aggregator/fn.make_value_signer_matrix.html @@ -1,4 +1,4 @@ -make_value_signer_matrix in redstone::core::aggregator - Rust

Function redstone::core::aggregator::make_value_signer_matrix

source ·
fn make_value_signer_matrix(
+make_value_signer_matrix in redstone::core::aggregator - Rust

Function redstone::core::aggregator::make_value_signer_matrix

source ·
fn make_value_signer_matrix(
     config: &Config,
-    data_packages: Vec<DataPackage>,
-) -> Vec<Vec<Option<U256>>>
\ No newline at end of file + data_packages: Vec<DataPackage>, +) -> Vec<Vec<Option<U256>>>
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/aggregator/index.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/core/aggregator/index.html index 7aa39374..d9b656ee 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/aggregator/index.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/core/aggregator/index.html @@ -1 +1 @@ -redstone::core::aggregator - Rust

Module redstone::core::aggregator

source ·

Functions§

Type Aliases§

\ No newline at end of file +redstone::core::aggregator - Rust

Module redstone::core::aggregator

source ·

Functions§

Type Aliases§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/aggregator/type.Matrix.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/core/aggregator/type.Matrix.html index 61c3f974..5fadd5eb 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/aggregator/type.Matrix.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/core/aggregator/type.Matrix.html @@ -1 +1 @@ -Matrix in redstone::core::aggregator - Rust

Type Alias redstone::core::aggregator::Matrix

source ·
type Matrix = Vec<Vec<Option<U256>>>;

Aliased Type§

struct Matrix { /* private fields */ }
\ No newline at end of file +Matrix in redstone::core::aggregator - Rust

Type Alias redstone::core::aggregator::Matrix

source ·
type Matrix = Vec<Vec<Option<U256>>>;

Aliased Type§

struct Matrix { /* private fields */ }
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/config/index.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/core/config/index.html index 32a77abc..5badc729 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/config/index.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/core/config/index.html @@ -1 +1 @@ -redstone::core::config - Rust

Module redstone::core::config

source ·

Structs§

  • Configuration for a RedStone payload processor.
\ No newline at end of file +redstone::core::config - Rust

Module redstone::core::config

source ·

Structs§

  • Configuration for a RedStone payload processor.
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/config/struct.Config.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/core/config/struct.Config.html index 5f859175..f80ce0c8 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/config/struct.Config.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/core/config/struct.Config.html @@ -1,38 +1,38 @@ -Config in redstone::core::config - Rust

Struct redstone::core::config::Config

source ·
pub struct Config {
-    pub signer_count_threshold: u8,
-    pub signers: Vec<Bytes>,
-    pub feed_ids: Vec<U256>,
-    pub block_timestamp: u64,
+Config in redstone::core::config - Rust

Struct redstone::core::config::Config

source ·
pub struct Config {
+    pub signer_count_threshold: u8,
+    pub signers: Vec<Bytes>,
+    pub feed_ids: Vec<U256>,
+    pub block_timestamp: u64,
 }
Expand description

Configuration for a RedStone payload processor.

Specifies the parameters necessary for the verification and aggregation of values from various data points passed by the RedStone payload.

-

Fields§

§signer_count_threshold: u8

The minimum number of signers required validating the data.

+

Fields§

§signer_count_threshold: u8

The minimum number of signers required validating the data.

Specifies how many unique signers (from different addresses) are required for the data to be considered valid and trustworthy.

-
§signers: Vec<Bytes>

List of identifiers for signers authorized to sign the data.

+
§signers: Vec<Bytes>

List of identifiers for signers authorized to sign the data.

Each signer is identified by a unique, network-specific byte string (Bytes), which represents their address.

-
§feed_ids: Vec<U256>

Identifiers for the data feeds from which values are aggregated.

+
§feed_ids: Vec<U256>

Identifiers for the data feeds from which values are aggregated.

Each data feed id is represented by the network-specific U256 type.

-
§block_timestamp: u64

The current block time in timestamp format, used for verifying data timeliness.

+
§block_timestamp: u64

The current block time in timestamp format, used for verifying data timeliness.

The value’s been expressed in milliseconds since the Unix epoch (January 1, 1970) and allows for determining whether the data is current in the context of blockchain time.

-

Trait Implementations§

source§

impl Debug for Config

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Validator for Config

source§

fn feed_index(&self, feed_id: U256) -> Option<usize>

Retrieves the index of a given data feed. Read more
source§

fn signer_index(&self, signer: &[u8]) -> Option<usize>

Retrieves the index of a given signer. Read more
source§

fn validate_signer_count_threshold( +

Trait Implementations§

source§

impl Debug for Config

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Validator for Config

source§

fn feed_index(&self, feed_id: U256) -> Option<usize>

Retrieves the index of a given data feed. Read more
source§

fn signer_index(&self, signer: &[u8]) -> Option<usize>

Retrieves the index of a given signer. Read more
source§

fn validate_signer_count_threshold( &self, - index: usize, - values: &[Option<U256>], -) -> Vec<U256>

Validates the signer count threshold for a given index within a set of values. Read more
source§

fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64

Validates the timestamp for a given index. Read more

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

Blanket Implementations§

source§

impl<T> Any for T
where - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where - T: Debug, - F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where - E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for T
where - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+ index: usize, + values: &[Option<U256>], +) -> Vec<U256>
Validates the signer count threshold for a given index within a set of values. Read more
source§

fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64

Validates the timestamp for a given index. Read more

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where + T: Debug, + F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where + E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where +From<T> for U chooses to do.

+

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/index.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/core/index.html index e427a2e8..e5c1246b 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/index.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/core/index.html @@ -1 +1 @@ -redstone::core - Rust

Module redstone::core

source ·

Modules§

\ No newline at end of file +redstone::core - Rust

Module redstone::core

source ·

Modules§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/processor/fn.make_processor_result.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/core/processor/fn.make_processor_result.html index d15046f1..33203759 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/processor/fn.make_processor_result.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/core/processor/fn.make_processor_result.html @@ -1 +1 @@ -make_processor_result in redstone::core::processor - Rust

Function redstone::core::processor::make_processor_result

source ·
fn make_processor_result(config: Config, payload: Payload) -> ProcessorResult
\ No newline at end of file +make_processor_result in redstone::core::processor - Rust

Function redstone::core::processor::make_processor_result

source ·
fn make_processor_result(config: Config, payload: Payload) -> ProcessorResult
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/processor/fn.process_payload.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/core/processor/fn.process_payload.html index b1ad0b84..6a5eb34e 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/processor/fn.process_payload.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/core/processor/fn.process_payload.html @@ -1,4 +1,4 @@ -process_payload in redstone::core::processor - Rust

Function redstone::core::processor::process_payload

source ·
pub fn process_payload(config: Config, payload_bytes: Bytes) -> ProcessorResult
Expand description

The main processor of the RedStone payload.

+process_payload in redstone::core::processor - Rust

Function redstone::core::processor::process_payload

source ·
pub fn process_payload(config: Config, payload_bytes: Bytes) -> ProcessorResult
Expand description

The main processor of the RedStone payload.

§Arguments

  • config - Configuration of the payload processing.
  • diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/processor/index.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/core/processor/index.html index ccd25006..5b72173e 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/processor/index.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/core/processor/index.html @@ -1 +1 @@ -redstone::core::processor - Rust

    Module redstone::core::processor

    source ·

    Functions§

    \ No newline at end of file +redstone::core::processor - Rust

    Module redstone::core::processor

    source ·

    Functions§

    \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/processor_result/index.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/core/processor_result/index.html index 52eaf103..fb6292fd 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/processor_result/index.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/core/processor_result/index.html @@ -1 +1 @@ -redstone::core::processor_result - Rust

    Module redstone::core::processor_result

    source ·

    Structs§

    \ No newline at end of file +redstone::core::processor_result - Rust

    Module redstone::core::processor_result

    source ·

    Structs§

    \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/processor_result/struct.ProcessorResult.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/core/processor_result/struct.ProcessorResult.html index c095c115..ff97643c 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/processor_result/struct.ProcessorResult.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/core/processor_result/struct.ProcessorResult.html @@ -1,29 +1,29 @@ -ProcessorResult in redstone::core::processor_result - Rust

    Struct redstone::core::processor_result::ProcessorResult

    source ·
    pub struct ProcessorResult {
    -    pub min_timestamp: u64,
    -    pub values: Vec<U256>,
    +ProcessorResult in redstone::core::processor_result - Rust

    Struct redstone::core::processor_result::ProcessorResult

    source ·
    pub struct ProcessorResult {
    +    pub min_timestamp: u64,
    +    pub values: Vec<U256>,
     }
    Expand description

    Represents the result of processing the RedStone payload.

    This structure is used to encapsulate the outcome of a RedStone payload processing operation, particularly focusing on time-sensitive data and its associated values, according to the Config.

    -

    Fields§

    §min_timestamp: u64

    The minimum timestamp encountered during processing.

    +

Fields§

§min_timestamp: u64

The minimum timestamp encountered during processing.

This field captures the earliest time point (in milliseconds since the Unix epoch) among the processed data packages, indicating the starting boundary of the dataset’s time range.

-
§values: Vec<U256>

A collection of values processed during the operation.

+
§values: Vec<U256>

A collection of values processed during the operation.

Each element in this vector represents a processed value corresponding to the passed data_feed item in the Config.

-

Trait Implementations§

source§

impl Debug for ProcessorResult

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<ProcessorResult> for (u64, Vec<U256>)

source§

fn from(result: ProcessorResult) -> Self

Converts to this type from the input type.
source§

impl PartialEq for ProcessorResult

source§

fn eq(&self, other: &ProcessorResult) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Eq for ProcessorResult

source§

impl StructuralPartialEq for ProcessorResult

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where - T: Debug, - F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where - E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for T
where - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

source§

impl Debug for ProcessorResult

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<ProcessorResult> for (u64, Vec<U256>)

source§

fn from(result: ProcessorResult) -> Self

Converts to this type from the input type.
source§

impl PartialEq for ProcessorResult

source§

fn eq(&self, other: &ProcessorResult) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for ProcessorResult

source§

impl StructuralPartialEq for ProcessorResult

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where + T: Debug, + F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where + E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where +From<T> for U chooses to do.

+

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/validator/index.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/core/validator/index.html index 141d82cd..63c305f0 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/validator/index.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/core/validator/index.html @@ -1 +1 @@ -redstone::core::validator - Rust

Module redstone::core::validator

source ·

Traits§

  • Validator 🔒
    A trait defining validation operations for data feeds and signers.
\ No newline at end of file +redstone::core::validator - Rust

Module redstone::core::validator

source ·

Traits§

  • Validator 🔒
    A trait defining validation operations for data feeds and signers.
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/validator/trait.Validator.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/core/validator/trait.Validator.html index ffbec709..4ad4fa99 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/validator/trait.Validator.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/core/validator/trait.Validator.html @@ -1,19 +1,19 @@ -Validator in redstone::core::validator - Rust

Trait redstone::core::validator::Validator

source ·
pub(crate) trait Validator {
+Validator in redstone::core::validator - Rust

Trait redstone::core::validator::Validator

source ·
pub(crate) trait Validator {
     // Required methods
-    fn feed_index(&self, feed_id: U256) -> Option<usize>;
-    fn signer_index(&self, signer: &[u8]) -> Option<usize>;
+    fn feed_index(&self, feed_id: U256) -> Option<usize>;
+    fn signer_index(&self, signer: &[u8]) -> Option<usize>;
     fn validate_signer_count_threshold(
         &self,
-        index: usize,
-        values: &[Option<U256>],
-    ) -> Vec<U256>;
-    fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64;
+        index: usize,
+        values: &[Option<U256>],
+    ) -> Vec<U256>;
+    fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64;
 }
Expand description

A trait defining validation operations for data feeds and signers.

This trait specifies methods for validating aspects of data feeds and signers within a system that requires data integrity and authenticity checks. Implementations of this trait are responsible for defining the logic behind each validation step, ensuring that data conforms to expected rules and conditions.

-

Required Methods§

source

fn feed_index(&self, feed_id: U256) -> Option<usize>

Retrieves the index of a given data feed.

+

Required Methods§

source

fn feed_index(&self, feed_id: U256) -> Option<usize>

Retrieves the index of a given data feed.

This method takes a feed_id representing the unique identifier of a data feed and returns an Option<usize> indicating the index of the feed within a collection of feeds. If the feed does not exist, None is returned.

@@ -25,7 +25,7 @@
§Returns
  • Option<usize> - The index of the feed if it exists, or None if it does not.
-
source

fn signer_index(&self, signer: &[u8]) -> Option<usize>

Retrieves the index of a given signer.

+
source

fn signer_index(&self, signer: &[u8]) -> Option<usize>

Retrieves the index of a given signer.

This method accepts a signer identifier in the form of a byte slice and returns an Option<usize> indicating the signer’s index within a collection of signers. If the signer is not found, None is returned.

@@ -39,9 +39,9 @@
§Returns
source

fn validate_signer_count_threshold( &self, - index: usize, - values: &[Option<U256>], -) -> Vec<U256>

Validates the signer count threshold for a given index within a set of values.

+ index: usize, + values: &[Option<U256>], +) -> Vec<U256>

Validates the signer count threshold for a given index within a set of values.

This method is responsible for ensuring that the number of valid signers meets or exceeds a specified threshold necessary for a set of data values to be considered valid. It returns a vector of U256 if the values pass the validation, to be processed in other steps.

@@ -54,7 +54,7 @@
§Returns
  • Vec<U256> - A vector of U256 values that meet the validation criteria.
-
source

fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64

Validates the timestamp for a given index.

+
source

fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64

Validates the timestamp for a given index.

This method checks whether a timestamp associated with a data value at a given index meets specific conditions (e.g., being within an acceptable time range). It returns the validated timestamp if it’s valid, to be processed in other steps.

diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/index.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/index.html index 541ea6ec..47b354db 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/index.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/index.html @@ -1 +1 @@ -redstone::crypto - Rust

Module redstone::crypto

source ·

Modules§

\ No newline at end of file +redstone::crypto - Rust

Module redstone::crypto

source ·

Modules§

Type Aliases§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/keccak256/fn.keccak256.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/keccak256/fn.keccak256.html index 2665643a..63420eda 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/keccak256/fn.keccak256.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/keccak256/fn.keccak256.html @@ -1 +1 @@ -keccak256 in redstone::crypto::keccak256 - Rust

Function redstone::crypto::keccak256::keccak256

source ·
pub fn keccak256(data: &[u8]) -> Box<[u8]>
\ No newline at end of file +keccak256 in redstone::crypto::keccak256 - Rust

Function redstone::crypto::keccak256::keccak256

source ·
pub fn keccak256(data: &[u8]) -> [u8; 32]
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/keccak256/index.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/keccak256/index.html index 96fe770a..e0b65a28 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/keccak256/index.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/keccak256/index.html @@ -1 +1 @@ -redstone::crypto::keccak256 - Rust

Module redstone::crypto::keccak256

source ·

Functions§

\ No newline at end of file +redstone::crypto::keccak256 - Rust

Module redstone::crypto::keccak256

source ·

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/recover/crypto256/fn.recover_public_key.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/recover/crypto256/fn.recover_public_key.html index ba2beac0..039b3003 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/recover/crypto256/fn.recover_public_key.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/recover/crypto256/fn.recover_public_key.html @@ -1,5 +1,5 @@ -recover_public_key in redstone::crypto::recover::crypto256 - Rust

Function redstone::crypto::recover::crypto256::recover_public_key

source ·
pub(crate) fn recover_public_key(
-    message_hash: Box<[u8]>,
-    signature_bytes: &[u8],
-    recovery_byte: u8,
-) -> Box<[u8]>
\ No newline at end of file +recover_public_key in redstone::crypto::recover::crypto256 - Rust

Function redstone::crypto::recover::crypto256::recover_public_key

source ·
pub(crate) fn recover_public_key(
+    message_hash: [u8; 32],
+    signature_bytes: [u8; 64],
+    recovery_byte: u8,
+) -> [u8; 65]
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/recover/crypto256/index.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/recover/crypto256/index.html index b5563f5f..1abee86b 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/recover/crypto256/index.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/recover/crypto256/index.html @@ -1 +1 @@ -redstone::crypto::recover::crypto256 - Rust

Module redstone::crypto::recover::crypto256

source ·

Functions§

\ No newline at end of file +redstone::crypto::recover::crypto256 - Rust

Module redstone::crypto::recover::crypto256

source ·

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/recover/fn.recover_address.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/recover/fn.recover_address.html index aba3bde0..c38049cf 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/recover/fn.recover_address.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/recover/fn.recover_address.html @@ -1 +1 @@ -recover_address in redstone::crypto::recover - Rust

Function redstone::crypto::recover::recover_address

source ·
pub fn recover_address(message: Vec<u8>, signature: Vec<u8>) -> Vec<u8> 
\ No newline at end of file +recover_address in redstone::crypto::recover - Rust

Function redstone::crypto::recover::recover_address

source ·
pub fn recover_address(message: Vec<u8>, signature: Vec<u8>) -> Vec<u8> 
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/recover/index.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/recover/index.html index e7703e69..6165a1e8 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/recover/index.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/recover/index.html @@ -1 +1 @@ -redstone::crypto::recover - Rust

Module redstone::crypto::recover

source ·

Modules§

Functions§

\ No newline at end of file +redstone::crypto::recover - Rust

Module redstone::crypto::recover

source ·

Modules§

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/sidebar-items.js index 521fe7cb..41e67b75 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/sidebar-items.js +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"mod":["keccak256","recover"]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"mod":["keccak256","recover"],"type":["EcdsaUncompressedPublicKey","Keccak256Hash","Secp256SigRs"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/type.EcdsaUncompressedPublicKey.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/type.EcdsaUncompressedPublicKey.html new file mode 100644 index 00000000..5b852c97 --- /dev/null +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/type.EcdsaUncompressedPublicKey.html @@ -0,0 +1 @@ +EcdsaUncompressedPublicKey in redstone::crypto - Rust

Type Alias redstone::crypto::EcdsaUncompressedPublicKey

source ·
pub(crate) type EcdsaUncompressedPublicKey = [u8; 65];
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/type.Keccak256Hash.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/type.Keccak256Hash.html new file mode 100644 index 00000000..2f59bdeb --- /dev/null +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/type.Keccak256Hash.html @@ -0,0 +1 @@ +Keccak256Hash in redstone::crypto - Rust

Type Alias redstone::crypto::Keccak256Hash

source ·
pub(crate) type Keccak256Hash = [u8; 32];
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/type.Secp256SigRs.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/type.Secp256SigRs.html new file mode 100644 index 00000000..cbead115 --- /dev/null +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/type.Secp256SigRs.html @@ -0,0 +1 @@ +Secp256SigRs in redstone::crypto - Rust

Type Alias redstone::crypto::Secp256SigRs

source ·
pub(crate) type Secp256SigRs = [u8; 64];
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/index.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/index.html index ea091ee8..1c83a111 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/index.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/index.html @@ -1,4 +1,4 @@ -redstone - Rust

Crate redstone

source ·
Expand description

§RedStone

+redstone - Rust

Crate redstone

source ·
Expand description

§RedStone

redstone is a collection of utilities to make deserializing&decrypting RedStone payload. It includes a pure Rust implementation, along with extensions for certain networks.

Different crypto-mechanisms are easily injectable. diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/macro.print_and_panic.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/macro.print_and_panic.html index b308eb68..468e62fc 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/macro.print_and_panic.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/macro.print_and_panic.html @@ -1,4 +1,4 @@ -print_and_panic in redstone - Rust

Macro redstone::print_and_panic

source ·
macro_rules! print_and_panic {
+print_and_panic in redstone - Rust

Macro redstone::print_and_panic

source ·
macro_rules! print_and_panic {
     ($fmt:expr) => { ... };
     ($fmt:expr, $($args:tt)*) => { ... };
 }
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/macro.print_debug.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/macro.print_debug.html index 3cb863d6..a8847b09 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/macro.print_debug.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/macro.print_debug.html @@ -1,4 +1,4 @@ -print_debug in redstone - Rust

Macro redstone::print_debug

source ·
macro_rules! print_debug {
+print_debug in redstone - Rust

Macro redstone::print_debug

source ·
macro_rules! print_debug {
     ($fmt:expr) => { ... };
     ($fmt:expr, $($args:tt)*) => { ... };
 }
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/as_str/index.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/as_str/index.html index 9f63a8ad..05ce8ab0 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/as_str/index.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/as_str/index.html @@ -1 +1 @@ -redstone::network::as_str - Rust

Module redstone::network::as_str

source ·

Traits§

\ No newline at end of file +redstone::network::as_str - Rust

Module redstone::network::as_str

source ·

Traits§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/as_str/trait.AsAsciiStr.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/as_str/trait.AsAsciiStr.html index 094c2e3e..a95b846f 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/as_str/trait.AsAsciiStr.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/as_str/trait.AsAsciiStr.html @@ -1,4 +1,4 @@ -AsAsciiStr in redstone::network::as_str - Rust

Trait redstone::network::as_str::AsAsciiStr

source ·
pub trait AsAsciiStr {
+AsAsciiStr in redstone::network::as_str - Rust

Trait redstone::network::as_str::AsAsciiStr

source ·
pub trait AsAsciiStr {
     // Required method
-    fn as_ascii_str(&self) -> String;
-}

Required Methods§

Implementations on Foreign Types§

source§

impl AsAsciiStr for &[u8]

source§

impl AsAsciiStr for Vec<u8>

Implementors§

\ No newline at end of file + fn as_ascii_str(&self) -> String; +}

Required Methods§

Implementations on Foreign Types§

source§

impl AsAsciiStr for &[u8]

source§

impl AsAsciiStr for Vec<u8>

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/as_str/trait.AsHexStr.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/as_str/trait.AsHexStr.html index 71d1669c..c236bef3 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/as_str/trait.AsHexStr.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/as_str/trait.AsHexStr.html @@ -1,4 +1,4 @@ -AsHexStr in redstone::network::as_str - Rust

Trait redstone::network::as_str::AsHexStr

source ·
pub trait AsHexStr {
+AsHexStr in redstone::network::as_str - Rust

Trait redstone::network::as_str::AsHexStr

source ·
pub trait AsHexStr {
     // Required method
-    fn as_hex_str(&self) -> String;
-}

Required Methods§

Implementations on Foreign Types§

source§

impl AsHexStr for &[u8]

source§

impl AsHexStr for Box<[u8]>

source§

impl AsHexStr for Vec<u8>

Implementors§

\ No newline at end of file + fn as_hex_str(&self) -> String; +}

Required Methods§

Implementations on Foreign Types§

source§

impl AsHexStr for &[u8]

source§

impl AsHexStr for Box<[u8]>

source§

impl AsHexStr for Vec<u8>

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/assert/fn.assert_or_revert.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/assert/fn.assert_or_revert.html index 13078112..1c579f09 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/assert/fn.assert_or_revert.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/assert/fn.assert_or_revert.html @@ -1,7 +1,7 @@ -assert_or_revert in redstone::network::assert - Rust

Function redstone::network::assert::assert_or_revert

source ·
fn assert_or_revert<F, T, E: FnOnce(&T) -> Error>(
+assert_or_revert in redstone::network::assert - Rust

Function redstone::network::assert::assert_or_revert

source ·
fn assert_or_revert<F, T, E: FnOnce(&T) -> Error>(
     arg: T,
     check: F,
     error: E,
 ) -> T
where - F: Fn(&T) -> bool, - T: Debug,
\ No newline at end of file + F: Fn(&T) -> bool, + T: Debug,
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/assert/fn.assert_or_revert_bool_with.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/assert/fn.assert_or_revert_bool_with.html index 385fc71e..7fd4c914 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/assert/fn.assert_or_revert_bool_with.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/assert/fn.assert_or_revert_bool_with.html @@ -1 +1 @@ -assert_or_revert_bool_with in redstone::network::assert - Rust

Function redstone::network::assert::assert_or_revert_bool_with

source ·
fn assert_or_revert_bool_with<E: FnOnce() -> Error>(check: bool, error: E)
\ No newline at end of file +assert_or_revert_bool_with in redstone::network::assert - Rust

Function redstone::network::assert::assert_or_revert_bool_with

source ·
fn assert_or_revert_bool_with<E: FnOnce() -> Error>(check: bool, error: E)
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/assert/index.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/assert/index.html index 680c61a9..a573fd72 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/assert/index.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/assert/index.html @@ -1 +1 @@ -redstone::network::assert - Rust

Module redstone::network::assert

source ·

Traits§

Functions§

\ No newline at end of file +redstone::network::assert - Rust

Module redstone::network::assert

source ·

Traits§

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/assert/trait.Assert.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/assert/trait.Assert.html index e068a406..0a3d27da 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/assert/trait.Assert.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/assert/trait.Assert.html @@ -1,6 +1,6 @@ -Assert in redstone::network::assert - Rust

Trait redstone::network::assert::Assert

source ·
pub trait Assert<F> {
+Assert in redstone::network::assert - Rust

Trait redstone::network::assert::Assert

source ·
pub trait Assert<F> {
     // Required method
-    fn assert_or_revert<E: Fn(&Self) -> Error>(self, check: F, error: E) -> Self;
-}

Required Methods§

source

fn assert_or_revert<E: Fn(&Self) -> Error>(self, check: F, error: E) -> Self

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T, F> Assert<F> for T
where - T: Debug, - F: Fn(&Self) -> bool,

\ No newline at end of file + fn assert_or_revert<E: Fn(&Self) -> Error>(self, check: F, error: E) -> Self; +}

Required Methods§

source

fn assert_or_revert<E: Fn(&Self) -> Error>(self, check: F, error: E) -> Self

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T, F> Assert<F> for T
where + T: Debug, + F: Fn(&Self) -> bool,

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/assert/trait.Unwrap.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/assert/trait.Unwrap.html index db1ea7bc..b995f4cd 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/assert/trait.Unwrap.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/assert/trait.Unwrap.html @@ -1,9 +1,9 @@ -Unwrap in redstone::network::assert - Rust

Trait redstone::network::assert::Unwrap

source ·
pub trait Unwrap<R> {
+Unwrap in redstone::network::assert - Rust

Trait redstone::network::assert::Unwrap

source ·
pub trait Unwrap<R> {
     type ErrorArg;
 
     // Required method
-    fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> R;
-}

Required Associated Types§

Required Methods§

source

fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> R

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T> Unwrap<T> for Option<T>
where - T: Debug,

§

type ErrorArg = ()

source§

fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> T

source§

impl<T, Err> Unwrap<T> for Result<T, Err>
where - T: Debug, - Err: Debug,

§

type ErrorArg = Err

source§

fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> T

Implementors§

\ No newline at end of file + fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> R; +}

Required Associated Types§

Required Methods§

source

fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> R

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T> Unwrap<T> for Option<T>
where + T: Debug,

§

type ErrorArg = ()

source§

fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> T

source§

impl<T, Err> Unwrap<T> for Result<T, Err>
where + T: Debug, + Err: Debug,

§

type ErrorArg = Err

source§

fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> T

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/error/enum.Error.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/error/enum.Error.html index 9cb4c379..d60089d3 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/error/enum.Error.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/error/enum.Error.html @@ -1,19 +1,19 @@ -Error in redstone::network::error - Rust

Enum redstone::network::error::Error

source ·
pub enum Error {
-    ContractError(Box<dyn ContractErrorContent>),
+Error in redstone::network::error - Rust

Enum redstone::network::error::Error

source ·
pub enum Error {
+    ContractError(Box<dyn ContractErrorContent>),
     NumberOverflow(U256),
     ArrayIsEmpty,
-    CryptographicError(usize),
-    SizeNotSupported(usize),
-    WrongRedStoneMarker(Vec<u8>),
-    NonEmptyPayloadRemainder(Vec<u8>),
-    InsufficientSignerCount(usize, usize, U256),
-    TimestampTooOld(usize, u64),
-    TimestampTooFuture(usize, u64),
-    ClonedContractError(u8, String),
+    CryptographicError(usize),
+    SizeNotSupported(usize),
+    WrongRedStoneMarker(Vec<u8>),
+    NonEmptyPayloadRemainder(Vec<u8>),
+    InsufficientSignerCount(usize, usize, U256),
+    TimestampTooOld(usize, u64),
+    TimestampTooFuture(usize, u64),
+    ClonedContractError(u8, String),
 }
Expand description

Errors that can be encountered in the deserializing&decrypting the RedStone payload or just contract execution process.

These errors include issues with contract logic, data types, cryptographic operations, and conditions specific to the requirements.

-

Variants§

§

ContractError(Box<dyn ContractErrorContent>)

Represents errors that arise from the contract itself.

+

Variants§

§

ContractError(Box<dyn ContractErrorContent>)

Represents errors that arise from the contract itself.

This variant is used for encapsulating errors that are specific to the contract’s logic or execution conditions that aren’t covered by more specific error types.

§

NumberOverflow(U256)

Indicates an overflow error with U256 numbers.

@@ -22,44 +22,45 @@
§

ArrayIsEmpty

Used when an expected non-empty array or vector is found to be empty.

This could occur in scenarios where the contract logic requires a non-empty collection of items for the correct operation, for example, during aggregating the values.

-
§

CryptographicError(usize)

Represents errors related to cryptographic operations.

+
§

CryptographicError(usize)

Represents errors related to cryptographic operations.

This includes failures in signature verification, hashing, or other cryptographic processes, with the usize indicating the position or identifier of the failed operation.

-
§

SizeNotSupported(usize)

Signifies that an unsupported size was encountered.

+
§

SizeNotSupported(usize)

Signifies that an unsupported size was encountered.

This could be used when a data structure or input does not meet the expected size requirements for processing.

-
§

WrongRedStoneMarker(Vec<u8>)

Indicates that the marker bytes for RedStone are incorrect.

+
§

WrongRedStoneMarker(Vec<u8>)

Indicates that the marker bytes for RedStone are incorrect.

This error is specific to scenarios where marker or identifier bytes do not match expected values, potentially indicating corrupted or tampered data.

-
§

NonEmptyPayloadRemainder(Vec<u8>)

Used when there is leftover data in a payload that should have been empty.

+
§

NonEmptyPayloadRemainder(Vec<u8>)

Used when there is leftover data in a payload that should have been empty.

This could indicate an error in data parsing or that additional, unexpected data was included in a message or transaction.

-
§

InsufficientSignerCount(usize, usize, U256)

Indicates that the number of signers does not meet the required threshold.

+
§

InsufficientSignerCount(usize, usize, U256)

Indicates that the number of signers does not meet the required threshold.

This variant includes the current number of signers, the required threshold, and potentially a feed_id related to the operation that failed due to insufficient signers.

-
§

TimestampTooOld(usize, u64)

Used when a timestamp is older than allowed by the processor logic.

+
§

TimestampTooOld(usize, u64)

Used when a timestamp is older than allowed by the processor logic.

Includes the position or identifier of the timestamp and the threshold value, indicating that the provided timestamp is too far in the past.

-
§

TimestampTooFuture(usize, u64)

Indicates that a timestamp is further in the future than allowed.

+
§

TimestampTooFuture(usize, u64)

Indicates that a timestamp is further in the future than allowed.

Similar to TimestampTooOld, but for future timestamps exceeding the contract’s acceptance window.

-
§

ClonedContractError(u8, String)

Represents errors that need to clone ContractErrorContent, which is not supported by default.

+
§

ClonedContractError(u8, String)

Represents errors that need to clone ContractErrorContent, which is not supported by default.

This variant allows for the manual duplication of contract error information, including an error code and a descriptive message.

-

Implementations§

source§

impl Error

source

pub fn contract_error<T: ContractErrorContent + 'static>(value: T) -> Error

source

pub(crate) fn code(&self) -> u16

Trait Implementations§

source§

impl Clone for Error

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Error

§

impl !RefUnwindSafe for Error

§

impl !Send for Error

§

impl !Sync for Error

§

impl Unpin for Error

§

impl !UnwindSafe for Error

Blanket Implementations§

source§

impl<T> Any for T
where - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where - T: Debug, - F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where - E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for T
where - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Implementations§

source§

impl Error

source

pub fn contract_error<T: ContractErrorContent + 'static>(value: T) -> Error

source

pub(crate) fn code(&self) -> u16

Trait Implementations§

source§

impl Clone for Error

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Error

§

impl !RefUnwindSafe for Error

§

impl !Send for Error

§

impl !Sync for Error

§

impl Unpin for Error

§

impl !UnwindSafe for Error

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where + T: Debug, + F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where + E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where + T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where - T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where +From<T> for U chooses to do.

+

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/error/index.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/error/index.html index e083b3b4..96a07109 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/error/index.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/error/index.html @@ -1 +1 @@ -redstone::network::error - Rust

Module redstone::network::error

source ·

Enums§

  • Errors that can be encountered in the deserializing&decrypting the RedStone payload or just contract execution process.

Traits§

\ No newline at end of file +redstone::network::error - Rust

Module redstone::network::error

source ·

Enums§

  • Errors that can be encountered in the deserializing&decrypting the RedStone payload or just contract execution process.

Traits§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/error/trait.ContractErrorContent.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/error/trait.ContractErrorContent.html index 577c3a6f..03e752aa 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/error/trait.ContractErrorContent.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/error/trait.ContractErrorContent.html @@ -1,5 +1,5 @@ -ContractErrorContent in redstone::network::error - Rust

Trait redstone::network::error::ContractErrorContent

source ·
pub trait ContractErrorContent: Debug {
+ContractErrorContent in redstone::network::error - Rust

Trait redstone::network::error::ContractErrorContent

source ·
pub trait ContractErrorContent: Debug {
     // Required methods
-    fn code(&self) -> u8;
-    fn message(&self) -> String;
-}

Required Methods§

source

fn code(&self) -> u8

source

fn message(&self) -> String

Implementors§

\ No newline at end of file + fn code(&self) -> u8; + fn message(&self) -> String; +}

Required Methods§

source

fn code(&self) -> u8

source

fn message(&self) -> String

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/flattened/index.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/flattened/index.html index e62982d8..1c855537 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/flattened/index.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/flattened/index.html @@ -1 +1 @@ -redstone::network::flattened - Rust

Module redstone::network::flattened

source ·

Traits§

\ No newline at end of file +redstone::network::flattened - Rust

Module redstone::network::flattened

source ·

Traits§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/flattened/trait.Flattened.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/flattened/trait.Flattened.html index 6e4f71a3..61e013cc 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/flattened/trait.Flattened.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/flattened/trait.Flattened.html @@ -1,4 +1,4 @@ -Flattened in redstone::network::flattened - Rust

Trait redstone::network::flattened::Flattened

source ·
pub trait Flattened<T> {
+Flattened in redstone::network::flattened - Rust

Trait redstone::network::flattened::Flattened

source ·
pub trait Flattened<T> {
     // Required method
     fn flattened(&self) -> T;
-}

Required Methods§

source

fn flattened(&self) -> T

Implementations on Foreign Types§

source§

impl Flattened<<Std as NetworkSpecific>::BytesRepr> for Vec<Bytes>

Implementors§

\ No newline at end of file +}

Required Methods§

source

fn flattened(&self) -> T

Implementations on Foreign Types§

source§

impl Flattened<<Std as NetworkSpecific>::BytesRepr> for Vec<Bytes>

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/from_bytes_repr/index.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/from_bytes_repr/index.html index 037b0f7e..3e91d071 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/from_bytes_repr/index.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/from_bytes_repr/index.html @@ -1 +1 @@ -redstone::network::from_bytes_repr - Rust

Module redstone::network::from_bytes_repr

source ·

Traits§

\ No newline at end of file +redstone::network::from_bytes_repr - Rust

Module redstone::network::from_bytes_repr

source ·

Traits§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/from_bytes_repr/trait.FromBytesRepr.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/from_bytes_repr/trait.FromBytesRepr.html index 54139e47..33cea492 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/from_bytes_repr/trait.FromBytesRepr.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/from_bytes_repr/trait.FromBytesRepr.html @@ -1,4 +1,4 @@ -FromBytesRepr in redstone::network::from_bytes_repr - Rust

Trait redstone::network::from_bytes_repr::FromBytesRepr

source ·
pub trait FromBytesRepr<T> {
+FromBytesRepr in redstone::network::from_bytes_repr - Rust

Trait redstone::network::from_bytes_repr::FromBytesRepr

source ·
pub trait FromBytesRepr<T> {
     // Required method
     fn from_bytes_repr(bytes: T) -> Self;
-}

Required Methods§

source

fn from_bytes_repr(bytes: T) -> Self

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file +}

Required Methods§

source

fn from_bytes_repr(bytes: T) -> Self

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/from_bytes_repr/trait.Sanitized.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/from_bytes_repr/trait.Sanitized.html index 79baf865..564f236f 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/from_bytes_repr/trait.Sanitized.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/from_bytes_repr/trait.Sanitized.html @@ -1,4 +1,4 @@ -Sanitized in redstone::network::from_bytes_repr - Rust

Trait redstone::network::from_bytes_repr::Sanitized

source ·
pub trait Sanitized {
+Sanitized in redstone::network::from_bytes_repr - Rust

Trait redstone::network::from_bytes_repr::Sanitized

source ·
pub trait Sanitized {
     // Required method
     fn sanitized(self) -> Self;
-}

Required Methods§

source

fn sanitized(self) -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Sanitized for Vec<u8>

source§

fn sanitized(self) -> Self

Implementors§

\ No newline at end of file +}

Required Methods§

source

fn sanitized(self) -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Sanitized for Vec<u8>

source§

fn sanitized(self) -> Self

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/index.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/index.html index a9fc43da..0331e2ad 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/index.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/index.html @@ -1 +1 @@ -redstone::network - Rust
\ No newline at end of file +redstone::network - Rust
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/print_debug/index.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/print_debug/index.html index ac53c72e..18bca892 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/print_debug/index.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/print_debug/index.html @@ -1 +1 @@ -redstone::network::print_debug - Rust

Module redstone::network::print_debug

source ·
\ No newline at end of file +redstone::network::print_debug - Rust

Module redstone::network::print_debug

source ·
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/pure/from_bytes_repr/index.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/pure/from_bytes_repr/index.html index f9f75a32..4527a046 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/pure/from_bytes_repr/index.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/pure/from_bytes_repr/index.html @@ -1 +1 @@ -redstone::network::pure::from_bytes_repr - Rust

Module redstone::network::pure::from_bytes_repr

source ·
\ No newline at end of file +redstone::network::pure::from_bytes_repr - Rust

Module redstone::network::pure::from_bytes_repr

source ·
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/pure/index.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/pure/index.html index fd752087..0a375ec9 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/pure/index.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/pure/index.html @@ -1 +1 @@ -redstone::network::pure - Rust

Module redstone::network::pure

source ·

Modules§

Structs§

\ No newline at end of file +redstone::network::pure - Rust

Module redstone::network::pure

source ·

Modules§

Structs§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/pure/struct.Std.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/pure/struct.Std.html index 3138ed4c..eae3d27e 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/pure/struct.Std.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/pure/struct.Std.html @@ -1,12 +1,12 @@ -Std in redstone::network::pure - Rust

Struct redstone::network::pure::Std

source ·
pub struct Std;

Trait Implementations§

Auto Trait Implementations§

§

impl Freeze for Std

§

impl RefUnwindSafe for Std

§

impl Send for Std

§

impl Sync for Std

§

impl Unpin for Std

§

impl UnwindSafe for Std

Blanket Implementations§

source§

impl<T> Any for T
where - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for T
where - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+Std in redstone::network::pure - Rust

Struct redstone::network::pure::Std

source ·
pub struct Std;

Trait Implementations§

Auto Trait Implementations§

§

impl Freeze for Std

§

impl RefUnwindSafe for Std

§

impl Send for Std

§

impl Sync for Std

§

impl Unpin for Std

§

impl UnwindSafe for Std

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where +From<T> for U chooses to do.

+

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/constant.VALUE_SIZE.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/constant.VALUE_SIZE.html index 2e47400c..286c9ec3 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/constant.VALUE_SIZE.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/constant.VALUE_SIZE.html @@ -1 +1 @@ -VALUE_SIZE in redstone::network::specific - Rust

Constant redstone::network::specific::VALUE_SIZE

source ·
pub const VALUE_SIZE: usize = <_Network as NetworkSpecific>::VALUE_SIZE; // 32usize
\ No newline at end of file +VALUE_SIZE in redstone::network::specific - Rust

Constant redstone::network::specific::VALUE_SIZE

source ·
pub const VALUE_SIZE: usize = <_Network as NetworkSpecific>::VALUE_SIZE; // 32usize
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/fn.print.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/fn.print.html index 414a9953..267b3a19 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/fn.print.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/fn.print.html @@ -1 +1 @@ -print in redstone::network::specific - Rust

Function redstone::network::specific::print

source ·
pub fn print(_text: String)
\ No newline at end of file +print in redstone::network::specific - Rust

Function redstone::network::specific::print

source ·
pub fn print(_text: String)
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/fn.revert.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/fn.revert.html index 2e9edf89..b38daa81 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/fn.revert.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/fn.revert.html @@ -1 +1 @@ -revert in redstone::network::specific - Rust

Function redstone::network::specific::revert

source ·
pub fn revert(error: Error) -> !
\ No newline at end of file +revert in redstone::network::specific - Rust

Function redstone::network::specific::revert

source ·
pub fn revert(error: Error) -> !
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/index.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/index.html index 1378d9dc..36a5939d 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/index.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/index.html @@ -1 +1 @@ -redstone::network::specific - Rust

Module redstone::network::specific

source ·

Constants§

Traits§

Functions§

Type Aliases§

\ No newline at end of file +redstone::network::specific - Rust

Module redstone::network::specific

source ·

Constants§

Traits§

Functions§

Type Aliases§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/trait.NetworkSpecific.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/trait.NetworkSpecific.html index 85367773..ba2a3d79 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/trait.NetworkSpecific.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/trait.NetworkSpecific.html @@ -1,11 +1,11 @@ -NetworkSpecific in redstone::network::specific - Rust

Trait redstone::network::specific::NetworkSpecific

source ·
pub trait NetworkSpecific {
-    type BytesRepr: From<Vec<u8>> + Into<Vec<u8>>;
-    type ValueRepr: FromBytesRepr<Vec<u8>>;
+NetworkSpecific in redstone::network::specific - Rust

Trait redstone::network::specific::NetworkSpecific

source ·
pub trait NetworkSpecific {
+    type BytesRepr: From<Vec<u8>> + Into<Vec<u8>>;
+    type ValueRepr: FromBytesRepr<Vec<u8>>;
     type _Self;
 
-    const VALUE_SIZE: usize;
+    const VALUE_SIZE: usize;
 
     // Required methods
-    fn print(_text: String);
-    fn revert(error: Error) -> !;
-}

Required Associated Types§

Required Associated Constants§

Required Methods§

source

fn print(_text: String)

source

fn revert(error: Error) -> !

Object Safety§

This trait is not object safe.

Implementors§

source§

impl NetworkSpecific for Std

§

type BytesRepr = Vec<u8>

§

type ValueRepr = U256

§

type _Self = Std

source§

const VALUE_SIZE: usize = 32usize

\ No newline at end of file + fn print(_text: String); + fn revert(error: Error) -> !; +}

Required Associated Types§

Required Associated Constants§

Required Methods§

source

fn print(_text: String)

source

fn revert(error: Error) -> !

Object Safety§

This trait is not object safe.

Implementors§

source§

impl NetworkSpecific for Std

§

type BytesRepr = Vec<u8>

§

type ValueRepr = U256

§

type _Self = Std

source§

const VALUE_SIZE: usize = 32usize

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/type.Bytes.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/type.Bytes.html index 04a40a5a..4f99def8 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/type.Bytes.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/type.Bytes.html @@ -1 +1 @@ -Bytes in redstone::network::specific - Rust

Type Alias redstone::network::specific::Bytes

source ·
pub type Bytes = <_Network as NetworkSpecific>::BytesRepr;
\ No newline at end of file +Bytes in redstone::network::specific - Rust

Type Alias redstone::network::specific::Bytes

source ·
pub type Bytes = <_Network as NetworkSpecific>::BytesRepr;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/type.Network.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/type.Network.html index 40e404c9..506ed82a 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/type.Network.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/type.Network.html @@ -1 +1 @@ -Network in redstone::network::specific - Rust

Type Alias redstone::network::specific::Network

source ·
pub(crate) type Network = <_Network as NetworkSpecific>::_Self;
\ No newline at end of file +Network in redstone::network::specific - Rust

Type Alias redstone::network::specific::Network

source ·
pub(crate) type Network = <_Network as NetworkSpecific>::_Self;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/type.U256.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/type.U256.html index f3f9c595..a6293b54 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/type.U256.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/type.U256.html @@ -1 +1 @@ -U256 in redstone::network::specific - Rust

Type Alias redstone::network::specific::U256

source ·
pub type U256 = <_Network as NetworkSpecific>::ValueRepr;

Trait Implementations§

\ No newline at end of file +U256 in redstone::network::specific - Rust

Type Alias redstone::network::specific::U256

source ·
pub type U256 = <_Network as NetworkSpecific>::ValueRepr;

Trait Implementations§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/type._Network.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/type._Network.html index 72f68b07..f3eb1236 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/type._Network.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/type._Network.html @@ -1 +1 @@ -_Network in redstone::network - Rust

Type Alias redstone::network::_Network

source ·
pub type _Network = Std;

Aliased Type§

struct _Network;
\ No newline at end of file +_Network in redstone::network - Rust

Type Alias redstone::network::_Network

source ·
pub type _Network = Std;

Aliased Type§

struct _Network;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.DATA_FEED_ID_BS.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.DATA_FEED_ID_BS.html index 72b04b86..8a6e1da5 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.DATA_FEED_ID_BS.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.DATA_FEED_ID_BS.html @@ -1 +1 @@ -DATA_FEED_ID_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::DATA_FEED_ID_BS

source ·
pub(crate) const DATA_FEED_ID_BS: usize = 32;
\ No newline at end of file +DATA_FEED_ID_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::DATA_FEED_ID_BS

source ·
pub(crate) const DATA_FEED_ID_BS: usize = 32;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.DATA_PACKAGES_COUNT_BS.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.DATA_PACKAGES_COUNT_BS.html index fed432b2..5785e972 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.DATA_PACKAGES_COUNT_BS.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.DATA_PACKAGES_COUNT_BS.html @@ -1 +1 @@ -DATA_PACKAGES_COUNT_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::DATA_PACKAGES_COUNT_BS

source ·
pub(crate) const DATA_PACKAGES_COUNT_BS: usize = 2;
\ No newline at end of file +DATA_PACKAGES_COUNT_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::DATA_PACKAGES_COUNT_BS

source ·
pub(crate) const DATA_PACKAGES_COUNT_BS: usize = 2;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.DATA_POINTS_COUNT_BS.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.DATA_POINTS_COUNT_BS.html index f25ed2f5..dfe6f9fa 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.DATA_POINTS_COUNT_BS.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.DATA_POINTS_COUNT_BS.html @@ -1 +1 @@ -DATA_POINTS_COUNT_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::DATA_POINTS_COUNT_BS

source ·
pub(crate) const DATA_POINTS_COUNT_BS: usize = 3;
\ No newline at end of file +DATA_POINTS_COUNT_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::DATA_POINTS_COUNT_BS

source ·
pub(crate) const DATA_POINTS_COUNT_BS: usize = 3;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.DATA_POINT_VALUE_BYTE_SIZE_BS.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.DATA_POINT_VALUE_BYTE_SIZE_BS.html index 95f9c3d5..2ac22658 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.DATA_POINT_VALUE_BYTE_SIZE_BS.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.DATA_POINT_VALUE_BYTE_SIZE_BS.html @@ -1 +1 @@ -DATA_POINT_VALUE_BYTE_SIZE_BS in redstone::protocol::constants - Rust
pub(crate) const DATA_POINT_VALUE_BYTE_SIZE_BS: usize = 4;
\ No newline at end of file +DATA_POINT_VALUE_BYTE_SIZE_BS in redstone::protocol::constants - Rust
pub(crate) const DATA_POINT_VALUE_BYTE_SIZE_BS: usize = 4;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.MAX_TIMESTAMP_AHEAD_MS.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.MAX_TIMESTAMP_AHEAD_MS.html index 160a69a6..748a6718 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.MAX_TIMESTAMP_AHEAD_MS.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.MAX_TIMESTAMP_AHEAD_MS.html @@ -1 +1 @@ -MAX_TIMESTAMP_AHEAD_MS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::MAX_TIMESTAMP_AHEAD_MS

source ·
pub(crate) const MAX_TIMESTAMP_AHEAD_MS: u64 = _; // 180_000u64
\ No newline at end of file +MAX_TIMESTAMP_AHEAD_MS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::MAX_TIMESTAMP_AHEAD_MS

source ·
pub(crate) const MAX_TIMESTAMP_AHEAD_MS: u64 = _; // 180_000u64
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.MAX_TIMESTAMP_DELAY_MS.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.MAX_TIMESTAMP_DELAY_MS.html index 47c72d3b..29966450 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.MAX_TIMESTAMP_DELAY_MS.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.MAX_TIMESTAMP_DELAY_MS.html @@ -1 +1 @@ -MAX_TIMESTAMP_DELAY_MS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::MAX_TIMESTAMP_DELAY_MS

source ·
pub(crate) const MAX_TIMESTAMP_DELAY_MS: u64 = _; // 900_000u64
\ No newline at end of file +MAX_TIMESTAMP_DELAY_MS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::MAX_TIMESTAMP_DELAY_MS

source ·
pub(crate) const MAX_TIMESTAMP_DELAY_MS: u64 = _; // 900_000u64
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.REDSTONE_MARKER.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.REDSTONE_MARKER.html index 07258216..29b8c249 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.REDSTONE_MARKER.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.REDSTONE_MARKER.html @@ -1 +1 @@ -REDSTONE_MARKER in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::REDSTONE_MARKER

source ·
pub(crate) const REDSTONE_MARKER: [u8; 9];
\ No newline at end of file +REDSTONE_MARKER in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::REDSTONE_MARKER

source ·
pub(crate) const REDSTONE_MARKER: [u8; 9];
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.REDSTONE_MARKER_BS.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.REDSTONE_MARKER_BS.html index 21ea69ca..6a9ebb32 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.REDSTONE_MARKER_BS.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.REDSTONE_MARKER_BS.html @@ -1 +1 @@ -REDSTONE_MARKER_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::REDSTONE_MARKER_BS

source ·
pub(crate) const REDSTONE_MARKER_BS: usize = 9;
\ No newline at end of file +REDSTONE_MARKER_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::REDSTONE_MARKER_BS

source ·
pub(crate) const REDSTONE_MARKER_BS: usize = 9;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.SIGNATURE_BS.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.SIGNATURE_BS.html index 2a3a5b7f..ca094747 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.SIGNATURE_BS.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.SIGNATURE_BS.html @@ -1 +1 @@ -SIGNATURE_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::SIGNATURE_BS

source ·
pub(crate) const SIGNATURE_BS: usize = 65;
\ No newline at end of file +SIGNATURE_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::SIGNATURE_BS

source ·
pub(crate) const SIGNATURE_BS: usize = 65;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.TIMESTAMP_BS.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.TIMESTAMP_BS.html index 1635207a..38d27451 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.TIMESTAMP_BS.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.TIMESTAMP_BS.html @@ -1 +1 @@ -TIMESTAMP_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::TIMESTAMP_BS

source ·
pub(crate) const TIMESTAMP_BS: usize = 6;
\ No newline at end of file +TIMESTAMP_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::TIMESTAMP_BS

source ·
pub(crate) const TIMESTAMP_BS: usize = 6;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.UNSIGNED_METADATA_BYTE_SIZE_BS.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.UNSIGNED_METADATA_BYTE_SIZE_BS.html index a7ccdc60..3b0a9907 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.UNSIGNED_METADATA_BYTE_SIZE_BS.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.UNSIGNED_METADATA_BYTE_SIZE_BS.html @@ -1 +1 @@ -UNSIGNED_METADATA_BYTE_SIZE_BS in redstone::protocol::constants - Rust
pub(crate) const UNSIGNED_METADATA_BYTE_SIZE_BS: usize = 3;
\ No newline at end of file +UNSIGNED_METADATA_BYTE_SIZE_BS in redstone::protocol::constants - Rust
pub(crate) const UNSIGNED_METADATA_BYTE_SIZE_BS: usize = 3;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/index.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/index.html index 0268cb89..2eb1f7cf 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/index.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/index.html @@ -1 +1 @@ -redstone::protocol::constants - Rust
\ No newline at end of file +redstone::protocol::constants - Rust
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_package/fn.trim_data_package.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_package/fn.trim_data_package.html index f1456016..25bf7e05 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_package/fn.trim_data_package.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_package/fn.trim_data_package.html @@ -1 +1 @@ -trim_data_package in redstone::protocol::data_package - Rust

Function redstone::protocol::data_package::trim_data_package

source ·
fn trim_data_package(payload: &mut Vec<u8>) -> DataPackage
\ No newline at end of file +trim_data_package in redstone::protocol::data_package - Rust

Function redstone::protocol::data_package::trim_data_package

source ·
fn trim_data_package(payload: &mut Vec<u8>) -> DataPackage
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_package/fn.trim_data_packages.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_package/fn.trim_data_packages.html index 393e9998..7ae9270e 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_package/fn.trim_data_packages.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_package/fn.trim_data_packages.html @@ -1,4 +1,4 @@ -trim_data_packages in redstone::protocol::data_package - Rust

Function redstone::protocol::data_package::trim_data_packages

source ·
pub(crate) fn trim_data_packages(
-    payload: &mut Vec<u8>,
-    count: usize,
-) -> Vec<DataPackage>
\ No newline at end of file +trim_data_packages in redstone::protocol::data_package - Rust

Function redstone::protocol::data_package::trim_data_packages

source ·
pub(crate) fn trim_data_packages(
+    payload: &mut Vec<u8>,
+    count: usize,
+) -> Vec<DataPackage>
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_package/index.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_package/index.html index 4f7ef4c4..71e2a3df 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_package/index.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_package/index.html @@ -1 +1 @@ -redstone::protocol::data_package - Rust

Module redstone::protocol::data_package

source ·

Structs§

Functions§

\ No newline at end of file +redstone::protocol::data_package - Rust

Module redstone::protocol::data_package

source ·

Structs§

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_package/struct.DataPackage.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_package/struct.DataPackage.html index b77c9d35..1cdc961b 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_package/struct.DataPackage.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_package/struct.DataPackage.html @@ -1,22 +1,23 @@ -DataPackage in redstone::protocol::data_package - Rust

Struct redstone::protocol::data_package::DataPackage

source ·
pub(crate) struct DataPackage {
-    pub(crate) signer_address: Vec<u8>,
-    pub(crate) timestamp: u64,
-    pub(crate) data_points: Vec<DataPoint>,
-}

Fields§

§signer_address: Vec<u8>§timestamp: u64§data_points: Vec<DataPoint>

Trait Implementations§

source§

impl Clone for DataPackage

source§

fn clone(&self) -> DataPackage

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DataPackage

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for DataPackage

source§

fn eq(&self, other: &DataPackage) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Eq for DataPackage

source§

impl StructuralPartialEq for DataPackage

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where - T: Debug, - F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where - E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for T
where - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+DataPackage in redstone::protocol::data_package - Rust

Struct redstone::protocol::data_package::DataPackage

source ·
pub(crate) struct DataPackage {
+    pub(crate) signer_address: Vec<u8>,
+    pub(crate) timestamp: u64,
+    pub(crate) data_points: Vec<DataPoint>,
+}

Fields§

§signer_address: Vec<u8>§timestamp: u64§data_points: Vec<DataPoint>

Trait Implementations§

source§

impl Clone for DataPackage

source§

fn clone(&self) -> DataPackage

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DataPackage

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for DataPackage

source§

fn eq(&self, other: &DataPackage) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for DataPackage

source§

impl StructuralPartialEq for DataPackage

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where + T: Debug, + F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where + E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where + T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where +From<T> for U chooses to do.

+

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_point/fn.trim_data_point.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_point/fn.trim_data_point.html index 10a3aa68..ef63a213 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_point/fn.trim_data_point.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_point/fn.trim_data_point.html @@ -1 +1 @@ -trim_data_point in redstone::protocol::data_point - Rust

Function redstone::protocol::data_point::trim_data_point

source ·
fn trim_data_point(payload: &mut Vec<u8>, value_size: usize) -> DataPoint
\ No newline at end of file +trim_data_point in redstone::protocol::data_point - Rust

Function redstone::protocol::data_point::trim_data_point

source ·
fn trim_data_point(payload: &mut Vec<u8>, value_size: usize) -> DataPoint
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_point/fn.trim_data_points.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_point/fn.trim_data_points.html index 4bc76a0f..6c2d70c3 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_point/fn.trim_data_points.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_point/fn.trim_data_points.html @@ -1,5 +1,5 @@ -trim_data_points in redstone::protocol::data_point - Rust

Function redstone::protocol::data_point::trim_data_points

source ·
pub(crate) fn trim_data_points(
-    payload: &mut Vec<u8>,
-    count: usize,
-    value_size: usize,
-) -> Vec<DataPoint>
\ No newline at end of file +trim_data_points in redstone::protocol::data_point - Rust

Function redstone::protocol::data_point::trim_data_points

source ·
pub(crate) fn trim_data_points(
+    payload: &mut Vec<u8>,
+    count: usize,
+    value_size: usize,
+) -> Vec<DataPoint>
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_point/index.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_point/index.html index 6ab1baf0..47323ad6 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_point/index.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_point/index.html @@ -1 +1 @@ -redstone::protocol::data_point - Rust

Module redstone::protocol::data_point

source ·

Structs§

Functions§

\ No newline at end of file +redstone::protocol::data_point - Rust

Module redstone::protocol::data_point

source ·

Structs§

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_point/struct.DataPoint.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_point/struct.DataPoint.html index 4cee4899..eee0d029 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_point/struct.DataPoint.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_point/struct.DataPoint.html @@ -1,21 +1,22 @@ -DataPoint in redstone::protocol::data_point - Rust

Struct redstone::protocol::data_point::DataPoint

source ·
pub(crate) struct DataPoint {
+DataPoint in redstone::protocol::data_point - Rust

Struct redstone::protocol::data_point::DataPoint

source ·
pub(crate) struct DataPoint {
     pub(crate) feed_id: U256,
     pub(crate) value: U256,
-}

Fields§

§feed_id: U256§value: U256

Trait Implementations§

source§

impl Clone for DataPoint

source§

fn clone(&self) -> DataPoint

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DataPoint

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for DataPoint

source§

fn eq(&self, other: &DataPoint) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Eq for DataPoint

source§

impl StructuralPartialEq for DataPoint

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where - T: Debug, - F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where - E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for T
where - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+}

Fields§

§feed_id: U256§value: U256

Trait Implementations§

source§

impl Clone for DataPoint

source§

fn clone(&self) -> DataPoint

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DataPoint

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for DataPoint

source§

fn eq(&self, other: &DataPoint) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for DataPoint

source§

impl StructuralPartialEq for DataPoint

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where + T: Debug, + F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where + E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where + T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where +From<T> for U chooses to do.

+

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/index.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/index.html index d221f7b2..933f37aa 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/index.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/index.html @@ -1 +1 @@ -redstone::protocol - Rust

Module redstone::protocol

source ·

Modules§

\ No newline at end of file +redstone::protocol - Rust

Module redstone::protocol

source ·

Modules§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/marker/fn.trim_redstone_marker.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/marker/fn.trim_redstone_marker.html index fb7c7144..01093e84 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/marker/fn.trim_redstone_marker.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/marker/fn.trim_redstone_marker.html @@ -1 +1 @@ -trim_redstone_marker in redstone::protocol::marker - Rust

Function redstone::protocol::marker::trim_redstone_marker

source ·
pub fn trim_redstone_marker(payload: &mut Vec<u8>)
\ No newline at end of file +trim_redstone_marker in redstone::protocol::marker - Rust

Function redstone::protocol::marker::trim_redstone_marker

source ·
pub fn trim_redstone_marker(payload: &mut Vec<u8>)
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/marker/index.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/marker/index.html index 9844daf7..0ac4ef1d 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/marker/index.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/marker/index.html @@ -1 +1 @@ -redstone::protocol::marker - Rust

Module redstone::protocol::marker

source ·

Functions§

\ No newline at end of file +redstone::protocol::marker - Rust

Module redstone::protocol::marker

source ·

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/payload/fn.trim_metadata.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/payload/fn.trim_metadata.html index b3e6350e..ce8dcf29 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/payload/fn.trim_metadata.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/payload/fn.trim_metadata.html @@ -1 +1 @@ -trim_metadata in redstone::protocol::payload - Rust

Function redstone::protocol::payload::trim_metadata

source ·
fn trim_metadata(payload: &mut Vec<u8>) -> usize
\ No newline at end of file +trim_metadata in redstone::protocol::payload - Rust

Function redstone::protocol::payload::trim_metadata

source ·
fn trim_metadata(payload: &mut Vec<u8>) -> usize
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/payload/fn.trim_payload.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/payload/fn.trim_payload.html index 9eae9fdd..9805f954 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/payload/fn.trim_payload.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/payload/fn.trim_payload.html @@ -1 +1 @@ -trim_payload in redstone::protocol::payload - Rust

Function redstone::protocol::payload::trim_payload

source ·
fn trim_payload(payload: &mut Vec<u8>) -> Payload
\ No newline at end of file +trim_payload in redstone::protocol::payload - Rust

Function redstone::protocol::payload::trim_payload

source ·
fn trim_payload(payload: &mut Vec<u8>) -> Payload
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/payload/index.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/payload/index.html index 7bedf304..7ef700d8 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/payload/index.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/payload/index.html @@ -1 +1 @@ -redstone::protocol::payload - Rust

Module redstone::protocol::payload

source ·

Structs§

Functions§

\ No newline at end of file +redstone::protocol::payload - Rust

Module redstone::protocol::payload

source ·

Structs§

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/payload/struct.Payload.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/payload/struct.Payload.html index 9234341b..94e5a48e 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/payload/struct.Payload.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/payload/struct.Payload.html @@ -1,18 +1,19 @@ -Payload in redstone::protocol::payload - Rust

Struct redstone::protocol::payload::Payload

source ·
pub(crate) struct Payload {
-    pub(crate) data_packages: Vec<DataPackage>,
-}

Fields§

§data_packages: Vec<DataPackage>

Implementations§

source§

impl Payload

source

pub(crate) fn make(payload_bytes: &mut Vec<u8>) -> Payload

Trait Implementations§

source§

impl Clone for Payload

source§

fn clone(&self) -> Payload

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Payload

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where - T: Debug, - F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where - E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for T
where - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+Payload in redstone::protocol::payload - Rust

Struct redstone::protocol::payload::Payload

source ·
pub(crate) struct Payload {
+    pub(crate) data_packages: Vec<DataPackage>,
+}

Fields§

§data_packages: Vec<DataPackage>

Implementations§

source§

impl Payload

source

pub(crate) fn make(payload_bytes: &mut Vec<u8>) -> Payload

Trait Implementations§

source§

impl Clone for Payload

source§

fn clone(&self) -> Payload

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Payload

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where + T: Debug, + F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where + E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where + T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where +From<T> for U chooses to do.

+

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/filter/index.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/filter/index.html index a153fc5f..fa4dd4df 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/filter/index.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/filter/index.html @@ -1 +1 @@ -redstone::utils::filter - Rust

Module redstone::utils::filter

source ·

Traits§

\ No newline at end of file +redstone::utils::filter - Rust

Module redstone::utils::filter

source ·

Traits§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/filter/trait.FilterSome.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/filter/trait.FilterSome.html index 69bc1f28..d00cce8b 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/filter/trait.FilterSome.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/filter/trait.FilterSome.html @@ -1,4 +1,4 @@ -FilterSome in redstone::utils::filter - Rust

Trait redstone::utils::filter::FilterSome

source ·
pub(crate) trait FilterSome<Output> {
+FilterSome in redstone::utils::filter - Rust

Trait redstone::utils::filter::FilterSome

source ·
pub(crate) trait FilterSome<Output> {
     // Required method
     fn filter_some(&self) -> Output;
-}

Required Methods§

source

fn filter_some(&self) -> Output

Implementations on Foreign Types§

source§

impl<T: Copy> FilterSome<Vec<T>> for [Option<T>]

source§

fn filter_some(&self) -> Vec<T>

Implementors§

\ No newline at end of file +}

Required Methods§

source

fn filter_some(&self) -> Output

Implementations on Foreign Types§

source§

impl<T: Copy> FilterSome<Vec<T>> for [Option<T>]

source§

fn filter_some(&self) -> Vec<T>

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/index.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/index.html index ef51ef17..d5ce81a0 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/index.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/index.html @@ -1 +1 @@ -redstone::utils - Rust

Module redstone::utils

source ·

Modules§

\ No newline at end of file +redstone::utils - Rust

Module redstone::utils

source ·

Modules§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/median/fn.maybe_pick_median.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/median/fn.maybe_pick_median.html index ebb4b4a4..027bd4bd 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/median/fn.maybe_pick_median.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/median/fn.maybe_pick_median.html @@ -1,2 +1,2 @@ -maybe_pick_median in redstone::utils::median - Rust

Function redstone::utils::median::maybe_pick_median

source ·
fn maybe_pick_median<T>(a: T, b: T, c: T) -> Option<T>
where - T: PartialOrd,
\ No newline at end of file +maybe_pick_median in redstone::utils::median - Rust

Function redstone::utils::median::maybe_pick_median

source ·
fn maybe_pick_median<T>(a: T, b: T, c: T) -> Option<T>
where + T: PartialOrd,
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/median/index.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/median/index.html index 9a4952c3..18678dad 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/median/index.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/median/index.html @@ -1 +1 @@ -redstone::utils::median - Rust

Module redstone::utils::median

source ·

Traits§

Functions§

\ No newline at end of file +redstone::utils::median - Rust

Module redstone::utils::median

source ·

Traits§

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/median/trait.Averageable.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/median/trait.Averageable.html index 3ef3b4b4..6e55e2ec 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/median/trait.Averageable.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/median/trait.Averageable.html @@ -1 +1 @@ -Averageable in redstone::utils::median - Rust

Trait redstone::utils::median::Averageable

source ·
trait Averageable: Add<Output = Self> + Shr<Output = Self> + From<u8> + Rem<Output = Self> + Copy { }

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Averageable for i32

Implementors§

\ No newline at end of file +Averageable in redstone::utils::median - Rust

Trait redstone::utils::median::Averageable

source ·
trait Averageable: Add<Output = Self> + Shr<Output = Self> + From<u8> + Rem<Output = Self> + Copy { }

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Averageable for i32

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/median/trait.Avg.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/median/trait.Avg.html index 200d300b..bd2c4cfd 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/median/trait.Avg.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/median/trait.Avg.html @@ -1,5 +1,5 @@ -Avg in redstone::utils::median - Rust

Trait redstone::utils::median::Avg

source ·
trait Avg {
+Avg in redstone::utils::median - Rust

Trait redstone::utils::median::Avg

source ·
trait Avg {
     // Required method
     fn avg(self, other: Self) -> Self;
-}

Required Methods§

source

fn avg(self, other: Self) -> Self

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> Avg for T
where +}

Required Methods§

source

fn avg(self, other: Self) -> Self

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> Avg for T
where T: Averageable,

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/median/trait.Median.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/median/trait.Median.html index 60047574..405ac93d 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/median/trait.Median.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/median/trait.Median.html @@ -1,7 +1,7 @@ -Median in redstone::utils::median - Rust

Trait redstone::utils::median::Median

source ·
pub(crate) trait Median {
+Median in redstone::utils::median - Rust

Trait redstone::utils::median::Median

source ·
pub(crate) trait Median {
     type Item;
 
     // Required method
     fn median(self) -> Self::Item;
-}

Required Associated Types§

Required Methods§

source

fn median(self) -> Self::Item

Implementations on Foreign Types§

source§

impl<T> Median for Vec<T>
where - T: Copy + Ord + Avg,

§

type Item = T

source§

fn median(self) -> Self::Item

Implementors§

\ No newline at end of file +}

Required Associated Types§

Required Methods§

source

fn median(self) -> Self::Item

Implementations on Foreign Types§

source§

impl<T> Median for Vec<T>
where + T: Copy + Ord + Avg,

§

type Item = T

source§

fn median(self) -> Self::Item

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/trim/index.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/trim/index.html index e7e6608a..b4c2c47c 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/trim/index.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/trim/index.html @@ -1 +1 @@ -redstone::utils::trim - Rust

Module redstone::utils::trim

source ·

Traits§

\ No newline at end of file +redstone::utils::trim - Rust

Module redstone::utils::trim

source ·

Traits§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/trim/trait.Trim.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/trim/trait.Trim.html index 9e458a9e..720a0534 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/trim/trait.Trim.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/trim/trait.Trim.html @@ -1,5 +1,5 @@ -Trim in redstone::utils::trim - Rust

Trait redstone::utils::trim::Trim

source ·
pub trait Trim<T>
where - Self: Sized,
{ +Trim in redstone::utils::trim - Rust

Trait redstone::utils::trim::Trim

source ·
pub trait Trim<T>
where + Self: Sized,
{ // Required method - fn trim_end(&mut self, len: usize) -> T; -}

Required Methods§

source

fn trim_end(&mut self, len: usize) -> T

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Trim<<Std as NetworkSpecific>::ValueRepr> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> U256

source§

impl Trim<u64> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> u64

source§

impl Trim<usize> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> usize

source§

impl Trim<Vec<u8>> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> Self

Implementors§

\ No newline at end of file + fn trim_end(&mut self, len: usize) -> T; +}

Required Methods§

source

fn trim_end(&mut self, len: usize) -> T

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Trim<<Std as NetworkSpecific>::ValueRepr> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> U256

source§

impl Trim<u64> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> u64

source§

impl Trim<usize> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> usize

source§

impl Trim<Vec<u8>> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> Self

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/trim_zeros/index.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/trim_zeros/index.html index 2a2fd9e0..9377f30d 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/trim_zeros/index.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/trim_zeros/index.html @@ -1 +1 @@ -redstone::utils::trim_zeros - Rust

Module redstone::utils::trim_zeros

source ·

Traits§

\ No newline at end of file +redstone::utils::trim_zeros - Rust

Module redstone::utils::trim_zeros

source ·

Traits§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/trim_zeros/trait.TrimZeros.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/trim_zeros/trait.TrimZeros.html index f1299ca4..ae49a55d 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/trim_zeros/trait.TrimZeros.html +++ b/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/trim_zeros/trait.TrimZeros.html @@ -1,4 +1,4 @@ -TrimZeros in redstone::utils::trim_zeros - Rust

Trait redstone::utils::trim_zeros::TrimZeros

source ·
pub trait TrimZeros {
+TrimZeros in redstone::utils::trim_zeros - Rust

Trait redstone::utils::trim_zeros::TrimZeros

source ·
pub trait TrimZeros {
     // Required method
     fn trim_zeros(self) -> Self;
-}

Required Methods§

source

fn trim_zeros(self) -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl TrimZeros for Vec<u8>

source§

fn trim_zeros(self) -> Self

Implementors§

\ No newline at end of file +}

Required Methods§

source

fn trim_zeros(self) -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl TrimZeros for Vec<u8>

source§

fn trim_zeros(self) -> Self

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/search-index.js b/static/rust/redstone/crypto_secp256k1/doc/search-index.js index 09c72cca..1b5280bb 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/search-index.js +++ b/static/rust/redstone/crypto_secp256k1/doc/search-index.js @@ -1,5 +1,5 @@ var searchIndex = new Map(JSON.parse('[\ -["redstone",{"t":"CCCQQCCCCCCCIHHHFNONNONNNNONONNNNNNHHFNNNNNNNONNNONKMMMMCCHCHHICCCCCCCCKKMMKRKHMHMPPPKPGPPPPPPPNNNNNMNNNNNNMNNNNNNKMKKMMFNNNCNNNNNNNIRIKISTRRNNNHMHMCCCCCSSSSSSSSSSSFNNNNNONNNNOONHHNNNNFNNNNNNONNNNHHNNNONHFNNNNNONNNNNHHNNNNCCCCKMKKRKMHMKMKM","n":["core","crypto","network","print_and_panic","print_debug","protocol","utils","aggregator","config","processor","processor_result","validator","Matrix","aggregate_matrix","aggregate_values","make_value_signer_matrix","Config","assert_or_revert","block_timestamp","borrow","borrow_mut","feed_ids","feed_index","fmt","from","into","signer_count_threshold","signer_index","signers","try_from","try_into","type_id","validate_signer_count_threshold","validate_timestamp","vzip","make_processor_result","process_payload","ProcessorResult","assert_or_revert","borrow","borrow_mut","eq","fmt","from","into","min_timestamp","try_from","try_into","type_id","values","vzip","Validator","feed_index","signer_index","validate_signer_count_threshold","validate_timestamp","keccak256","recover","keccak256","crypto256","recover_address","recover_public_key","_Network","as_str","assert","error","flattened","from_bytes_repr","print_debug","pure","specific","AsAsciiStr","AsHexStr","as_ascii_str","as_hex_str","Assert","ErrorArg","Unwrap","assert_or_revert","assert_or_revert","assert_or_revert_bool_with","unwrap_or_revert","ArrayIsEmpty","ClonedContractError","ContractError","ContractErrorContent","CryptographicError","Error","InsufficientSignerCount","NonEmptyPayloadRemainder","NumberOverflow","SizeNotSupported","TimestampTooFuture","TimestampTooOld","WrongRedStoneMarker","assert_or_revert","borrow","borrow_mut","clone","clone_into","code","code","contract_error","fmt","fmt","from","into","message","to_owned","to_string","try_from","try_into","type_id","vzip","Flattened","flattened","FromBytesRepr","Sanitized","from_bytes_repr","sanitized","Std","borrow","borrow_mut","from","from_bytes_repr","into","print","revert","try_from","try_into","type_id","vzip","Bytes","BytesRepr","Network","NetworkSpecific","U256","VALUE_SIZE","VALUE_SIZE","ValueRepr","_Self","as_ascii_str","as_hex_str","from_bytes_repr","print","print","revert","revert","constants","data_package","data_point","marker","payload","DATA_FEED_ID_BS","DATA_PACKAGES_COUNT_BS","DATA_POINTS_COUNT_BS","DATA_POINT_VALUE_BYTE_SIZE_BS","MAX_TIMESTAMP_AHEAD_MS","MAX_TIMESTAMP_DELAY_MS","REDSTONE_MARKER","REDSTONE_MARKER_BS","SIGNATURE_BS","TIMESTAMP_BS","UNSIGNED_METADATA_BYTE_SIZE_BS","DataPackage","assert_or_revert","borrow","borrow_mut","clone","clone_into","data_points","eq","fmt","from","into","signer_address","timestamp","to_owned","trim_data_package","trim_data_packages","try_from","try_into","type_id","vzip","DataPoint","assert_or_revert","borrow","borrow_mut","clone","clone_into","eq","feed_id","fmt","from","into","to_owned","trim_data_point","trim_data_points","try_from","try_into","type_id","value","vzip","trim_redstone_marker","Payload","assert_or_revert","borrow","borrow_mut","clone","clone_into","data_packages","fmt","from","into","make","to_owned","trim_metadata","trim_payload","try_from","try_into","type_id","vzip","filter","median","trim","trim_zeros","FilterSome","filter_some","Averageable","Avg","Item","Median","avg","maybe_pick_median","median","Trim","trim_end","TrimZeros","trim_zeros"],"q":[[0,"redstone"],[7,"redstone::core"],[12,"redstone::core::aggregator"],[16,"redstone::core::config"],[35,"redstone::core::processor"],[37,"redstone::core::processor_result"],[51,"redstone::core::validator"],[56,"redstone::crypto"],[58,"redstone::crypto::keccak256"],[59,"redstone::crypto::recover"],[61,"redstone::crypto::recover::crypto256"],[62,"redstone::network"],[71,"redstone::network::as_str"],[75,"redstone::network::assert"],[82,"redstone::network::error"],[114,"redstone::network::flattened"],[116,"redstone::network::from_bytes_repr"],[120,"redstone::network::pure"],[132,"redstone::network::specific"],[148,"redstone::protocol"],[153,"redstone::protocol::constants"],[164,"redstone::protocol::data_package"],[184,"redstone::protocol::data_point"],[203,"redstone::protocol::marker"],[204,"redstone::protocol::payload"],[222,"redstone::utils"],[226,"redstone::utils::filter"],[228,"redstone::utils::median"],[235,"redstone::utils::trim"],[237,"redstone::utils::trim_zeros"],[239,"core::option"],[240,"alloc::vec"],[241,"core::ops::function"],[242,"core::fmt"],[243,"core::result"],[244,"core::any"],[245,"alloc::boxed"],[246,"alloc::string"],[247,"core::cmp"]],"i":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,20,20,20,20,20,20,20,20,20,20,20,20,20,0,23,23,23,23,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,27,0,33,0,0,30,0,33,8,8,8,0,8,0,8,8,8,8,8,8,8,8,8,8,8,8,34,8,8,8,8,8,8,34,8,8,8,8,8,8,0,36,0,0,37,38,0,48,48,48,0,48,48,48,48,48,48,48,0,49,0,0,0,0,49,49,49,1,1,1,0,49,0,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,5,5,5,5,0,40,40,40,40,40,40,40,40,40,40,40,0,0,40,40,40,40,40,0,0,19,19,19,19,19,19,19,19,19,19,19,0,0,19,19,19,19,0,0,0,0,0,41,0,0,45,0,42,0,45,0,46,0,47],"f":"`````````````{{{f{{f{{d{b}}}}}}h}{{f{b}}}}{{h{f{j}}}{{f{b}}}}{{{l{h}}{f{j}}}{{f{{f{{d{b}}}}}}}}`{{cei}g{}{}{}{{Ab{{l{g}}}{{n{A`}}}}}}`{{{l{c}}}{{l{e}}}{}{}}{{{l{Adc}}}{{l{Ade}}}{}{}}`{{{l{h}}b}{{d{Af}}}}{{{l{h}}{l{AdAh}}}Aj}{cc{}}{ce{}{}}`{{{l{h}}{l{{An{Al}}}}}{{d{Af}}}}`{c{{B`{e}}}{}{}}0{{{l{c}}}Bb{}}{{{l{h}}Af{l{{An{{d{b}}}}}}}{{f{b}}}}{{{l{h}}AfBd}Bd}5{{hBf}Bh}{{hBj}Bh}`=<;{{{l{Bh}}{l{Bh}}}Bl}{{{l{Bh}}{l{AdAh}}}Aj}:9`776`9`{{{l{Bn}}b}{{d{Af}}}}{{{l{Bn}}{l{{An{Al}}}}}{{d{Af}}}}{{{l{Bn}}Af{l{{An{{d{b}}}}}}}{{f{b}}}}{{{l{Bn}}AfBd}Bd}``{{{l{{An{Al}}}}}{{C`{{An{Al}}}}}}`{{{f{Al}}{f{Al}}}{{f{Al}}}}{{{C`{{An{Al}}}}{l{{An{Al}}}}Al}{{C`{{An{Al}}}}}}```````````{{{l{Cb}}}Cd}{{{l{Cf}}}Cd}```{{ceg}cCh{{Cj{{l{c}}}{{n{Bl}}}}}{{Ab{{l{c}}}{{n{A`}}}}}}{{Clce}Cl{}{{Cj{{l{Cl}}}{{n{A`}}}}}}{{Blc}Cn{{Ab{}{{n{A`}}}}}}{{{Db{}{{D`{c}}}}e}g{}{{Cj{{l{c}}}{{n{A`}}}}}{}}`````````````{{cei}g{}{}{}{{Ab{{l{g}}}{{n{A`}}}}}}{{{l{c}}}{{l{e}}}{}{}}{{{l{Adc}}}{{l{Ade}}}{}{}}{{{l{A`}}}A`}{{{l{c}}{l{Ade}}}Cn{}{}}{{{l{Dd}}}Al}{{{l{A`}}}Df}{cA`Dd}{{{l{A`}}{l{AdAh}}}Aj}0{cc{}}{ce{}{}}{{{l{Dd}}}Cd}{{{l{c}}}e{}{}}{{{l{c}}}Cd{}}{c{{B`{e}}}{}{}}0{{{l{c}}}Bb{}}5`{{{l{Dh}}}c{}}``{cDj{}}{DlDl}`{{{l{c}}}{{l{e}}}{}{}}{{{l{Adc}}}{{l{Ade}}}{}{}};`:{CdCn}{A`Dn}887<`````````{{{l{b}}}Cd}0{{{f{Al}}}b}3322`````````````````{{cei}g{}{}{}{{Ab{{l{g}}}{{n{A`}}}}}}65{{{l{j}}}j}{{{l{c}}{l{Ade}}}Cn{}{}}`{{{l{j}}{l{j}}}Bl}{{{l{j}}{l{AdAh}}}Aj}{cc{}}{ce{}{}}``{{{l{c}}}e{}{}}{{{l{Ad{f{Al}}}}}j}{{{l{Ad{f{Al}}}}Af}{{f{j}}}}{c{{B`{e}}}{}{}}0{{{l{c}}}Bb{}}5`;{{{l{c}}}{{l{e}}}{}{}}{{{l{Adc}}}{{l{Ade}}}{}{}}{{{l{E`}}}E`}<{{{l{E`}}{l{E`}}}Bl}`{{{l{E`}}{l{AdAh}}}Aj};:9{{{l{Ad{f{Al}}}}Af}E`}{{{l{Ad{f{Al}}}}AfAf}{{f{E`}}}}887`<{{{l{Ad{f{Al}}}}}Cn}`{{cei}g{}{}{}{{Ab{{l{g}}}{{n{A`}}}}}}87{{{l{Bf}}}Bf}{{{l{c}}{l{Ade}}}Cn{}{}}`{{{l{Bf}}{l{AdAh}}}Aj}{cc{}}{ce{}{}}{{{l{Ad{f{Al}}}}}Bf}{{{l{c}}}e{}{}}{{{l{Ad{f{Al}}}}}Af}2{c{{B`{e}}}{}{}}0{{{l{c}}}Bb{}}5`````{{{l{Eb}}}c{}}````{{EdEd}Ed}{{ccc}{{d{c}}}Ef}{{{Ej{}{{Eh{c}}}}}c{}}`{{{l{AdEl}}Af}c{}}`{EnEn}","D":"Ed","p":[[8,"U256",132],[6,"Option",239],[5,"Vec",240],[5,"Config",16],[5,"DataPackage",164],[1,"reference"],[17,"Output"],[6,"Error",82],[10,"FnOnce",241],[0,"mut"],[1,"usize"],[5,"Formatter",242],[8,"Result",242],[1,"u8"],[1,"slice"],[6,"Result",243],[5,"TypeId",244],[1,"u64"],[5,"Payload",204],[5,"ProcessorResult",37],[8,"Bytes",132],[1,"bool"],[10,"Validator",51],[5,"Box",245],[10,"AsAsciiStr",71],[5,"String",246],[10,"AsHexStr",71],[10,"Debug",242],[10,"Fn",241],[10,"Assert",75],[1,"unit"],[17,"ErrorArg"],[10,"Unwrap",75],[10,"ContractErrorContent",82],[1,"u16"],[10,"Flattened",114],[10,"FromBytesRepr",116],[10,"Sanitized",116],[1,"never"],[5,"DataPoint",184],[10,"FilterSome",226],[10,"Avg",228],[10,"PartialOrd",247],[17,"Item"],[10,"Median",228],[10,"Trim",235],[10,"TrimZeros",237],[5,"Std",120],[10,"NetworkSpecific",132]],"r":[],"b":[[103,"impl-Display-for-Error"],[104,"impl-Debug-for-Error"]],"c":"OjAAAAAAAAA=","e":"OzAAAAEAAMUAEwABAA0AEAAAABIAAAAUAAEAFwABABwAAAAeAAYAJwAEAC8AAgAzAAAAOQAZAFYAAABgAAkAbAAPAH0AAAB/AC4AsAARAMQAEADXABgA"}]\ +["redstone",{"t":"CCCQQCCCCCCCIHHHFNONNONNNNONONNNNNNHHFNNNNNNNONNNONKMMMMIIICCHCHHICCCCCCCCKKMMKRKHMHMPPPKPGPPPPPPPNNNNNNMNNNNNNMNNNNNNKMKKMMFNNNCNNNNNNNIRIKISTRRNNNHMHMCCCCCSSSSSSSSSSSFNNNNNNONNNNOONHHNNNNFNNNNNNNONNNNHHNNNONHFNNNNNNONNNNNHHNNNNCCCCKMKKRKMHMKMKM","n":["core","crypto","network","print_and_panic","print_debug","protocol","utils","aggregator","config","processor","processor_result","validator","Matrix","aggregate_matrix","aggregate_values","make_value_signer_matrix","Config","assert_or_revert","block_timestamp","borrow","borrow_mut","feed_ids","feed_index","fmt","from","into","signer_count_threshold","signer_index","signers","try_from","try_into","type_id","validate_signer_count_threshold","validate_timestamp","vzip","make_processor_result","process_payload","ProcessorResult","assert_or_revert","borrow","borrow_mut","eq","fmt","from","into","min_timestamp","try_from","try_into","type_id","values","vzip","Validator","feed_index","signer_index","validate_signer_count_threshold","validate_timestamp","EcdsaUncompressedPublicKey","Keccak256Hash","Secp256SigRs","keccak256","recover","keccak256","crypto256","recover_address","recover_public_key","_Network","as_str","assert","error","flattened","from_bytes_repr","print_debug","pure","specific","AsAsciiStr","AsHexStr","as_ascii_str","as_hex_str","Assert","ErrorArg","Unwrap","assert_or_revert","assert_or_revert","assert_or_revert_bool_with","unwrap_or_revert","ArrayIsEmpty","ClonedContractError","ContractError","ContractErrorContent","CryptographicError","Error","InsufficientSignerCount","NonEmptyPayloadRemainder","NumberOverflow","SizeNotSupported","TimestampTooFuture","TimestampTooOld","WrongRedStoneMarker","assert_or_revert","borrow","borrow_mut","clone","clone_into","clone_to_uninit","code","code","contract_error","fmt","fmt","from","into","message","to_owned","to_string","try_from","try_into","type_id","vzip","Flattened","flattened","FromBytesRepr","Sanitized","from_bytes_repr","sanitized","Std","borrow","borrow_mut","from","from_bytes_repr","into","print","revert","try_from","try_into","type_id","vzip","Bytes","BytesRepr","Network","NetworkSpecific","U256","VALUE_SIZE","VALUE_SIZE","ValueRepr","_Self","as_ascii_str","as_hex_str","from_bytes_repr","print","print","revert","revert","constants","data_package","data_point","marker","payload","DATA_FEED_ID_BS","DATA_PACKAGES_COUNT_BS","DATA_POINTS_COUNT_BS","DATA_POINT_VALUE_BYTE_SIZE_BS","MAX_TIMESTAMP_AHEAD_MS","MAX_TIMESTAMP_DELAY_MS","REDSTONE_MARKER","REDSTONE_MARKER_BS","SIGNATURE_BS","TIMESTAMP_BS","UNSIGNED_METADATA_BYTE_SIZE_BS","DataPackage","assert_or_revert","borrow","borrow_mut","clone","clone_into","clone_to_uninit","data_points","eq","fmt","from","into","signer_address","timestamp","to_owned","trim_data_package","trim_data_packages","try_from","try_into","type_id","vzip","DataPoint","assert_or_revert","borrow","borrow_mut","clone","clone_into","clone_to_uninit","eq","feed_id","fmt","from","into","to_owned","trim_data_point","trim_data_points","try_from","try_into","type_id","value","vzip","trim_redstone_marker","Payload","assert_or_revert","borrow","borrow_mut","clone","clone_into","clone_to_uninit","data_packages","fmt","from","into","make","to_owned","trim_metadata","trim_payload","try_from","try_into","type_id","vzip","filter","median","trim","trim_zeros","FilterSome","filter_some","Averageable","Avg","Item","Median","avg","maybe_pick_median","median","Trim","trim_end","TrimZeros","trim_zeros"],"q":[[0,"redstone"],[7,"redstone::core"],[12,"redstone::core::aggregator"],[16,"redstone::core::config"],[35,"redstone::core::processor"],[37,"redstone::core::processor_result"],[51,"redstone::core::validator"],[56,"redstone::crypto"],[61,"redstone::crypto::keccak256"],[62,"redstone::crypto::recover"],[64,"redstone::crypto::recover::crypto256"],[65,"redstone::network"],[74,"redstone::network::as_str"],[78,"redstone::network::assert"],[85,"redstone::network::error"],[118,"redstone::network::flattened"],[120,"redstone::network::from_bytes_repr"],[124,"redstone::network::pure"],[136,"redstone::network::specific"],[152,"redstone::protocol"],[157,"redstone::protocol::constants"],[168,"redstone::protocol::data_package"],[189,"redstone::protocol::data_point"],[209,"redstone::protocol::marker"],[210,"redstone::protocol::payload"],[229,"redstone::utils"],[233,"redstone::utils::filter"],[235,"redstone::utils::median"],[242,"redstone::utils::trim"],[244,"redstone::utils::trim_zeros"],[246,"core::option"],[247,"alloc::vec"],[248,"core::ops::function"],[249,"core::fmt"],[250,"core::result"],[251,"core::any"],[252,"alloc::string"],[253,"core::cmp"]],"i":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,20,20,20,20,20,20,20,20,20,20,20,20,20,0,23,23,23,23,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,27,0,33,0,0,30,0,33,8,8,8,0,8,0,8,8,8,8,8,8,8,8,8,8,8,8,8,34,8,8,8,8,8,8,34,8,8,8,8,8,8,0,36,0,0,37,38,0,48,48,48,0,48,48,48,48,48,48,48,0,49,0,0,0,0,49,49,49,1,1,1,0,49,0,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,5,5,5,5,0,40,40,40,40,40,40,40,40,40,40,40,40,0,0,40,40,40,40,40,0,0,19,19,19,19,19,19,19,19,19,19,19,19,0,0,19,19,19,19,0,0,0,0,0,41,0,0,45,0,42,0,45,0,46,0,47],"f":"`````````````{{{f{{f{{d{b}}}}}}h}{{f{b}}}}{{h{f{j}}}{{f{b}}}}{{{l{h}}{f{j}}}{{f{{f{{d{b}}}}}}}}`{{cei}g{}{}{}{{Ab{{l{g}}}{{n{A`}}}}}}`{{{l{c}}}{{l{e}}}{}{}}{{{l{Adc}}}{{l{Ade}}}{}{}}`{{{l{h}}b}{{d{Af}}}}{{{l{h}}{l{AdAh}}}Aj}{cc{}}{ce{}{}}`{{{l{h}}{l{{An{Al}}}}}{{d{Af}}}}`{c{{B`{e}}}{}{}}0{{{l{c}}}Bb{}}{{{l{h}}Af{l{{An{{d{b}}}}}}}{{f{b}}}}{{{l{h}}AfBd}Bd}5{{hBf}Bh}{{hBj}Bh}`=<;{{{l{Bh}}{l{Bh}}}Bl}{{{l{Bh}}{l{AdAh}}}Aj}:9`776`9`{{{l{Bn}}b}{{d{Af}}}}{{{l{Bn}}{l{{An{Al}}}}}{{d{Af}}}}{{{l{Bn}}Af{l{{An{{d{b}}}}}}}{{f{b}}}}{{{l{Bn}}AfBd}Bd}`````{{{l{{An{Al}}}}}{{C`{Al}}}}`{{{f{Al}}{f{Al}}}{{f{Al}}}}{{{C`{Al}}{C`{Al}}Al}{{C`{Al}}}}```````````{{{l{Cb}}}Cd}{{{l{Cf}}}Cd}```{{ceg}cCh{{Cj{{l{c}}}{{n{Bl}}}}}{{Ab{{l{c}}}{{n{A`}}}}}}{{Clce}Cl{}{{Cj{{l{Cl}}}{{n{A`}}}}}}{{Blc}Cn{{Ab{}{{n{A`}}}}}}{{{Db{}{{D`{c}}}}e}g{}{{Cj{{l{c}}}{{n{A`}}}}}{}}`````````````{{cei}g{}{}{}{{Ab{{l{g}}}{{n{A`}}}}}}{{{l{c}}}{{l{e}}}{}{}}{{{l{Adc}}}{{l{Ade}}}{}{}}{{{l{A`}}}A`}{{{l{c}}{l{Ade}}}Cn{}{}}{{{l{c}}}Cn{}}{{{l{Dd}}}Al}{{{l{A`}}}Df}{cA`Dd}{{{l{A`}}{l{AdAh}}}Aj}0{cc{}}{ce{}{}}{{{l{Dd}}}Cd}{{{l{c}}}e{}{}}{{{l{c}}}Cd{}}{c{{B`{e}}}{}{}}0{{{l{c}}}Bb{}}5`{{{l{Dh}}}c{}}``{cDj{}}{DlDl}`{{{l{c}}}{{l{e}}}{}{}}{{{l{Adc}}}{{l{Ade}}}{}{}};`:{CdCn}{A`Dn}887<`````````{{{l{b}}}Cd}0{{{f{Al}}}b}3322`````````````````{{cei}g{}{}{}{{Ab{{l{g}}}{{n{A`}}}}}}65{{{l{j}}}j}{{{l{c}}{l{Ade}}}Cn{}{}}{{{l{c}}}Cn{}}`{{{l{j}}{l{j}}}Bl}{{{l{j}}{l{AdAh}}}Aj}{cc{}}{ce{}{}}``{{{l{c}}}e{}{}}{{{l{Ad{f{Al}}}}}j}{{{l{Ad{f{Al}}}}Af}{{f{j}}}}{c{{B`{e}}}{}{}}0{{{l{c}}}Bb{}}5`<{{{l{c}}}{{l{e}}}{}{}}{{{l{Adc}}}{{l{Ade}}}{}{}}{{{l{E`}}}E`}=<{{{l{E`}}{l{E`}}}Bl}`{{{l{E`}}{l{AdAh}}}Aj};:9{{{l{Ad{f{Al}}}}Af}E`}{{{l{Ad{f{Al}}}}AfAf}{{f{E`}}}}887`<{{{l{Ad{f{Al}}}}}Cn}`{{cei}g{}{}{}{{Ab{{l{g}}}{{n{A`}}}}}}87{{{l{Bf}}}Bf}{{{l{c}}{l{Ade}}}Cn{}{}}{{{l{c}}}Cn{}}`{{{l{Bf}}{l{AdAh}}}Aj}{cc{}}{ce{}{}}{{{l{Ad{f{Al}}}}}Bf}{{{l{c}}}e{}{}}{{{l{Ad{f{Al}}}}}Af}2{c{{B`{e}}}{}{}}0{{{l{c}}}Bb{}}5`````{{{l{Eb}}}c{}}````{{EdEd}Ed}{{ccc}{{d{c}}}Ef}{{{Ej{}{{Eh{c}}}}}c{}}`{{{l{AdEl}}Af}c{}}`{EnEn}","D":"Ed","p":[[8,"U256",136],[6,"Option",246],[5,"Vec",247],[5,"Config",16],[5,"DataPackage",168],[1,"reference"],[17,"Output"],[6,"Error",85],[10,"FnOnce",248],[0,"mut"],[1,"usize"],[5,"Formatter",249],[8,"Result",249],[1,"u8"],[1,"slice"],[6,"Result",250],[5,"TypeId",251],[1,"u64"],[5,"Payload",210],[5,"ProcessorResult",37],[8,"Bytes",136],[1,"bool"],[10,"Validator",51],[1,"array"],[10,"AsAsciiStr",74],[5,"String",252],[10,"AsHexStr",74],[10,"Debug",249],[10,"Fn",248],[10,"Assert",78],[1,"unit"],[17,"ErrorArg"],[10,"Unwrap",78],[10,"ContractErrorContent",85],[1,"u16"],[10,"Flattened",118],[10,"FromBytesRepr",120],[10,"Sanitized",120],[1,"never"],[5,"DataPoint",189],[10,"FilterSome",233],[10,"Avg",235],[10,"PartialOrd",253],[17,"Item"],[10,"Median",235],[10,"Trim",242],[10,"TrimZeros",244],[5,"Std",124],[10,"NetworkSpecific",136]],"r":[],"b":[[107,"impl-Debug-for-Error"],[108,"impl-Display-for-Error"]],"c":"OjAAAAAAAAA=","e":"OzAAAAEAAMwAEwABAA0AEAAAABIAAAAUAAEAFwABABwAAAAeAAYAJwAEAC8AAgAzAAAAOQAcAFkAAABjAAoAcAAPAIEAAACDAC8AtQASAMoAEQDeABgA"}]\ ]')); if (typeof exports !== 'undefined') exports.searchIndex = searchIndex; else if (window.initSearch) window.initSearch(searchIndex); diff --git a/static/rust/redstone/crypto_secp256k1/doc/settings.html b/static/rust/redstone/crypto_secp256k1/doc/settings.html index 9631dcb2..6da7f2d5 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/settings.html +++ b/static/rust/redstone/crypto_secp256k1/doc/settings.html @@ -1 +1 @@ -Settings

Rustdoc settings

Back
\ No newline at end of file +Settings

Rustdoc settings

Back
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/core/aggregator.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/core/aggregator.rs.html index e839b506..ed9efa50 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/core/aggregator.rs.html +++ b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/core/aggregator.rs.html @@ -1,4 +1,4 @@ -aggregator.rs - source
1
+aggregator.rs - source
1
 2
 3
 4
@@ -289,6 +289,12 @@
 289
 290
 291
+292
+293
+294
+295
+296
+297
 
use crate::{
     core::{config::Config, validator::Validator},
     network::specific::U256,
@@ -368,6 +374,9 @@
         helpers::iter_into::{IterInto, IterIntoOpt, OptIterIntoOpt},
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_aggregate_matrix() {
         let matrix = vec![
@@ -445,6 +454,9 @@
         protocol::data_package::DataPackage,
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_make_value_signer_matrix_empty() {
         let config = Config::test();
diff --git a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/core/config.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/core/config.rs.html
index 0b9ca7f7..a5b2ec60 100644
--- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/core/config.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/core/config.rs.html
@@ -1,4 +1,4 @@
-config.rs - source
1
+config.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/core/mod.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/core/mod.rs.html
index f278fb16..3aa3fec4 100644
--- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/core/mod.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/core/mod.rs.html
@@ -1,4 +1,4 @@
-mod.rs - source
1
+mod.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/core/processor.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/core/processor.rs.html
index 2e92e10d..15860266 100644
--- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/core/processor.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/core/processor.rs.html
@@ -1,4 +1,4 @@
-processor.rs - source
1
+processor.rs - source
1
 2
 3
 4
@@ -99,6 +99,9 @@
 99
 100
 101
+102
+103
+104
 
use crate::{
     core::{
         aggregator::aggregate_values, config::Config, processor_result::ProcessorResult,
@@ -160,6 +163,9 @@
         protocol::{data_package::DataPackage, payload::Payload},
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_make_processor_result() {
         let data_packages = vec![
diff --git a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/core/processor_result.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/core/processor_result.rs.html
index ecdffb37..8352b915 100644
--- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/core/processor_result.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/core/processor_result.rs.html
@@ -1,4 +1,4 @@
-processor_result.rs - source
1
+processor_result.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/core/validator.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/core/validator.rs.html
index 1fed8ca0..30f7ee53 100644
--- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/core/validator.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/core/validator.rs.html
@@ -1,4 +1,4 @@
-validator.rs - source
1
+validator.rs - source
1
 2
 3
 4
@@ -284,6 +284,9 @@
 284
 285
 286
+287
+288
+289
 
use crate::{
     core::config::Config,
     network::{
@@ -421,6 +424,9 @@
     };
     use itertools::Itertools;
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_feed_index() {
         let config = Config::test();
diff --git a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/crypto/keccak256.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/crypto/keccak256.rs.html
index 7e62e207..aadbac5d 100644
--- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/crypto/keccak256.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/crypto/keccak256.rs.html
@@ -1,4 +1,4 @@
-keccak256.rs - source
1
+keccak256.rs - source
1
 2
 3
 4
@@ -34,20 +34,46 @@
 34
 35
 36
-
use sha3::{Digest, Keccak256};
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+
use crate::crypto::Keccak256Hash;
+#[cfg(not(all(feature = "crypto_radix", target_arch = "wasm32")))]
+use sha3::Digest;
 
-pub fn keccak256(data: &[u8]) -> Box<[u8]> {
-    Keccak256::new_with_prefix(data)
+#[cfg(not(all(feature = "crypto_radix", target_arch = "wasm32")))]
+pub fn keccak256(data: &[u8]) -> Keccak256Hash {
+    sha3::Keccak256::new_with_prefix(data)
         .finalize()
         .as_slice()
-        .into()
+        .try_into()
+        .unwrap()
 }
 
-#[cfg(feature = "helpers")]
+#[cfg(all(feature = "crypto_radix", target_arch = "wasm32"))]
+pub fn keccak256(data: &[u8]) -> Keccak256Hash {
+    scrypto::prelude::CryptoUtils::keccak256_hash(data).0
+}
+
+#[cfg(not(all(feature = "crypto_radix", target_arch = "wasm32")))]
+#[cfg(feature = "helpers")]
 #[cfg(test)]
 mod tests {
     use crate::{crypto::keccak256::keccak256, helpers::hex::hex_to_bytes};
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const MESSAGE: &str = "415641580000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d394303d018d79bf0ba000000020000001";
     const MESSAGE_HASH: &str = "f0805644755393876d0e917e553f0c206f8bc68b7ebfe73a79d2a9e7f5a4cea6";
     const EMPTY_MESSAGE_HASH: &str =
diff --git a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/crypto/mod.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/crypto/mod.rs.html
index fa282223..c3470603 100644
--- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/crypto/mod.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/crypto/mod.rs.html
@@ -1,5 +1,13 @@
-mod.rs - source
1
+mod.rs - source
1
 2
+3
+4
+5
+6
 
mod keccak256;
 pub(crate) mod recover;
+
+pub(crate) type Keccak256Hash = [u8; 32];
+pub(crate) type Secp256SigRs = [u8; 64];
+pub(crate) type EcdsaUncompressedPublicKey = [u8; 65];
 
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/crypto/recover.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/crypto/recover.rs.html index f03e84b0..3b917f5c 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/crypto/recover.rs.html +++ b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/crypto/recover.rs.html @@ -1,4 +1,4 @@ -recover.rs - source
1
+recover.rs - source
1
 2
 3
 4
@@ -131,14 +131,59 @@
 131
 132
 133
-
use crate::crypto::{keccak256, recover::crypto256::recover_public_key};
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+
use crate::crypto::{
+    keccak256, recover::crypto256::recover_public_key, EcdsaUncompressedPublicKey, Keccak256Hash,
+    Secp256SigRs,
+};
 
 pub fn recover_address(message: Vec<u8>, signature: Vec<u8>) -> Vec<u8> {
-    let recovery_byte = signature[64]; // 65-byte representation
+    //TODO: check malleability support by the libraries
+    let recovery_byte = signature[64]; // 65-byte representation
     let msg_hash = keccak256::keccak256(message.as_slice());
     let key = recover_public_key(
         msg_hash,
-        &signature[..64],
+        signature[..64].try_into().unwrap(),
         recovery_byte - (if recovery_byte >= 27 { 27 } else { 0 }),
     );
     let key_hash = keccak256::keccak256(&key[1..]); // skip first uncompressed-key byte
@@ -148,66 +193,100 @@
 
 #[cfg(feature = "crypto_secp256k1")]
 pub(crate) mod crypto256 {
+    use super::{EcdsaUncompressedPublicKey, Keccak256Hash, Secp256SigRs};
     use crate::network::{assert::Unwrap, error::Error};
     use secp256k1::{ecdsa::RecoverableSignature, Message, Secp256k1 as Secp256k1Curve};
 
     pub(crate) fn recover_public_key(
-        message_hash: Box<[u8]>,
-        signature_bytes: &[u8],
+        message_hash: Keccak256Hash,
+        signature_bytes: Secp256SigRs,
         recovery_byte: u8,
-    ) -> Box<[u8]> {
-        let msg = Message::from_digest_slice(message_hash.as_ref())
-            .unwrap_or_revert(|_| Error::CryptographicError(message_hash.len()));
+    ) -> EcdsaUncompressedPublicKey {
+        let msg = Message::from_digest(message_hash);
 
         let recovery_id = secp256k1::ecdsa::RecoveryId::from_i32(recovery_byte.into())
             .unwrap_or_revert(|_| Error::CryptographicError(recovery_byte.into()));
 
         let sig: RecoverableSignature =
-            RecoverableSignature::from_compact(signature_bytes, recovery_id)
+            RecoverableSignature::from_compact(signature_bytes.as_slice(), recovery_id)
                 .unwrap_or_revert(|_| Error::CryptographicError(signature_bytes.len()));
 
         let public_key = Secp256k1Curve::new().recover_ecdsa(&msg, &sig);
 
-        public_key.unwrap().serialize_uncompressed().into()
+        public_key.unwrap().serialize_uncompressed()
     }
 }
 
 #[cfg(feature = "crypto_k256")]
 pub(crate) mod crypto256 {
+    use super::{EcdsaUncompressedPublicKey, Keccak256Hash, Secp256SigRs};
     use crate::network::{assert::Unwrap, error::Error};
     use k256::ecdsa::{RecoveryId, Signature, VerifyingKey};
 
     pub(crate) fn recover_public_key(
-        message_hash: Box<[u8]>,
-        signature_bytes: &[u8],
+        message_hash: Keccak256Hash,
+        signature_bytes: Secp256SigRs,
         recovery_byte: u8,
-    ) -> Box<[u8]> {
+    ) -> EcdsaUncompressedPublicKey {
         let recovery_id = RecoveryId::from_byte(recovery_byte)
             .unwrap_or_revert(|_| Error::CryptographicError(recovery_byte.into()));
 
-        let signature = Signature::try_from(signature_bytes)
+        let signature = Signature::try_from(signature_bytes.as_slice())
             .unwrap_or_revert(|_| Error::CryptographicError(signature_bytes.len()));
 
         let recovered_key =
             VerifyingKey::recover_from_prehash(message_hash.as_ref(), &signature, recovery_id)
-                .map(|key| key.to_encoded_point(false).to_bytes());
+                .map(|key| key.to_encoded_point(false).to_bytes())
+                .unwrap_or_revert(|_| Error::CryptographicError(0));
 
-        recovered_key.unwrap()
+        recovered_key.as_ref().try_into().unwrap()
     }
 }
 
-#[cfg(all(not(feature = "crypto_k256"), not(feature = "crypto_secp256k1")))]
+#[cfg(all(feature = "crypto_radix", target_arch = "wasm32"))]
 pub(crate) mod crypto256 {
+    use super::{EcdsaUncompressedPublicKey, Keccak256Hash, Secp256SigRs};
+    use crate::network::assert::Unwrap;
+    use crate::network::error::Error;
+    use radix_common::crypto::{Hash, IsHash, Secp256k1Signature};
+    use scrypto::crypto_utils::CryptoUtils;
+
     pub(crate) fn recover_public_key(
-        _message_hash: Box<[u8]>,
-        _signature_bytes: &[u8],
+        message_hash: Keccak256Hash,
+        signature_bytes: Secp256SigRs,
+        recovery_byte: u8,
+    ) -> EcdsaUncompressedPublicKey {
+        let hash = Hash::from_bytes(message_hash);
+
+        let mut sig_vec = Vec::with_capacity(65);
+        sig_vec.push(recovery_byte);
+        sig_vec.extend(signature_bytes);
+        let signature = Secp256k1Signature::try_from(sig_vec.as_slice())
+            .unwrap_or_revert(|_| Error::CryptographicError(signature_bytes.len()));
+
+        CryptoUtils::secp256k1_ecdsa_verify_and_key_recover_uncompressed(hash, signature).0
+    }
+}
+
+#[cfg(all(
+    not(feature = "crypto_k256"),
+    not(feature = "crypto_secp256k1"),
+    not(all(feature = "crypto_radix", target_arch = "wasm32"))
+))]
+pub(crate) mod crypto256 {
+    use super::{EcdsaUncompressedPublicKey, Keccak256Hash, Secp256SigRs};
+
+    pub(crate) fn recover_public_key(
+        _message_hash: Keccak256Hash,
+        _signature_bytes: Secp256SigRs,
         _recovery_byte: u8,
-    ) -> Box<[u8]> {
+    ) -> EcdsaUncompressedPublicKey {
         panic!("Not implemented!")
     }
 }
 
-#[cfg(feature = "helpers")]
+#[cfg(not(all(feature = "crypto_radix", target_arch = "wasm32")))]
+#[cfg(feature = "helpers")]
 #[cfg(test)]
 mod tests {
     use crate::{
@@ -215,6 +294,9 @@
         helpers::hex::hex_to_bytes,
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const MESSAGE: &str = "415641580000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d394303d018d79bf0ba000000020000001";
     const MESSAGE_HASH: &str = "f0805644755393876d0e917e553f0c206f8bc68b7ebfe73a79d2a9e7f5a4cea6";
     const SIG_V27: &str = "475195641dae43318e194c3d9e5fc308773d6fdf5e197e02644dfd9ca3d19e3e2bd7d8656428f7f02e658a16b8f83722169c57126cc50bec8fad188b1bac6d19";
@@ -228,16 +310,16 @@
 
     #[test]
     fn test_recover_public_key_v27() {
-        let public_key = recover_public_key(u8_box(MESSAGE_HASH), &u8_box(SIG_V27), 0);
+        let public_key = recover_public_key(u8_slice(MESSAGE_HASH), u8_slice(SIG_V27), 0);
 
-        assert_eq!(u8_box(PUBLIC_KEY_V27), public_key);
+        assert_eq!(u8_slice(PUBLIC_KEY_V27), public_key);
     }
 
     #[test]
     fn test_recover_public_key_v28() {
-        let public_key = recover_public_key(u8_box(MESSAGE_HASH), &u8_box(SIG_V28), 1);
+        let public_key = recover_public_key(u8_slice(MESSAGE_HASH), u8_slice(SIG_V28), 1);
 
-        assert_eq!(u8_box(PUBLIC_KEY_V28), public_key);
+        assert_eq!(u8_slice(PUBLIC_KEY_V28), public_key);
     }
 
     #[test]
@@ -260,8 +342,8 @@
         assert_eq!(hex_to_bytes(ADDRESS_V28.into()), address);
     }
 
-    fn u8_box(str: &str) -> Box<[u8]> {
-        hex_to_bytes(str.into()).as_slice().into()
+    fn u8_slice<const N: usize>(str: &str) -> [u8; N] {
+        hex_to_bytes(str.into()).as_slice().try_into().unwrap()
     }
 }
 
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/lib.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/lib.rs.html index a1f164bf..dc7e6ba2 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/lib.rs.html +++ b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/lib.rs.html @@ -1,4 +1,4 @@ -lib.rs - source
1
+lib.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/as_str.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/as_str.rs.html
index f0b58bfb..95d88b4b 100644
--- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/as_str.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/as_str.rs.html
@@ -1,4 +1,4 @@
-as_str.rs - source
1
+as_str.rs - source
1
 2
 3
 4
@@ -115,6 +115,9 @@
 115
 116
 117
+118
+119
+120
 
extern crate alloc;
 
 use crate::network::specific::U256;
@@ -214,6 +217,9 @@
         specific::U256,
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const ETH: u32 = 4543560u32;
 
     #[test]
diff --git a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/assert.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/assert.rs.html
index cfd43818..c6e40334 100644
--- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/assert.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/assert.rs.html
@@ -1,4 +1,4 @@
-assert.rs - source
1
+assert.rs - source
1
 2
 3
 4
@@ -134,6 +134,12 @@
 134
 135
 136
+137
+138
+139
+140
+141
+142
 
use crate::{
     network::{error::Error, specific::revert},
     print_debug,
@@ -217,6 +223,9 @@
         error::Error,
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_assert_or_revert_bool_with_true() {
         assert_or_revert_bool_with(true, || Error::ArrayIsEmpty);
@@ -244,6 +253,9 @@
 mod unwrap_or_revert_tests {
     use crate::network::{assert::Unwrap, error::Error};
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_unwrap_or_revert_some() {
         let result = Some(543).unwrap_or_revert(|_| Error::CryptographicError(333));
diff --git a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/error.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/error.rs.html
index 4c0588a6..e61e278d 100644
--- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/error.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/error.rs.html
@@ -1,4 +1,4 @@
-error.rs - source
1
+error.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/flattened.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/flattened.rs.html
index f8226f69..3dd50203 100644
--- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/flattened.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/flattened.rs.html
@@ -1,4 +1,4 @@
-flattened.rs - source
1
+flattened.rs - source
1
 2
 3
 4
@@ -33,6 +33,9 @@
 33
 34
 35
+36
+37
+38
 
use crate::network::specific::Bytes;
 
 pub trait Flattened<T> {
@@ -50,6 +53,9 @@
 mod tests {
     use crate::network::{flattened::Flattened, specific::Bytes};
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_bytes_flattened() {
         #[allow(clippy::useless_conversion)]
diff --git a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/from_bytes_repr.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/from_bytes_repr.rs.html
index 0c7663c5..46079bf7 100644
--- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/from_bytes_repr.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/from_bytes_repr.rs.html
@@ -1,4 +1,4 @@
-from_bytes_repr.rs - source
1
+from_bytes_repr.rs - source
1
 2
 3
 4
@@ -126,6 +126,9 @@
 126
 127
 128
+129
+130
+131
 
use crate::network::specific::VALUE_SIZE;
 
 pub trait FromBytesRepr<T> {
@@ -160,6 +163,9 @@
         specific::{U256, VALUE_SIZE},
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[cfg(feature = "network_radix")]
     use crate::network::radix::u256_ext::U256Ext;
 
diff --git a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/mod.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/mod.rs.html
index f79fb758..55e94cdf 100644
--- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/mod.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/mod.rs.html
@@ -1,4 +1,4 @@
-mod.rs - source
1
+mod.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/print_debug.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/print_debug.rs.html
index 1fca4faf..52808df8 100644
--- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/print_debug.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/print_debug.rs.html
@@ -1,4 +1,4 @@
-print_debug.rs - source
1
+print_debug.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/pure/from_bytes_repr.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/pure/from_bytes_repr.rs.html
index dfb1ae60..b399e708 100644
--- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/pure/from_bytes_repr.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/pure/from_bytes_repr.rs.html
@@ -1,4 +1,4 @@
-from_bytes_repr.rs - source
1
+from_bytes_repr.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/pure/mod.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/pure/mod.rs.html
index 36cc7a10..09bddebe 100644
--- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/pure/mod.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/pure/mod.rs.html
@@ -1,4 +1,4 @@
-mod.rs - source
1
+mod.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/specific.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/specific.rs.html
index 8d698709..33830b2a 100644
--- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/specific.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/specific.rs.html
@@ -1,4 +1,4 @@
-specific.rs - source
1
+specific.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/protocol/constants.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/protocol/constants.rs.html
index 3e2f4fd5..7b1e4887 100644
--- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/protocol/constants.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/protocol/constants.rs.html
@@ -1,4 +1,4 @@
-constants.rs - source
1
+constants.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/protocol/data_package.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/protocol/data_package.rs.html
index a1d603e6..f3e8cc32 100644
--- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/protocol/data_package.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/protocol/data_package.rs.html
@@ -1,4 +1,4 @@
-data_package.rs - source
1
+data_package.rs - source
1
 2
 3
 4
@@ -213,6 +213,10 @@
 213
 214
 215
+216
+217
+218
+219
 
use crate::{
     crypto::recover::recover_address,
     network::as_str::AsHexStr,
@@ -281,7 +285,8 @@
     }
 }
 
-#[cfg(feature = "helpers")]
+#[cfg(not(all(feature = "crypto_radix", target_arch = "wasm32")))]
+#[cfg(feature = "helpers")]
 #[cfg(test)]
 mod tests {
     use crate::{
@@ -297,6 +302,9 @@
         },
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const DATA_PACKAGE_BYTES_1: &str = "4554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000360cafc94e018d79bf0ba00000002000000151afa8c5c3caf6004b42c0fb17723e524f993b9ecbad3b9bce5ec74930fa436a3660e8edef10e96ee5f222de7ef5787c02ca467c0ec18daa2907b43ac20c63c11c";
     const DATA_PACKAGE_BYTES_2: &str = "4554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000360cdd851e018d79bf0ba000000020000001473fd9dc72e6814a7de719b403cf4c9eba08934a643fd0666c433b806b31e69904f2226ffd3c8ef75861b11b5e32a1fda4b1458e0da4605a772dfba2a812f3ee1b";
 
diff --git a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/protocol/data_point.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/protocol/data_point.rs.html
index e643085a..b9e92d43 100644
--- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/protocol/data_point.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/protocol/data_point.rs.html
@@ -1,4 +1,4 @@
-data_point.rs - source
1
+data_point.rs - source
1
 2
 3
 4
@@ -155,6 +155,9 @@
 155
 156
 157
+158
+159
+160
 
use crate::{
     network::{
         as_str::{AsAsciiStr, AsHexStr},
@@ -229,6 +232,9 @@
     };
     use std::ops::Shr;
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const DATA_POINT_BYTES_TAIL: &str = "4554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000360cafc94e";
     const VALUE: u128 = 232141080910;
 
diff --git a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/protocol/marker.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/protocol/marker.rs.html
index 15b31817..7646024c 100644
--- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/protocol/marker.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/protocol/marker.rs.html
@@ -1,4 +1,4 @@
-marker.rs - source
1
+marker.rs - source
1
 2
 3
 4
@@ -64,6 +64,9 @@
 64
 65
 66
+67
+68
+69
 
use crate::{
     network::{assert::Assert, error::Error},
     protocol::constants::{REDSTONE_MARKER, REDSTONE_MARKER_BS},
@@ -87,6 +90,9 @@
         protocol::{constants::REDSTONE_MARKER_BS, marker::trim_redstone_marker},
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const PAYLOAD_TAIL: &str = "1c000f000000000002ed57011e0000";
 
     #[test]
diff --git a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/protocol/mod.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/protocol/mod.rs.html
index fbd60f5b..e7d0b176 100644
--- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/protocol/mod.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/protocol/mod.rs.html
@@ -1,4 +1,4 @@
-mod.rs - source
1
+mod.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/protocol/payload.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/protocol/payload.rs.html
index 1cd14131..bfb8b9b0 100644
--- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/protocol/payload.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/protocol/payload.rs.html
@@ -1,4 +1,4 @@
-payload.rs - source
1
+payload.rs - source
1
 2
 3
 4
@@ -102,6 +102,10 @@
 102
 103
 104
+105
+106
+107
+108
 
use crate::{
     network::{assert::Assert, error::Error},
     protocol::{
@@ -145,7 +149,8 @@
     payload.trim_end(DATA_PACKAGES_COUNT_BS)
 }
 
-#[cfg(feature = "helpers")]
+#[cfg(not(all(feature = "crypto_radix", target_arch = "wasm32")))]
+#[cfg(feature = "helpers")]
 #[cfg(test)]
 mod tests {
     use crate::{
@@ -156,6 +161,9 @@
         },
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const PAYLOAD_METADATA_BYTES: &str = "000f000000";
     const PAYLOAD_METADATA_WITH_UNSIGNED_BYTE: &str = "000f55000001";
     const PAYLOAD_METADATA_WITH_UNSIGNED_BYTES: &str = "000f11223344556677889900aabbccddeeff000010";
diff --git a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/utils/filter.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/utils/filter.rs.html
index f28b29ef..7043d176 100644
--- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/utils/filter.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/utils/filter.rs.html
@@ -1,4 +1,4 @@
-filter.rs - source
1
+filter.rs - source
1
 2
 3
 4
@@ -19,6 +19,9 @@
 19
 20
 21
+22
+23
+24
 
pub(crate) trait FilterSome<Output> {
     fn filter_some(&self) -> Output;
 }
@@ -33,6 +36,9 @@
 mod filter_some_tests {
     use crate::utils::filter::FilterSome;
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_filter_some() {
         let values = [None, Some(23u64), None, Some(12), Some(12), None, Some(23)];
diff --git a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/utils/median.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/utils/median.rs.html
index c329ff3b..62b2749e 100644
--- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/utils/median.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/utils/median.rs.html
@@ -1,4 +1,4 @@
-median.rs - source
1
+median.rs - source
1
 2
 3
 4
@@ -185,6 +185,9 @@
 185
 186
 187
+188
+189
+190
 
use crate::network::{assert::Assert, error::Error::ArrayIsEmpty, specific::U256};
 use std::ops::{Add, Rem, Shr};
 
@@ -281,6 +284,9 @@
     use itertools::Itertools;
     use std::fmt::Debug;
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[cfg(feature = "network_radix")]
     use crate::network::radix::u256_ext::U256Ext;
 
diff --git a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/utils/mod.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/utils/mod.rs.html
index 44258e67..a99c109d 100644
--- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/utils/mod.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/utils/mod.rs.html
@@ -1,4 +1,4 @@
-mod.rs - source
1
+mod.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/utils/trim.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/utils/trim.rs.html
index 551a41a8..63a6ae2c 100644
--- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/utils/trim.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/utils/trim.rs.html
@@ -1,4 +1,4 @@
-trim.rs - source
1
+trim.rs - source
1
 2
 3
 4
@@ -147,6 +147,19 @@
 147
 148
 149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
 
use crate::network::{
     assert::Unwrap, error::Error, from_bytes_repr::FromBytesRepr, specific::U256,
 };
@@ -196,6 +209,9 @@
         utils::trim::Trim,
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const MARKER_DECIMAL: u64 = 823907890102272;
 
     fn redstone_marker_bytes() -> Vec<u8> {
@@ -253,8 +269,11 @@
         let (_, result): (_, u64) = test_trim_end(size);
         assert_eq!(result, MARKER_DECIMAL);
 
-        let (_, result): (_, usize) = test_trim_end(size);
-        assert_eq!(result, 823907890102272usize);
+        #[cfg(not(target_arch = "wasm32"))]
+        {
+            let (_, result): (_, usize) = test_trim_end(size);
+            assert_eq!(result, 823907890102272usize);
+        }
 
         let (_rest, result): (_, Vec<u8>) = test_trim_end(size);
         assert_eq!(result.as_slice().len(), size.min(REDSTONE_MARKER_BS));
@@ -271,9 +290,16 @@
         assert_eq!(x, 18446744073709551615);
     }
 
+    #[cfg(target_arch = "wasm32")]
+    #[should_panic(expected = "Number overflow: 823907890102272")]
+    #[test]
+    fn test_trim_end_u64_overflow_usize_wasm32() {
+        let (_, _): (_, usize) = test_trim_end(REDSTONE_MARKER_BS);
+    }
+
     #[should_panic(expected = "Number overflow: 18591708106338011145")]
     #[test]
-    fn test_trim_end_u64_overflow() {
+    fn test_trim_end_u64_overflow_u64() {
         let mut bytes = vec![1u8, 2, 3, 4, 5, 6, 7, 8, 9];
 
         let _: u64 = bytes.trim_end(9);
diff --git a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/utils/trim_zeros.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/utils/trim_zeros.rs.html
index 0d223de1..9be0496f 100644
--- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/utils/trim_zeros.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/utils/trim_zeros.rs.html
@@ -1,4 +1,4 @@
-trim_zeros.rs - source
1
+trim_zeros.rs - source
1
 2
 3
 4
@@ -43,6 +43,9 @@
 43
 44
 45
+46
+47
+48
 
pub trait TrimZeros {
     fn trim_zeros(self) -> Self;
 }
@@ -69,6 +72,9 @@
 mod tests {
     use crate::{protocol::constants::REDSTONE_MARKER, utils::trim_zeros::TrimZeros};
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     fn redstone_marker_bytes() -> Vec<u8> {
         REDSTONE_MARKER.as_slice().into()
     }
diff --git a/static/rust/redstone/crypto_secp256k1/doc/static.files/main-d2fab2bf619172d3.js b/static/rust/redstone/crypto_secp256k1/doc/static.files/main-d2fab2bf619172d3.js
new file mode 100644
index 00000000..8fc48ede
--- /dev/null
+++ b/static/rust/redstone/crypto_secp256k1/doc/static.files/main-d2fab2bf619172d3.js
@@ -0,0 +1,11 @@
+"use strict";window.RUSTDOC_TOOLTIP_HOVER_MS=300;window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS=450;function resourcePath(basename,extension){return getVar("root-path")+basename+getVar("resource-suffix")+extension}function hideMain(){addClass(document.getElementById(MAIN_ID),"hidden")}function showMain(){removeClass(document.getElementById(MAIN_ID),"hidden")}function blurHandler(event,parentElem,hideCallback){if(!parentElem.contains(document.activeElement)&&!parentElem.contains(event.relatedTarget)){hideCallback()}}window.rootPath=getVar("root-path");window.currentCrate=getVar("current-crate");function setMobileTopbar(){const mobileTopbar=document.querySelector(".mobile-topbar");const locationTitle=document.querySelector(".sidebar h2.location");if(mobileTopbar){const mobileTitle=document.createElement("h2");mobileTitle.className="location";if(hasClass(document.querySelector(".rustdoc"),"crate")){mobileTitle.innerHTML=`Crate ${window.currentCrate}`}else if(locationTitle){mobileTitle.innerHTML=locationTitle.innerHTML}mobileTopbar.appendChild(mobileTitle)}}function getVirtualKey(ev){if("key"in ev&&typeof ev.key!=="undefined"){return ev.key}const c=ev.charCode||ev.keyCode;if(c===27){return"Escape"}return String.fromCharCode(c)}const MAIN_ID="main-content";const SETTINGS_BUTTON_ID="settings-menu";const ALTERNATIVE_DISPLAY_ID="alternative-display";const NOT_DISPLAYED_ID="not-displayed";const HELP_BUTTON_ID="help-button";function getSettingsButton(){return document.getElementById(SETTINGS_BUTTON_ID)}function getHelpButton(){return document.getElementById(HELP_BUTTON_ID)}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}function insertAfter(newNode,referenceNode){referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling)}function getOrCreateSection(id,classes){let el=document.getElementById(id);if(!el){el=document.createElement("section");el.id=id;el.className=classes;insertAfter(el,document.getElementById(MAIN_ID))}return el}function getAlternativeDisplayElem(){return getOrCreateSection(ALTERNATIVE_DISPLAY_ID,"content hidden")}function getNotDisplayedElem(){return getOrCreateSection(NOT_DISPLAYED_ID,"hidden")}function switchDisplayedElement(elemToDisplay){const el=getAlternativeDisplayElem();if(el.children.length>0){getNotDisplayedElem().appendChild(el.firstElementChild)}if(elemToDisplay===null){addClass(el,"hidden");showMain();return}el.appendChild(elemToDisplay);hideMain();removeClass(el,"hidden")}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}function preLoadCss(cssUrl){const link=document.createElement("link");link.href=cssUrl;link.rel="preload";link.as="style";document.getElementsByTagName("head")[0].appendChild(link)}(function(){const isHelpPage=window.location.pathname.endsWith("/help.html");function loadScript(url,errorCallback){const script=document.createElement("script");script.src=url;if(errorCallback!==undefined){script.onerror=errorCallback}document.head.append(script)}getSettingsButton().onclick=event=>{if(event.ctrlKey||event.altKey||event.metaKey){return}window.hideAllModals(false);addClass(getSettingsButton(),"rotate");event.preventDefault();loadScript(getVar("static-root-path")+getVar("settings-js"));setTimeout(()=>{const themes=getVar("themes").split(",");for(const theme of themes){if(theme!==""){preLoadCss(getVar("root-path")+theme+".css")}}},0)};window.searchState={loadingText:"Loading search results...",input:document.getElementsByClassName("search-input")[0],outputElement:()=>{let el=document.getElementById("search");if(!el){el=document.createElement("section");el.id="search";getNotDisplayedElem().appendChild(el)}return el},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:()=>{if(searchState.timeout!==null){clearTimeout(searchState.timeout);searchState.timeout=null}},isDisplayed:()=>searchState.outputElement().parentElement.id===ALTERNATIVE_DISPLAY_ID,focus:()=>{searchState.input.focus()},defocus:()=>{searchState.input.blur()},showResults:search=>{if(search===null||typeof search==="undefined"){search=searchState.outputElement()}switchDisplayedElement(search);searchState.mouseMovedAfterSearch=false;document.title=searchState.title},removeQueryParameters:()=>{document.title=searchState.titleBeforeSearch;if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.hash)}},hideResults:()=>{switchDisplayedElement(null);searchState.removeQueryParameters()},getQueryStringParams:()=>{const params={};window.location.search.substring(1).split("&").map(s=>{const pair=s.split("=").map(x=>x.replace(/\+/g," "));params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params},setup:()=>{const search_input=searchState.input;if(!searchState.input){return}let searchLoaded=false;function sendSearchForm(){document.getElementsByClassName("search-form")[0].submit()}function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(getVar("static-root-path")+getVar("search-js"),sendSearchForm);loadScript(resourcePath("search-index",".js"),sendSearchForm)}}search_input.addEventListener("focus",()=>{search_input.origPlaceholder=search_input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});if(search_input.value!==""){loadSearch()}const params=searchState.getQueryStringParams();if(params.search!==undefined){searchState.setLoadingSearch();loadSearch()}},setLoadingSearch:()=>{const search=searchState.outputElement();search.innerHTML="

"+searchState.loadingText+"

";searchState.showResults(search)},descShards:new Map(),loadDesc:async function({descShard,descIndex}){if(descShard.promise===null){descShard.promise=new Promise((resolve,reject)=>{descShard.resolve=resolve;const ds=descShard;const fname=`${ds.crate}-desc-${ds.shard}-`;const url=resourcePath(`search.desc/${descShard.crate}/${fname}`,".js",);loadScript(url,reject)})}const list=await descShard.promise;return list[descIndex]},loadedDescShard:function(crate,shard,data){this.descShards.get(crate)[shard].resolve(data.split("\n"))},};const toggleAllDocsId="toggle-all-docs";let savedHash="";function handleHashes(ev){if(ev!==null&&searchState.isDisplayed()&&ev.newURL){switchDisplayedElement(null);const hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.search+"#"+hash)}const elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}const pageId=window.location.hash.replace(/^#/,"");if(savedHash!==pageId){savedHash=pageId;if(pageId!==""){expandSection(pageId)}}if(savedHash.startsWith("impl-")){const splitAt=savedHash.indexOf("/");if(splitAt!==-1){const implId=savedHash.slice(0,splitAt);const assocId=savedHash.slice(splitAt+1);const implElem=document.getElementById(implId);if(implElem&&implElem.parentElement.tagName==="SUMMARY"&&implElem.parentElement.parentElement.tagName==="DETAILS"){onEachLazy(implElem.parentElement.parentElement.querySelectorAll(`[id^="${assocId}"]`),item=>{const numbered=/([^-]+)-([0-9]+)/.exec(item.id);if(item.id===assocId||(numbered&&numbered[1]===assocId)){openParentDetails(item);item.scrollIntoView();setTimeout(()=>{window.location.replace("#"+item.id)},0)}},)}}}}function onHashChange(ev){hideSidebar();handleHashes(ev)}function openParentDetails(elem){while(elem){if(elem.tagName==="DETAILS"){elem.open=true}elem=elem.parentNode}}function expandSection(id){openParentDetails(document.getElementById(id))}function handleEscape(ev){searchState.clearInputTimeout();searchState.hideResults();ev.preventDefault();searchState.defocus();window.hideAllModals(true)}function handleShortcut(ev){const disableShortcuts=getSettingValue("disable-shortcuts")==="true";if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts){return}if(document.activeElement.tagName==="INPUT"&&document.activeElement.type!=="checkbox"&&document.activeElement.type!=="radio"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":case"/":ev.preventDefault();searchState.focus();break;case"+":ev.preventDefault();expandAllDocs();break;case"-":ev.preventDefault();collapseAllDocs();break;case"?":showHelp();break;default:break}}}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);function addSidebarItems(){if(!window.SIDEBAR_ITEMS){return}const sidebar=document.getElementsByClassName("sidebar-elems")[0];function block(shortty,id,longty){const filtered=window.SIDEBAR_ITEMS[shortty];if(!filtered){return}const modpath=hasClass(document.querySelector(".rustdoc"),"mod")?"../":"";const h3=document.createElement("h3");h3.innerHTML=`${longty}`;const ul=document.createElement("ul");ul.className="block "+shortty;for(const name of filtered){let path;if(shortty==="mod"){path=`${modpath}${name}/index.html`}else{path=`${modpath}${shortty}.${name}.html`}let current_page=document.location.href.toString();if(current_page.endsWith("/")){current_page+="index.html"}const link=document.createElement("a");link.href=path;link.textContent=name;const li=document.createElement("li");if(link.href===current_page){li.classList.add("current")}li.appendChild(link);ul.appendChild(li)}sidebar.appendChild(h3);sidebar.appendChild(ul)}if(sidebar){block("primitive","primitives","Primitive Types");block("mod","modules","Modules");block("macro","macros","Macros");block("struct","structs","Structs");block("enum","enums","Enums");block("constant","constants","Constants");block("static","static","Statics");block("trait","traits","Traits");block("fn","functions","Functions");block("type","types","Type Aliases");block("union","unions","Unions");block("foreigntype","foreign-types","Foreign Types");block("keyword","keywords","Keywords");block("opaque","opaque-types","Opaque Types");block("attr","attributes","Attribute Macros");block("derive","derives","Derive Macros");block("traitalias","trait-aliases","Trait Aliases")}}window.register_implementors=imp=>{const implementors=document.getElementById("implementors-list");const synthetic_implementors=document.getElementById("synthetic-implementors-list");const inlined_types=new Set();const TEXT_IDX=0;const SYNTHETIC_IDX=1;const TYPES_IDX=2;if(synthetic_implementors){onEachLazy(synthetic_implementors.getElementsByClassName("impl"),el=>{const aliases=el.getAttribute("data-aliases");if(!aliases){return}aliases.split(",").forEach(alias=>{inlined_types.add(alias)})})}let currentNbImpls=implementors.getElementsByClassName("impl").length;const traitName=document.querySelector(".main-heading h1 > .trait").textContent;const baseIdName="impl-"+traitName+"-";const libs=Object.getOwnPropertyNames(imp);const script=document.querySelector("script[data-ignore-extern-crates]");const ignoreExternCrates=new Set((script?script.getAttribute("data-ignore-extern-crates"):"").split(","),);for(const lib of libs){if(lib===window.currentCrate||ignoreExternCrates.has(lib)){continue}const structs=imp[lib];struct_loop:for(const struct of structs){const list=struct[SYNTHETIC_IDX]?synthetic_implementors:implementors;if(struct[SYNTHETIC_IDX]){for(const struct_type of struct[TYPES_IDX]){if(inlined_types.has(struct_type)){continue struct_loop}inlined_types.add(struct_type)}}const code=document.createElement("h3");code.innerHTML=struct[TEXT_IDX];addClass(code,"code-header");onEachLazy(code.getElementsByTagName("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});const currentId=baseIdName+currentNbImpls;const anchor=document.createElement("a");anchor.href="#"+currentId;addClass(anchor,"anchor");const display=document.createElement("div");display.id=currentId;addClass(display,"impl");display.appendChild(anchor);display.appendChild(code);list.appendChild(display);currentNbImpls+=1}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}window.register_type_impls=imp=>{if(!imp||!imp[window.currentCrate]){return}window.pending_type_impls=null;const idMap=new Map();let implementations=document.getElementById("implementations-list");let trait_implementations=document.getElementById("trait-implementations-list");let trait_implementations_header=document.getElementById("trait-implementations");const script=document.querySelector("script[data-self-path]");const selfPath=script?script.getAttribute("data-self-path"):null;const mainContent=document.querySelector("#main-content");const sidebarSection=document.querySelector(".sidebar section");let methods=document.querySelector(".sidebar .block.method");let associatedTypes=document.querySelector(".sidebar .block.associatedtype");let associatedConstants=document.querySelector(".sidebar .block.associatedconstant");let sidebarTraitList=document.querySelector(".sidebar .block.trait-implementation");for(const impList of imp[window.currentCrate]){const types=impList.slice(2);const text=impList[0];const isTrait=impList[1]!==0;const traitName=impList[1];if(types.indexOf(selfPath)===-1){continue}let outputList=isTrait?trait_implementations:implementations;if(outputList===null){const outputListName=isTrait?"Trait Implementations":"Implementations";const outputListId=isTrait?"trait-implementations-list":"implementations-list";const outputListHeaderId=isTrait?"trait-implementations":"implementations";const outputListHeader=document.createElement("h2");outputListHeader.id=outputListHeaderId;outputListHeader.innerText=outputListName;outputList=document.createElement("div");outputList.id=outputListId;if(isTrait){const link=document.createElement("a");link.href=`#${outputListHeaderId}`;link.innerText="Trait Implementations";const h=document.createElement("h3");h.appendChild(link);trait_implementations=outputList;trait_implementations_header=outputListHeader;sidebarSection.appendChild(h);sidebarTraitList=document.createElement("ul");sidebarTraitList.className="block trait-implementation";sidebarSection.appendChild(sidebarTraitList);mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList)}else{implementations=outputList;if(trait_implementations){mainContent.insertBefore(outputListHeader,trait_implementations_header);mainContent.insertBefore(outputList,trait_implementations_header)}else{const mainContent=document.querySelector("#main-content");mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList)}}}const template=document.createElement("template");template.innerHTML=text;onEachLazy(template.content.querySelectorAll("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});onEachLazy(template.content.querySelectorAll("[id]"),el=>{let i=0;if(idMap.has(el.id)){i=idMap.get(el.id)}else if(document.getElementById(el.id)){i=1;while(document.getElementById(`${el.id}-${2 * i}`)){i=2*i}while(document.getElementById(`${el.id}-${i}`)){i+=1}}if(i!==0){const oldHref=`#${el.id}`;const newHref=`#${el.id}-${i}`;el.id=`${el.id}-${i}`;onEachLazy(template.content.querySelectorAll("a[href]"),link=>{if(link.getAttribute("href")===oldHref){link.href=newHref}})}idMap.set(el.id,i+1)});const templateAssocItems=template.content.querySelectorAll("section.tymethod, "+"section.method, section.associatedtype, section.associatedconstant");if(isTrait){const li=document.createElement("li");const a=document.createElement("a");a.href=`#${template.content.querySelector(".impl").id}`;a.textContent=traitName;li.appendChild(a);sidebarTraitList.append(li)}else{onEachLazy(templateAssocItems,item=>{let block=hasClass(item,"associatedtype")?associatedTypes:(hasClass(item,"associatedconstant")?associatedConstants:(methods));if(!block){const blockTitle=hasClass(item,"associatedtype")?"Associated Types":(hasClass(item,"associatedconstant")?"Associated Constants":("Methods"));const blockClass=hasClass(item,"associatedtype")?"associatedtype":(hasClass(item,"associatedconstant")?"associatedconstant":("method"));const blockHeader=document.createElement("h3");const blockLink=document.createElement("a");blockLink.href="#implementations";blockLink.innerText=blockTitle;blockHeader.appendChild(blockLink);block=document.createElement("ul");block.className=`block ${blockClass}`;const insertionReference=methods||sidebarTraitList;if(insertionReference){const insertionReferenceH=insertionReference.previousElementSibling;sidebarSection.insertBefore(blockHeader,insertionReferenceH);sidebarSection.insertBefore(block,insertionReferenceH)}else{sidebarSection.appendChild(blockHeader);sidebarSection.appendChild(block)}if(hasClass(item,"associatedtype")){associatedTypes=block}else if(hasClass(item,"associatedconstant")){associatedConstants=block}else{methods=block}}const li=document.createElement("li");const a=document.createElement("a");a.innerText=item.id.split("-")[0].split(".")[1];a.href=`#${item.id}`;li.appendChild(a);block.appendChild(li)})}outputList.appendChild(template.content)}for(const list of[methods,associatedTypes,associatedConstants,sidebarTraitList]){if(!list){continue}const newChildren=Array.prototype.slice.call(list.children);newChildren.sort((a,b)=>{const aI=a.innerText;const bI=b.innerText;return aIbI?1:0});list.replaceChildren(...newChildren)}};if(window.pending_type_impls){window.register_type_impls(window.pending_type_impls)}function addSidebarCrates(){if(!window.ALL_CRATES){return}const sidebarElems=document.getElementsByClassName("sidebar-elems")[0];if(!sidebarElems){return}const h3=document.createElement("h3");h3.innerHTML="Crates";const ul=document.createElement("ul");ul.className="block crate";for(const crate of window.ALL_CRATES){const link=document.createElement("a");link.href=window.rootPath+crate+"/index.html";link.textContent=crate;const li=document.createElement("li");if(window.rootPath!=="./"&&crate===window.currentCrate){li.className="current"}li.appendChild(link);ul.appendChild(li)}sidebarElems.appendChild(h3);sidebarElems.appendChild(ul)}function expandAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);removeClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hasClass(e,"type-contents-toggle")&&!hasClass(e,"more-examples-toggle")){e.open=true}});innerToggle.title="collapse all docs";innerToggle.children[0].innerText="\u2212"}function collapseAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);addClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(e.parentNode.id!=="implementations-list"||(!hasClass(e,"implementors-toggle")&&!hasClass(e,"type-contents-toggle"))){e.open=false}});innerToggle.title="expand all docs";innerToggle.children[0].innerText="+"}function toggleAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);if(!innerToggle){return}if(hasClass(innerToggle,"will-expand")){expandAllDocs()}else{collapseAllDocs()}}(function(){const toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}const hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";const hideImplementations=getSettingValue("auto-hide-trait-implementations")==="true";const hideLargeItemContents=getSettingValue("auto-hide-large-items")!=="false";function setImplementorsTogglesOpen(id,open){const list=document.getElementById(id);if(list!==null){onEachLazy(list.getElementsByClassName("implementors-toggle"),e=>{e.open=open})}}if(hideImplementations){setImplementorsTogglesOpen("trait-implementations-list",false);setImplementorsTogglesOpen("blanket-implementations-list",false)}onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hideLargeItemContents&&hasClass(e,"type-contents-toggle")){e.open=true}if(hideMethodDocs&&hasClass(e,"method-toggle")){e.open=false}})}());window.rustdoc_add_line_numbers_to_examples=()=>{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");if(line_numbers.length>0){return}const count=x.textContent.split("\n").length;const elems=[];for(let i=0;i{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");for(const node of line_numbers){parent.removeChild(node)}})};if(getSettingValue("line-numbers")==="true"){window.rustdoc_add_line_numbers_to_examples()}function showSidebar(){window.hideAllModals(false);const sidebar=document.getElementsByClassName("sidebar")[0];addClass(sidebar,"shown")}function hideSidebar(){const sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"shown")}window.addEventListener("resize",()=>{if(window.CURRENT_TOOLTIP_ELEMENT){const base=window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE;const force_visible=base.TOOLTIP_FORCE_VISIBLE;hideTooltip(false);if(force_visible){showTooltip(base);base.TOOLTIP_FORCE_VISIBLE=true}}});const mainElem=document.getElementById(MAIN_ID);if(mainElem){mainElem.addEventListener("click",hideSidebar)}onEachLazy(document.querySelectorAll("a[href^='#']"),el=>{el.addEventListener("click",()=>{expandSection(el.hash.slice(1));hideSidebar()})});onEachLazy(document.querySelectorAll(".toggle > summary:not(.hideme)"),el=>{el.addEventListener("click",e=>{if(e.target.tagName!=="SUMMARY"&&e.target.tagName!=="A"){e.preventDefault()}})});function showTooltip(e){const notable_ty=e.getAttribute("data-notable-ty");if(!window.NOTABLE_TRAITS&¬able_ty){const data=document.getElementById("notable-traits-data");if(data){window.NOTABLE_TRAITS=JSON.parse(data.innerText)}else{throw new Error("showTooltip() called with notable without any notable traits!")}}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE===e){clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);return}window.hideAllModals(false);const wrapper=document.createElement("div");if(notable_ty){wrapper.innerHTML="
"+window.NOTABLE_TRAITS[notable_ty]+"
"}else{if(e.getAttribute("title")!==null){e.setAttribute("data-title",e.getAttribute("title"));e.removeAttribute("title")}if(e.getAttribute("data-title")!==null){const titleContent=document.createElement("div");titleContent.className="content";titleContent.appendChild(document.createTextNode(e.getAttribute("data-title")));wrapper.appendChild(titleContent)}}wrapper.className="tooltip popover";const focusCatcher=document.createElement("div");focusCatcher.setAttribute("tabindex","0");focusCatcher.onfocus=hideTooltip;wrapper.appendChild(focusCatcher);const pos=e.getBoundingClientRect();wrapper.style.top=(pos.top+window.scrollY+pos.height)+"px";wrapper.style.left=0;wrapper.style.right="auto";wrapper.style.visibility="hidden";const body=document.getElementsByTagName("body")[0];body.appendChild(wrapper);const wrapperPos=wrapper.getBoundingClientRect();const finalPos=pos.left+window.scrollX-wrapperPos.width+24;if(finalPos>0){wrapper.style.left=finalPos+"px"}else{wrapper.style.setProperty("--popover-arrow-offset",(wrapperPos.right-pos.right+4)+"px",)}wrapper.style.visibility="";window.CURRENT_TOOLTIP_ELEMENT=wrapper;window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE=e;clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);wrapper.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}clearTooltipHoverTimeout(e)};wrapper.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&!e.contains(ev.relatedTarget)){setTooltipHoverTimeout(e,false);addClass(wrapper,"fade-out")}}}function setTooltipHoverTimeout(element,show){clearTooltipHoverTimeout(element);if(!show&&!window.CURRENT_TOOLTIP_ELEMENT){return}if(show&&window.CURRENT_TOOLTIP_ELEMENT){return}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE!==element){return}element.TOOLTIP_HOVER_TIMEOUT=setTimeout(()=>{if(show){showTooltip(element)}else if(!element.TOOLTIP_FORCE_VISIBLE){hideTooltip(false)}},show?window.RUSTDOC_TOOLTIP_HOVER_MS:window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS)}function clearTooltipHoverTimeout(element){if(element.TOOLTIP_HOVER_TIMEOUT!==undefined){removeClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out");clearTimeout(element.TOOLTIP_HOVER_TIMEOUT);delete element.TOOLTIP_HOVER_TIMEOUT}}function tooltipBlurHandler(event){if(window.CURRENT_TOOLTIP_ELEMENT&&!window.CURRENT_TOOLTIP_ELEMENT.contains(document.activeElement)&&!window.CURRENT_TOOLTIP_ELEMENT.contains(event.relatedTarget)&&!window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.contains(document.activeElement)&&!window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.contains(event.relatedTarget)){setTimeout(()=>hideTooltip(false),0)}}function hideTooltip(focus){if(window.CURRENT_TOOLTIP_ELEMENT){if(window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE){if(focus){window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.focus()}window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE=false}const body=document.getElementsByTagName("body")[0];body.removeChild(window.CURRENT_TOOLTIP_ELEMENT);clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);window.CURRENT_TOOLTIP_ELEMENT=null}}onEachLazy(document.getElementsByClassName("tooltip"),e=>{e.onclick=()=>{e.TOOLTIP_FORCE_VISIBLE=e.TOOLTIP_FORCE_VISIBLE?false:true;if(window.CURRENT_TOOLTIP_ELEMENT&&!e.TOOLTIP_FORCE_VISIBLE){hideTooltip(true)}else{showTooltip(e);window.CURRENT_TOOLTIP_ELEMENT.setAttribute("tabindex","0");window.CURRENT_TOOLTIP_ELEMENT.focus();window.CURRENT_TOOLTIP_ELEMENT.onblur=tooltipBlurHandler}return false};e.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointermove=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&window.CURRENT_TOOLTIP_ELEMENT&&!window.CURRENT_TOOLTIP_ELEMENT.contains(ev.relatedTarget)){setTooltipHoverTimeout(e,false);addClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out")}}});const sidebar_menu_toggle=document.getElementsByClassName("sidebar-menu-toggle")[0];if(sidebar_menu_toggle){sidebar_menu_toggle.addEventListener("click",()=>{const sidebar=document.getElementsByClassName("sidebar")[0];if(!hasClass(sidebar,"shown")){showSidebar()}else{hideSidebar()}})}function helpBlurHandler(event){blurHandler(event,getHelpButton(),window.hidePopoverMenus)}function buildHelpMenu(){const book_info=document.createElement("span");const channel=getVar("channel");book_info.className="top";book_info.innerHTML=`You can find more information in \ +the rustdoc book.`;const shortcuts=[["?","Show this help dialog"],["S / /","Focus the search field"],["↑","Move up in search results"],["↓","Move down in search results"],["← / →","Switch result tab (when results focused)"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(x=>"
"+x[0].split(" ").map((y,index)=>((index&1)===0?""+y+"":" "+y+" ")).join("")+"
"+x[1]+"
").join("");const div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

"+shortcuts+"
";const infos=[`For a full list of all search features, take a look here.`,"Prefix searches with a type followed by a colon (e.g., fn:) to \ + restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ + enum, trait, type, macro, \ + and const.","Search functions by type signature (e.g., vec -> usize or \ + -> vec or String, enum:Cow -> bool)","You can look for items with an exact name by putting double quotes around \ + your request: \"string\"","Look for functions that accept or return \ + slices and \ + arrays by writing \ + square brackets (e.g., -> [u8] or [] -> Option)","Look for items inside another one by searching for a path: vec::Vec",].map(x=>"

"+x+"

").join("");const div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="

Search Tricks

"+infos;const rustdoc_version=document.createElement("span");rustdoc_version.className="bottom";const rustdoc_version_code=document.createElement("code");rustdoc_version_code.innerText="rustdoc "+getVar("rustdoc-version");rustdoc_version.appendChild(rustdoc_version_code);const container=document.createElement("div");if(!isHelpPage){container.className="popover"}container.id="help";container.style.display="none";const side_by_side=document.createElement("div");side_by_side.className="side-by-side";side_by_side.appendChild(div_shortcuts);side_by_side.appendChild(div_infos);container.appendChild(book_info);container.appendChild(side_by_side);container.appendChild(rustdoc_version);if(isHelpPage){const help_section=document.createElement("section");help_section.appendChild(container);document.getElementById("main-content").appendChild(help_section);container.style.display="block"}else{const help_button=getHelpButton();help_button.appendChild(container);container.onblur=helpBlurHandler;help_button.onblur=helpBlurHandler;help_button.children[0].onblur=helpBlurHandler}return container}window.hideAllModals=switchFocus=>{hideSidebar();window.hidePopoverMenus();hideTooltip(switchFocus)};window.hidePopoverMenus=()=>{onEachLazy(document.querySelectorAll(".search-form .popover"),elem=>{elem.style.display="none"})};function getHelpMenu(buildNeeded){let menu=getHelpButton().querySelector(".popover");if(!menu&&buildNeeded){menu=buildHelpMenu()}return menu}function showHelp(){getHelpButton().querySelector("a").focus();const menu=getHelpMenu(true);if(menu.style.display==="none"){window.hideAllModals();menu.style.display=""}}if(isHelpPage){showHelp();document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault()})}else{document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault();const menu=getHelpMenu(true);const shouldShowHelp=menu.style.display==="none";if(shouldShowHelp){showHelp()}else{window.hidePopoverMenus()}})}setMobileTopbar();addSidebarItems();addSidebarCrates();onHashChange(null);window.addEventListener("hashchange",onHashChange);searchState.setup()}());(function(){const SIDEBAR_MIN=100;const SIDEBAR_MAX=500;const RUSTDOC_MOBILE_BREAKPOINT=700;const BODY_MIN=400;const SIDEBAR_VANISH_THRESHOLD=SIDEBAR_MIN/2;const sidebarButton=document.getElementById("sidebar-button");if(sidebarButton){sidebarButton.addEventListener("click",e=>{removeClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","false");if(document.querySelector(".rustdoc.src")){window.rustdocToggleSrcSidebar()}e.preventDefault()})}let currentPointerId=null;let desiredSidebarSize=null;let pendingSidebarResizingFrame=false;const resizer=document.querySelector(".sidebar-resizer");const sidebar=document.querySelector(".sidebar");if(!resizer||!sidebar){return}const isSrcPage=hasClass(document.body,"src");function hideSidebar(){if(isSrcPage){window.rustdocCloseSourceSidebar();updateLocalStorage("src-sidebar-width",null);document.documentElement.style.removeProperty("--src-sidebar-width");sidebar.style.removeProperty("--src-sidebar-width");resizer.style.removeProperty("--src-sidebar-width")}else{addClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","true");updateLocalStorage("desktop-sidebar-width",null);document.documentElement.style.removeProperty("--desktop-sidebar-width");sidebar.style.removeProperty("--desktop-sidebar-width");resizer.style.removeProperty("--desktop-sidebar-width")}}function showSidebar(){if(isSrcPage){window.rustdocShowSourceSidebar()}else{removeClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","false")}}function changeSidebarSize(size){if(isSrcPage){updateLocalStorage("src-sidebar-width",size);sidebar.style.setProperty("--src-sidebar-width",size+"px");resizer.style.setProperty("--src-sidebar-width",size+"px")}else{updateLocalStorage("desktop-sidebar-width",size);sidebar.style.setProperty("--desktop-sidebar-width",size+"px");resizer.style.setProperty("--desktop-sidebar-width",size+"px")}}function isSidebarHidden(){return isSrcPage?!hasClass(document.documentElement,"src-sidebar-expanded"):hasClass(document.documentElement,"hide-sidebar")}function resize(e){if(currentPointerId===null||currentPointerId!==e.pointerId){return}e.preventDefault();const pos=e.clientX-3;if(pos=SIDEBAR_MIN){if(isSidebarHidden()){showSidebar()}const constrainedPos=Math.min(pos,window.innerWidth-BODY_MIN,SIDEBAR_MAX);changeSidebarSize(constrainedPos);desiredSidebarSize=constrainedPos;if(pendingSidebarResizingFrame!==false){clearTimeout(pendingSidebarResizingFrame)}pendingSidebarResizingFrame=setTimeout(()=>{if(currentPointerId===null||pendingSidebarResizingFrame===false){return}pendingSidebarResizingFrame=false;document.documentElement.style.setProperty("--resizing-sidebar-width",desiredSidebarSize+"px",)},100)}}window.addEventListener("resize",()=>{if(window.innerWidth=(window.innerWidth-BODY_MIN)){changeSidebarSize(window.innerWidth-BODY_MIN)}else if(desiredSidebarSize!==null&&desiredSidebarSize>SIDEBAR_MIN){changeSidebarSize(desiredSidebarSize)}});function stopResize(e){if(currentPointerId===null){return}if(e){e.preventDefault()}desiredSidebarSize=sidebar.getBoundingClientRect().width;removeClass(resizer,"active");window.removeEventListener("pointermove",resize,false);window.removeEventListener("pointerup",stopResize,false);removeClass(document.documentElement,"sidebar-resizing");document.documentElement.style.removeProperty("--resizing-sidebar-width");if(resizer.releasePointerCapture){resizer.releasePointerCapture(currentPointerId);currentPointerId=null}}function initResize(e){if(currentPointerId!==null||e.altKey||e.ctrlKey||e.metaKey||e.button!==0){return}if(resizer.setPointerCapture){resizer.setPointerCapture(e.pointerId);if(!resizer.hasPointerCapture(e.pointerId)){resizer.releasePointerCapture(e.pointerId);return}currentPointerId=e.pointerId}window.hideAllModals(false);e.preventDefault();window.addEventListener("pointermove",resize,false);window.addEventListener("pointercancel",stopResize,false);window.addEventListener("pointerup",stopResize,false);addClass(resizer,"active");addClass(document.documentElement,"sidebar-resizing");const pos=e.clientX-sidebar.offsetLeft-3;document.documentElement.style.setProperty("--resizing-sidebar-width",pos+"px");desiredSidebarSize=null}resizer.addEventListener("pointerdown",initResize,false)}());(function(){let reset_button_timeout=null;const but=document.getElementById("copy-path");if(!but){return}but.onclick=()=>{const parent=but.parentElement;const path=[];onEach(parent.childNodes,child=>{if(child.tagName==="A"){path.push(child.textContent)}});const el=document.createElement("textarea");el.value=path.join("::");el.setAttribute("readonly","");el.style.position="absolute";el.style.left="-9999px";document.body.appendChild(el);el.select();document.execCommand("copy");document.body.removeChild(el);but.classList.add("clicked");if(reset_button_timeout!==null){window.clearTimeout(reset_button_timeout)}function reset_button(){reset_button_timeout=null;but.classList.remove("clicked")}reset_button_timeout=window.setTimeout(reset_button,1000)}}()) \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/static.files/rustdoc-c5d6553a23f1e5a6.css b/static/rust/redstone/crypto_secp256k1/doc/static.files/rustdoc-c5d6553a23f1e5a6.css new file mode 100644 index 00000000..9f64990b --- /dev/null +++ b/static/rust/redstone/crypto_secp256k1/doc/static.files/rustdoc-c5d6553a23f1e5a6.css @@ -0,0 +1,46 @@ + :root{--nav-sub-mobile-padding:8px;--search-typename-width:6.75rem;--desktop-sidebar-width:200px;--src-sidebar-width:300px;--desktop-sidebar-z-index:100;--sidebar-elems-left-padding:24px;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular-018c141bf0843ffd.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium-8f9a781e4970d388.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular-46f98efaafac5295.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:italic;font-weight:400;src:local('Source Serif 4 Italic'),url("SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:700;src:local('Source Serif 4 Bold'),url("SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'NanumBarunGothic';src:url("NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2") format("woff2");font-display:swap;unicode-range:U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF;}*{box-sizing:border-box;}body{font:1rem/1.5 "Source Serif 4",NanumBarunGothic,serif;margin:0;position:relative;overflow-wrap:break-word;overflow-wrap:anywhere;font-feature-settings:"kern","liga";background-color:var(--main-background-color);color:var(--main-color);}h1{font-size:1.5rem;}h2{font-size:1.375rem;}h3{font-size:1.25rem;}h1,h2,h3,h4,h5,h6{font-weight:500;}h1,h2,h3,h4{margin:25px 0 15px 0;padding-bottom:6px;}.docblock h3,.docblock h4,h5,h6{margin:15px 0 5px 0;}.docblock>h2:first-child,.docblock>h3:first-child,.docblock>h4:first-child,.docblock>h5:first-child,.docblock>h6:first-child{margin-top:0;}.main-heading h1{margin:0;padding:0;flex-grow:1;overflow-wrap:break-word;overflow-wrap:anywhere;}.main-heading{display:flex;flex-wrap:wrap;padding-bottom:6px;margin-bottom:15px;}.content h2,.top-doc .docblock>h3,.top-doc .docblock>h4{border-bottom:1px solid var(--headings-border-bottom-color);}h1,h2{line-height:1.25;padding-top:3px;padding-bottom:9px;}h3.code-header{font-size:1.125rem;}h4.code-header{font-size:1rem;}.code-header{font-weight:600;margin:0;padding:0;white-space:pre-wrap;}#crate-search,h1,h2,h3,h4,h5,h6,.sidebar,.mobile-topbar,.search-input,.search-results .result-name,.item-name>a,.out-of-band,span.since,a.src,#help-button>a,summary.hideme,.scraped-example-list,ul.all-items{font-family:"Fira Sans",Arial,NanumBarunGothic,sans-serif;}#toggle-all-docs,a.anchor,.section-header a,#src-sidebar a,.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,h1 a,.search-results a,.stab,.result-name i{color:var(--main-color);}span.enum,a.enum,span.struct,a.struct,span.union,a.union,span.primitive,a.primitive,span.type,a.type,span.foreigntype,a.foreigntype{color:var(--type-link-color);}span.trait,a.trait,span.traitalias,a.traitalias{color:var(--trait-link-color);}span.associatedtype,a.associatedtype,span.constant,a.constant,span.static,a.static{color:var(--assoc-item-link-color);}span.fn,a.fn,span.method,a.method,span.tymethod,a.tymethod{color:var(--function-link-color);}span.attr,a.attr,span.derive,a.derive,span.macro,a.macro{color:var(--macro-link-color);}span.mod,a.mod{color:var(--mod-link-color);}span.keyword,a.keyword{color:var(--keyword-link-color);}a{color:var(--link-color);text-decoration:none;}ol,ul{padding-left:24px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.625em;}p,.docblock>.warning{margin:0 0 .75em 0;}p:last-child,.docblock>.warning:last-child{margin:0;}button{padding:1px 6px;cursor:pointer;}button#toggle-all-docs{padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.rustdoc{display:flex;flex-direction:row;flex-wrap:nowrap;}main{position:relative;flex-grow:1;padding:10px 15px 40px 45px;min-width:0;}.src main{padding:15px;}.width-limiter{max-width:960px;margin-right:auto;}details:not(.toggle) summary{margin-bottom:.6em;}code,pre,a.test-arrow,.code-header{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.125em;}.docblock pre code,.docblock-short pre code{padding:0;}pre{padding:14px;line-height:1.5;}pre.item-decl{overflow-x:auto;}.item-decl .type-contents-toggle{contain:initial;}.src .content pre{padding:20px;}.rustdoc.src .example-wrap pre.src-line-numbers{padding:20px 0 20px 4px;}img{max-width:100%;}.logo-container{line-height:0;display:block;}.rust-logo{filter:var(--rust-logo-filter);}.sidebar{font-size:0.875rem;flex:0 0 var(--desktop-sidebar-width);width:var(--desktop-sidebar-width);overflow-y:scroll;overscroll-behavior:contain;position:sticky;height:100vh;top:0;left:0;z-index:var(--desktop-sidebar-z-index);}.rustdoc.src .sidebar{flex-basis:50px;width:50px;border-right:1px solid;overflow-x:hidden;overflow-y:hidden;}.hide-sidebar .sidebar,.hide-sidebar .sidebar-resizer{display:none;}.sidebar-resizer{touch-action:none;width:9px;cursor:col-resize;z-index:calc(var(--desktop-sidebar-z-index) + 1);position:fixed;height:100%;left:calc(var(--desktop-sidebar-width) + 1px);}.rustdoc.src .sidebar-resizer{left:49px;}.src-sidebar-expanded .src .sidebar-resizer{left:var(--src-sidebar-width);}.sidebar-resizing{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;}.sidebar-resizing*{cursor:col-resize !important;}.sidebar-resizing .sidebar{position:fixed;}.sidebar-resizing>body{padding-left:var(--resizing-sidebar-width);}.sidebar-resizer:hover,.sidebar-resizer:active,.sidebar-resizer:focus,.sidebar-resizer.active{width:10px;margin:0;left:var(--desktop-sidebar-width);border-left:solid 1px var(--sidebar-resizer-hover);}.src-sidebar-expanded .rustdoc.src .sidebar-resizer:hover,.src-sidebar-expanded .rustdoc.src .sidebar-resizer:active,.src-sidebar-expanded .rustdoc.src .sidebar-resizer:focus,.src-sidebar-expanded .rustdoc.src .sidebar-resizer.active{left:calc(var(--src-sidebar-width) - 1px);}@media (pointer:coarse){.sidebar-resizer{display:none !important;}}.sidebar-resizer.active{padding:0 140px;width:2px;margin-left:-140px;border-left:none;}.sidebar-resizer.active:before{border-left:solid 2px var(--sidebar-resizer-active);display:block;height:100%;content:"";}.sidebar,.mobile-topbar,.sidebar-menu-toggle,#src-sidebar{background-color:var(--sidebar-background-color);}.src .sidebar>*{visibility:hidden;}.src-sidebar-expanded .src .sidebar{overflow-y:auto;flex-basis:var(--src-sidebar-width);width:var(--src-sidebar-width);}.src-sidebar-expanded .src .sidebar>*{visibility:visible;}#all-types{margin-top:1em;}*{scrollbar-width:initial;scrollbar-color:var(--scrollbar-color);}.sidebar{scrollbar-width:thin;scrollbar-color:var(--scrollbar-color);}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;background-color:var(--scrollbar-track-background-color);}.sidebar::-webkit-scrollbar-track{background-color:var(--scrollbar-track-background-color);}::-webkit-scrollbar-thumb,.sidebar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-background-color);}.hidden{display:none !important;}.logo-container>img{height:48px;width:48px;}ul.block,.block li{padding:0;margin:0;list-style:none;}.sidebar-elems a,.sidebar>h2 a{display:block;padding:0.25rem;margin-right:0.25rem;border-left:solid var(--sidebar-elems-left-padding) transparent;margin-left:calc(-0.25rem - var(--sidebar-elems-left-padding));background-clip:border-box;}.sidebar h2{overflow-wrap:anywhere;padding:0;margin:0.7rem 0;}.sidebar h3{font-size:1.125rem;padding:0;margin:0;}.sidebar-elems,.sidebar>.version,.sidebar>h2{padding-left:var(--sidebar-elems-left-padding);}.sidebar a{color:var(--sidebar-link-color);}.sidebar .current,.sidebar .current a,.sidebar-crate a.logo-container:hover+h2 a,.sidebar a:hover:not(.logo-container){background-color:var(--sidebar-current-link-background-color);}.sidebar-elems .block{margin-bottom:2em;}.sidebar-elems .block li a{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}.sidebar-crate{display:flex;align-items:center;justify-content:center;margin:14px 32px 1rem;row-gap:10px;column-gap:32px;flex-wrap:wrap;}.sidebar-crate h2{flex-grow:1;margin:0 -8px;align-self:start;}.sidebar-crate .logo-container{margin:0 calc(-16px - var(--sidebar-elems-left-padding));padding:0 var(--sidebar-elems-left-padding);text-align:center;}.sidebar-crate .logo-container img{margin-top:-16px;border-top:solid 16px transparent;box-sizing:content-box;position:relative;background-clip:border-box;z-index:1;}.sidebar-crate h2 a{display:block;border-left:solid var(--sidebar-elems-left-padding) transparent;background-clip:border-box;margin:0 calc(-24px + 0.25rem) 0 calc(-0.2rem - var(--sidebar-elems-left-padding));padding:calc((16px - 0.57rem ) / 2 ) 0.25rem;padding-left:0.2rem;}.sidebar-crate h2 .version{display:block;font-weight:normal;font-size:1rem;overflow-wrap:break-word;}.sidebar-crate+.version{margin-top:-1rem;margin-bottom:1rem;}.mobile-topbar{display:none;}.rustdoc .example-wrap{display:flex;position:relative;margin-bottom:10px;}.rustdoc .example-wrap:last-child{margin-bottom:0px;}.rustdoc .example-wrap pre{margin:0;flex-grow:1;}.rustdoc:not(.src) .example-wrap pre{overflow:auto hidden;}.rustdoc .example-wrap pre.example-line-numbers,.rustdoc .example-wrap pre.src-line-numbers{flex-grow:0;min-width:fit-content;overflow:initial;text-align:right;-webkit-user-select:none;user-select:none;padding:14px 8px;color:var(--src-line-numbers-span-color);}.rustdoc .example-wrap pre.src-line-numbers{padding:14px 0;}.src-line-numbers a,.src-line-numbers span{color:var(--src-line-numbers-span-color);padding:0 8px;}.src-line-numbers :target{background-color:transparent;border-right:none;padding:0 8px;}.src-line-numbers .line-highlighted{background-color:var(--src-line-number-highlighted-background-color);}.search-loading{text-align:center;}.docblock-short{overflow-wrap:break-word;overflow-wrap:anywhere;}.docblock :not(pre)>code,.docblock-short code{white-space:pre-wrap;}.top-doc .docblock h2{font-size:1.375rem;}.top-doc .docblock h3{font-size:1.25rem;}.top-doc .docblock h4,.top-doc .docblock h5{font-size:1.125rem;}.top-doc .docblock h6{font-size:1rem;}.docblock h5{font-size:1rem;}.docblock h6{font-size:0.875rem;}.docblock{margin-left:24px;position:relative;}.docblock>:not(.more-examples-toggle):not(.example-wrap){max-width:100%;overflow-x:auto;}.out-of-band{flex-grow:0;font-size:1.125rem;}.docblock code,.docblock-short code,pre,.rustdoc.src .example-wrap{background-color:var(--code-block-background-color);}#main-content{position:relative;}.docblock table{margin:.5em 0;border-collapse:collapse;}.docblock table td,.docblock table th{padding:.5em;border:1px solid var(--border-color);}.docblock table tbody tr:nth-child(2n){background:var(--table-alt-row-background-color);}div.where{white-space:pre-wrap;font-size:0.875rem;}.item-info{display:block;margin-left:24px;}.item-info code{font-size:0.875rem;}#main-content>.item-info{margin-left:0;}nav.sub{flex-grow:1;flex-flow:row nowrap;margin:4px 0 25px 0;display:flex;align-items:center;}.search-form{position:relative;display:flex;height:34px;flex-grow:1;}.src nav.sub{margin:0 0 15px 0;}.section-header{display:block;position:relative;}.section-header:hover>.anchor,.impl:hover>.anchor,.trait-impl:hover>.anchor,.variant:hover>.anchor{display:initial;}.anchor{display:none;position:absolute;left:-0.5em;background:none !important;}.anchor.field{left:-5px;}.section-header>.anchor{left:-15px;padding-right:8px;}h2.section-header>.anchor{padding-right:6px;}a.doc-anchor{color:var(--main-color);display:none;position:absolute;left:-17px;padding-right:5px;padding-left:3px;}*:hover>.doc-anchor{display:block;}.top-doc>.docblock>*:first-child>.doc-anchor{display:none !important;}.main-heading a:hover,.example-wrap .rust a:hover,.all-items a:hover,.docblock a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover:not(.doc-anchor),.docblock-short a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover,.item-info a{text-decoration:underline;}.crate.block li.current a{font-weight:500;}table,.item-table{overflow-wrap:break-word;}.item-table{display:table;padding:0;margin:0;}.item-table>li{display:table-row;}.item-table>li>div{display:table-cell;}.item-table>li>.item-name{padding-right:1.25rem;}.search-results-title{margin-top:0;white-space:nowrap;display:flex;align-items:baseline;}#crate-search-div{position:relative;min-width:5em;}#crate-search{min-width:115px;padding:0 23px 0 4px;max-width:100%;text-overflow:ellipsis;border:1px solid var(--border-color);border-radius:4px;outline:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;background-color:var(--main-background-color);color:inherit;line-height:1.5;font-weight:500;}#crate-search:hover,#crate-search:focus{border-color:var(--crate-search-hover-border);}#crate-search-div::after{pointer-events:none;width:100%;height:100%;position:absolute;top:0;left:0;content:"";background-repeat:no-repeat;background-size:20px;background-position:calc(100% - 2px) 56%;background-image:url('data:image/svg+xml, \ + ');filter:var(--crate-search-div-filter);}#crate-search-div:hover::after,#crate-search-div:focus-within::after{filter:var(--crate-search-div-hover-filter);}#crate-search>option{font-size:1rem;}.search-input{-webkit-appearance:none;outline:none;border:1px solid var(--border-color);border-radius:2px;padding:8px;font-size:1rem;flex-grow:1;background-color:var(--button-background-color);color:var(--search-color);}.search-input:focus{border-color:var(--search-input-focused-border-color);}.search-results{display:none;}.search-results.active{display:block;}.search-results>a{display:flex;margin-left:2px;margin-right:2px;border-bottom:1px solid var(--search-result-border-color);gap:1em;}.search-results>a>div.desc{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex:2;}.search-results a:hover,.search-results a:focus{background-color:var(--search-result-link-focus-background-color);}.search-results .result-name{display:flex;align-items:center;justify-content:start;flex:3;}.search-results .result-name .alias{color:var(--search-results-alias-color);}.search-results .result-name .grey{color:var(--search-results-grey-color);}.search-results .result-name .typename{color:var(--search-results-grey-color);font-size:0.875rem;width:var(--search-typename-width);}.search-results .result-name .path{word-break:break-all;max-width:calc(100% - var(--search-typename-width));display:inline-block;}.search-results .result-name .path>*{display:inline;}.popover{position:absolute;top:100%;right:0;z-index:calc(var(--desktop-sidebar-z-index) + 1);margin-top:7px;border-radius:3px;border:1px solid var(--border-color);background-color:var(--main-background-color);color:var(--main-color);--popover-arrow-offset:11px;}.popover::before{content:'';position:absolute;right:var(--popover-arrow-offset);border:solid var(--border-color);border-width:1px 1px 0 0;background-color:var(--main-background-color);padding:4px;transform:rotate(-45deg);top:-5px;}.setting-line{margin:1.2em 0.6em;}.setting-radio input,.setting-check input{margin-right:0.3em;height:1.2rem;width:1.2rem;border:2px solid var(--settings-input-border-color);outline:none;-webkit-appearance:none;cursor:pointer;}.setting-radio input{border-radius:50%;}.setting-radio span,.setting-check span{padding-bottom:1px;}.setting-radio{margin-top:0.1em;margin-bottom:0.1em;min-width:3.8em;padding:0.3em;display:inline-flex;align-items:center;cursor:pointer;}.setting-radio+.setting-radio{margin-left:0.5em;}.setting-check{margin-right:20px;display:flex;align-items:center;cursor:pointer;}.setting-radio input:checked{box-shadow:inset 0 0 0 3px var(--main-background-color);background-color:var(--settings-input-color);}.setting-check input:checked{background-color:var(--settings-input-color);border-width:1px;content:url('data:image/svg+xml,\ + \ + ');}.setting-radio input:focus,.setting-check input:focus{box-shadow:0 0 1px 1px var(--settings-input-color);}.setting-radio input:checked:focus{box-shadow:inset 0 0 0 3px var(--main-background-color),0 0 2px 2px var(--settings-input-color);}.setting-radio input:hover,.setting-check input:hover{border-color:var(--settings-input-color) !important;}#help.popover{max-width:600px;--popover-arrow-offset:48px;}#help dt{float:left;clear:left;margin-right:0.5rem;}#help span.top,#help span.bottom{text-align:center;display:block;font-size:1.125rem;}#help span.top{margin:10px 0;border-bottom:1px solid var(--border-color);padding-bottom:4px;margin-bottom:6px;}#help span.bottom{clear:both;border-top:1px solid var(--border-color);}.side-by-side>div{width:50%;float:left;padding:0 20px 20px 17px;}.item-info .stab{display:block;padding:3px;margin-bottom:5px;}.item-name .stab{margin-left:0.3125em;}.stab{padding:0 2px;font-size:0.875rem;font-weight:normal;color:var(--main-color);background-color:var(--stab-background-color);width:fit-content;white-space:pre-wrap;border-radius:3px;display:inline;vertical-align:baseline;}.stab.portability>code{background:none;color:var(--stab-code-color);}.stab .emoji,.item-info .stab::before{font-size:1.25rem;}.stab .emoji{margin-right:0.3rem;}.item-info .stab::before{content:"\0";width:0;display:inline-block;color:transparent;}.emoji{text-shadow:1px 0 0 black,-1px 0 0 black,0 1px 0 black,0 -1px 0 black;}.since{font-weight:normal;font-size:initial;}.rightside{padding-left:12px;float:right;}.rightside:not(a),.out-of-band{color:var(--right-side-color);}pre.rust{tab-size:4;-moz-tab-size:4;}pre.rust .kw{color:var(--code-highlight-kw-color);}pre.rust .kw-2{color:var(--code-highlight-kw-2-color);}pre.rust .lifetime{color:var(--code-highlight-lifetime-color);}pre.rust .prelude-ty{color:var(--code-highlight-prelude-color);}pre.rust .prelude-val{color:var(--code-highlight-prelude-val-color);}pre.rust .string{color:var(--code-highlight-string-color);}pre.rust .number{color:var(--code-highlight-number-color);}pre.rust .bool-val{color:var(--code-highlight-literal-color);}pre.rust .self{color:var(--code-highlight-self-color);}pre.rust .attr{color:var(--code-highlight-attribute-color);}pre.rust .macro,pre.rust .macro-nonterminal{color:var(--code-highlight-macro-color);}pre.rust .question-mark{font-weight:bold;color:var(--code-highlight-question-mark-color);}pre.rust .comment{color:var(--code-highlight-comment-color);}pre.rust .doccomment{color:var(--code-highlight-doc-comment-color);}.rustdoc.src .example-wrap pre.rust a{background:var(--codeblock-link-background);}.example-wrap.compile_fail,.example-wrap.should_panic{border-left:2px solid var(--codeblock-error-color);}.ignore.example-wrap{border-left:2px solid var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover,.example-wrap.should_panic:hover{border-left:2px solid var(--codeblock-error-hover-color);}.example-wrap.ignore:hover{border-left:2px solid var(--codeblock-ignore-hover-color);}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip{color:var(--codeblock-error-color);}.example-wrap.ignore .tooltip{color:var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover .tooltip,.example-wrap.should_panic:hover .tooltip{color:var(--codeblock-error-hover-color);}.example-wrap.ignore:hover .tooltip{color:var(--codeblock-ignore-hover-color);}.example-wrap .tooltip{position:absolute;display:block;left:-25px;top:5px;margin:0;line-height:1;}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip,.example-wrap.ignore .tooltip{font-weight:bold;font-size:1.25rem;}.content .docblock .warning{border-left:2px solid var(--warning-border-color);padding:14px;position:relative;overflow-x:visible !important;}.content .docblock .warning::before{color:var(--warning-border-color);content:"ⓘ";position:absolute;left:-25px;top:5px;font-weight:bold;font-size:1.25rem;}.top-doc>.docblock>.warning:first-child::before{top:20px;}a.test-arrow{visibility:hidden;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:1.375rem;top:5px;right:5px;z-index:1;color:var(--test-arrow-color);background-color:var(--test-arrow-background-color);}a.test-arrow:hover{color:var(--test-arrow-hover-color);background-color:var(--test-arrow-hover-background-color);}.example-wrap:hover .test-arrow{visibility:visible;}.code-attribute{font-weight:300;color:var(--code-attribute-color);}.item-spacer{width:100%;height:12px;display:block;}.out-of-band>span.since{font-size:1.25rem;}.sub-variant h4{font-size:1rem;font-weight:400;margin-top:0;margin-bottom:0;}.sub-variant{margin-left:24px;margin-bottom:40px;}.sub-variant>.sub-variant-field{margin-left:24px;}:target{padding-right:3px;background-color:var(--target-background-color);border-right:3px solid var(--target-border-color);}.code-header a.tooltip{color:inherit;margin-right:15px;position:relative;}.code-header a.tooltip:hover{color:var(--link-color);}a.tooltip:hover::after{position:absolute;top:calc(100% - 10px);left:-15px;right:-15px;height:20px;content:"\00a0";}.fade-out{opacity:0;transition:opacity 0.45s cubic-bezier(0,0,0.1,1.0);}.popover.tooltip .content{margin:0.25em 0.5em;}.popover.tooltip .content pre,.popover.tooltip .content code{background:transparent;margin:0;padding:0;font-size:1.25rem;white-space:pre-wrap;}.popover.tooltip .content>h3:first-child{margin:0 0 5px 0;}.search-failed{text-align:center;margin-top:20px;display:none;}.search-failed.active{display:block;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#search-tabs{display:flex;flex-direction:row;gap:1px;margin-bottom:4px;}#search-tabs button{text-align:center;font-size:1.125rem;border:0;border-top:2px solid;flex:1;line-height:1.5;color:inherit;}#search-tabs button:not(.selected){background-color:var(--search-tab-button-not-selected-background);border-top-color:var(--search-tab-button-not-selected-border-top-color);}#search-tabs button:hover,#search-tabs button.selected{background-color:var(--search-tab-button-selected-background);border-top-color:var(--search-tab-button-selected-border-top-color);}#search-tabs .count{font-size:1rem;font-variant-numeric:tabular-nums;color:var(--search-tab-title-count-color);}#search .error code{border-radius:3px;background-color:var(--search-error-code-background-color);}.search-corrections{font-weight:normal;}#src-sidebar{width:100%;overflow:auto;}#src-sidebar div.files>a:hover,details.dir-entry summary:hover,#src-sidebar div.files>a:focus,details.dir-entry summary:focus{background-color:var(--src-sidebar-background-hover);}#src-sidebar div.files>a.selected{background-color:var(--src-sidebar-background-selected);}.src-sidebar-title{position:sticky;top:0;display:flex;padding:8px 8px 0 48px;margin-bottom:7px;background:var(--sidebar-background-color);border-bottom:1px solid var(--border-color);}#settings-menu,#help-button{margin-left:4px;display:flex;}#sidebar-button{display:none;line-height:0;}.hide-sidebar #sidebar-button,.src #sidebar-button{display:flex;margin-right:4px;position:fixed;left:6px;height:34px;width:34px;background-color:var(--main-background-color);z-index:1;}.src #sidebar-button{left:8px;z-index:calc(var(--desktop-sidebar-z-index) + 1);}.hide-sidebar .src #sidebar-button{position:static;}#settings-menu>a,#help-button>a,#sidebar-button>a{display:flex;align-items:center;justify-content:center;background-color:var(--button-background-color);border:1px solid var(--border-color);border-radius:2px;color:var(--settings-button-color);font-size:20px;width:33px;}#settings-menu>a:hover,#settings-menu>a:focus,#help-button>a:hover,#help-button>a:focus,#sidebar-button>a:hover,#sidebar-button>a:focus{border-color:var(--settings-button-border-focus);}#settings-menu>a{line-height:0;font-size:0;}#settings-menu>a:before{content:url('data:image/svg+xml,\ + ');width:22px;height:22px;filter:var(--settings-menu-filter);}#sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');width:22px;height:22px;}#copy-path{color:var(--copy-path-button-color);background:var(--main-background-color);height:34px;width:33px;margin-left:10px;padding:0;padding-left:2px;border:0;font-size:0;}#copy-path::before{filter:var(--copy-path-img-filter);content:url('data:image/svg+xml,\ +\ +\ +');width:19px;height:18px;}#copy-path:hover::before{filter:var(--copy-path-img-hover-filter);}#copy-path.clicked::before{content:url('data:image/svg+xml,\ + \ + ');}@keyframes rotating{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}#settings-menu.rotate>a img{animation:rotating 2s linear infinite;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px var(--border-color);border-radius:3px;color:var(--kbd-color);background-color:var(--kbd-background);box-shadow:inset 0 -1px 0 var(--kbd-box-shadow-color);}ul.all-items>li{list-style:none;}details.dir-entry{padding-left:4px;}details.dir-entry>summary{margin:0 0 0 -4px;padding:0 0 0 4px;cursor:pointer;}details.dir-entry div.folders,details.dir-entry div.files{padding-left:23px;}details.dir-entry a{display:block;}details.toggle{contain:layout;position:relative;}details.toggle>summary.hideme{cursor:pointer;font-size:1rem;}details.toggle>summary{list-style:none;outline:none;}details.toggle>summary::-webkit-details-marker,details.toggle>summary::marker{display:none;}details.toggle>summary.hideme>span{margin-left:9px;}details.toggle>summary::before{background:url('data:image/svg+xml,') no-repeat top left;content:"";cursor:pointer;width:16px;height:16px;display:inline-block;vertical-align:middle;opacity:.5;filter:var(--toggle-filter);}details.toggle>summary.hideme>span,.more-examples-toggle summary,.more-examples-toggle .hide-more{color:var(--toggles-color);}details.toggle>summary::after{content:"Expand";overflow:hidden;width:0;height:0;position:absolute;}details.toggle>summary.hideme::after{content:"";}details.toggle>summary:focus::before,details.toggle>summary:hover::before{opacity:1;}details.toggle>summary:focus-visible::before{outline:1px dotted #000;outline-offset:1px;}details.non-exhaustive{margin-bottom:8px;}details.toggle>summary.hideme::before{position:relative;}details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;top:4px;}.impl-items>details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;}details.toggle[open] >summary.hideme{position:absolute;}details.toggle[open] >summary.hideme>span{display:none;}details.toggle[open] >summary::before{background:url('data:image/svg+xml,') no-repeat top left;}details.toggle[open] >summary::after{content:"Collapse";}.docblock summary>*{display:inline-block;}.docblock>.example-wrap:first-child .tooltip{margin-top:16px;}.src #sidebar-button>a:before,.sidebar-menu-toggle:before{content:url('data:image/svg+xml,\ + ');opacity:0.75;}.sidebar-menu-toggle:hover:before,.sidebar-menu-toggle:active:before,.sidebar-menu-toggle:focus:before{opacity:1;}.src #sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');opacity:0.75;}@media (max-width:850px){#search-tabs .count{display:block;}}@media (max-width:700px){*[id]{scroll-margin-top:45px;}.rustdoc{display:block;}main{padding-left:15px;padding-top:0px;}.main-heading{flex-direction:column;}.out-of-band{text-align:left;margin-left:initial;padding:initial;}.out-of-band .since::before{content:"Since ";}.sidebar .logo-container,.sidebar .location,.sidebar-resizer{display:none;}.sidebar{position:fixed;top:45px;left:-1000px;z-index:11;height:calc(100vh - 45px);width:200px;}.src main,.rustdoc.src .sidebar{top:0;padding:0;height:100vh;border:0;}.src .search-form{margin-left:40px;}.hide-sidebar .search-form{margin-left:32px;}.hide-sidebar .src .search-form{margin-left:0;}.sidebar.shown,.src-sidebar-expanded .src .sidebar,.rustdoc:not(.src) .sidebar:focus-within{left:0;}.mobile-topbar h2{padding-bottom:0;margin:auto 0.5em auto auto;overflow:hidden;font-size:24px;white-space:nowrap;text-overflow:ellipsis;}.mobile-topbar .logo-container>img{max-width:35px;max-height:35px;margin:5px 0 5px 20px;}.mobile-topbar{display:flex;flex-direction:row;position:sticky;z-index:10;font-size:2rem;height:45px;width:100%;left:0;top:0;}.hide-sidebar .mobile-topbar{display:none;}.sidebar-menu-toggle{width:45px;border:none;line-height:0;}.hide-sidebar .sidebar-menu-toggle{display:none;}.sidebar-elems{margin-top:1em;}.anchor{display:none !important;}#main-content>details.toggle>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}#copy-path,#help-button{display:none;}#sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');width:22px;height:22px;}.sidebar-menu-toggle:before{filter:var(--mobile-sidebar-menu-filter);}.sidebar-menu-toggle:hover{background:var(--main-background-color);}.item-table,.item-row,.item-table>li,.item-table>li>div,.search-results>a,.search-results>a>div{display:block;}.search-results>a{padding:5px 0px;}.search-results>a>div.desc,.item-table>li>div.desc{padding-left:2em;}.search-results .result-name{display:block;}.search-results .result-name .typename{width:initial;margin-right:0;}.search-results .result-name .typename,.search-results .result-name .path{display:inline;}.src-sidebar-expanded .src .sidebar{position:fixed;max-width:100vw;width:100vw;}.src .src-sidebar-title{padding-top:0;}details.toggle:not(.top-doc)>summary{margin-left:10px;}.impl-items>details.toggle>summary:not(.hideme)::before,#main-content>details.toggle:not(.top-doc)>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}.impl-items>.item-info{margin-left:34px;}.src nav.sub{margin:0;padding:var(--nav-sub-mobile-padding);}}@media (min-width:701px){.scraped-example-title{position:absolute;z-index:10;background:var(--main-background-color);bottom:8px;right:5px;padding:2px 4px;box-shadow:0 0 4px var(--main-background-color);}.item-table>li>.item-name{width:33%;}.item-table>li>div{padding-bottom:5px;word-break:break-all;}}@media print{nav.sidebar,nav.sub,.out-of-band,a.src,#copy-path,details.toggle[open] >summary::before,details.toggle>summary::before,details.toggle.top-doc>summary{display:none;}.docblock{margin-left:0;}main{padding:10px;}}@media (max-width:464px){.docblock{margin-left:12px;}.docblock code{overflow-wrap:break-word;overflow-wrap:anywhere;}nav.sub{flex-direction:column;}.search-form{align-self:stretch;}}.variant,.implementors-toggle>summary,.impl,#implementors-list>.docblock,.impl-items>section,.impl-items>.toggle>summary,.methods>section,.methods>.toggle>summary{margin-bottom:0.75em;}.variants>.docblock,.implementors-toggle>.docblock,.impl-items>.toggle[open]:not(:last-child),.methods>.toggle[open]:not(:last-child),.implementors-toggle[open]:not(:last-child){margin-bottom:2em;}#trait-implementations-list .impl-items>.toggle:not(:last-child),#synthetic-implementations-list .impl-items>.toggle:not(:last-child),#blanket-implementations-list .impl-items>.toggle:not(:last-child){margin-bottom:1em;}.scraped-example-list .scrape-help{margin-left:10px;padding:0 4px;font-weight:normal;font-size:12px;position:relative;bottom:1px;border:1px solid var(--scrape-example-help-border-color);border-radius:50px;color:var(--scrape-example-help-color);}.scraped-example-list .scrape-help:hover{border-color:var(--scrape-example-help-hover-border-color);color:var(--scrape-example-help-hover-color);}.scraped-example{position:relative;}.scraped-example .code-wrapper{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;}.scraped-example:not(.expanded) .code-wrapper{max-height:calc(1.5em * 5 + 10px);}.scraped-example:not(.expanded) .code-wrapper pre{overflow-y:hidden;padding-bottom:0;max-height:calc(1.5em * 5 + 10px);}.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper,.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper pre{max-height:calc(1.5em * 10 + 10px);}.scraped-example .code-wrapper .next,.scraped-example .code-wrapper .prev,.scraped-example .code-wrapper .expand{color:var(--main-color);position:absolute;top:0.25em;z-index:1;padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.scraped-example .code-wrapper .prev{right:2.25em;}.scraped-example .code-wrapper .next{right:1.25em;}.scraped-example .code-wrapper .expand{right:0.25em;}.scraped-example:not(.expanded) .code-wrapper::before,.scraped-example:not(.expanded) .code-wrapper::after{content:" ";width:100%;height:5px;position:absolute;z-index:1;}.scraped-example:not(.expanded) .code-wrapper::before{top:0;background:linear-gradient(to bottom,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example:not(.expanded) .code-wrapper::after{bottom:0;background:linear-gradient(to top,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example .code-wrapper .example-wrap{width:100%;overflow-y:hidden;margin-bottom:0;}.scraped-example:not(.expanded) .code-wrapper .example-wrap{overflow-x:hidden;}.scraped-example .example-wrap .rust span.highlight{background:var(--scrape-example-code-line-highlight);}.scraped-example .example-wrap .rust span.highlight.focus{background:var(--scrape-example-code-line-highlight-focus);}.more-examples-toggle{max-width:calc(100% + 25px);margin-top:10px;margin-left:-25px;}.more-examples-toggle .hide-more{margin-left:25px;cursor:pointer;}.more-scraped-examples{margin-left:25px;position:relative;}.toggle-line{position:absolute;top:5px;bottom:0;right:calc(100% + 10px);padding:0 4px;cursor:pointer;}.toggle-line-inner{min-width:2px;height:100%;background:var(--scrape-example-toggle-line-background);}.toggle-line:hover .toggle-line-inner{background:var(--scrape-example-toggle-line-hover-background);}.more-scraped-examples .scraped-example,.example-links{margin-top:20px;}.more-scraped-examples .scraped-example:first-child{margin-top:5px;}.example-links ul{margin-bottom:0;}:root[data-theme="light"],:root:not([data-theme]){--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#f5f5f5;--sidebar-background-color-hover:#e0e0e0;--code-block-background-color:#f5f5f5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--mobile-sidebar-menu-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#fff;--settings-menu-filter:none;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--test-arrow-color:#f5f5f5;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#f5f5f5;--test-arrow-hover-background-color:rgb(78,139,202);--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#f5f5f5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);--sidebar-resizer-hover:hsl(207,90%,66%);--sidebar-resizer-active:hsl(207,90%,54%);}:root[data-theme="dark"]{--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--mobile-sidebar-menu-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--settings-menu-filter:none;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--test-arrow-color:#dedede;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#dedede;--test-arrow-hover-background-color:#4e8bca;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2a2a2a;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);--sidebar-resizer-hover:hsl(207,30%,54%);--sidebar-resizer-active:hsl(207,90%,54%);}:root[data-theme="ayu"]{--main-background-color:#0f1419;--main-color:#c5c5c5;--settings-input-color:#ffb454;--settings-input-border-color:#999;--settings-button-color:#fff;--settings-button-border-focus:#e0e0e0;--sidebar-background-color:#14191f;--sidebar-background-color-hover:rgba(70,70,70,0.33);--code-block-background-color:#191f26;--scrollbar-track-background-color:transparent;--scrollbar-thumb-background-color:#5c6773;--scrollbar-color:#5c6773 #24292f;--headings-border-bottom-color:#5c6773;--border-color:#5c6773;--button-background-color:#141920;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--mobile-sidebar-menu-filter:invert(100%);--search-input-focused-border-color:#5c6773;--copy-path-button-color:#fff;--copy-path-img-filter:invert(70%);--copy-path-img-hover-filter:invert(100%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ffa0a5;--trait-link-color:#39afd7;--assoc-item-link-color:#39afd7;--function-link-color:#fdd687;--macro-link-color:#a37acc;--keyword-link-color:#39afd7;--mod-link-color:#39afd7;--link-color:#39afd7;--sidebar-link-color:#53b1db;--sidebar-current-link-background-color:transparent;--search-result-link-focus-background-color:#3c3c3c;--search-result-border-color:#aaa3;--search-color:#fff;--search-error-code-background-color:#4f4c4c;--search-results-alias-color:#c5c5c5;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:none;--search-tab-button-not-selected-background:transparent !important;--search-tab-button-selected-border-top-color:none;--search-tab-button-selected-background:#141920 !important;--settings-menu-filter:invert(100%);--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ff7733;--code-highlight-kw-2-color:#ff7733;--code-highlight-lifetime-color:#ff7733;--code-highlight-prelude-color:#69f2df;--code-highlight-prelude-val-color:#ff7733;--code-highlight-number-color:#b8cc52;--code-highlight-string-color:#b8cc52;--code-highlight-literal-color:#ff7733;--code-highlight-attribute-color:#e6e1cf;--code-highlight-self-color:#36a3d9;--code-highlight-macro-color:#a37acc;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#788797;--code-highlight-doc-comment-color:#a1ac88;--src-line-numbers-span-color:#5c6773;--src-line-number-highlighted-background-color:rgba(255,236,164,0.06);--test-arrow-color:#788797;--test-arrow-background-color:rgba(57,175,215,0.09);--test-arrow-hover-color:#c5c5c5;--test-arrow-hover-background-color:rgba(57,175,215,0.368);--target-background-color:rgba(255,236,164,0.06);--target-border-color:rgba(255,180,76,0.85);--kbd-color:#c5c5c5;--kbd-background:#314559;--kbd-box-shadow-color:#5c6773;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(41%) sepia(12%) saturate(487%) hue-rotate(171deg) brightness(94%) contrast(94%);--crate-search-div-hover-filter:invert(98%) sepia(12%) saturate(81%) hue-rotate(343deg) brightness(113%) contrast(76%);--crate-search-hover-border:#e0e0e0;--src-sidebar-background-selected:#14191f;--src-sidebar-background-hover:#14191f;--table-alt-row-background-color:#191f26;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(15,20,25,1);--scrape-example-code-wrapper-background-end:rgba(15,20,25,0);--sidebar-resizer-hover:hsl(34,50%,33%);--sidebar-resizer-active:hsl(34,100%,66%);}:root[data-theme="ayu"] h1,:root[data-theme="ayu"] h2,:root[data-theme="ayu"] h3,:root[data-theme="ayu"] h4,:where(:root[data-theme="ayu"]) h1 a,:root[data-theme="ayu"] .sidebar h2 a,:root[data-theme="ayu"] .sidebar h3 a{color:#fff;}:root[data-theme="ayu"] .docblock code{color:#ffb454;}:root[data-theme="ayu"] .docblock a>code{color:#39AFD7 !important;}:root[data-theme="ayu"] .code-header,:root[data-theme="ayu"] .docblock pre>code,:root[data-theme="ayu"] pre,:root[data-theme="ayu"] pre>code,:root[data-theme="ayu"] .item-info code,:root[data-theme="ayu"] .rustdoc.source .example-wrap{color:#e6e1cf;}:root[data-theme="ayu"] .sidebar .current,:root[data-theme="ayu"] .sidebar .current a,:root[data-theme="ayu"] .sidebar a:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:hover,:root[data-theme="ayu"] details.dir-entry summary:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:focus,:root[data-theme="ayu"] details.dir-entry summary:focus,:root[data-theme="ayu"] #src-sidebar div.files>a.selected{color:#ffb44c;}:root[data-theme="ayu"] .sidebar-elems .location{color:#ff7733;}:root[data-theme="ayu"] .src-line-numbers .line-highlighted{color:#708090;padding-right:7px;border-right:1px solid #ffb44c;}:root[data-theme="ayu"] .search-results a:hover,:root[data-theme="ayu"] .search-results a:focus{color:#fff !important;background-color:#3c3c3c;}:root[data-theme="ayu"] .search-results a{color:#0096cf;}:root[data-theme="ayu"] .search-results a div.desc{color:#c5c5c5;}:root[data-theme="ayu"] .result-name .primitive>i,:root[data-theme="ayu"] .result-name .keyword>i{color:#788797;}:root[data-theme="ayu"] #search-tabs>button.selected{border-bottom:1px solid #ffb44c !important;border-top:none;}:root[data-theme="ayu"] #search-tabs>button:not(.selected){border:none;background-color:transparent !important;}:root[data-theme="ayu"] #search-tabs>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}:root[data-theme="ayu"] #settings-menu>a img,:root[data-theme="ayu"] #sidebar-button>a:before{filter:invert(100);} \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/static.files/search-d234aafac6c221dd.js b/static/rust/redstone/crypto_secp256k1/doc/static.files/search-d234aafac6c221dd.js new file mode 100644 index 00000000..3f587f65 --- /dev/null +++ b/static/rust/redstone/crypto_secp256k1/doc/static.files/search-d234aafac6c221dd.js @@ -0,0 +1,5 @@ +"use strict";if(!Array.prototype.toSpliced){Array.prototype.toSpliced=function(){const me=this.slice();Array.prototype.splice.apply(me,arguments);return me}}(function(){const itemTypes=["keyword","primitive","mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","associatedtype","constant","associatedconstant","union","foreigntype","existential","attr","derive","traitalias","generic",];const longItemTypes=["keyword","primitive type","module","extern crate","re-export","struct","enum","function","type alias","static","trait","","trait method","method","struct field","enum variant","macro","assoc type","constant","assoc const","union","foreign type","existential type","attribute macro","derive macro","trait alias",];const TY_GENERIC=itemTypes.indexOf("generic");const TY_IMPORT=itemTypes.indexOf("import");const ROOT_PATH=typeof window!=="undefined"?window.rootPath:"../";const UNBOXING_LIMIT=5;const REGEX_IDENT=/\p{ID_Start}\p{ID_Continue}*|_\p{ID_Continue}+/uy;const REGEX_INVALID_TYPE_FILTER=/[^a-z]/ui;function printTab(nb){let iter=0;let foundCurrentTab=false;let foundCurrentResultSet=false;onEachLazy(document.getElementById("search-tabs").childNodes,elem=>{if(nb===iter){addClass(elem,"selected");foundCurrentTab=true}else{removeClass(elem,"selected")}iter+=1});const isTypeSearch=(nb>0||iter===1);iter=0;onEachLazy(document.getElementById("results").childNodes,elem=>{if(nb===iter){addClass(elem,"active");foundCurrentResultSet=true}else{removeClass(elem,"active")}iter+=1});if(foundCurrentTab&&foundCurrentResultSet){searchState.currentTab=nb;const correctionsElem=document.getElementsByClassName("search-corrections");if(isTypeSearch){removeClass(correctionsElem[0],"hidden")}else{addClass(correctionsElem[0],"hidden")}}else if(nb!==0){printTab(0)}}const editDistanceState={current:[],prev:[],prevPrev:[],calculate:function calculate(a,b,limit){if(a.lengthlimit){return limit+1}while(b.length>0&&b[0]===a[0]){a=a.substring(1);b=b.substring(1)}while(b.length>0&&b[b.length-1]===a[a.length-1]){a=a.substring(0,a.length-1);b=b.substring(0,b.length-1)}if(b.length===0){return minDist}const aLength=a.length;const bLength=b.length;for(let i=0;i<=bLength;++i){this.current[i]=0;this.prev[i]=i;this.prevPrev[i]=Number.MAX_VALUE}for(let i=1;i<=aLength;++i){this.current[0]=i;const aIdx=i-1;for(let j=1;j<=bLength;++j){const bIdx=j-1;const substitutionCost=a[aIdx]===b[bIdx]?0:1;this.current[j]=Math.min(this.prev[j]+1,this.current[j-1]+1,this.prev[j-1]+substitutionCost,);if((i>1)&&(j>1)&&(a[aIdx]===b[bIdx-1])&&(a[aIdx-1]===b[bIdx])){this.current[j]=Math.min(this.current[j],this.prevPrev[j-2]+1,)}}const prevPrevTmp=this.prevPrev;this.prevPrev=this.prev;this.prev=this.current;this.current=prevPrevTmp}const distance=this.prev[bLength];return distance<=limit?distance:(limit+1)},};function editDistance(a,b,limit){return editDistanceState.calculate(a,b,limit)}function initSearch(rawSearchIndex){const MAX_RESULTS=200;const NO_TYPE_FILTER=-1;let searchIndex;let searchIndexDeprecated;let searchIndexEmptyDesc;let functionTypeFingerprint;let currentResults;const typeNameIdMap=new Map();const ALIASES=new Map();const typeNameIdOfArray=buildTypeMapIndex("array");const typeNameIdOfSlice=buildTypeMapIndex("slice");const typeNameIdOfArrayOrSlice=buildTypeMapIndex("[]");const typeNameIdOfTuple=buildTypeMapIndex("tuple");const typeNameIdOfUnit=buildTypeMapIndex("unit");const typeNameIdOfTupleOrUnit=buildTypeMapIndex("()");const typeNameIdOfFn=buildTypeMapIndex("fn");const typeNameIdOfFnMut=buildTypeMapIndex("fnmut");const typeNameIdOfFnOnce=buildTypeMapIndex("fnonce");const typeNameIdOfHof=buildTypeMapIndex("->");function buildTypeMapIndex(name,isAssocType){if(name===""||name===null){return null}if(typeNameIdMap.has(name)){const obj=typeNameIdMap.get(name);obj.assocOnly=isAssocType&&obj.assocOnly;return obj.id}else{const id=typeNameIdMap.size;typeNameIdMap.set(name,{id,assocOnly:isAssocType});return id}}function isSpecialStartCharacter(c){return"<\"".indexOf(c)!==-1}function isEndCharacter(c){return"=,>-])".indexOf(c)!==-1}function itemTypeFromName(typename){const index=itemTypes.findIndex(i=>i===typename);if(index<0){throw["Unknown type filter ",typename]}return index}function getStringElem(query,parserState,isInGenerics){if(isInGenerics){throw["Unexpected ","\""," in generics"]}else if(query.literalSearch){throw["Cannot have more than one literal search element"]}else if(parserState.totalElems-parserState.genericsElems>0){throw["Cannot use literal search when there is more than one element"]}parserState.pos+=1;const start=parserState.pos;const end=getIdentEndPosition(parserState);if(parserState.pos>=parserState.length){throw["Unclosed ","\""]}else if(parserState.userQuery[end]!=="\""){throw["Unexpected ",parserState.userQuery[end]," in a string element"]}else if(start===end){throw["Cannot have empty string element"]}parserState.pos+=1;query.literalSearch=true}function isPathStart(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="::"}function isReturnArrow(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="->"}function consumeIdent(parserState){REGEX_IDENT.lastIndex=parserState.pos;const match=parserState.userQuery.match(REGEX_IDENT);if(match){parserState.pos+=match[0].length;return true}return false}function isSeparatorCharacter(c){return c===","||c==="="}function isPathSeparator(c){return c===":"||c===" "}function prevIs(parserState,lookingFor){let pos=parserState.pos;while(pos>0){const c=parserState.userQuery[pos-1];if(c===lookingFor){return true}else if(c!==" "){break}pos-=1}return false}function isLastElemGeneric(elems,parserState){return(elems.length>0&&elems[elems.length-1].generics.length>0)||prevIs(parserState,">")}function skipWhitespace(parserState){while(parserState.pos0){throw["Cannot have more than one element if you use quotes"]}const typeFilter=parserState.typeFilter;parserState.typeFilter=null;if(name==="!"){if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive never type ","!"," and ",typeFilter," both specified",]}if(generics.length!==0){throw["Never type ","!"," does not accept generic parameters",]}const bindingName=parserState.isInBinding;parserState.isInBinding=null;return makePrimitiveElement("never",{bindingName})}const quadcolon=/::\s*::/.exec(path);if(path.startsWith("::")){throw["Paths cannot start with ","::"]}else if(path.endsWith("::")){throw["Paths cannot end with ","::"]}else if(quadcolon!==null){throw["Unexpected ",quadcolon[0]]}const pathSegments=path.split(/(?:::\s*)|(?:\s+(?:::\s*)?)/);if(pathSegments.length===0||(pathSegments.length===1&&pathSegments[0]==="")){if(generics.length>0||prevIs(parserState,">")){throw["Found generics without a path"]}else{throw["Unexpected ",parserState.userQuery[parserState.pos]]}}for(const[i,pathSegment]of pathSegments.entries()){if(pathSegment==="!"){if(i!==0){throw["Never type ","!"," is not associated item"]}pathSegments[i]="never"}}parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1}const bindingName=parserState.isInBinding;parserState.isInBinding=null;const bindings=new Map();const pathLast=pathSegments[pathSegments.length-1];return{name:name.trim(),id:null,fullPath:pathSegments,pathWithoutLast:pathSegments.slice(0,pathSegments.length-1),pathLast,normalizedPathLast:pathLast.replace(/_/g,""),generics:generics.filter(gen=>{if(gen.bindingName!==null){if(gen.name!==null){gen.bindingName.generics.unshift(gen)}bindings.set(gen.bindingName.name,gen.bindingName.generics);return false}return true}),bindings,typeFilter,bindingName,}}function getIdentEndPosition(parserState){let afterIdent=consumeIdent(parserState);let end=parserState.pos;let macroExclamation=-1;while(parserState.pos0){throw["Unexpected ",c," after ",parserState.userQuery[parserState.pos-1]," (not a valid identifier)"]}else{throw["Unexpected ",c," (not a valid identifier)"]}parserState.pos+=1;afterIdent=consumeIdent(parserState);end=parserState.pos}if(macroExclamation!==-1){if(parserState.typeFilter===null){parserState.typeFilter="macro"}else if(parserState.typeFilter!=="macro"){throw["Invalid search type: macro ","!"," and ",parserState.typeFilter," both specified",]}end=macroExclamation}return end}function getFilteredNextElem(query,parserState,elems,isInGenerics){const start=parserState.pos;if(parserState.userQuery[parserState.pos]===":"&&!isPathStart(parserState)){throw["Expected type filter before ",":"]}getNextElem(query,parserState,elems,isInGenerics);if(parserState.userQuery[parserState.pos]===":"&&!isPathStart(parserState)){if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}if(elems.length===0){throw["Expected type filter before ",":"]}else if(query.literalSearch){throw["Cannot use quotes on type filter"]}const typeFilterElem=elems.pop();checkExtraTypeFilterCharacters(start,parserState);parserState.typeFilter=typeFilterElem.name;parserState.pos+=1;parserState.totalElems-=1;query.literalSearch=false;getNextElem(query,parserState,elems,isInGenerics)}}function getNextElem(query,parserState,elems,isInGenerics){const generics=[];skipWhitespace(parserState);let start=parserState.pos;let end;if("[(".indexOf(parserState.userQuery[parserState.pos])!==-1){let endChar=")";let name="()";let friendlyName="tuple";if(parserState.userQuery[parserState.pos]==="["){endChar="]";name="[]";friendlyName="slice"}parserState.pos+=1;const{foundSeparator}=getItemsBefore(query,parserState,generics,endChar);const typeFilter=parserState.typeFilter;const bindingName=parserState.isInBinding;parserState.typeFilter=null;parserState.isInBinding=null;for(const gen of generics){if(gen.bindingName!==null){throw["Type parameter ","=",` cannot be within ${friendlyName} `,name]}}if(name==="()"&&!foundSeparator&&generics.length===1&&typeFilter===null){elems.push(generics[0])}else if(name==="()"&&generics.length===1&&generics[0].name==="->"){generics[0].typeFilter=typeFilter;elems.push(generics[0])}else{if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive ",name," and ",typeFilter," both specified",]}parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1}elems.push(makePrimitiveElement(name,{bindingName,generics}))}}else if(parserState.userQuery[parserState.pos]==="&"){if(parserState.typeFilter!==null&&parserState.typeFilter!=="primitive"){throw["Invalid search type: primitive ","&"," and ",parserState.typeFilter," both specified",]}parserState.typeFilter=null;parserState.pos+=1;let c=parserState.userQuery[parserState.pos];while(c===" "&&parserState.pos=end){throw["Found generics without a path"]}parserState.pos+=1;getItemsBefore(query,parserState,generics,">")}else if(parserState.pos=end){throw["Found generics without a path"]}if(parserState.isInBinding){throw["Unexpected ","("," after ","="]}parserState.pos+=1;const typeFilter=parserState.typeFilter;parserState.typeFilter=null;getItemsBefore(query,parserState,generics,")");skipWhitespace(parserState);if(isReturnArrow(parserState)){parserState.pos+=2;skipWhitespace(parserState);getFilteredNextElem(query,parserState,generics,isInGenerics);generics[generics.length-1].bindingName=makePrimitiveElement("output")}else{generics.push(makePrimitiveElement(null,{bindingName:makePrimitiveElement("output"),typeFilter:null,}))}parserState.typeFilter=typeFilter}if(isStringElem){skipWhitespace(parserState)}if(start>=end&&generics.length===0){return}if(parserState.userQuery[parserState.pos]==="="){if(parserState.isInBinding){throw["Cannot write ","="," twice in a binding"]}if(!isInGenerics){throw["Type parameter ","="," must be within generics list"]}const name=parserState.userQuery.slice(start,end).trim();if(name==="!"){throw["Type parameter ","="," key cannot be ","!"," never type"]}if(name.includes("!")){throw["Type parameter ","="," key cannot be ","!"," macro"]}if(name.includes("::")){throw["Type parameter ","="," key cannot contain ","::"," path"]}if(name.includes(":")){throw["Type parameter ","="," key cannot contain ",":"," type"]}parserState.isInBinding={name,generics}}else{elems.push(createQueryElement(query,parserState,parserState.userQuery.slice(start,end),generics,isInGenerics,),)}}}function getItemsBefore(query,parserState,elems,endChar){let foundStopChar=true;let foundSeparator=false;const oldTypeFilter=parserState.typeFilter;parserState.typeFilter=null;const oldIsInBinding=parserState.isInBinding;parserState.isInBinding=null;let hofParameters=null;let extra="";if(endChar===">"){extra="<"}else if(endChar==="]"){extra="["}else if(endChar===")"){extra="("}else if(endChar===""){extra="->"}else{extra=endChar}while(parserState.pos"," after ","="]}hofParameters=[...elems];elems.length=0;parserState.pos+=2;foundStopChar=true;foundSeparator=false;continue}else if(c===" "){parserState.pos+=1;continue}else if(isSeparatorCharacter(c)){parserState.pos+=1;foundStopChar=true;foundSeparator=true;continue}else if(c===":"&&isPathStart(parserState)){throw["Unexpected ","::",": paths cannot start with ","::"]}else if(isEndCharacter(c)){throw["Unexpected ",c," after ",extra]}if(!foundStopChar){let extra=[];if(isLastElemGeneric(query.elems,parserState)){extra=[" after ",">"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(endChar!==""){throw["Expected ",",",", ","=",", or ",endChar,...extra,", found ",c,]}throw["Expected ",","," or ","=",...extra,", found ",c,]}const posBefore=parserState.pos;getFilteredNextElem(query,parserState,elems,endChar!=="");if(endChar!==""&&parserState.pos>=parserState.length){throw["Unclosed ",extra]}if(posBefore===parserState.pos){parserState.pos+=1}foundStopChar=false}if(parserState.pos>=parserState.length&&endChar!==""){throw["Unclosed ",extra]}parserState.pos+=1;if(hofParameters){foundSeparator=false;if([...elems,...hofParameters].some(x=>x.bindingName)||parserState.isInBinding){throw["Unexpected ","="," within ","->"]}const hofElem=makePrimitiveElement("->",{generics:hofParameters,bindings:new Map([["output",[...elems]]]),typeFilter:null,});elems.length=0;elems[0]=hofElem}parserState.typeFilter=oldTypeFilter;parserState.isInBinding=oldIsInBinding;return{foundSeparator}}function checkExtraTypeFilterCharacters(start,parserState){const query=parserState.userQuery.slice(start,parserState.pos).trim();const match=query.match(REGEX_INVALID_TYPE_FILTER);if(match){throw["Unexpected ",match[0]," in type filter (before ",":",")",]}}function parseInput(query,parserState){let foundStopChar=true;while(parserState.pos"){if(isReturnArrow(parserState)){break}throw["Unexpected ",c," (did you mean ","->","?)"]}else if(parserState.pos>0){throw["Unexpected ",c," after ",parserState.userQuery[parserState.pos-1]]}throw["Unexpected ",c]}else if(c===" "){skipWhitespace(parserState);continue}if(!foundStopChar){let extra="";if(isLastElemGeneric(query.elems,parserState)){extra=[" after ",">"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(parserState.typeFilter!==null){throw["Expected ",","," or ","->",...extra,", found ",c,]}throw["Expected ",",",", ",":"," or ","->",...extra,", found ",c,]}const before=query.elems.length;getFilteredNextElem(query,parserState,query.elems,false);if(query.elems.length===before){parserState.pos+=1}foundStopChar=false}if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}while(parserState.pos"]}break}else{parserState.pos+=1}}}function newParsedQuery(userQuery){return{original:userQuery,userQuery:userQuery.toLowerCase(),elems:[],returned:[],foundElems:0,totalElems:0,literalSearch:false,error:null,correction:null,proposeCorrectionFrom:null,proposeCorrectionTo:null,typeFingerprint:new Uint32Array(4),}}function buildUrl(search,filterCrates){let extra="?search="+encodeURIComponent(search);if(filterCrates!==null){extra+="&filter-crate="+encodeURIComponent(filterCrates)}return getNakedUrl()+extra+window.location.hash}function getFilterCrates(){const elem=document.getElementById("crate-search");if(elem&&elem.value!=="all crates"&&rawSearchIndex.has(elem.value)){return elem.value}return null}function parseQuery(userQuery){function convertTypeFilterOnElem(elem){if(elem.typeFilter!==null){let typeFilter=elem.typeFilter;if(typeFilter==="const"){typeFilter="constant"}elem.typeFilter=itemTypeFromName(typeFilter)}else{elem.typeFilter=NO_TYPE_FILTER}for(const elem2 of elem.generics){convertTypeFilterOnElem(elem2)}for(const constraints of elem.bindings.values()){for(const constraint of constraints){convertTypeFilterOnElem(constraint)}}}userQuery=userQuery.trim().replace(/\r|\n|\t/g," ");const parserState={length:userQuery.length,pos:0,totalElems:0,genericsElems:0,typeFilter:null,isInBinding:null,userQuery:userQuery.toLowerCase(),};let query=newParsedQuery(userQuery);try{parseInput(query,parserState);for(const elem of query.elems){convertTypeFilterOnElem(elem)}for(const elem of query.returned){convertTypeFilterOnElem(elem)}}catch(err){query=newParsedQuery(userQuery);query.error=err;return query}if(!query.literalSearch){query.literalSearch=parserState.totalElems>1}query.foundElems=query.elems.length+query.returned.length;query.totalElems=parserState.totalElems;return query}function createQueryResults(results_in_args,results_returned,results_others,parsedQuery){return{"in_args":results_in_args,"returned":results_returned,"others":results_others,"query":parsedQuery,}}async function execQuery(parsedQuery,filterCrates,currentCrate){const results_others=new Map(),results_in_args=new Map(),results_returned=new Map();function transformResults(results){const duplicates=new Set();const out=[];for(const result of results){if(result.id!==-1){const obj=searchIndex[result.id];obj.dist=result.dist;const res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=res[2]+"|"+obj.ty;if(duplicates.has(obj.fullPath)){continue}if(obj.ty===TY_IMPORT&&duplicates.has(res[2])){continue}if(duplicates.has(res[2]+"|"+TY_IMPORT)){continue}duplicates.add(obj.fullPath);duplicates.add(res[2]);obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}return out}async function sortResults(results,isType,preferredCrate){const userQuery=parsedQuery.userQuery;const result_list=[];for(const result of results.values()){result.item=searchIndex[result.id];result.word=searchIndex[result.id].word;result_list.push(result)}result_list.sort((aaa,bbb)=>{let a,b;a=(aaa.word!==userQuery);b=(bbb.word!==userQuery);if(a!==b){return a-b}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.path_dist;b=bbb.path_dist;if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}a=(aaa.dist);b=(bbb.dist);if(a!==b){return a-b}a=searchIndexDeprecated.get(aaa.item.crate).contains(aaa.item.bitIndex);b=searchIndexDeprecated.get(bbb.item.crate).contains(bbb.item.bitIndex);if(a!==b){return a-b}a=(aaa.item.crate!==preferredCrate);b=(bbb.item.crate!==preferredCrate);if(a!==b){return a-b}a=aaa.word.length;b=bbb.word.length;if(a!==b){return a-b}a=aaa.word;b=bbb.word;if(a!==b){return(a>b?+1:-1)}a=searchIndexEmptyDesc.get(aaa.item.crate).contains(aaa.item.bitIndex);b=searchIndexEmptyDesc.get(bbb.item.crate).contains(bbb.item.bitIndex);if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});return transformResults(result_list)}function unifyFunctionTypes(fnTypesIn,queryElems,whereClause,mgensIn,solutionCb,unboxingDepth,){if(unboxingDepth>=UNBOXING_LIMIT){return false}const mgens=mgensIn===null?null:new Map(mgensIn);if(queryElems.length===0){return!solutionCb||solutionCb(mgens)}if(!fnTypesIn||fnTypesIn.length===0){return false}const ql=queryElems.length;const fl=fnTypesIn.length;if(ql===1&&queryElems[0].generics.length===0&&queryElems[0].bindings.size===0){const queryElem=queryElems[0];for(const fnType of fnTypesIn){if(!unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgens)){continue}if(fnType.id<0&&queryElem.id<0){if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==queryElem.id){continue}const mgensScratch=new Map(mgens);mgensScratch.set(fnType.id,queryElem.id);if(!solutionCb||solutionCb(mgensScratch)){return true}}else if(!solutionCb||solutionCb(mgens?new Map(mgens):null)){return true}}for(const fnType of fnTypesIn){if(!unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth+1,)){continue}if(fnType.id<0){if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==0){continue}const mgensScratch=new Map(mgens);mgensScratch.set(fnType.id,0);if(unifyFunctionTypes(whereClause[(-fnType.id)-1],queryElems,whereClause,mgensScratch,solutionCb,unboxingDepth+1,)){return true}}else if(unifyFunctionTypes([...fnType.generics,...Array.from(fnType.bindings.values()).flat()],queryElems,whereClause,mgens?new Map(mgens):null,solutionCb,unboxingDepth+1,)){return true}}return false}const fnTypes=fnTypesIn.slice();const flast=fl-1;const qlast=ql-1;const queryElem=queryElems[qlast];let queryElemsTmp=null;for(let i=flast;i>=0;i-=1){const fnType=fnTypes[i];if(!unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgens)){continue}let mgensScratch;if(fnType.id<0){mgensScratch=new Map(mgens);if(mgensScratch.has(fnType.id)&&mgensScratch.get(fnType.id)!==queryElem.id){continue}mgensScratch.set(fnType.id,queryElem.id)}else{mgensScratch=mgens}fnTypes[i]=fnTypes[flast];fnTypes.length=flast;if(!queryElemsTmp){queryElemsTmp=queryElems.slice(0,qlast)}const passesUnification=unifyFunctionTypes(fnTypes,queryElemsTmp,whereClause,mgensScratch,mgensScratch=>{if(fnType.generics.length===0&&queryElem.generics.length===0&&fnType.bindings.size===0&&queryElem.bindings.size===0){return!solutionCb||solutionCb(mgensScratch)}const solution=unifyFunctionTypeCheckBindings(fnType,queryElem,whereClause,mgensScratch,unboxingDepth,);if(!solution){return false}const simplifiedGenerics=solution.simplifiedGenerics;for(const simplifiedMgens of solution.mgens){const passesUnification=unifyFunctionTypes(simplifiedGenerics,queryElem.generics,whereClause,simplifiedMgens,solutionCb,unboxingDepth,);if(passesUnification){return true}}return false},unboxingDepth,);if(passesUnification){return true}fnTypes[flast]=fnTypes[i];fnTypes[i]=fnType;fnTypes.length=fl}for(let i=flast;i>=0;i-=1){const fnType=fnTypes[i];if(!unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth+1,)){continue}let mgensScratch;if(fnType.id<0){mgensScratch=new Map(mgens);if(mgensScratch.has(fnType.id)&&mgensScratch.get(fnType.id)!==0){continue}mgensScratch.set(fnType.id,0)}else{mgensScratch=mgens}const generics=fnType.id<0?whereClause[(-fnType.id)-1]:fnType.generics;const bindings=fnType.bindings?Array.from(fnType.bindings.values()).flat():[];const passesUnification=unifyFunctionTypes(fnTypes.toSpliced(i,1,...generics,...bindings),queryElems,whereClause,mgensScratch,solutionCb,unboxingDepth+1,);if(passesUnification){return true}}return false}function unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgensIn){if(!typePassesFilter(queryElem.typeFilter,fnType.ty)){return false}if(fnType.id<0&&queryElem.id<0){if(mgensIn){if(mgensIn.has(fnType.id)&&mgensIn.get(fnType.id)!==queryElem.id){return false}for(const[fid,qid]of mgensIn.entries()){if(fnType.id!==fid&&queryElem.id===qid){return false}if(fnType.id===fid&&queryElem.id!==qid){return false}}}return true}else{if(queryElem.id===typeNameIdOfArrayOrSlice&&(fnType.id===typeNameIdOfSlice||fnType.id===typeNameIdOfArray)){}else if(queryElem.id===typeNameIdOfTupleOrUnit&&(fnType.id===typeNameIdOfTuple||fnType.id===typeNameIdOfUnit)){}else if(queryElem.id===typeNameIdOfHof&&(fnType.id===typeNameIdOfFn||fnType.id===typeNameIdOfFnMut||fnType.id===typeNameIdOfFnOnce)){}else if(fnType.id!==queryElem.id||queryElem.id===null){return false}if((fnType.generics.length+fnType.bindings.size)===0&&queryElem.generics.length!==0){return false}if(fnType.bindings.size0){const fnTypePath=fnType.path!==undefined&&fnType.path!==null?fnType.path.split("::"):[];if(queryElemPathLength>fnTypePath.length){return false}let i=0;for(const path of fnTypePath){if(path===queryElem.pathWithoutLast[i]){i+=1;if(i>=queryElemPathLength){break}}}if(i0){let mgensSolutionSet=[mgensIn];for(const[name,constraints]of queryElem.bindings.entries()){if(mgensSolutionSet.length===0){return false}if(!fnType.bindings.has(name)){return false}const fnTypeBindings=fnType.bindings.get(name);mgensSolutionSet=mgensSolutionSet.flatMap(mgens=>{const newSolutions=[];unifyFunctionTypes(fnTypeBindings,constraints,whereClause,mgens,newMgens=>{newSolutions.push(newMgens);return false},unboxingDepth,);return newSolutions})}if(mgensSolutionSet.length===0){return false}const binds=Array.from(fnType.bindings.entries()).flatMap(entry=>{const[name,constraints]=entry;if(queryElem.bindings.has(name)){return[]}else{return constraints}});if(simplifiedGenerics.length>0){simplifiedGenerics=[...simplifiedGenerics,...binds]}else{simplifiedGenerics=binds}return{simplifiedGenerics,mgens:mgensSolutionSet}}return{simplifiedGenerics,mgens:[mgensIn]}}function unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth,){if(unboxingDepth>=UNBOXING_LIMIT){return false}if(fnType.id<0&&queryElem.id>=0){if(!whereClause){return false}if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==0){return false}const mgensTmp=new Map(mgens);mgensTmp.set(fnType.id,null);return checkIfInList(whereClause[(-fnType.id)-1],queryElem,whereClause,mgensTmp,unboxingDepth,)}else if(fnType.generics.length>0||fnType.bindings.size>0){const simplifiedGenerics=[...fnType.generics,...Array.from(fnType.bindings.values()).flat(),];return checkIfInList(simplifiedGenerics,queryElem,whereClause,mgens,unboxingDepth,)}return false}function checkIfInList(list,elem,whereClause,mgens,unboxingDepth){for(const entry of list){if(checkType(entry,elem,whereClause,mgens,unboxingDepth)){return true}}return false}function checkType(row,elem,whereClause,mgens,unboxingDepth){if(unboxingDepth>=UNBOXING_LIMIT){return false}if(row.bindings.size===0&&elem.bindings.size===0){if(elem.id<0&&mgens===null){return row.id<0||checkIfInList(row.generics,elem,whereClause,mgens,unboxingDepth+1,)}if(row.id>0&&elem.id>0&&elem.pathWithoutLast.length===0&&typePassesFilter(elem.typeFilter,row.ty)&&elem.generics.length===0&&elem.id!==typeNameIdOfArrayOrSlice&&elem.id!==typeNameIdOfTupleOrUnit&&elem.id!==typeNameIdOfHof){return row.id===elem.id||checkIfInList(row.generics,elem,whereClause,mgens,unboxingDepth,)}}return unifyFunctionTypes([row],[elem],whereClause,mgens,null,unboxingDepth)}function checkPath(contains,ty){if(contains.length===0){return 0}const maxPathEditDistance=Math.floor(contains.reduce((acc,next)=>acc+next.length,0)/3,);let ret_dist=maxPathEditDistance+1;const path=ty.path.split("::");if(ty.parent&&ty.parent.name){path.push(ty.parent.name.toLowerCase())}const length=path.length;const clength=contains.length;pathiter:for(let i=length-clength;i>=0;i-=1){let dist_total=0;for(let x=0;xmaxPathEditDistance){continue pathiter}dist_total+=dist}}ret_dist=Math.min(ret_dist,Math.round(dist_total/clength))}return ret_dist>maxPathEditDistance?null:ret_dist}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER||filter===type)return true;const name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,descShard:item.descShard,descIndex:item.descIndex,exactPath:item.exactPath,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,bitIndex:item.bitIndex,implDisambiguator:item.implDisambiguator,}}async function handleAliases(ret,query,filterCrates,currentCrate){const lowerQuery=query.toLowerCase();const aliases=[];const crateAliases=[];if(filterCrates!==null){if(ALIASES.has(filterCrates)&&ALIASES.get(filterCrates).has(lowerQuery)){const query_aliases=ALIASES.get(filterCrates).get(lowerQuery);for(const alias of query_aliases){aliases.push(createAliasFromItem(searchIndex[alias]))}}}else{for(const[crate,crateAliasesIndex]of ALIASES){if(crateAliasesIndex.has(lowerQuery)){const pushTo=crate===currentCrate?crateAliases:aliases;const query_aliases=crateAliasesIndex.get(lowerQuery);for(const alias of query_aliases){pushTo.push(createAliasFromItem(searchIndex[alias]))}}}}const sortFunc=(aaa,bbb)=>{if(aaa.path{return searchIndexEmptyDesc.get(alias.crate).contains(alias.bitIndex)?"":searchState.loadDesc(alias)};const[crateDescs,descs]=await Promise.all([Promise.all(crateAliases.map(fetchDesc)),Promise.all(aliases.map(fetchDesc)),]);const pushFunc=alias=>{alias.alias=query;const res=buildHrefAndPath(alias);alias.displayPath=pathSplitter(res[0]);alias.fullPath=alias.displayPath+alias.name;alias.href=res[1];ret.others.unshift(alias);if(ret.others.length>MAX_RESULTS){ret.others.pop()}};aliases.forEach((alias,i)=>{alias.desc=descs[i]});aliases.forEach(pushFunc);crateAliases.forEach((alias,i)=>{alias.desc=crateDescs[i]});crateAliases.forEach(pushFunc)}function addIntoResults(results,fullId,id,index,dist,path_dist,maxEditDistance){if(dist<=maxEditDistance||index!==-1){if(results.has(fullId)){const result=results.get(fullId);if(result.dontValidate||result.dist<=dist){return}}results.set(fullId,{id:id,index:index,dontValidate:parsedQuery.literalSearch,dist:dist,path_dist:path_dist,})}}function handleSingleArg(row,pos,elem,results_others,results_in_args,results_returned,maxEditDistance,){if(!row||(filterCrates!==null&&row.crate!==filterCrates)){return}let path_dist=0;const fullId=row.id;const tfpDist=compareTypeFingerprints(fullId,parsedQuery.typeFingerprint,);if(tfpDist!==null){const in_args=row.type&&row.type.inputs&&checkIfInList(row.type.inputs,elem,row.type.where_clause,null,0);const returned=row.type&&row.type.output&&checkIfInList(row.type.output,elem,row.type.where_clause,null,0);if(in_args){results_in_args.max_dist=Math.max(results_in_args.max_dist||0,tfpDist);const maxDist=results_in_args.sizenormalizedIndex&&normalizedIndex!==-1)){index=normalizedIndex}if(elem.fullPath.length>1){path_dist=checkPath(elem.pathWithoutLast,row);if(path_dist===null){return}}if(parsedQuery.literalSearch){if(row.word===elem.pathLast){addIntoResults(results_others,fullId,pos,index,0,path_dist)}return}const dist=editDistance(row.normalizedName,elem.normalizedPathLast,maxEditDistance);if(index===-1&&dist>maxEditDistance){return}addIntoResults(results_others,fullId,pos,index,dist,path_dist,maxEditDistance)}function handleArgs(row,pos,results){if(!row||(filterCrates!==null&&row.crate!==filterCrates)||!row.type){return}const tfpDist=compareTypeFingerprints(row.id,parsedQuery.typeFingerprint,);if(tfpDist===null){return}if(results.size>=MAX_RESULTS&&tfpDist>results.max_dist){return}if(!unifyFunctionTypes(row.type.inputs,parsedQuery.elems,row.type.where_clause,null,mgens=>{return unifyFunctionTypes(row.type.output,parsedQuery.returned,row.type.where_clause,mgens,null,0,)},0,)){return}results.max_dist=Math.max(results.max_dist||0,tfpDist);addIntoResults(results,row.id,pos,0,tfpDist,0,Number.MAX_VALUE)}function innerRunQuery(){const queryLen=parsedQuery.elems.reduce((acc,next)=>acc+next.pathLast.length,0)+parsedQuery.returned.reduce((acc,next)=>acc+next.pathLast.length,0);const maxEditDistance=Math.floor(queryLen/3);const genericSymbols=new Map();function convertNameToId(elem,isAssocType){const loweredName=elem.pathLast.toLowerCase();if(typeNameIdMap.has(loweredName)&&(isAssocType||!typeNameIdMap.get(loweredName).assocOnly)){elem.id=typeNameIdMap.get(loweredName).id}else if(!parsedQuery.literalSearch){let match=null;let matchDist=maxEditDistance+1;let matchName="";for(const[name,{id,assocOnly}]of typeNameIdMap){const dist=Math.min(editDistance(name,loweredName,maxEditDistance),editDistance(name,elem.normalizedPathLast,maxEditDistance),);if(dist<=matchDist&&dist<=maxEditDistance&&(isAssocType||!assocOnly)){if(dist===matchDist&&matchName>name){continue}match=id;matchDist=dist;matchName=name}}if(match!==null){parsedQuery.correction=matchName}elem.id=match}if((elem.id===null&&parsedQuery.totalElems>1&&elem.typeFilter===-1&&elem.generics.length===0&&elem.bindings.size===0)||elem.typeFilter===TY_GENERIC){if(genericSymbols.has(elem.name)){elem.id=genericSymbols.get(elem.name)}else{elem.id=-(genericSymbols.size+1);genericSymbols.set(elem.name,elem.id)}if(elem.typeFilter===-1&&elem.name.length>=3){const maxPartDistance=Math.floor(elem.name.length/3);let matchDist=maxPartDistance+1;let matchName="";for(const name of typeNameIdMap.keys()){const dist=editDistance(name,elem.name,maxPartDistance);if(dist<=matchDist&&dist<=maxPartDistance){if(dist===matchDist&&matchName>name){continue}matchDist=dist;matchName=name}}if(matchName!==""){parsedQuery.proposeCorrectionFrom=elem.name;parsedQuery.proposeCorrectionTo=matchName}}elem.typeFilter=TY_GENERIC}if(elem.generics.length>0&&elem.typeFilter===TY_GENERIC){parsedQuery.error=["Generic type parameter ",elem.name," does not accept generic parameters",]}for(const elem2 of elem.generics){convertNameToId(elem2)}elem.bindings=new Map(Array.from(elem.bindings.entries()).map(entry=>{const[name,constraints]=entry;if(!typeNameIdMap.has(name)){parsedQuery.error=["Type parameter ",name," does not exist",];return[null,[]]}for(const elem2 of constraints){convertNameToId(elem2)}return[typeNameIdMap.get(name).id,constraints]}),)}const fps=new Set();for(const elem of parsedQuery.elems){convertNameToId(elem);buildFunctionTypeFingerprint(elem,parsedQuery.typeFingerprint,fps)}for(const elem of parsedQuery.returned){convertNameToId(elem);buildFunctionTypeFingerprint(elem,parsedQuery.typeFingerprint,fps)}if(parsedQuery.foundElems===1&&parsedQuery.returned.length===0){if(parsedQuery.elems.length===1){const elem=parsedQuery.elems[0];for(let i=0,nSearchIndex=searchIndex.length;i0){const sortQ=(a,b)=>{const ag=a.generics.length===0&&a.bindings.size===0;const bg=b.generics.length===0&&b.bindings.size===0;if(ag!==bg){return ag-bg}const ai=a.id>0;const bi=b.id>0;return ai-bi};parsedQuery.elems.sort(sortQ);parsedQuery.returned.sort(sortQ);for(let i=0,nSearchIndex=searchIndex.length;i{const descs=await Promise.all(list.map(result=>{return searchIndexEmptyDesc.get(result.crate).contains(result.bitIndex)?"":searchState.loadDesc(result)}));for(const[i,result]of list.entries()){result.desc=descs[i]}}));if(parsedQuery.error!==null&&ret.others.length!==0){ret.query.error=null}return ret}function nextTab(direction){const next=(searchState.currentTab+direction+3)%searchState.focusedByTab.length;searchState.focusedByTab[searchState.currentTab]=document.activeElement;printTab(next);focusSearchResult()}function focusSearchResult(){const target=searchState.focusedByTab[searchState.currentTab]||document.querySelectorAll(".search-results.active a").item(0)||document.querySelectorAll("#search-tabs button").item(searchState.currentTab);searchState.focusedByTab[searchState.currentTab]=null;if(target){target.focus()}}function buildHrefAndPath(item){let displayPath;let href;const type=itemTypes[item.ty];const name=item.name;let path=item.path;let exactPath=item.exactPath;if(type==="mod"){displayPath=path+"::";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="import"){displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/index.html#reexport."+name}else if(type==="primitive"||type==="keyword"){displayPath="";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=ROOT_PATH+name+"/index.html"}else if(item.parent!==undefined){const myparent=item.parent;let anchor=type+"."+name;const parentType=itemTypes[myparent.ty];let pageType=parentType;let pageName=myparent.name;exactPath=`${myparent.exactPath}::${myparent.name}`;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){const enumNameIdx=item.path.lastIndexOf("::");const enumName=item.path.substr(enumNameIdx+2);path=item.path.substr(0,enumNameIdx);displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}if(item.implDisambiguator!==null){anchor=item.implDisambiguator+"/"+anchor}href=ROOT_PATH+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html#"+anchor}else{displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href,`${exactPath}::${name}`]}function pathSplitter(path){const tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}async function addTab(array,query,display){const extraClass=display?" active":"";const output=document.createElement("div");if(array.length>0){output.className="search-results "+extraClass;for(const item of array){const name=item.name;const type=itemTypes[item.ty];const longType=longItemTypes[item.ty];const typeName=longType.length!==0?`${longType}`:"?";const link=document.createElement("a");link.className="result-"+type;link.href=item.href;const resultName=document.createElement("div");resultName.className="result-name";resultName.insertAdjacentHTML("beforeend",`${typeName}`);link.appendChild(resultName);let alias=" ";if(item.is_alias){alias=`
\ +${item.alias} - see \ +
`}resultName.insertAdjacentHTML("beforeend",`
${alias}\ +${item.displayPath}${name}\ +
`);const description=document.createElement("div");description.className="desc";description.insertAdjacentHTML("beforeend",item.desc);link.appendChild(description);output.appendChild(link)}}else if(query.error===null){output.className="search-failed"+extraClass;output.innerHTML="No results :(
"+"Try on DuckDuckGo?

"+"Or try looking in one of these:"}return[output,array.length]}function makeTabHeader(tabNb,text,nbElems){const fmtNbElems=nbElems<10?`\u{2007}(${nbElems})\u{2007}\u{2007}`:nbElems<100?`\u{2007}(${nbElems})\u{2007}`:`\u{2007}(${nbElems})`;if(searchState.currentTab===tabNb){return""}return""}async function showResults(results,go_to_first,filterCrates){const search=searchState.outputElement();if(go_to_first||(results.others.length===1&&getSettingValue("go-to-only-result")==="true")){window.onunload=()=>{};searchState.removeQueryParameters();const elem=document.createElement("a");elem.href=results.others[0].href;removeClass(elem,"active");document.body.appendChild(elem);elem.click();return}if(results.query===undefined){results.query=parseQuery(searchState.input.value)}currentResults=results.query.userQuery;const[ret_others,ret_in_args,ret_returned]=await Promise.all([addTab(results.others,results.query,true),addTab(results.in_args,results.query,false),addTab(results.returned,results.query,false),]);let currentTab=searchState.currentTab;if((currentTab===0&&ret_others[1]===0)||(currentTab===1&&ret_in_args[1]===0)||(currentTab===2&&ret_returned[1]===0)){if(ret_others[1]!==0){currentTab=0}else if(ret_in_args[1]!==0){currentTab=1}else if(ret_returned[1]!==0){currentTab=2}}let crates="";if(rawSearchIndex.size>1){crates=" in 
"}let output=`

Results${crates}

`;if(results.query.error!==null){const error=results.query.error;error.forEach((value,index)=>{value=value.split("<").join("<").split(">").join(">");if(index%2!==0){error[index]=`${value.replaceAll(" ", " ")}`}else{error[index]=value}});output+=`

Query parser error: "${error.join("")}".

`;output+="
"+makeTabHeader(0,"In Names",ret_others[1])+"
";currentTab=0}else if(results.query.foundElems<=1&&results.query.returned.length===0){output+="
"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
"}else{const signatureTabTitle=results.query.elems.length===0?"In Function Return Types":results.query.returned.length===0?"In Function Parameters":"In Function Signatures";output+="
"+makeTabHeader(0,signatureTabTitle,ret_others[1])+"
";currentTab=0}if(results.query.correction!==null){const orig=results.query.returned.length>0?results.query.returned[0].name:results.query.elems[0].name;output+="

"+`Type "${orig}" not found. `+"Showing results for closest type name "+`"${results.query.correction}" instead.

`}if(results.query.proposeCorrectionFrom!==null){const orig=results.query.proposeCorrectionFrom;const targ=results.query.proposeCorrectionTo;output+="

"+`Type "${orig}" not found and used as generic parameter. `+`Consider searching for "${targ}" instead.

`}const resultsElem=document.createElement("div");resultsElem.id="results";resultsElem.appendChild(ret_others[0]);resultsElem.appendChild(ret_in_args[0]);resultsElem.appendChild(ret_returned[0]);search.innerHTML=output;const crateSearch=document.getElementById("crate-search");if(crateSearch){crateSearch.addEventListener("input",updateCrate)}search.appendChild(resultsElem);searchState.showResults(search);const elems=document.getElementById("search-tabs").childNodes;searchState.focusedByTab=[];let i=0;for(const elem of elems){const j=i;elem.onclick=()=>printTab(j);searchState.focusedByTab.push(null);i+=1}printTab(currentTab)}function updateSearchHistory(url){if(!browserSupportsHistoryApi()){return}const params=searchState.getQueryStringParams();if(!history.state&&!params.search){history.pushState(null,"",url)}else{history.replaceState(null,"",url)}}async function search(forced){const query=parseQuery(searchState.input.value.trim());let filterCrates=getFilterCrates();if(!forced&&query.userQuery===currentResults){if(query.userQuery.length>0){putBackSearch()}return}searchState.setLoadingSearch();const params=searchState.getQueryStringParams();if(filterCrates===null&¶ms["filter-crate"]!==undefined){filterCrates=params["filter-crate"]}searchState.title="Results for "+query.original+" - Rust";updateSearchHistory(buildUrl(query.original,filterCrates));await showResults(await execQuery(query,filterCrates,window.currentCrate),params.go_to_first,filterCrates)}function buildItemSearchTypeAll(types,lowercasePaths){return types.length>0?types.map(type=>buildItemSearchType(type,lowercasePaths)):EMPTY_GENERICS_ARRAY}const EMPTY_BINDINGS_MAP=new Map();const EMPTY_GENERICS_ARRAY=[];let TYPES_POOL=new Map();function buildItemSearchType(type,lowercasePaths,isAssocType){const PATH_INDEX_DATA=0;const GENERICS_DATA=1;const BINDINGS_DATA=2;let pathIndex,generics,bindings;if(typeof type==="number"){pathIndex=type;generics=EMPTY_GENERICS_ARRAY;bindings=EMPTY_BINDINGS_MAP}else{pathIndex=type[PATH_INDEX_DATA];generics=buildItemSearchTypeAll(type[GENERICS_DATA],lowercasePaths,);if(type.length>BINDINGS_DATA&&type[BINDINGS_DATA].length>0){bindings=new Map(type[BINDINGS_DATA].map(binding=>{const[assocType,constraints]=binding;return[buildItemSearchType(assocType,lowercasePaths,true).id,buildItemSearchTypeAll(constraints,lowercasePaths),]}))}else{bindings=EMPTY_BINDINGS_MAP}}let result;if(pathIndex<0){result={id:pathIndex,ty:TY_GENERIC,path:null,exactPath:null,generics,bindings,}}else if(pathIndex===0){result={id:null,ty:null,path:null,exactPath:null,generics,bindings,}}else{const item=lowercasePaths[pathIndex-1];result={id:buildTypeMapIndex(item.name,isAssocType),ty:item.ty,path:item.path,exactPath:item.exactPath,generics,bindings,}}const cr=TYPES_POOL.get(result.id);if(cr){if(cr.generics.length===result.generics.length&&cr.generics!==result.generics&&cr.generics.every((x,i)=>result.generics[i]===x)){result.generics=cr.generics}if(cr.bindings.size===result.bindings.size&&cr.bindings!==result.bindings){let ok=true;for(const[k,v]of cr.bindings.entries()){const v2=result.bindings.get(v);if(!v2){ok=false;break}if(v!==v2&&v.length===v2.length&&v.every((x,i)=>v2[i]===x)){result.bindings.set(k,v)}else if(v!==v2){ok=false;break}}if(ok){result.bindings=cr.bindings}}if(cr.ty===result.ty&&cr.path===result.path&&cr.bindings===result.bindings&&cr.generics===result.generics&&cr.ty===result.ty){return cr}}TYPES_POOL.set(result.id,result);return result}function buildFunctionSearchTypeCallback(lowercasePaths){return functionSearchType=>{if(functionSearchType===0){return null}const INPUTS_DATA=0;const OUTPUT_DATA=1;let inputs,output;if(typeof functionSearchType[INPUTS_DATA]==="number"){inputs=[buildItemSearchType(functionSearchType[INPUTS_DATA],lowercasePaths)]}else{inputs=buildItemSearchTypeAll(functionSearchType[INPUTS_DATA],lowercasePaths,)}if(functionSearchType.length>1){if(typeof functionSearchType[OUTPUT_DATA]==="number"){output=[buildItemSearchType(functionSearchType[OUTPUT_DATA],lowercasePaths)]}else{output=buildItemSearchTypeAll(functionSearchType[OUTPUT_DATA],lowercasePaths,)}}else{output=[]}const where_clause=[];const l=functionSearchType.length;for(let i=2;i{k=(~~k+0x7ed55d16)+(k<<12);k=(k ^ 0xc761c23c)^(k>>>19);k=(~~k+0x165667b1)+(k<<5);k=(~~k+0xd3a2646c)^(k<<9);k=(~~k+0xfd7046c5)+(k<<3);return(k ^ 0xb55a4f09)^(k>>>16)};const hashint2=k=>{k=~k+(k<<15);k ^=k>>>12;k+=k<<2;k ^=k>>>4;k=Math.imul(k,2057);return k ^(k>>16)};if(input!==null){const h0a=hashint1(input);const h0b=hashint2(input);const h1a=~~(h0a+Math.imul(h0b,2));const h1b=~~(h0a+Math.imul(h0b,3));const h2a=~~(h0a+Math.imul(h0b,4));const h2b=~~(h0a+Math.imul(h0b,5));output[0]|=(1<<(h0a%32))|(1<<(h1b%32));output[1]|=(1<<(h1a%32))|(1<<(h2b%32));output[2]|=(1<<(h2a%32))|(1<<(h0b%32));fps.add(input)}for(const g of type.generics){buildFunctionTypeFingerprint(g,output,fps)}const fb={id:null,ty:0,generics:EMPTY_GENERICS_ARRAY,bindings:EMPTY_BINDINGS_MAP,};for(const[k,v]of type.bindings.entries()){fb.id=k;fb.generics=v;buildFunctionTypeFingerprint(fb,output,fps)}output[3]=fps.size}function compareTypeFingerprints(fullId,queryFingerprint){const fh0=functionTypeFingerprint[fullId*4];const fh1=functionTypeFingerprint[(fullId*4)+1];const fh2=functionTypeFingerprint[(fullId*4)+2];const[qh0,qh1,qh2]=queryFingerprint;const[in0,in1,in2]=[fh0&qh0,fh1&qh1,fh2&qh2];if((in0 ^ qh0)||(in1 ^ qh1)||(in2 ^ qh2)){return null}return functionTypeFingerprint[(fullId*4)+3]}class VlqHexDecoder{constructor(string,cons){this.string=string;this.cons=cons;this.offset=0;this.backrefQueue=[]}decodeList(){let c=this.string.charCodeAt(this.offset);const ret=[];while(c!==125){ret.push(this.decode());c=this.string.charCodeAt(this.offset)}this.offset+=1;return ret}decode(){let n=0;let c=this.string.charCodeAt(this.offset);if(c===123){this.offset+=1;return this.decodeList()}while(c<96){n=(n<<4)|(c&0xF);this.offset+=1;c=this.string.charCodeAt(this.offset)}n=(n<<4)|(c&0xF);const[sign,value]=[n&1,n>>1];this.offset+=1;return sign?-value:value}next(){const c=this.string.charCodeAt(this.offset);if(c>=48&&c<64){this.offset+=1;return this.backrefQueue[c-48]}if(c===96){this.offset+=1;return this.cons(0)}const result=this.cons(this.decode());this.backrefQueue.unshift(result);if(this.backrefQueue.length>16){this.backrefQueue.pop()}return result}}class RoaringBitmap{constructor(str){const strdecoded=atob(str);const u8array=new Uint8Array(strdecoded.length);for(let j=0;j=4){offsets=[];for(let j=0;j>3]&(1<<(j&0x7))){const runcount=(u8array[i]|(u8array[i+1]<<8));i+=2;this.containers.push(new RoaringBitmapRun(runcount,u8array.slice(i,i+(runcount*4)),));i+=runcount*4}else if(this.cardinalities[j]>=4096){this.containers.push(new RoaringBitmapBits(u8array.slice(i,i+8192)));i+=8192}else{const end=this.cardinalities[j]*2;this.containers.push(new RoaringBitmapArray(this.cardinalities[j],u8array.slice(i,i+end),));i+=end}}}contains(keyvalue){const key=keyvalue>>16;const value=keyvalue&0xFFFF;for(let i=0;i=start&&value<=(start+lenm1)){return true}}return false}}class RoaringBitmapArray{constructor(cardinality,array){this.cardinality=cardinality;this.array=array}contains(value){const l=this.cardinality*2;for(let i=0;i>3]&(1<<(value&7)))}}function buildIndex(rawSearchIndex){searchIndex=[];searchIndexDeprecated=new Map();searchIndexEmptyDesc=new Map();let currentIndex=0;let id=0;for(const crate of rawSearchIndex.values()){id+=crate.t.length+1}functionTypeFingerprint=new Uint32Array((id+1)*4);id=0;for(const[crate,crateCorpus]of rawSearchIndex){const itemDescShardDecoder=new VlqHexDecoder(crateCorpus.D,noop=>noop);let descShard={crate,shard:0,start:0,len:itemDescShardDecoder.next(),promise:null,resolve:null,};const descShardList=[descShard];searchIndexDeprecated.set(crate,new RoaringBitmap(crateCorpus.c));searchIndexEmptyDesc.set(crate,new RoaringBitmap(crateCorpus.e));let descIndex=0;const crateRow={crate,ty:3,name:crate,path:"",descShard,descIndex,exactPath:"",desc:crateCorpus.doc,parent:undefined,type:null,id,word:crate,normalizedName:crate.indexOf("_")===-1?crate:crate.replace(/_/g,""),bitIndex:0,implDisambiguator:null,};id+=1;searchIndex.push(crateRow);currentIndex+=1;if(!searchIndexEmptyDesc.get(crate).contains(0)){descIndex+=1}const itemTypes=crateCorpus.t;const itemNames=crateCorpus.n;const itemPaths=new Map(crateCorpus.q);const itemReexports=new Map(crateCorpus.r);const itemParentIdxs=crateCorpus.i;const implDisambiguator=new Map(crateCorpus.b);const paths=crateCorpus.p;const aliases=crateCorpus.a;const lowercasePaths=[];const itemFunctionDecoder=new VlqHexDecoder(crateCorpus.f,buildFunctionSearchTypeCallback(lowercasePaths),);let len=paths.length;let lastPath=itemPaths.get(0);for(let i=0;i2){path=itemPaths.has(elem[2])?itemPaths.get(elem[2]):lastPath;lastPath=path}const exactPath=elem.length>3?itemPaths.get(elem[3]):path;lowercasePaths.push({ty,name:name.toLowerCase(),path,exactPath});paths[i]={ty,name,path,exactPath}}lastPath="";len=itemTypes.length;for(let i=0;i=descShard.len&&!searchIndexEmptyDesc.get(crate).contains(bitIndex)){descShard={crate,shard:descShard.shard+1,start:descShard.start+descShard.len,len:itemDescShardDecoder.next(),promise:null,resolve:null,};descIndex=0;descShardList.push(descShard)}let word="";if(typeof itemNames[i]==="string"){word=itemNames[i].toLowerCase()}const path=itemPaths.has(i)?itemPaths.get(i):lastPath;const type=itemFunctionDecoder.next();if(type!==null){if(type){const fp=functionTypeFingerprint.subarray(id*4,(id+1)*4);const fps=new Set();for(const t of type.inputs){buildFunctionTypeFingerprint(t,fp,fps)}for(const t of type.output){buildFunctionTypeFingerprint(t,fp,fps)}for(const w of type.where_clause){for(const t of w){buildFunctionTypeFingerprint(t,fp,fps)}}}}const row={crate,ty:itemTypes.charCodeAt(i)-65,name:itemNames[i],path,descShard,descIndex,exactPath:itemReexports.has(i)?itemPaths.get(itemReexports.get(i)):path,parent:itemParentIdxs[i]>0?paths[itemParentIdxs[i]-1]:undefined,type,id,word,normalizedName:word.indexOf("_")===-1?word:word.replace(/_/g,""),bitIndex,implDisambiguator:implDisambiguator.has(i)?implDisambiguator.get(i):null,};id+=1;searchIndex.push(row);lastPath=row.path;if(!searchIndexEmptyDesc.get(crate).contains(bitIndex)){descIndex+=1}}if(aliases){const currentCrateAliases=new Map();ALIASES.set(crate,currentCrateAliases);for(const alias_name in aliases){if(!Object.prototype.hasOwnProperty.call(aliases,alias_name)){continue}let currentNameAliases;if(currentCrateAliases.has(alias_name)){currentNameAliases=currentCrateAliases.get(alias_name)}else{currentNameAliases=[];currentCrateAliases.set(alias_name,currentNameAliases)}for(const local_alias of aliases[alias_name]){currentNameAliases.push(local_alias+currentIndex)}}}currentIndex+=itemTypes.length;searchState.descShards.set(crate,descShardList)}TYPES_POOL=new Map()}function onSearchSubmit(e){e.preventDefault();searchState.clearInputTimeout();search()}function putBackSearch(){const search_input=searchState.input;if(!searchState.input){return}if(search_input.value!==""&&!searchState.isDisplayed()){searchState.showResults();if(browserSupportsHistoryApi()){history.replaceState(null,"",buildUrl(search_input.value,getFilterCrates()))}document.title=searchState.title}}function registerSearchEvents(){const params=searchState.getQueryStringParams();if(searchState.input.value===""){searchState.input.value=params.search||""}const searchAfter500ms=()=>{searchState.clearInputTimeout();if(searchState.input.value.length===0){searchState.hideResults()}else{searchState.timeout=setTimeout(search,500)}};searchState.input.onkeyup=searchAfter500ms;searchState.input.oninput=searchAfter500ms;document.getElementsByClassName("search-form")[0].onsubmit=onSearchSubmit;searchState.input.onchange=e=>{if(e.target!==document.activeElement){return}searchState.clearInputTimeout();setTimeout(search,0)};searchState.input.onpaste=searchState.input.onchange;searchState.outputElement().addEventListener("keydown",e=>{if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey){return}if(e.which===38){const previous=document.activeElement.previousElementSibling;if(previous){previous.focus()}else{searchState.focus()}e.preventDefault()}else if(e.which===40){const next=document.activeElement.nextElementSibling;if(next){next.focus()}const rect=document.activeElement.getBoundingClientRect();if(window.innerHeight-rect.bottom{if(e.which===40){focusSearchResult();e.preventDefault()}});searchState.input.addEventListener("focus",()=>{putBackSearch()});searchState.input.addEventListener("blur",()=>{searchState.input.placeholder=searchState.input.origPlaceholder});if(browserSupportsHistoryApi()){const previousTitle=document.title;window.addEventListener("popstate",e=>{const params=searchState.getQueryStringParams();document.title=previousTitle;currentResults=null;if(params.search&¶ms.search.length>0){searchState.input.value=params.search;e.preventDefault();search()}else{searchState.input.value="";searchState.hideResults()}})}window.onpageshow=()=>{const qSearch=searchState.getQueryStringParams().search;if(searchState.input.value===""&&qSearch){searchState.input.value=qSearch}search()}}function updateCrate(ev){if(ev.target.value==="all crates"){const query=searchState.input.value.trim();updateSearchHistory(buildUrl(query,null))}currentResults=null;search(true)}buildIndex(rawSearchIndex);if(typeof window!=="undefined"){registerSearchEvents();if(window.searchState.getQueryStringParams().search){search()}}if(typeof exports!=="undefined"){exports.initSearch=initSearch;exports.execQuery=execQuery;exports.parseQuery=parseQuery}}if(typeof window!=="undefined"){window.initSearch=initSearch;if(window.searchIndex!==undefined){initSearch(window.searchIndex)}}else{initSearch(new Map())}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/clone/trait.Clone.js b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/clone/trait.Clone.js index 270a1587..f3493485 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/clone/trait.Clone.js +++ b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/clone/trait.Clone.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl Clone for Error"],["impl Clone for DataPackage"],["impl Clone for DataPoint"],["impl Clone for Payload"]] +"redstone":[["impl Clone for Error"],["impl Clone for DataPackage"],["impl Clone for DataPoint"],["impl Clone for Payload"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/cmp/trait.Eq.js b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/cmp/trait.Eq.js index a573550b..65c9074b 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/cmp/trait.Eq.js +++ b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/cmp/trait.Eq.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl Eq for ProcessorResult"],["impl Eq for DataPackage"],["impl Eq for DataPoint"]] +"redstone":[["impl Eq for ProcessorResult"],["impl Eq for DataPackage"],["impl Eq for DataPoint"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/cmp/trait.PartialEq.js b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/cmp/trait.PartialEq.js index 695eda8f..694c39aa 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/cmp/trait.PartialEq.js +++ b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/cmp/trait.PartialEq.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl PartialEq for ProcessorResult"],["impl PartialEq for DataPackage"],["impl PartialEq for DataPoint"]] +"redstone":[["impl PartialEq for ProcessorResult"],["impl PartialEq for DataPackage"],["impl PartialEq for DataPoint"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/convert/trait.From.js b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/convert/trait.From.js index 92afa7bb..1ca779a8 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/convert/trait.From.js +++ b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/convert/trait.From.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl From<ProcessorResult> for (u64, Vec<U256>)"]] +"redstone":[["impl From<ProcessorResult> for (u64, Vec<U256>)"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/fmt/trait.Debug.js b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/fmt/trait.Debug.js index f544c767..00b02dec 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/fmt/trait.Debug.js +++ b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/fmt/trait.Debug.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl Debug for Error"],["impl Debug for Config"],["impl Debug for ProcessorResult"],["impl Debug for DataPackage"],["impl Debug for DataPoint"],["impl Debug for Payload"]] +"redstone":[["impl Debug for Error"],["impl Debug for Config"],["impl Debug for ProcessorResult"],["impl Debug for DataPackage"],["impl Debug for DataPoint"],["impl Debug for Payload"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/fmt/trait.Display.js b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/fmt/trait.Display.js index 899cd7d8..99ad5f7c 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/fmt/trait.Display.js +++ b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/fmt/trait.Display.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl Display for Error"]] +"redstone":[["impl Display for Error"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/marker/trait.Freeze.js b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/marker/trait.Freeze.js index 9ef439fb..b171c620 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/marker/trait.Freeze.js +++ b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/marker/trait.Freeze.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl Freeze for Error",1,["redstone::network::error::Error"]],["impl Freeze for Config",1,["redstone::core::config::Config"]],["impl Freeze for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Freeze for Std",1,["redstone::network::pure::Std"]],["impl Freeze for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Freeze for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Freeze for Payload",1,["redstone::protocol::payload::Payload"]]] +"redstone":[["impl Freeze for Error",1,["redstone::network::error::Error"]],["impl Freeze for Config",1,["redstone::core::config::Config"]],["impl Freeze for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Freeze for Std",1,["redstone::network::pure::Std"]],["impl Freeze for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Freeze for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Freeze for Payload",1,["redstone::protocol::payload::Payload"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/marker/trait.Send.js b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/marker/trait.Send.js index 5c6a47bd..b46e7c30 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/marker/trait.Send.js +++ b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/marker/trait.Send.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl !Send for Error",1,["redstone::network::error::Error"]],["impl Send for Config",1,["redstone::core::config::Config"]],["impl Send for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Send for Std",1,["redstone::network::pure::Std"]],["impl Send for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Send for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Send for Payload",1,["redstone::protocol::payload::Payload"]]] +"redstone":[["impl !Send for Error",1,["redstone::network::error::Error"]],["impl Send for Config",1,["redstone::core::config::Config"]],["impl Send for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Send for Std",1,["redstone::network::pure::Std"]],["impl Send for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Send for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Send for Payload",1,["redstone::protocol::payload::Payload"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/marker/trait.StructuralPartialEq.js b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/marker/trait.StructuralPartialEq.js index 19408b71..e4ec763f 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/marker/trait.StructuralPartialEq.js +++ b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/marker/trait.StructuralPartialEq.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl StructuralPartialEq for ProcessorResult"],["impl StructuralPartialEq for DataPackage"],["impl StructuralPartialEq for DataPoint"]] +"redstone":[["impl StructuralPartialEq for ProcessorResult"],["impl StructuralPartialEq for DataPackage"],["impl StructuralPartialEq for DataPoint"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/marker/trait.Sync.js b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/marker/trait.Sync.js index 38836f03..f954a405 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/marker/trait.Sync.js +++ b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/marker/trait.Sync.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl !Sync for Error",1,["redstone::network::error::Error"]],["impl Sync for Config",1,["redstone::core::config::Config"]],["impl Sync for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Sync for Std",1,["redstone::network::pure::Std"]],["impl Sync for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Sync for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Sync for Payload",1,["redstone::protocol::payload::Payload"]]] +"redstone":[["impl !Sync for Error",1,["redstone::network::error::Error"]],["impl Sync for Config",1,["redstone::core::config::Config"]],["impl Sync for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Sync for Std",1,["redstone::network::pure::Std"]],["impl Sync for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Sync for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Sync for Payload",1,["redstone::protocol::payload::Payload"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/marker/trait.Unpin.js b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/marker/trait.Unpin.js index 05a367f3..bcba46c1 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/marker/trait.Unpin.js +++ b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/marker/trait.Unpin.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl Unpin for Error",1,["redstone::network::error::Error"]],["impl Unpin for Config",1,["redstone::core::config::Config"]],["impl Unpin for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Unpin for Std",1,["redstone::network::pure::Std"]],["impl Unpin for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Unpin for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Unpin for Payload",1,["redstone::protocol::payload::Payload"]]] +"redstone":[["impl Unpin for Error",1,["redstone::network::error::Error"]],["impl Unpin for Config",1,["redstone::core::config::Config"]],["impl Unpin for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Unpin for Std",1,["redstone::network::pure::Std"]],["impl Unpin for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Unpin for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Unpin for Payload",1,["redstone::protocol::payload::Payload"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js index 5dbcd460..22ad876f 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js +++ b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl !RefUnwindSafe for Error",1,["redstone::network::error::Error"]],["impl RefUnwindSafe for Config",1,["redstone::core::config::Config"]],["impl RefUnwindSafe for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl RefUnwindSafe for Std",1,["redstone::network::pure::Std"]],["impl RefUnwindSafe for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl RefUnwindSafe for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl RefUnwindSafe for Payload",1,["redstone::protocol::payload::Payload"]]] +"redstone":[["impl !RefUnwindSafe for Error",1,["redstone::network::error::Error"]],["impl RefUnwindSafe for Config",1,["redstone::core::config::Config"]],["impl RefUnwindSafe for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl RefUnwindSafe for Std",1,["redstone::network::pure::Std"]],["impl RefUnwindSafe for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl RefUnwindSafe for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl RefUnwindSafe for Payload",1,["redstone::protocol::payload::Payload"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js index 850af1de..b9ce6a8c 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js +++ b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl !UnwindSafe for Error",1,["redstone::network::error::Error"]],["impl UnwindSafe for Config",1,["redstone::core::config::Config"]],["impl UnwindSafe for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl UnwindSafe for Std",1,["redstone::network::pure::Std"]],["impl UnwindSafe for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl UnwindSafe for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl UnwindSafe for Payload",1,["redstone::protocol::payload::Payload"]]] +"redstone":[["impl !UnwindSafe for Error",1,["redstone::network::error::Error"]],["impl UnwindSafe for Config",1,["redstone::core::config::Config"]],["impl UnwindSafe for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl UnwindSafe for Std",1,["redstone::network::pure::Std"]],["impl UnwindSafe for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl UnwindSafe for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl UnwindSafe for Payload",1,["redstone::protocol::payload::Payload"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/type.impl/alloc/vec/struct.Vec.js b/static/rust/redstone/crypto_secp256k1/doc/type.impl/alloc/vec/struct.Vec.js index 02ba4b44..f62dde52 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/type.impl/alloc/vec/struct.Vec.js +++ b/static/rust/redstone/crypto_secp256k1/doc/type.impl/alloc/vec/struct.Vec.js @@ -1,3 +1,3 @@ (function() {var type_impls = { -"redstone":[["
1.5.0 · source§

impl<T, A> AsMut<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn as_mut(&mut self) -> &mut [T]

Converts this type into a mutable reference of the (usually inferred) input type.
","AsMut<[T]>","redstone::core::aggregator::Matrix"],["
1.5.0 · source§

impl<T, A> AsMut<Vec<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn as_mut(&mut self) -> &mut Vec<T, A>

Converts this type into a mutable reference of the (usually inferred) input type.
","AsMut>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> AsRef<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn as_ref(&self) -> &[T]

Converts this type into a shared reference of the (usually inferred) input type.
","AsRef<[T]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> AsRef<Vec<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn as_ref(&self) -> &Vec<T, A>

Converts this type into a shared reference of the (usually inferred) input type.
","AsRef>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Borrow<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn borrow(&self) -> &[T]

Immutably borrows from an owned value. Read more
","Borrow<[T]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> BorrowMut<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn borrow_mut(&mut self) -> &mut [T]

Mutably borrows from an owned value. Read more
","BorrowMut<[T]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Clone for Vec<T, A>
where\n T: Clone,\n A: Allocator + Clone,

source§

fn clone_from(&mut self, source: &Vec<T, A>)

Overwrites the contents of self with a clone of the contents of source.

\n

This method is preferred over simply assigning source.clone() to self,\nas it avoids reallocation if possible. Additionally, if the element type\nT overrides clone_from(), this will reuse the resources of self’s\nelements as well.

\n
§Examples
\n
let x = vec![5, 6, 7];\nlet mut y = vec![8, 9, 10];\nlet yp: *const i32 = y.as_ptr();\n\ny.clone_from(&x);\n\n// The value is the same\nassert_eq!(x, y);\n\n// And no reallocation occurred\nassert_eq!(yp, y.as_ptr());
\n
source§

fn clone(&self) -> Vec<T, A>

Returns a copy of the value. Read more
","Clone","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Debug for Vec<T, A>
where\n T: Debug,\n A: Allocator,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T> Default for Vec<T>

source§

fn default() -> Vec<T>

Creates an empty Vec<T>.

\n

The vector will not allocate until elements are pushed onto it.

\n
","Default","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Deref for Vec<T, A>
where\n A: Allocator,

§

type Target = [T]

The resulting type after dereferencing.
source§

fn deref(&self) -> &[T]

Dereferences the value.
","Deref","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> DerefMut for Vec<T, A>
where\n A: Allocator,

source§

fn deref_mut(&mut self) -> &mut [T]

Mutably dereferences the value.
","DerefMut","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Drop for Vec<T, A>
where\n A: Allocator,

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
","Drop","redstone::core::aggregator::Matrix"],["
1.2.0 · source§

impl<'a, T, A> Extend<&'a T> for Vec<T, A>
where\n T: Copy + 'a,\n A: Allocator,

Extend implementation that copies elements out of references before pushing them onto the Vec.

\n

This implementation is specialized for slice iterators, where it uses copy_from_slice to\nappend the entire slice at once.

\n
source§

fn extend<I>(&mut self, iter: I)
where\n I: IntoIterator<Item = &'a T>,

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, _: &'a T)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
","Extend<&'a T>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Extend<T> for Vec<T, A>
where\n A: Allocator,

source§

fn extend<I>(&mut self, iter: I)
where\n I: IntoIterator<Item = T>,

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: T)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
","Extend","redstone::core::aggregator::Matrix"],["
source§

impl Flattened<<Std as NetworkSpecific>::BytesRepr> for Vec<Bytes>

","Flattened<::BytesRepr>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T> From<&[T]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &[T]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&[1, 2, 3][..]), vec![1, 2, 3]);
\n
","From<&[T]>","redstone::core::aggregator::Matrix"],["
1.74.0 · source§

impl<T, const N: usize> From<&[T; N]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &[T; N]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&[1, 2, 3]), vec![1, 2, 3]);
\n
","From<&[T; N]>","redstone::core::aggregator::Matrix"],["
1.19.0 · source§

impl<T> From<&mut [T]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &mut [T]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&mut [1, 2, 3][..]), vec![1, 2, 3]);
\n
","From<&mut [T]>","redstone::core::aggregator::Matrix"],["
1.74.0 · source§

impl<T, const N: usize> From<&mut [T; N]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &mut [T; N]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&mut [1, 2, 3]), vec![1, 2, 3]);
\n
","From<&mut [T; N]>","redstone::core::aggregator::Matrix"],["
1.44.0 · source§

impl<T, const N: usize> From<[T; N]> for Vec<T>

source§

fn from(s: [T; N]) -> Vec<T>

Allocate a Vec<T> and move s’s items into it.

\n
§Examples
\n
assert_eq!(Vec::from([1, 2, 3]), vec![1, 2, 3]);
\n
","From<[T; N]>","redstone::core::aggregator::Matrix"],["
1.5.0 · source§

impl<T, A> From<BinaryHeap<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn from(heap: BinaryHeap<T, A>) -> Vec<T, A>

Converts a BinaryHeap<T> into a Vec<T>.

\n

This conversion requires no data movement or allocation, and has\nconstant time complexity.

\n
","From>","redstone::core::aggregator::Matrix"],["
1.18.0 · source§

impl<T, A> From<Box<[T], A>> for Vec<T, A>
where\n A: Allocator,

source§

fn from(s: Box<[T], A>) -> Vec<T, A>

Convert a boxed slice into a vector by transferring ownership of\nthe existing heap allocation.

\n
§Examples
\n
let b: Box<[i32]> = vec![1, 2, 3].into_boxed_slice();\nassert_eq!(Vec::from(b), vec![1, 2, 3]);
\n
","From>","redstone::core::aggregator::Matrix"],["
1.14.0 · source§

impl<'a, T> From<Cow<'a, [T]>> for Vec<T>
where\n [T]: ToOwned<Owned = Vec<T>>,

source§

fn from(s: Cow<'a, [T]>) -> Vec<T>

Convert a clone-on-write slice into a vector.

\n

If s already owns a Vec<T>, it will be returned directly.\nIf s is borrowing a slice, a new Vec<T> will be allocated and\nfilled by cloning s’s items into it.

\n
§Examples
\n
let o: Cow<'_, [i32]> = Cow::Owned(vec![1, 2, 3]);\nlet b: Cow<'_, [i32]> = Cow::Borrowed(&[1, 2, 3]);\nassert_eq!(Vec::from(o), Vec::from(b));
\n
","From>","redstone::core::aggregator::Matrix"],["
1.10.0 · source§

impl<T, A> From<VecDeque<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn from(other: VecDeque<T, A>) -> Vec<T, A>

Turn a VecDeque<T> into a Vec<T>.

\n

This never needs to re-allocate, but does need to do O(n) data movement if\nthe circular buffer doesn’t happen to be at the beginning of the allocation.

\n
§Examples
\n
use std::collections::VecDeque;\n\n// This one is *O*(1).\nlet deque: VecDeque<_> = (1..5).collect();\nlet ptr = deque.as_slices().0.as_ptr();\nlet vec = Vec::from(deque);\nassert_eq!(vec, [1, 2, 3, 4]);\nassert_eq!(vec.as_ptr(), ptr);\n\n// This one needs data rearranging.\nlet mut deque: VecDeque<_> = (1..5).collect();\ndeque.push_front(9);\ndeque.push_front(8);\nlet ptr = deque.as_slices().1.as_ptr();\nlet vec = Vec::from(deque);\nassert_eq!(vec, [8, 9, 1, 2, 3, 4]);\nassert_eq!(vec.as_ptr(), ptr);
\n
","From>","redstone::core::aggregator::Matrix"],["
source§

impl FromBytesRepr<Vec<u8>> for U256

source§

fn from_bytes_repr(bytes: Vec<u8>) -> Self

","FromBytesRepr>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T> FromIterator<T> for Vec<T>

Collects an iterator into a Vec, commonly called via Iterator::collect()

\n

§Allocation behavior

\n

In general Vec does not guarantee any particular growth or allocation strategy.\nThat also applies to this trait impl.

\n

Note: This section covers implementation details and is therefore exempt from\nstability guarantees.

\n

Vec may use any or none of the following strategies,\ndepending on the supplied iterator:

\n
    \n
  • preallocate based on Iterator::size_hint()\n
      \n
    • and panic if the number of items is outside the provided lower/upper bounds
    • \n
    \n
  • \n
  • use an amortized growth strategy similar to pushing one item at a time
  • \n
  • perform the iteration in-place on the original allocation backing the iterator
  • \n
\n

The last case warrants some attention. It is an optimization that in many cases reduces peak memory\nconsumption and improves cache locality. But when big, short-lived allocations are created,\nonly a small fraction of their items get collected, no further use is made of the spare capacity\nand the resulting Vec is moved into a longer-lived structure, then this can lead to the large\nallocations having their lifetimes unnecessarily extended which can result in increased memory\nfootprint.

\n

In cases where this is an issue, the excess capacity can be discarded with Vec::shrink_to(),\nVec::shrink_to_fit() or by collecting into Box<[T]> instead, which additionally reduces\nthe size of the long-lived struct.

\n\n
static LONG_LIVED: Mutex<Vec<Vec<u16>>> = Mutex::new(Vec::new());\n\nfor i in 0..10 {\n    let big_temporary: Vec<u16> = (0..1024).collect();\n    // discard most items\n    let mut result: Vec<_> = big_temporary.into_iter().filter(|i| i % 100 == 0).collect();\n    // without this a lot of unused capacity might be moved into the global\n    result.shrink_to_fit();\n    LONG_LIVED.lock().unwrap().push(result);\n}
\n
source§

fn from_iter<I>(iter: I) -> Vec<T>
where\n I: IntoIterator<Item = T>,

Creates a value from an iterator. Read more
","FromIterator","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Hash for Vec<T, A>
where\n T: Hash,\n A: Allocator,

The hash of a vector is the same as that of the corresponding slice,\nas required by the core::borrow::Borrow implementation.

\n\n
use std::hash::BuildHasher;\n\nlet b = std::hash::RandomState::new();\nlet v: Vec<u8> = vec![0xa8, 0x3c, 0x09];\nlet s: &[u8] = &[0xa8, 0x3c, 0x09];\nassert_eq!(b.hash_one(v), b.hash_one(s));
\n
source§

fn hash<H>(&self, state: &mut H)
where\n H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, I, A> Index<I> for Vec<T, A>
where\n I: SliceIndex<[T]>,\n A: Allocator,

§

type Output = <I as SliceIndex<[T]>>::Output

The returned type after indexing.
source§

fn index(&self, index: I) -> &<Vec<T, A> as Index<I>>::Output

Performs the indexing (container[index]) operation. Read more
","Index","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, I, A> IndexMut<I> for Vec<T, A>
where\n I: SliceIndex<[T]>,\n A: Allocator,

source§

fn index_mut(&mut self, index: I) -> &mut <Vec<T, A> as Index<I>>::Output

Performs the mutable indexing (container[index]) operation. Read more
","IndexMut","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> IntoIterator for Vec<T, A>
where\n A: Allocator,

source§

fn into_iter(self) -> <Vec<T, A> as IntoIterator>::IntoIter

Creates a consuming iterator, that is, one that moves each value out of\nthe vector (from start to end). The vector cannot be used after calling\nthis.

\n
§Examples
\n
let v = vec![\"a\".to_string(), \"b\".to_string()];\nlet mut v_iter = v.into_iter();\n\nlet first_element: Option<String> = v_iter.next();\n\nassert_eq!(first_element, Some(\"a\".to_string()));\nassert_eq!(v_iter.next(), Some(\"b\".to_string()));\nassert_eq!(v_iter.next(), None);
\n
§

type Item = T

The type of the elements being iterated over.
§

type IntoIter = IntoIter<T, A>

Which kind of iterator are we turning this into?
","IntoIterator","redstone::core::aggregator::Matrix"],["
source§

impl<T> Median for Vec<T>
where\n T: Copy + Ord + Avg,

§

type Item = T

source§

fn median(self) -> Self::Item

","Median","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Ord for Vec<T, A>
where\n T: Ord,\n A: Allocator,

Implements ordering of vectors, lexicographically.

\n
source§

fn cmp(&self, other: &Vec<T, A>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
","Ord","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A> PartialEq<&[U]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &&[U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&[U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&[U]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A, const N: usize> PartialEq<&[U; N]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &&[U; N]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&[U; N]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&[U; N]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A> PartialEq<&mut [U]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &&mut [U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&mut [U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&mut [U]>","redstone::core::aggregator::Matrix"],["
1.48.0 · source§

impl<T, U, A> PartialEq<[U]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &[U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &[U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<[U]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A, const N: usize> PartialEq<[U; N]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &[U; N]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &[U; N]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<[U; N]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A1, A2> PartialEq<Vec<U, A2>> for Vec<T, A1>
where\n A1: Allocator,\n A2: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &Vec<U, A2>) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &Vec<U, A2>) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A1, A2> PartialOrd<Vec<T, A2>> for Vec<T, A1>
where\n T: PartialOrd,\n A1: Allocator,\n A2: Allocator,

Implements comparison of vectors, lexicographically.

\n
source§

fn partial_cmp(&self, other: &Vec<T, A2>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <=\noperator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >=\noperator. Read more
","PartialOrd>","redstone::core::aggregator::Matrix"],["
source§

impl<T> Vec<T>

1.0.0 (const: 1.39.0) · source

pub const fn new() -> Vec<T>

Constructs a new, empty Vec<T>.

\n

The vector will not allocate until elements are pushed onto it.

\n
§Examples
\n
let mut vec: Vec<i32> = Vec::new();
\n
1.0.0 · source

pub fn with_capacity(capacity: usize) -> Vec<T>

Constructs a new, empty Vec<T> with at least the specified capacity.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n

It is important to note that although the returned vector has the\nminimum capacity specified, the vector will have a zero length. For\nan explanation of the difference between length and capacity, see\nCapacity and reallocation.

\n

If it is important to know the exact allocated capacity of a Vec,\nalways use the capacity method after construction.

\n

For Vec<T> where T is a zero-sized type, there will be no allocation\nand the capacity will always be usize::MAX.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = Vec::with_capacity(10);\n\n// The vector contains no items, even though it has capacity for more\nassert_eq!(vec.len(), 0);\nassert!(vec.capacity() >= 10);\n\n// These are all done without reallocating...\nfor i in 0..10 {\n    vec.push(i);\n}\nassert_eq!(vec.len(), 10);\nassert!(vec.capacity() >= 10);\n\n// ...but this may make the vector reallocate\nvec.push(11);\nassert_eq!(vec.len(), 11);\nassert!(vec.capacity() >= 11);\n\n// A vector of a zero-sized type will always over-allocate, since no\n// allocation is necessary\nlet vec_units = Vec::<()>::with_capacity(10);\nassert_eq!(vec_units.capacity(), usize::MAX);
\n
source

pub fn try_with_capacity(capacity: usize) -> Result<Vec<T>, TryReserveError>

🔬This is a nightly-only experimental API. (try_with_capacity)

Constructs a new, empty Vec<T> with at least the specified capacity.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n
§Errors
\n

Returns an error if the capacity exceeds isize::MAX bytes,\nor if the allocator reports allocation failure.

\n
1.0.0 · source

pub unsafe fn from_raw_parts(\n ptr: *mut T,\n length: usize,\n capacity: usize,\n) -> Vec<T>

Creates a Vec<T> directly from a pointer, a length, and a capacity.

\n
§Safety
\n

This is highly unsafe, due to the number of invariants that aren’t\nchecked:

\n
    \n
  • ptr must have been allocated using the global allocator, such as via\nthe alloc::alloc function.
  • \n
  • T needs to have the same alignment as what ptr was allocated with.\n(T having a less strict alignment is not sufficient, the alignment really\nneeds to be equal to satisfy the dealloc requirement that memory must be\nallocated and deallocated with the same layout.)
  • \n
  • The size of T times the capacity (ie. the allocated size in bytes) needs\nto be the same size as the pointer was allocated with. (Because similar to\nalignment, dealloc must be called with the same layout size.)
  • \n
  • length needs to be less than or equal to capacity.
  • \n
  • The first length values must be properly initialized values of type T.
  • \n
  • capacity needs to be the capacity that the pointer was allocated with.
  • \n
  • The allocated size in bytes must be no larger than isize::MAX.\nSee the safety documentation of pointer::offset.
  • \n
\n

These requirements are always upheld by any ptr that has been allocated\nvia Vec<T>. Other allocation sources are allowed if the invariants are\nupheld.

\n

Violating these may cause problems like corrupting the allocator’s\ninternal data structures. For example it is normally not safe\nto build a Vec<u8> from a pointer to a C char array with length\nsize_t, doing so is only safe if the array was initially allocated by\na Vec or String.\nIt’s also not safe to build one from a Vec<u16> and its length, because\nthe allocator cares about the alignment, and these two types have different\nalignments. The buffer was allocated with alignment 2 (for u16), but after\nturning it into a Vec<u8> it’ll be deallocated with alignment 1. To avoid\nthese issues, it is often preferable to do casting/transmuting using\nslice::from_raw_parts instead.

\n

The ownership of ptr is effectively transferred to the\nVec<T> which may then deallocate, reallocate or change the\ncontents of memory pointed to by the pointer at will. Ensure\nthat nothing else uses the pointer after calling this\nfunction.

\n
§Examples
\n
use std::ptr;\nuse std::mem;\n\nlet v = vec![1, 2, 3];\n\n// Prevent running `v`'s destructor so we are in complete control\n// of the allocation.\nlet mut v = mem::ManuallyDrop::new(v);\n\n// Pull out the various important pieces of information about `v`\nlet p = v.as_mut_ptr();\nlet len = v.len();\nlet cap = v.capacity();\n\nunsafe {\n    // Overwrite memory with 4, 5, 6\n    for i in 0..len {\n        ptr::write(p.add(i), 4 + i);\n    }\n\n    // Put everything back together into a Vec\n    let rebuilt = Vec::from_raw_parts(p, len, cap);\n    assert_eq!(rebuilt, [4, 5, 6]);\n}
\n

Using memory that was allocated elsewhere:

\n\n
use std::alloc::{alloc, Layout};\n\nfn main() {\n    let layout = Layout::array::<u32>(16).expect(\"overflow cannot happen\");\n\n    let vec = unsafe {\n        let mem = alloc(layout).cast::<u32>();\n        if mem.is_null() {\n            return;\n        }\n\n        mem.write(1_000_000);\n\n        Vec::from_raw_parts(mem, 1, 16)\n    };\n\n    assert_eq!(vec, &[1_000_000]);\n    assert_eq!(vec.capacity(), 16);\n}
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n T: Clone,\n A: Allocator,

1.5.0 · source

pub fn resize(&mut self, new_len: usize, value: T)

Resizes the Vec in-place so that len is equal to new_len.

\n

If new_len is greater than len, the Vec is extended by the\ndifference, with each additional slot filled with value.\nIf new_len is less than len, the Vec is simply truncated.

\n

This method requires T to implement Clone,\nin order to be able to clone the passed value.\nIf you need more flexibility (or want to rely on Default instead of\nClone), use Vec::resize_with.\nIf you only need to resize to a smaller size, use Vec::truncate.

\n
§Examples
\n
let mut vec = vec![\"hello\"];\nvec.resize(3, \"world\");\nassert_eq!(vec, [\"hello\", \"world\", \"world\"]);\n\nlet mut vec = vec![1, 2, 3, 4];\nvec.resize(2, 0);\nassert_eq!(vec, [1, 2]);
\n
1.6.0 · source

pub fn extend_from_slice(&mut self, other: &[T])

Clones and appends all elements in a slice to the Vec.

\n

Iterates over the slice other, clones each element, and then appends\nit to this Vec. The other slice is traversed in-order.

\n

Note that this function is same as extend except that it is\nspecialized to work with slices instead. If and when Rust gets\nspecialization this function will likely be deprecated (but still\navailable).

\n
§Examples
\n
let mut vec = vec![1];\nvec.extend_from_slice(&[2, 3, 4]);\nassert_eq!(vec, [1, 2, 3, 4]);
\n
1.53.0 · source

pub fn extend_from_within<R>(&mut self, src: R)
where\n R: RangeBounds<usize>,

Copies elements from src range to the end of the vector.

\n
§Panics
\n

Panics if the starting point is greater than the end point or if\nthe end point is greater than the length of the vector.

\n
§Examples
\n
let mut vec = vec![0, 1, 2, 3, 4];\n\nvec.extend_from_within(2..);\nassert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4]);\n\nvec.extend_from_within(..2);\nassert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4, 0, 1]);\n\nvec.extend_from_within(4..8);\nassert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4, 0, 1, 4, 2, 3, 4]);
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n T: PartialEq,\n A: Allocator,

1.0.0 · source

pub fn dedup(&mut self)

Removes consecutive repeated elements in the vector according to the\nPartialEq trait implementation.

\n

If the vector is sorted, this removes all duplicates.

\n
§Examples
\n
let mut vec = vec![1, 2, 2, 3, 2];\n\nvec.dedup();\n\nassert_eq!(vec, [1, 2, 3, 2]);
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n A: Allocator,

1.21.0 · source

pub fn splice<R, I>(\n &mut self,\n range: R,\n replace_with: I,\n) -> Splice<'_, <I as IntoIterator>::IntoIter, A>
where\n R: RangeBounds<usize>,\n I: IntoIterator<Item = T>,

Creates a splicing iterator that replaces the specified range in the vector\nwith the given replace_with iterator and yields the removed items.\nreplace_with does not need to be the same length as range.

\n

range is removed even if the iterator is not consumed until the end.

\n

It is unspecified how many elements are removed from the vector\nif the Splice value is leaked.

\n

The input iterator replace_with is only consumed when the Splice value is dropped.

\n

This is optimal if:

\n
    \n
  • The tail (elements in the vector after range) is empty,
  • \n
  • or replace_with yields fewer or equal elements than range’s length
  • \n
  • or the lower bound of its size_hint() is exact.
  • \n
\n

Otherwise, a temporary vector is allocated and the tail is moved twice.

\n
§Panics
\n

Panics if the starting point is greater than the end point or if\nthe end point is greater than the length of the vector.

\n
§Examples
\n
let mut v = vec![1, 2, 3, 4];\nlet new = [7, 8, 9];\nlet u: Vec<_> = v.splice(1..3, new).collect();\nassert_eq!(v, &[1, 7, 8, 9, 4]);\nassert_eq!(u, &[2, 3]);
\n
source

pub fn extract_if<F>(&mut self, filter: F) -> ExtractIf<'_, T, F, A>
where\n F: FnMut(&mut T) -> bool,

🔬This is a nightly-only experimental API. (extract_if)

Creates an iterator which uses a closure to determine if an element should be removed.

\n

If the closure returns true, then the element is removed and yielded.\nIf the closure returns false, the element will remain in the vector and will not be yielded\nby the iterator.

\n

If the returned ExtractIf is not exhausted, e.g. because it is dropped without iterating\nor the iteration short-circuits, then the remaining elements will be retained.\nUse retain with a negated predicate if you do not need the returned iterator.

\n

Using this method is equivalent to the following code:

\n\n
let mut i = 0;\nwhile i < vec.len() {\n    if some_predicate(&mut vec[i]) {\n        let val = vec.remove(i);\n        // your code here\n    } else {\n        i += 1;\n    }\n}\n
\n

But extract_if is easier to use. extract_if is also more efficient,\nbecause it can backshift the elements of the array in bulk.

\n

Note that extract_if also lets you mutate every element in the filter closure,\nregardless of whether you choose to keep or remove it.

\n
§Examples
\n

Splitting an array into evens and odds, reusing the original allocation:

\n\n
#![feature(extract_if)]\nlet mut numbers = vec![1, 2, 3, 4, 5, 6, 8, 9, 11, 13, 14, 15];\n\nlet evens = numbers.extract_if(|x| *x % 2 == 0).collect::<Vec<_>>();\nlet odds = numbers;\n\nassert_eq!(evens, vec![2, 4, 6, 8, 14]);\nassert_eq!(odds, vec![1, 3, 5, 9, 11, 13, 15]);
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n A: Allocator,

source

pub const fn new_in(alloc: A) -> Vec<T, A>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new, empty Vec<T, A>.

\n

The vector will not allocate until elements are pushed onto it.

\n
§Examples
\n
#![feature(allocator_api)]\n\nuse std::alloc::System;\n\nlet mut vec: Vec<i32, _> = Vec::new_in(System);
\n
source

pub fn with_capacity_in(capacity: usize, alloc: A) -> Vec<T, A>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new, empty Vec<T, A> with at least the specified capacity\nwith the provided allocator.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n

It is important to note that although the returned vector has the\nminimum capacity specified, the vector will have a zero length. For\nan explanation of the difference between length and capacity, see\nCapacity and reallocation.

\n

If it is important to know the exact allocated capacity of a Vec,\nalways use the capacity method after construction.

\n

For Vec<T, A> where T is a zero-sized type, there will be no allocation\nand the capacity will always be usize::MAX.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
#![feature(allocator_api)]\n\nuse std::alloc::System;\n\nlet mut vec = Vec::with_capacity_in(10, System);\n\n// The vector contains no items, even though it has capacity for more\nassert_eq!(vec.len(), 0);\nassert!(vec.capacity() >= 10);\n\n// These are all done without reallocating...\nfor i in 0..10 {\n    vec.push(i);\n}\nassert_eq!(vec.len(), 10);\nassert!(vec.capacity() >= 10);\n\n// ...but this may make the vector reallocate\nvec.push(11);\nassert_eq!(vec.len(), 11);\nassert!(vec.capacity() >= 11);\n\n// A vector of a zero-sized type will always over-allocate, since no\n// allocation is necessary\nlet vec_units = Vec::<(), System>::with_capacity_in(10, System);\nassert_eq!(vec_units.capacity(), usize::MAX);
\n
source

pub fn try_with_capacity_in(\n capacity: usize,\n alloc: A,\n) -> Result<Vec<T, A>, TryReserveError>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new, empty Vec<T, A> with at least the specified capacity\nwith the provided allocator.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n
§Errors
\n

Returns an error if the capacity exceeds isize::MAX bytes,\nor if the allocator reports allocation failure.

\n
source

pub unsafe fn from_raw_parts_in(\n ptr: *mut T,\n length: usize,\n capacity: usize,\n alloc: A,\n) -> Vec<T, A>

🔬This is a nightly-only experimental API. (allocator_api)

Creates a Vec<T, A> directly from a pointer, a length, a capacity,\nand an allocator.

\n
§Safety
\n

This is highly unsafe, due to the number of invariants that aren’t\nchecked:

\n
    \n
  • ptr must be currently allocated via the given allocator alloc.
  • \n
  • T needs to have the same alignment as what ptr was allocated with.\n(T having a less strict alignment is not sufficient, the alignment really\nneeds to be equal to satisfy the dealloc requirement that memory must be\nallocated and deallocated with the same layout.)
  • \n
  • The size of T times the capacity (ie. the allocated size in bytes) needs\nto be the same size as the pointer was allocated with. (Because similar to\nalignment, dealloc must be called with the same layout size.)
  • \n
  • length needs to be less than or equal to capacity.
  • \n
  • The first length values must be properly initialized values of type T.
  • \n
  • capacity needs to fit the layout size that the pointer was allocated with.
  • \n
  • The allocated size in bytes must be no larger than isize::MAX.\nSee the safety documentation of pointer::offset.
  • \n
\n

These requirements are always upheld by any ptr that has been allocated\nvia Vec<T, A>. Other allocation sources are allowed if the invariants are\nupheld.

\n

Violating these may cause problems like corrupting the allocator’s\ninternal data structures. For example it is not safe\nto build a Vec<u8> from a pointer to a C char array with length size_t.\nIt’s also not safe to build one from a Vec<u16> and its length, because\nthe allocator cares about the alignment, and these two types have different\nalignments. The buffer was allocated with alignment 2 (for u16), but after\nturning it into a Vec<u8> it’ll be deallocated with alignment 1.

\n

The ownership of ptr is effectively transferred to the\nVec<T> which may then deallocate, reallocate or change the\ncontents of memory pointed to by the pointer at will. Ensure\nthat nothing else uses the pointer after calling this\nfunction.

\n
§Examples
\n
#![feature(allocator_api)]\n\nuse std::alloc::System;\n\nuse std::ptr;\nuse std::mem;\n\nlet mut v = Vec::with_capacity_in(3, System);\nv.push(1);\nv.push(2);\nv.push(3);\n\n// Prevent running `v`'s destructor so we are in complete control\n// of the allocation.\nlet mut v = mem::ManuallyDrop::new(v);\n\n// Pull out the various important pieces of information about `v`\nlet p = v.as_mut_ptr();\nlet len = v.len();\nlet cap = v.capacity();\nlet alloc = v.allocator();\n\nunsafe {\n    // Overwrite memory with 4, 5, 6\n    for i in 0..len {\n        ptr::write(p.add(i), 4 + i);\n    }\n\n    // Put everything back together into a Vec\n    let rebuilt = Vec::from_raw_parts_in(p, len, cap, alloc.clone());\n    assert_eq!(rebuilt, [4, 5, 6]);\n}
\n

Using memory that was allocated elsewhere:

\n\n
#![feature(allocator_api)]\n\nuse std::alloc::{AllocError, Allocator, Global, Layout};\n\nfn main() {\n    let layout = Layout::array::<u32>(16).expect(\"overflow cannot happen\");\n\n    let vec = unsafe {\n        let mem = match Global.allocate(layout) {\n            Ok(mem) => mem.cast::<u32>().as_ptr(),\n            Err(AllocError) => return,\n        };\n\n        mem.write(1_000_000);\n\n        Vec::from_raw_parts_in(mem, 1, 16, Global)\n    };\n\n    assert_eq!(vec, &[1_000_000]);\n    assert_eq!(vec.capacity(), 16);\n}
\n
source

pub fn into_raw_parts(self) -> (*mut T, usize, usize)

🔬This is a nightly-only experimental API. (vec_into_raw_parts)

Decomposes a Vec<T> into its raw components: (pointer, length, capacity).

\n

Returns the raw pointer to the underlying data, the length of\nthe vector (in elements), and the allocated capacity of the\ndata (in elements). These are the same arguments in the same\norder as the arguments to from_raw_parts.

\n

After calling this function, the caller is responsible for the\nmemory previously managed by the Vec. The only way to do\nthis is to convert the raw pointer, length, and capacity back\ninto a Vec with the from_raw_parts function, allowing\nthe destructor to perform the cleanup.

\n
§Examples
\n
#![feature(vec_into_raw_parts)]\nlet v: Vec<i32> = vec![-1, 0, 1];\n\nlet (ptr, len, cap) = v.into_raw_parts();\n\nlet rebuilt = unsafe {\n    // We can now make changes to the components, such as\n    // transmuting the raw pointer to a compatible type.\n    let ptr = ptr as *mut u32;\n\n    Vec::from_raw_parts(ptr, len, cap)\n};\nassert_eq!(rebuilt, [4294967295, 0, 1]);
\n
source

pub fn into_raw_parts_with_alloc(self) -> (*mut T, usize, usize, A)

🔬This is a nightly-only experimental API. (allocator_api)

Decomposes a Vec<T> into its raw components: (pointer, length, capacity, allocator).

\n

Returns the raw pointer to the underlying data, the length of the vector (in elements),\nthe allocated capacity of the data (in elements), and the allocator. These are the same\narguments in the same order as the arguments to from_raw_parts_in.

\n

After calling this function, the caller is responsible for the\nmemory previously managed by the Vec. The only way to do\nthis is to convert the raw pointer, length, and capacity back\ninto a Vec with the from_raw_parts_in function, allowing\nthe destructor to perform the cleanup.

\n
§Examples
\n
#![feature(allocator_api, vec_into_raw_parts)]\n\nuse std::alloc::System;\n\nlet mut v: Vec<i32, System> = Vec::new_in(System);\nv.push(-1);\nv.push(0);\nv.push(1);\n\nlet (ptr, len, cap, alloc) = v.into_raw_parts_with_alloc();\n\nlet rebuilt = unsafe {\n    // We can now make changes to the components, such as\n    // transmuting the raw pointer to a compatible type.\n    let ptr = ptr as *mut u32;\n\n    Vec::from_raw_parts_in(ptr, len, cap, alloc)\n};\nassert_eq!(rebuilt, [4294967295, 0, 1]);
\n
1.0.0 · source

pub fn capacity(&self) -> usize

Returns the total number of elements the vector can hold without\nreallocating.

\n
§Examples
\n
let mut vec: Vec<i32> = Vec::with_capacity(10);\nvec.push(42);\nassert!(vec.capacity() >= 10);
\n
1.0.0 · source

pub fn reserve(&mut self, additional: usize)

Reserves capacity for at least additional more elements to be inserted\nin the given Vec<T>. The collection may reserve more space to\nspeculatively avoid frequent reallocations. After calling reserve,\ncapacity will be greater than or equal to self.len() + additional.\nDoes nothing if capacity is already sufficient.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1];\nvec.reserve(10);\nassert!(vec.capacity() >= 11);
\n
1.0.0 · source

pub fn reserve_exact(&mut self, additional: usize)

Reserves the minimum capacity for at least additional more elements to\nbe inserted in the given Vec<T>. Unlike reserve, this will not\ndeliberately over-allocate to speculatively avoid frequent allocations.\nAfter calling reserve_exact, capacity will be greater than or equal to\nself.len() + additional. Does nothing if the capacity is already\nsufficient.

\n

Note that the allocator may give the collection more space than it\nrequests. Therefore, capacity can not be relied upon to be precisely\nminimal. Prefer reserve if future insertions are expected.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1];\nvec.reserve_exact(10);\nassert!(vec.capacity() >= 11);
\n
1.57.0 · source

pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>

Tries to reserve capacity for at least additional more elements to be inserted\nin the given Vec<T>. The collection may reserve more space to speculatively avoid\nfrequent reallocations. After calling try_reserve, capacity will be\ngreater than or equal to self.len() + additional if it returns\nOk(()). Does nothing if capacity is already sufficient. This method\npreserves the contents even if an error occurs.

\n
§Errors
\n

If the capacity overflows, or the allocator reports a failure, then an error\nis returned.

\n
§Examples
\n
use std::collections::TryReserveError;\n\nfn process_data(data: &[u32]) -> Result<Vec<u32>, TryReserveError> {\n    let mut output = Vec::new();\n\n    // Pre-reserve the memory, exiting if we can't\n    output.try_reserve(data.len())?;\n\n    // Now we know this can't OOM in the middle of our complex work\n    output.extend(data.iter().map(|&val| {\n        val * 2 + 5 // very complicated\n    }));\n\n    Ok(output)\n}
\n
1.57.0 · source

pub fn try_reserve_exact(\n &mut self,\n additional: usize,\n) -> Result<(), TryReserveError>

Tries to reserve the minimum capacity for at least additional\nelements to be inserted in the given Vec<T>. Unlike try_reserve,\nthis will not deliberately over-allocate to speculatively avoid frequent\nallocations. After calling try_reserve_exact, capacity will be greater\nthan or equal to self.len() + additional if it returns Ok(()).\nDoes nothing if the capacity is already sufficient.

\n

Note that the allocator may give the collection more space than it\nrequests. Therefore, capacity can not be relied upon to be precisely\nminimal. Prefer try_reserve if future insertions are expected.

\n
§Errors
\n

If the capacity overflows, or the allocator reports a failure, then an error\nis returned.

\n
§Examples
\n
use std::collections::TryReserveError;\n\nfn process_data(data: &[u32]) -> Result<Vec<u32>, TryReserveError> {\n    let mut output = Vec::new();\n\n    // Pre-reserve the memory, exiting if we can't\n    output.try_reserve_exact(data.len())?;\n\n    // Now we know this can't OOM in the middle of our complex work\n    output.extend(data.iter().map(|&val| {\n        val * 2 + 5 // very complicated\n    }));\n\n    Ok(output)\n}
\n
1.0.0 · source

pub fn shrink_to_fit(&mut self)

Shrinks the capacity of the vector as much as possible.

\n

The behavior of this method depends on the allocator, which may either shrink the vector\nin-place or reallocate. The resulting vector might still have some excess capacity, just as\nis the case for with_capacity. See Allocator::shrink for more details.

\n
§Examples
\n
let mut vec = Vec::with_capacity(10);\nvec.extend([1, 2, 3]);\nassert!(vec.capacity() >= 10);\nvec.shrink_to_fit();\nassert!(vec.capacity() >= 3);
\n
1.56.0 · source

pub fn shrink_to(&mut self, min_capacity: usize)

Shrinks the capacity of the vector with a lower bound.

\n

The capacity will remain at least as large as both the length\nand the supplied value.

\n

If the current capacity is less than the lower limit, this is a no-op.

\n
§Examples
\n
let mut vec = Vec::with_capacity(10);\nvec.extend([1, 2, 3]);\nassert!(vec.capacity() >= 10);\nvec.shrink_to(4);\nassert!(vec.capacity() >= 4);\nvec.shrink_to(0);\nassert!(vec.capacity() >= 3);
\n
1.0.0 · source

pub fn into_boxed_slice(self) -> Box<[T], A>

Converts the vector into Box<[T]>.

\n

Before doing the conversion, this method discards excess capacity like shrink_to_fit.

\n
§Examples
\n
let v = vec![1, 2, 3];\n\nlet slice = v.into_boxed_slice();
\n

Any excess capacity is removed:

\n\n
let mut vec = Vec::with_capacity(10);\nvec.extend([1, 2, 3]);\n\nassert!(vec.capacity() >= 10);\nlet slice = vec.into_boxed_slice();\nassert_eq!(slice.into_vec().capacity(), 3);
\n
1.0.0 · source

pub fn truncate(&mut self, len: usize)

Shortens the vector, keeping the first len elements and dropping\nthe rest.

\n

If len is greater or equal to the vector’s current length, this has\nno effect.

\n

The drain method can emulate truncate, but causes the excess\nelements to be returned instead of dropped.

\n

Note that this method has no effect on the allocated capacity\nof the vector.

\n
§Examples
\n

Truncating a five element vector to two elements:

\n\n
let mut vec = vec![1, 2, 3, 4, 5];\nvec.truncate(2);\nassert_eq!(vec, [1, 2]);
\n

No truncation occurs when len is greater than the vector’s current\nlength:

\n\n
let mut vec = vec![1, 2, 3];\nvec.truncate(8);\nassert_eq!(vec, [1, 2, 3]);
\n

Truncating when len == 0 is equivalent to calling the clear\nmethod.

\n\n
let mut vec = vec![1, 2, 3];\nvec.truncate(0);\nassert_eq!(vec, []);
\n
1.7.0 · source

pub fn as_slice(&self) -> &[T]

Extracts a slice containing the entire vector.

\n

Equivalent to &s[..].

\n
§Examples
\n
use std::io::{self, Write};\nlet buffer = vec![1, 2, 3, 5, 8];\nio::sink().write(buffer.as_slice()).unwrap();
\n
1.7.0 · source

pub fn as_mut_slice(&mut self) -> &mut [T]

Extracts a mutable slice of the entire vector.

\n

Equivalent to &mut s[..].

\n
§Examples
\n
use std::io::{self, Read};\nlet mut buffer = vec![0; 3];\nio::repeat(0b101).read_exact(buffer.as_mut_slice()).unwrap();
\n
1.37.0 · source

pub fn as_ptr(&self) -> *const T

Returns a raw pointer to the vector’s buffer, or a dangling raw pointer\nvalid for zero sized reads if the vector didn’t allocate.

\n

The caller must ensure that the vector outlives the pointer this\nfunction returns, or else it will end up pointing to garbage.\nModifying the vector may cause its buffer to be reallocated,\nwhich would also make any pointers to it invalid.

\n

The caller must also ensure that the memory the pointer (non-transitively) points to\nis never written to (except inside an UnsafeCell) using this pointer or any pointer\nderived from it. If you need to mutate the contents of the slice, use as_mut_ptr.

\n

This method guarantees that for the purpose of the aliasing model, this method\ndoes not materialize a reference to the underlying slice, and thus the returned pointer\nwill remain valid when mixed with other calls to as_ptr and as_mut_ptr.\nNote that calling other methods that materialize mutable references to the slice,\nor mutable references to specific elements you are planning on accessing through this pointer,\nas well as writing to those elements, may still invalidate this pointer.\nSee the second example below for how this guarantee can be used.

\n
§Examples
\n
let x = vec![1, 2, 4];\nlet x_ptr = x.as_ptr();\n\nunsafe {\n    for i in 0..x.len() {\n        assert_eq!(*x_ptr.add(i), 1 << i);\n    }\n}
\n

Due to the aliasing guarantee, the following code is legal:

\n\n
unsafe {\n    let mut v = vec![0, 1, 2];\n    let ptr1 = v.as_ptr();\n    let _ = ptr1.read();\n    let ptr2 = v.as_mut_ptr().offset(2);\n    ptr2.write(2);\n    // Notably, the write to `ptr2` did *not* invalidate `ptr1`\n    // because it mutated a different element:\n    let _ = ptr1.read();\n}
\n
1.37.0 · source

pub fn as_mut_ptr(&mut self) -> *mut T

Returns an unsafe mutable pointer to the vector’s buffer, or a dangling\nraw pointer valid for zero sized reads if the vector didn’t allocate.

\n

The caller must ensure that the vector outlives the pointer this\nfunction returns, or else it will end up pointing to garbage.\nModifying the vector may cause its buffer to be reallocated,\nwhich would also make any pointers to it invalid.

\n

This method guarantees that for the purpose of the aliasing model, this method\ndoes not materialize a reference to the underlying slice, and thus the returned pointer\nwill remain valid when mixed with other calls to as_ptr and as_mut_ptr.\nNote that calling other methods that materialize references to the slice,\nor references to specific elements you are planning on accessing through this pointer,\nmay still invalidate this pointer.\nSee the second example below for how this guarantee can be used.

\n
§Examples
\n
// Allocate vector big enough for 4 elements.\nlet size = 4;\nlet mut x: Vec<i32> = Vec::with_capacity(size);\nlet x_ptr = x.as_mut_ptr();\n\n// Initialize elements via raw pointer writes, then set length.\nunsafe {\n    for i in 0..size {\n        *x_ptr.add(i) = i as i32;\n    }\n    x.set_len(size);\n}\nassert_eq!(&*x, &[0, 1, 2, 3]);
\n

Due to the aliasing guarantee, the following code is legal:

\n\n
unsafe {\n    let mut v = vec![0];\n    let ptr1 = v.as_mut_ptr();\n    ptr1.write(1);\n    let ptr2 = v.as_mut_ptr();\n    ptr2.write(2);\n    // Notably, the write to `ptr2` did *not* invalidate `ptr1`:\n    ptr1.write(3);\n}
\n
source

pub fn allocator(&self) -> &A

🔬This is a nightly-only experimental API. (allocator_api)

Returns a reference to the underlying allocator.

\n
1.0.0 · source

pub unsafe fn set_len(&mut self, new_len: usize)

Forces the length of the vector to new_len.

\n

This is a low-level operation that maintains none of the normal\ninvariants of the type. Normally changing the length of a vector\nis done using one of the safe operations instead, such as\ntruncate, resize, extend, or clear.

\n
§Safety
\n
    \n
  • new_len must be less than or equal to capacity().
  • \n
  • The elements at old_len..new_len must be initialized.
  • \n
\n
§Examples
\n

This method can be useful for situations in which the vector\nis serving as a buffer for other code, particularly over FFI:

\n\n
pub fn get_dictionary(&self) -> Option<Vec<u8>> {\n    // Per the FFI method's docs, \"32768 bytes is always enough\".\n    let mut dict = Vec::with_capacity(32_768);\n    let mut dict_length = 0;\n    // SAFETY: When `deflateGetDictionary` returns `Z_OK`, it holds that:\n    // 1. `dict_length` elements were initialized.\n    // 2. `dict_length` <= the capacity (32_768)\n    // which makes `set_len` safe to call.\n    unsafe {\n        // Make the FFI call...\n        let r = deflateGetDictionary(self.strm, dict.as_mut_ptr(), &mut dict_length);\n        if r == Z_OK {\n            // ...and update the length to what was initialized.\n            dict.set_len(dict_length);\n            Some(dict)\n        } else {\n            None\n        }\n    }\n}
\n

While the following example is sound, there is a memory leak since\nthe inner vectors were not freed prior to the set_len call:

\n\n
let mut vec = vec![vec![1, 0, 0],\n                   vec![0, 1, 0],\n                   vec![0, 0, 1]];\n// SAFETY:\n// 1. `old_len..0` is empty so no elements need to be initialized.\n// 2. `0 <= capacity` always holds whatever `capacity` is.\nunsafe {\n    vec.set_len(0);\n}
\n

Normally, here, one would use clear instead to correctly drop\nthe contents and thus not leak memory.

\n
1.0.0 · source

pub fn swap_remove(&mut self, index: usize) -> T

Removes an element from the vector and returns it.

\n

The removed element is replaced by the last element of the vector.

\n

This does not preserve ordering of the remaining elements, but is O(1).\nIf you need to preserve the element order, use remove instead.

\n
§Panics
\n

Panics if index is out of bounds.

\n
§Examples
\n
let mut v = vec![\"foo\", \"bar\", \"baz\", \"qux\"];\n\nassert_eq!(v.swap_remove(1), \"bar\");\nassert_eq!(v, [\"foo\", \"qux\", \"baz\"]);\n\nassert_eq!(v.swap_remove(0), \"foo\");\nassert_eq!(v, [\"baz\", \"qux\"]);
\n
1.0.0 · source

pub fn insert(&mut self, index: usize, element: T)

Inserts an element at position index within the vector, shifting all\nelements after it to the right.

\n
§Panics
\n

Panics if index > len.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nvec.insert(1, 4);\nassert_eq!(vec, [1, 4, 2, 3]);\nvec.insert(4, 5);\nassert_eq!(vec, [1, 4, 2, 3, 5]);
\n
§Time complexity
\n

Takes O(Vec::len) time. All items after the insertion index must be\nshifted to the right. In the worst case, all elements are shifted when\nthe insertion index is 0.

\n
1.0.0 · source

pub fn remove(&mut self, index: usize) -> T

Removes and returns the element at position index within the vector,\nshifting all elements after it to the left.

\n

Note: Because this shifts over the remaining elements, it has a\nworst-case performance of O(n). If you don’t need the order of elements\nto be preserved, use swap_remove instead. If you’d like to remove\nelements from the beginning of the Vec, consider using\nVecDeque::pop_front instead.

\n
§Panics
\n

Panics if index is out of bounds.

\n
§Examples
\n
let mut v = vec![1, 2, 3];\nassert_eq!(v.remove(1), 2);\nassert_eq!(v, [1, 3]);
\n
1.0.0 · source

pub fn retain<F>(&mut self, f: F)
where\n F: FnMut(&T) -> bool,

Retains only the elements specified by the predicate.

\n

In other words, remove all elements e for which f(&e) returns false.\nThis method operates in place, visiting each element exactly once in the\noriginal order, and preserves the order of the retained elements.

\n
§Examples
\n
let mut vec = vec![1, 2, 3, 4];\nvec.retain(|&x| x % 2 == 0);\nassert_eq!(vec, [2, 4]);
\n

Because the elements are visited exactly once in the original order,\nexternal state may be used to decide which elements to keep.

\n\n
let mut vec = vec![1, 2, 3, 4, 5];\nlet keep = [false, true, true, false, true];\nlet mut iter = keep.iter();\nvec.retain(|_| *iter.next().unwrap());\nassert_eq!(vec, [2, 3, 5]);
\n
1.61.0 · source

pub fn retain_mut<F>(&mut self, f: F)
where\n F: FnMut(&mut T) -> bool,

Retains only the elements specified by the predicate, passing a mutable reference to it.

\n

In other words, remove all elements e such that f(&mut e) returns false.\nThis method operates in place, visiting each element exactly once in the\noriginal order, and preserves the order of the retained elements.

\n
§Examples
\n
let mut vec = vec![1, 2, 3, 4];\nvec.retain_mut(|x| if *x <= 3 {\n    *x += 1;\n    true\n} else {\n    false\n});\nassert_eq!(vec, [2, 3, 4]);
\n
1.16.0 · source

pub fn dedup_by_key<F, K>(&mut self, key: F)
where\n F: FnMut(&mut T) -> K,\n K: PartialEq,

Removes all but the first of consecutive elements in the vector that resolve to the same\nkey.

\n

If the vector is sorted, this removes all duplicates.

\n
§Examples
\n
let mut vec = vec![10, 20, 21, 30, 20];\n\nvec.dedup_by_key(|i| *i / 10);\n\nassert_eq!(vec, [10, 20, 30, 20]);
\n
1.16.0 · source

pub fn dedup_by<F>(&mut self, same_bucket: F)
where\n F: FnMut(&mut T, &mut T) -> bool,

Removes all but the first of consecutive elements in the vector satisfying a given equality\nrelation.

\n

The same_bucket function is passed references to two elements from the vector and\nmust determine if the elements compare equal. The elements are passed in opposite order\nfrom their order in the slice, so if same_bucket(a, b) returns true, a is removed.

\n

If the vector is sorted, this removes all duplicates.

\n
§Examples
\n
let mut vec = vec![\"foo\", \"bar\", \"Bar\", \"baz\", \"bar\"];\n\nvec.dedup_by(|a, b| a.eq_ignore_ascii_case(b));\n\nassert_eq!(vec, [\"foo\", \"bar\", \"baz\", \"bar\"]);
\n
1.0.0 · source

pub fn push(&mut self, value: T)

Appends an element to the back of a collection.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1, 2];\nvec.push(3);\nassert_eq!(vec, [1, 2, 3]);
\n
§Time complexity
\n

Takes amortized O(1) time. If the vector’s length would exceed its\ncapacity after the push, O(capacity) time is taken to copy the\nvector’s elements to a larger allocation. This expensive operation is\noffset by the capacity O(1) insertions it allows.

\n
source

pub fn push_within_capacity(&mut self, value: T) -> Result<(), T>

🔬This is a nightly-only experimental API. (vec_push_within_capacity)

Appends an element if there is sufficient spare capacity, otherwise an error is returned\nwith the element.

\n

Unlike push this method will not reallocate when there’s insufficient capacity.\nThe caller should use reserve or try_reserve to ensure that there is enough capacity.

\n
§Examples
\n

A manual, panic-free alternative to FromIterator:

\n\n
#![feature(vec_push_within_capacity)]\n\nuse std::collections::TryReserveError;\nfn from_iter_fallible<T>(iter: impl Iterator<Item=T>) -> Result<Vec<T>, TryReserveError> {\n    let mut vec = Vec::new();\n    for value in iter {\n        if let Err(value) = vec.push_within_capacity(value) {\n            vec.try_reserve(1)?;\n            // this cannot fail, the previous line either returned or added at least 1 free slot\n            let _ = vec.push_within_capacity(value);\n        }\n    }\n    Ok(vec)\n}\nassert_eq!(from_iter_fallible(0..100), Ok(Vec::from_iter(0..100)));
\n
§Time complexity
\n

Takes O(1) time.

\n
1.0.0 · source

pub fn pop(&mut self) -> Option<T>

Removes the last element from a vector and returns it, or None if it\nis empty.

\n

If you’d like to pop the first element, consider using\nVecDeque::pop_front instead.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nassert_eq!(vec.pop(), Some(3));\nassert_eq!(vec, [1, 2]);
\n
§Time complexity
\n

Takes O(1) time.

\n
source

pub fn pop_if<F>(&mut self, f: F) -> Option<T>
where\n F: FnOnce(&mut T) -> bool,

🔬This is a nightly-only experimental API. (vec_pop_if)

Removes and returns the last element in a vector if the predicate\nreturns true, or None if the predicate returns false or the vector\nis empty.

\n
§Examples
\n
#![feature(vec_pop_if)]\n\nlet mut vec = vec![1, 2, 3, 4];\nlet pred = |x: &mut i32| *x % 2 == 0;\n\nassert_eq!(vec.pop_if(pred), Some(4));\nassert_eq!(vec, [1, 2, 3]);\nassert_eq!(vec.pop_if(pred), None);
\n
1.4.0 · source

pub fn append(&mut self, other: &mut Vec<T, A>)

Moves all the elements of other into self, leaving other empty.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nlet mut vec2 = vec![4, 5, 6];\nvec.append(&mut vec2);\nassert_eq!(vec, [1, 2, 3, 4, 5, 6]);\nassert_eq!(vec2, []);
\n
1.6.0 · source

pub fn drain<R>(&mut self, range: R) -> Drain<'_, T, A>
where\n R: RangeBounds<usize>,

Removes the specified range from the vector in bulk, returning all\nremoved elements as an iterator. If the iterator is dropped before\nbeing fully consumed, it drops the remaining removed elements.

\n

The returned iterator keeps a mutable borrow on the vector to optimize\nits implementation.

\n
§Panics
\n

Panics if the starting point is greater than the end point or if\nthe end point is greater than the length of the vector.

\n
§Leaking
\n

If the returned iterator goes out of scope without being dropped (due to\nmem::forget, for example), the vector may have lost and leaked\nelements arbitrarily, including elements outside the range.

\n
§Examples
\n
let mut v = vec![1, 2, 3];\nlet u: Vec<_> = v.drain(1..).collect();\nassert_eq!(v, &[1]);\nassert_eq!(u, &[2, 3]);\n\n// A full range clears the vector, like `clear()` does\nv.drain(..);\nassert_eq!(v, &[]);
\n
1.0.0 · source

pub fn clear(&mut self)

Clears the vector, removing all values.

\n

Note that this method has no effect on the allocated capacity\nof the vector.

\n
§Examples
\n
let mut v = vec![1, 2, 3];\n\nv.clear();\n\nassert!(v.is_empty());
\n
1.0.0 · source

pub fn len(&self) -> usize

Returns the number of elements in the vector, also referred to\nas its ‘length’.

\n
§Examples
\n
let a = vec![1, 2, 3];\nassert_eq!(a.len(), 3);
\n
1.0.0 · source

pub fn is_empty(&self) -> bool

Returns true if the vector contains no elements.

\n
§Examples
\n
let mut v = Vec::new();\nassert!(v.is_empty());\n\nv.push(1);\nassert!(!v.is_empty());
\n
1.4.0 · source

pub fn split_off(&mut self, at: usize) -> Vec<T, A>
where\n A: Clone,

Splits the collection into two at the given index.

\n

Returns a newly allocated vector containing the elements in the range\n[at, len). After the call, the original vector will be left containing\nthe elements [0, at) with its previous capacity unchanged.

\n
    \n
  • If you want to take ownership of the entire contents and capacity of\nthe vector, see mem::take or mem::replace.
  • \n
  • If you don’t need the returned vector at all, see Vec::truncate.
  • \n
  • If you want to take ownership of an arbitrary subslice, or you don’t\nnecessarily want to store the removed items in a vector, see Vec::drain.
  • \n
\n
§Panics
\n

Panics if at > len.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nlet vec2 = vec.split_off(1);\nassert_eq!(vec, [1]);\nassert_eq!(vec2, [2, 3]);
\n
1.33.0 · source

pub fn resize_with<F>(&mut self, new_len: usize, f: F)
where\n F: FnMut() -> T,

Resizes the Vec in-place so that len is equal to new_len.

\n

If new_len is greater than len, the Vec is extended by the\ndifference, with each additional slot filled with the result of\ncalling the closure f. The return values from f will end up\nin the Vec in the order they have been generated.

\n

If new_len is less than len, the Vec is simply truncated.

\n

This method uses a closure to create new values on every push. If\nyou’d rather Clone a given value, use Vec::resize. If you\nwant to use the Default trait to generate values, you can\npass Default::default as the second argument.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nvec.resize_with(5, Default::default);\nassert_eq!(vec, [1, 2, 3, 0, 0]);\n\nlet mut vec = vec![];\nlet mut p = 1;\nvec.resize_with(4, || { p *= 2; p });\nassert_eq!(vec, [2, 4, 8, 16]);
\n
1.47.0 · source

pub fn leak<'a>(self) -> &'a mut [T]
where\n A: 'a,

Consumes and leaks the Vec, returning a mutable reference to the contents,\n&'a mut [T]. Note that the type T must outlive the chosen lifetime\n'a. If the type has only static references, or none at all, then this\nmay be chosen to be 'static.

\n

As of Rust 1.57, this method does not reallocate or shrink the Vec,\nso the leaked allocation may include unused capacity that is not part\nof the returned slice.

\n

This function is mainly useful for data that lives for the remainder of\nthe program’s life. Dropping the returned reference will cause a memory\nleak.

\n
§Examples
\n

Simple usage:

\n\n
let x = vec![1, 2, 3];\nlet static_ref: &'static mut [usize] = x.leak();\nstatic_ref[0] += 1;\nassert_eq!(static_ref, &[2, 2, 3]);
\n
1.60.0 · source

pub fn spare_capacity_mut(&mut self) -> &mut [MaybeUninit<T>]

Returns the remaining spare capacity of the vector as a slice of\nMaybeUninit<T>.

\n

The returned slice can be used to fill the vector with data (e.g. by\nreading from a file) before marking the data as initialized using the\nset_len method.

\n
§Examples
\n
// Allocate vector big enough for 10 elements.\nlet mut v = Vec::with_capacity(10);\n\n// Fill in the first 3 elements.\nlet uninit = v.spare_capacity_mut();\nuninit[0].write(0);\nuninit[1].write(1);\nuninit[2].write(2);\n\n// Mark the first 3 elements of the vector as being initialized.\nunsafe {\n    v.set_len(3);\n}\n\nassert_eq!(&v, &[0, 1, 2]);
\n
source

pub fn split_at_spare_mut(&mut self) -> (&mut [T], &mut [MaybeUninit<T>])

🔬This is a nightly-only experimental API. (vec_split_at_spare)

Returns vector content as a slice of T, along with the remaining spare\ncapacity of the vector as a slice of MaybeUninit<T>.

\n

The returned spare capacity slice can be used to fill the vector with data\n(e.g. by reading from a file) before marking the data as initialized using\nthe set_len method.

\n

Note that this is a low-level API, which should be used with care for\noptimization purposes. If you need to append data to a Vec\nyou can use push, extend, extend_from_slice,\nextend_from_within, insert, append, resize or\nresize_with, depending on your exact needs.

\n
§Examples
\n
#![feature(vec_split_at_spare)]\n\nlet mut v = vec![1, 1, 2];\n\n// Reserve additional space big enough for 10 elements.\nv.reserve(10);\n\nlet (init, uninit) = v.split_at_spare_mut();\nlet sum = init.iter().copied().sum::<u32>();\n\n// Fill in the next 4 elements.\nuninit[0].write(sum);\nuninit[1].write(sum * 2);\nuninit[2].write(sum * 3);\nuninit[3].write(sum * 4);\n\n// Mark the 4 elements of the vector as being initialized.\nunsafe {\n    let len = v.len();\n    v.set_len(len + 4);\n}\n\nassert_eq!(&v, &[1, 1, 2, 4, 8, 12, 16]);
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> DerefPure for Vec<T, A>
where\n A: Allocator,

","DerefPure","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Eq for Vec<T, A>
where\n T: Eq,\n A: Allocator,

","Eq","redstone::core::aggregator::Matrix"]] +"redstone":[["
1.5.0 · source§

impl<T, A> AsMut<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn as_mut(&mut self) -> &mut [T]

Converts this type into a mutable reference of the (usually inferred) input type.
","AsMut<[T]>","redstone::core::aggregator::Matrix"],["
1.5.0 · source§

impl<T, A> AsMut<Vec<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn as_mut(&mut self) -> &mut Vec<T, A>

Converts this type into a mutable reference of the (usually inferred) input type.
","AsMut>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> AsRef<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn as_ref(&self) -> &[T]

Converts this type into a shared reference of the (usually inferred) input type.
","AsRef<[T]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> AsRef<Vec<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn as_ref(&self) -> &Vec<T, A>

Converts this type into a shared reference of the (usually inferred) input type.
","AsRef>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Borrow<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn borrow(&self) -> &[T]

Immutably borrows from an owned value. Read more
","Borrow<[T]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> BorrowMut<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn borrow_mut(&mut self) -> &mut [T]

Mutably borrows from an owned value. Read more
","BorrowMut<[T]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Clone for Vec<T, A>
where\n T: Clone,\n A: Allocator + Clone,

source§

fn clone_from(&mut self, source: &Vec<T, A>)

Overwrites the contents of self with a clone of the contents of source.

\n

This method is preferred over simply assigning source.clone() to self,\nas it avoids reallocation if possible. Additionally, if the element type\nT overrides clone_from(), this will reuse the resources of self’s\nelements as well.

\n
§Examples
\n
let x = vec![5, 6, 7];\nlet mut y = vec![8, 9, 10];\nlet yp: *const i32 = y.as_ptr();\n\ny.clone_from(&x);\n\n// The value is the same\nassert_eq!(x, y);\n\n// And no reallocation occurred\nassert_eq!(yp, y.as_ptr());
\n
source§

fn clone(&self) -> Vec<T, A>

Returns a copy of the value. Read more
","Clone","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Debug for Vec<T, A>
where\n T: Debug,\n A: Allocator,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T> Default for Vec<T>

source§

fn default() -> Vec<T>

Creates an empty Vec<T>.

\n

The vector will not allocate until elements are pushed onto it.

\n
","Default","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Deref for Vec<T, A>
where\n A: Allocator,

§

type Target = [T]

The resulting type after dereferencing.
source§

fn deref(&self) -> &[T]

Dereferences the value.
","Deref","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> DerefMut for Vec<T, A>
where\n A: Allocator,

source§

fn deref_mut(&mut self) -> &mut [T]

Mutably dereferences the value.
","DerefMut","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Drop for Vec<T, A>
where\n A: Allocator,

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
","Drop","redstone::core::aggregator::Matrix"],["
1.2.0 · source§

impl<'a, T, A> Extend<&'a T> for Vec<T, A>
where\n T: Copy + 'a,\n A: Allocator,

Extend implementation that copies elements out of references before pushing them onto the Vec.

\n

This implementation is specialized for slice iterators, where it uses copy_from_slice to\nappend the entire slice at once.

\n
source§

fn extend<I>(&mut self, iter: I)
where\n I: IntoIterator<Item = &'a T>,

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, _: &'a T)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
","Extend<&'a T>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Extend<T> for Vec<T, A>
where\n A: Allocator,

source§

fn extend<I>(&mut self, iter: I)
where\n I: IntoIterator<Item = T>,

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: T)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
","Extend","redstone::core::aggregator::Matrix"],["
source§

impl Flattened<<Std as NetworkSpecific>::BytesRepr> for Vec<Bytes>

","Flattened<::BytesRepr>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T> From<&[T]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &[T]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&[1, 2, 3][..]), vec![1, 2, 3]);
\n
","From<&[T]>","redstone::core::aggregator::Matrix"],["
1.74.0 · source§

impl<T, const N: usize> From<&[T; N]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &[T; N]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&[1, 2, 3]), vec![1, 2, 3]);
\n
","From<&[T; N]>","redstone::core::aggregator::Matrix"],["
1.19.0 · source§

impl<T> From<&mut [T]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &mut [T]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&mut [1, 2, 3][..]), vec![1, 2, 3]);
\n
","From<&mut [T]>","redstone::core::aggregator::Matrix"],["
1.74.0 · source§

impl<T, const N: usize> From<&mut [T; N]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &mut [T; N]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&mut [1, 2, 3]), vec![1, 2, 3]);
\n
","From<&mut [T; N]>","redstone::core::aggregator::Matrix"],["
1.44.0 · source§

impl<T, const N: usize> From<[T; N]> for Vec<T>

source§

fn from(s: [T; N]) -> Vec<T>

Allocate a Vec<T> and move s’s items into it.

\n
§Examples
\n
assert_eq!(Vec::from([1, 2, 3]), vec![1, 2, 3]);
\n
","From<[T; N]>","redstone::core::aggregator::Matrix"],["
1.5.0 · source§

impl<T, A> From<BinaryHeap<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn from(heap: BinaryHeap<T, A>) -> Vec<T, A>

Converts a BinaryHeap<T> into a Vec<T>.

\n

This conversion requires no data movement or allocation, and has\nconstant time complexity.

\n
","From>","redstone::core::aggregator::Matrix"],["
1.18.0 · source§

impl<T, A> From<Box<[T], A>> for Vec<T, A>
where\n A: Allocator,

source§

fn from(s: Box<[T], A>) -> Vec<T, A>

Convert a boxed slice into a vector by transferring ownership of\nthe existing heap allocation.

\n
§Examples
\n
let b: Box<[i32]> = vec![1, 2, 3].into_boxed_slice();\nassert_eq!(Vec::from(b), vec![1, 2, 3]);
\n
","From>","redstone::core::aggregator::Matrix"],["
1.14.0 · source§

impl<'a, T> From<Cow<'a, [T]>> for Vec<T>
where\n [T]: ToOwned<Owned = Vec<T>>,

source§

fn from(s: Cow<'a, [T]>) -> Vec<T>

Convert a clone-on-write slice into a vector.

\n

If s already owns a Vec<T>, it will be returned directly.\nIf s is borrowing a slice, a new Vec<T> will be allocated and\nfilled by cloning s’s items into it.

\n
§Examples
\n
let o: Cow<'_, [i32]> = Cow::Owned(vec![1, 2, 3]);\nlet b: Cow<'_, [i32]> = Cow::Borrowed(&[1, 2, 3]);\nassert_eq!(Vec::from(o), Vec::from(b));
\n
","From>","redstone::core::aggregator::Matrix"],["
1.10.0 · source§

impl<T, A> From<VecDeque<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn from(other: VecDeque<T, A>) -> Vec<T, A>

Turn a VecDeque<T> into a Vec<T>.

\n

This never needs to re-allocate, but does need to do O(n) data movement if\nthe circular buffer doesn’t happen to be at the beginning of the allocation.

\n
§Examples
\n
use std::collections::VecDeque;\n\n// This one is *O*(1).\nlet deque: VecDeque<_> = (1..5).collect();\nlet ptr = deque.as_slices().0.as_ptr();\nlet vec = Vec::from(deque);\nassert_eq!(vec, [1, 2, 3, 4]);\nassert_eq!(vec.as_ptr(), ptr);\n\n// This one needs data rearranging.\nlet mut deque: VecDeque<_> = (1..5).collect();\ndeque.push_front(9);\ndeque.push_front(8);\nlet ptr = deque.as_slices().1.as_ptr();\nlet vec = Vec::from(deque);\nassert_eq!(vec, [8, 9, 1, 2, 3, 4]);\nassert_eq!(vec.as_ptr(), ptr);
\n
","From>","redstone::core::aggregator::Matrix"],["
source§

impl FromBytesRepr<Vec<u8>> for U256

source§

fn from_bytes_repr(bytes: Vec<u8>) -> Self

","FromBytesRepr>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T> FromIterator<T> for Vec<T>

Collects an iterator into a Vec, commonly called via Iterator::collect()

\n

§Allocation behavior

\n

In general Vec does not guarantee any particular growth or allocation strategy.\nThat also applies to this trait impl.

\n

Note: This section covers implementation details and is therefore exempt from\nstability guarantees.

\n

Vec may use any or none of the following strategies,\ndepending on the supplied iterator:

\n
    \n
  • preallocate based on Iterator::size_hint()\n
      \n
    • and panic if the number of items is outside the provided lower/upper bounds
    • \n
    \n
  • \n
  • use an amortized growth strategy similar to pushing one item at a time
  • \n
  • perform the iteration in-place on the original allocation backing the iterator
  • \n
\n

The last case warrants some attention. It is an optimization that in many cases reduces peak memory\nconsumption and improves cache locality. But when big, short-lived allocations are created,\nonly a small fraction of their items get collected, no further use is made of the spare capacity\nand the resulting Vec is moved into a longer-lived structure, then this can lead to the large\nallocations having their lifetimes unnecessarily extended which can result in increased memory\nfootprint.

\n

In cases where this is an issue, the excess capacity can be discarded with Vec::shrink_to(),\nVec::shrink_to_fit() or by collecting into Box<[T]> instead, which additionally reduces\nthe size of the long-lived struct.

\n\n
static LONG_LIVED: Mutex<Vec<Vec<u16>>> = Mutex::new(Vec::new());\n\nfor i in 0..10 {\n    let big_temporary: Vec<u16> = (0..1024).collect();\n    // discard most items\n    let mut result: Vec<_> = big_temporary.into_iter().filter(|i| i % 100 == 0).collect();\n    // without this a lot of unused capacity might be moved into the global\n    result.shrink_to_fit();\n    LONG_LIVED.lock().unwrap().push(result);\n}
\n
source§

fn from_iter<I>(iter: I) -> Vec<T>
where\n I: IntoIterator<Item = T>,

Creates a value from an iterator. Read more
","FromIterator","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Hash for Vec<T, A>
where\n T: Hash,\n A: Allocator,

The hash of a vector is the same as that of the corresponding slice,\nas required by the core::borrow::Borrow implementation.

\n\n
use std::hash::BuildHasher;\n\nlet b = std::hash::RandomState::new();\nlet v: Vec<u8> = vec![0xa8, 0x3c, 0x09];\nlet s: &[u8] = &[0xa8, 0x3c, 0x09];\nassert_eq!(b.hash_one(v), b.hash_one(s));
\n
source§

fn hash<H>(&self, state: &mut H)
where\n H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, I, A> Index<I> for Vec<T, A>
where\n I: SliceIndex<[T]>,\n A: Allocator,

§

type Output = <I as SliceIndex<[T]>>::Output

The returned type after indexing.
source§

fn index(&self, index: I) -> &<Vec<T, A> as Index<I>>::Output

Performs the indexing (container[index]) operation. Read more
","Index","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, I, A> IndexMut<I> for Vec<T, A>
where\n I: SliceIndex<[T]>,\n A: Allocator,

source§

fn index_mut(&mut self, index: I) -> &mut <Vec<T, A> as Index<I>>::Output

Performs the mutable indexing (container[index]) operation. Read more
","IndexMut","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> IntoIterator for Vec<T, A>
where\n A: Allocator,

source§

fn into_iter(self) -> <Vec<T, A> as IntoIterator>::IntoIter

Creates a consuming iterator, that is, one that moves each value out of\nthe vector (from start to end). The vector cannot be used after calling\nthis.

\n
§Examples
\n
let v = vec![\"a\".to_string(), \"b\".to_string()];\nlet mut v_iter = v.into_iter();\n\nlet first_element: Option<String> = v_iter.next();\n\nassert_eq!(first_element, Some(\"a\".to_string()));\nassert_eq!(v_iter.next(), Some(\"b\".to_string()));\nassert_eq!(v_iter.next(), None);
\n
§

type Item = T

The type of the elements being iterated over.
§

type IntoIter = IntoIter<T, A>

Which kind of iterator are we turning this into?
","IntoIterator","redstone::core::aggregator::Matrix"],["
source§

impl<T> Median for Vec<T>
where\n T: Copy + Ord + Avg,

§

type Item = T

source§

fn median(self) -> Self::Item

","Median","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Ord for Vec<T, A>
where\n T: Ord,\n A: Allocator,

Implements ordering of vectors, lexicographically.

\n
source§

fn cmp(&self, other: &Vec<T, A>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
","Ord","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A> PartialEq<&[U]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &&[U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&[U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&[U]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A, const N: usize> PartialEq<&[U; N]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &&[U; N]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&[U; N]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&[U; N]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A> PartialEq<&mut [U]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &&mut [U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&mut [U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&mut [U]>","redstone::core::aggregator::Matrix"],["
1.48.0 · source§

impl<T, U, A> PartialEq<[U]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &[U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &[U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<[U]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A, const N: usize> PartialEq<[U; N]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &[U; N]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &[U; N]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<[U; N]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A1, A2> PartialEq<Vec<U, A2>> for Vec<T, A1>
where\n A1: Allocator,\n A2: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &Vec<U, A2>) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &Vec<U, A2>) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A1, A2> PartialOrd<Vec<T, A2>> for Vec<T, A1>
where\n T: PartialOrd,\n A1: Allocator,\n A2: Allocator,

Implements comparison of vectors, lexicographically.

\n
source§

fn partial_cmp(&self, other: &Vec<T, A2>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <=\noperator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >=\noperator. Read more
","PartialOrd>","redstone::core::aggregator::Matrix"],["
source§

impl<T> Vec<T>

1.0.0 (const: 1.39.0) · source

pub const fn new() -> Vec<T>

Constructs a new, empty Vec<T>.

\n

The vector will not allocate until elements are pushed onto it.

\n
§Examples
\n
let mut vec: Vec<i32> = Vec::new();
\n
1.0.0 · source

pub fn with_capacity(capacity: usize) -> Vec<T>

Constructs a new, empty Vec<T> with at least the specified capacity.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n

It is important to note that although the returned vector has the\nminimum capacity specified, the vector will have a zero length. For\nan explanation of the difference between length and capacity, see\nCapacity and reallocation.

\n

If it is important to know the exact allocated capacity of a Vec,\nalways use the capacity method after construction.

\n

For Vec<T> where T is a zero-sized type, there will be no allocation\nand the capacity will always be usize::MAX.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = Vec::with_capacity(10);\n\n// The vector contains no items, even though it has capacity for more\nassert_eq!(vec.len(), 0);\nassert!(vec.capacity() >= 10);\n\n// These are all done without reallocating...\nfor i in 0..10 {\n    vec.push(i);\n}\nassert_eq!(vec.len(), 10);\nassert!(vec.capacity() >= 10);\n\n// ...but this may make the vector reallocate\nvec.push(11);\nassert_eq!(vec.len(), 11);\nassert!(vec.capacity() >= 11);\n\n// A vector of a zero-sized type will always over-allocate, since no\n// allocation is necessary\nlet vec_units = Vec::<()>::with_capacity(10);\nassert_eq!(vec_units.capacity(), usize::MAX);
\n
source

pub fn try_with_capacity(capacity: usize) -> Result<Vec<T>, TryReserveError>

🔬This is a nightly-only experimental API. (try_with_capacity)

Constructs a new, empty Vec<T> with at least the specified capacity.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n
§Errors
\n

Returns an error if the capacity exceeds isize::MAX bytes,\nor if the allocator reports allocation failure.

\n
1.0.0 · source

pub unsafe fn from_raw_parts(\n ptr: *mut T,\n length: usize,\n capacity: usize,\n) -> Vec<T>

Creates a Vec<T> directly from a pointer, a length, and a capacity.

\n
§Safety
\n

This is highly unsafe, due to the number of invariants that aren’t\nchecked:

\n
    \n
  • ptr must have been allocated using the global allocator, such as via\nthe alloc::alloc function.
  • \n
  • T needs to have the same alignment as what ptr was allocated with.\n(T having a less strict alignment is not sufficient, the alignment really\nneeds to be equal to satisfy the dealloc requirement that memory must be\nallocated and deallocated with the same layout.)
  • \n
  • The size of T times the capacity (ie. the allocated size in bytes) needs\nto be the same size as the pointer was allocated with. (Because similar to\nalignment, dealloc must be called with the same layout size.)
  • \n
  • length needs to be less than or equal to capacity.
  • \n
  • The first length values must be properly initialized values of type T.
  • \n
  • capacity needs to be the capacity that the pointer was allocated with.
  • \n
  • The allocated size in bytes must be no larger than isize::MAX.\nSee the safety documentation of pointer::offset.
  • \n
\n

These requirements are always upheld by any ptr that has been allocated\nvia Vec<T>. Other allocation sources are allowed if the invariants are\nupheld.

\n

Violating these may cause problems like corrupting the allocator’s\ninternal data structures. For example it is normally not safe\nto build a Vec<u8> from a pointer to a C char array with length\nsize_t, doing so is only safe if the array was initially allocated by\na Vec or String.\nIt’s also not safe to build one from a Vec<u16> and its length, because\nthe allocator cares about the alignment, and these two types have different\nalignments. The buffer was allocated with alignment 2 (for u16), but after\nturning it into a Vec<u8> it’ll be deallocated with alignment 1. To avoid\nthese issues, it is often preferable to do casting/transmuting using\nslice::from_raw_parts instead.

\n

The ownership of ptr is effectively transferred to the\nVec<T> which may then deallocate, reallocate or change the\ncontents of memory pointed to by the pointer at will. Ensure\nthat nothing else uses the pointer after calling this\nfunction.

\n
§Examples
\n
use std::ptr;\nuse std::mem;\n\nlet v = vec![1, 2, 3];\n\n// Prevent running `v`'s destructor so we are in complete control\n// of the allocation.\nlet mut v = mem::ManuallyDrop::new(v);\n\n// Pull out the various important pieces of information about `v`\nlet p = v.as_mut_ptr();\nlet len = v.len();\nlet cap = v.capacity();\n\nunsafe {\n    // Overwrite memory with 4, 5, 6\n    for i in 0..len {\n        ptr::write(p.add(i), 4 + i);\n    }\n\n    // Put everything back together into a Vec\n    let rebuilt = Vec::from_raw_parts(p, len, cap);\n    assert_eq!(rebuilt, [4, 5, 6]);\n}
\n

Using memory that was allocated elsewhere:

\n\n
use std::alloc::{alloc, Layout};\n\nfn main() {\n    let layout = Layout::array::<u32>(16).expect(\"overflow cannot happen\");\n\n    let vec = unsafe {\n        let mem = alloc(layout).cast::<u32>();\n        if mem.is_null() {\n            return;\n        }\n\n        mem.write(1_000_000);\n\n        Vec::from_raw_parts(mem, 1, 16)\n    };\n\n    assert_eq!(vec, &[1_000_000]);\n    assert_eq!(vec.capacity(), 16);\n}
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n T: Clone,\n A: Allocator,

1.5.0 · source

pub fn resize(&mut self, new_len: usize, value: T)

Resizes the Vec in-place so that len is equal to new_len.

\n

If new_len is greater than len, the Vec is extended by the\ndifference, with each additional slot filled with value.\nIf new_len is less than len, the Vec is simply truncated.

\n

This method requires T to implement Clone,\nin order to be able to clone the passed value.\nIf you need more flexibility (or want to rely on Default instead of\nClone), use Vec::resize_with.\nIf you only need to resize to a smaller size, use Vec::truncate.

\n
§Examples
\n
let mut vec = vec![\"hello\"];\nvec.resize(3, \"world\");\nassert_eq!(vec, [\"hello\", \"world\", \"world\"]);\n\nlet mut vec = vec![1, 2, 3, 4];\nvec.resize(2, 0);\nassert_eq!(vec, [1, 2]);
\n
1.6.0 · source

pub fn extend_from_slice(&mut self, other: &[T])

Clones and appends all elements in a slice to the Vec.

\n

Iterates over the slice other, clones each element, and then appends\nit to this Vec. The other slice is traversed in-order.

\n

Note that this function is same as extend except that it is\nspecialized to work with slices instead. If and when Rust gets\nspecialization this function will likely be deprecated (but still\navailable).

\n
§Examples
\n
let mut vec = vec![1];\nvec.extend_from_slice(&[2, 3, 4]);\nassert_eq!(vec, [1, 2, 3, 4]);
\n
1.53.0 · source

pub fn extend_from_within<R>(&mut self, src: R)
where\n R: RangeBounds<usize>,

Copies elements from src range to the end of the vector.

\n
§Panics
\n

Panics if the starting point is greater than the end point or if\nthe end point is greater than the length of the vector.

\n
§Examples
\n
let mut vec = vec![0, 1, 2, 3, 4];\n\nvec.extend_from_within(2..);\nassert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4]);\n\nvec.extend_from_within(..2);\nassert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4, 0, 1]);\n\nvec.extend_from_within(4..8);\nassert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4, 0, 1, 4, 2, 3, 4]);
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n T: PartialEq,\n A: Allocator,

1.0.0 · source

pub fn dedup(&mut self)

Removes consecutive repeated elements in the vector according to the\nPartialEq trait implementation.

\n

If the vector is sorted, this removes all duplicates.

\n
§Examples
\n
let mut vec = vec![1, 2, 2, 3, 2];\n\nvec.dedup();\n\nassert_eq!(vec, [1, 2, 3, 2]);
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n A: Allocator,

1.21.0 · source

pub fn splice<R, I>(\n &mut self,\n range: R,\n replace_with: I,\n) -> Splice<'_, <I as IntoIterator>::IntoIter, A>
where\n R: RangeBounds<usize>,\n I: IntoIterator<Item = T>,

Creates a splicing iterator that replaces the specified range in the vector\nwith the given replace_with iterator and yields the removed items.\nreplace_with does not need to be the same length as range.

\n

range is removed even if the iterator is not consumed until the end.

\n

It is unspecified how many elements are removed from the vector\nif the Splice value is leaked.

\n

The input iterator replace_with is only consumed when the Splice value is dropped.

\n

This is optimal if:

\n
    \n
  • The tail (elements in the vector after range) is empty,
  • \n
  • or replace_with yields fewer or equal elements than range’s length
  • \n
  • or the lower bound of its size_hint() is exact.
  • \n
\n

Otherwise, a temporary vector is allocated and the tail is moved twice.

\n
§Panics
\n

Panics if the starting point is greater than the end point or if\nthe end point is greater than the length of the vector.

\n
§Examples
\n
let mut v = vec![1, 2, 3, 4];\nlet new = [7, 8, 9];\nlet u: Vec<_> = v.splice(1..3, new).collect();\nassert_eq!(v, &[1, 7, 8, 9, 4]);\nassert_eq!(u, &[2, 3]);
\n
source

pub fn extract_if<F>(&mut self, filter: F) -> ExtractIf<'_, T, F, A>
where\n F: FnMut(&mut T) -> bool,

🔬This is a nightly-only experimental API. (extract_if)

Creates an iterator which uses a closure to determine if an element should be removed.

\n

If the closure returns true, then the element is removed and yielded.\nIf the closure returns false, the element will remain in the vector and will not be yielded\nby the iterator.

\n

If the returned ExtractIf is not exhausted, e.g. because it is dropped without iterating\nor the iteration short-circuits, then the remaining elements will be retained.\nUse retain with a negated predicate if you do not need the returned iterator.

\n

Using this method is equivalent to the following code:

\n\n
let mut i = 0;\nwhile i < vec.len() {\n    if some_predicate(&mut vec[i]) {\n        let val = vec.remove(i);\n        // your code here\n    } else {\n        i += 1;\n    }\n}\n
\n

But extract_if is easier to use. extract_if is also more efficient,\nbecause it can backshift the elements of the array in bulk.

\n

Note that extract_if also lets you mutate every element in the filter closure,\nregardless of whether you choose to keep or remove it.

\n
§Examples
\n

Splitting an array into evens and odds, reusing the original allocation:

\n\n
#![feature(extract_if)]\nlet mut numbers = vec![1, 2, 3, 4, 5, 6, 8, 9, 11, 13, 14, 15];\n\nlet evens = numbers.extract_if(|x| *x % 2 == 0).collect::<Vec<_>>();\nlet odds = numbers;\n\nassert_eq!(evens, vec![2, 4, 6, 8, 14]);\nassert_eq!(odds, vec![1, 3, 5, 9, 11, 13, 15]);
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n A: Allocator,

source

pub const fn new_in(alloc: A) -> Vec<T, A>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new, empty Vec<T, A>.

\n

The vector will not allocate until elements are pushed onto it.

\n
§Examples
\n
#![feature(allocator_api)]\n\nuse std::alloc::System;\n\nlet mut vec: Vec<i32, _> = Vec::new_in(System);
\n
source

pub fn with_capacity_in(capacity: usize, alloc: A) -> Vec<T, A>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new, empty Vec<T, A> with at least the specified capacity\nwith the provided allocator.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n

It is important to note that although the returned vector has the\nminimum capacity specified, the vector will have a zero length. For\nan explanation of the difference between length and capacity, see\nCapacity and reallocation.

\n

If it is important to know the exact allocated capacity of a Vec,\nalways use the capacity method after construction.

\n

For Vec<T, A> where T is a zero-sized type, there will be no allocation\nand the capacity will always be usize::MAX.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
#![feature(allocator_api)]\n\nuse std::alloc::System;\n\nlet mut vec = Vec::with_capacity_in(10, System);\n\n// The vector contains no items, even though it has capacity for more\nassert_eq!(vec.len(), 0);\nassert!(vec.capacity() >= 10);\n\n// These are all done without reallocating...\nfor i in 0..10 {\n    vec.push(i);\n}\nassert_eq!(vec.len(), 10);\nassert!(vec.capacity() >= 10);\n\n// ...but this may make the vector reallocate\nvec.push(11);\nassert_eq!(vec.len(), 11);\nassert!(vec.capacity() >= 11);\n\n// A vector of a zero-sized type will always over-allocate, since no\n// allocation is necessary\nlet vec_units = Vec::<(), System>::with_capacity_in(10, System);\nassert_eq!(vec_units.capacity(), usize::MAX);
\n
source

pub fn try_with_capacity_in(\n capacity: usize,\n alloc: A,\n) -> Result<Vec<T, A>, TryReserveError>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new, empty Vec<T, A> with at least the specified capacity\nwith the provided allocator.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n
§Errors
\n

Returns an error if the capacity exceeds isize::MAX bytes,\nor if the allocator reports allocation failure.

\n
source

pub unsafe fn from_raw_parts_in(\n ptr: *mut T,\n length: usize,\n capacity: usize,\n alloc: A,\n) -> Vec<T, A>

🔬This is a nightly-only experimental API. (allocator_api)

Creates a Vec<T, A> directly from a pointer, a length, a capacity,\nand an allocator.

\n
§Safety
\n

This is highly unsafe, due to the number of invariants that aren’t\nchecked:

\n
    \n
  • ptr must be currently allocated via the given allocator alloc.
  • \n
  • T needs to have the same alignment as what ptr was allocated with.\n(T having a less strict alignment is not sufficient, the alignment really\nneeds to be equal to satisfy the dealloc requirement that memory must be\nallocated and deallocated with the same layout.)
  • \n
  • The size of T times the capacity (ie. the allocated size in bytes) needs\nto be the same size as the pointer was allocated with. (Because similar to\nalignment, dealloc must be called with the same layout size.)
  • \n
  • length needs to be less than or equal to capacity.
  • \n
  • The first length values must be properly initialized values of type T.
  • \n
  • capacity needs to fit the layout size that the pointer was allocated with.
  • \n
  • The allocated size in bytes must be no larger than isize::MAX.\nSee the safety documentation of pointer::offset.
  • \n
\n

These requirements are always upheld by any ptr that has been allocated\nvia Vec<T, A>. Other allocation sources are allowed if the invariants are\nupheld.

\n

Violating these may cause problems like corrupting the allocator’s\ninternal data structures. For example it is not safe\nto build a Vec<u8> from a pointer to a C char array with length size_t.\nIt’s also not safe to build one from a Vec<u16> and its length, because\nthe allocator cares about the alignment, and these two types have different\nalignments. The buffer was allocated with alignment 2 (for u16), but after\nturning it into a Vec<u8> it’ll be deallocated with alignment 1.

\n

The ownership of ptr is effectively transferred to the\nVec<T> which may then deallocate, reallocate or change the\ncontents of memory pointed to by the pointer at will. Ensure\nthat nothing else uses the pointer after calling this\nfunction.

\n
§Examples
\n
#![feature(allocator_api)]\n\nuse std::alloc::System;\n\nuse std::ptr;\nuse std::mem;\n\nlet mut v = Vec::with_capacity_in(3, System);\nv.push(1);\nv.push(2);\nv.push(3);\n\n// Prevent running `v`'s destructor so we are in complete control\n// of the allocation.\nlet mut v = mem::ManuallyDrop::new(v);\n\n// Pull out the various important pieces of information about `v`\nlet p = v.as_mut_ptr();\nlet len = v.len();\nlet cap = v.capacity();\nlet alloc = v.allocator();\n\nunsafe {\n    // Overwrite memory with 4, 5, 6\n    for i in 0..len {\n        ptr::write(p.add(i), 4 + i);\n    }\n\n    // Put everything back together into a Vec\n    let rebuilt = Vec::from_raw_parts_in(p, len, cap, alloc.clone());\n    assert_eq!(rebuilt, [4, 5, 6]);\n}
\n

Using memory that was allocated elsewhere:

\n\n
#![feature(allocator_api)]\n\nuse std::alloc::{AllocError, Allocator, Global, Layout};\n\nfn main() {\n    let layout = Layout::array::<u32>(16).expect(\"overflow cannot happen\");\n\n    let vec = unsafe {\n        let mem = match Global.allocate(layout) {\n            Ok(mem) => mem.cast::<u32>().as_ptr(),\n            Err(AllocError) => return,\n        };\n\n        mem.write(1_000_000);\n\n        Vec::from_raw_parts_in(mem, 1, 16, Global)\n    };\n\n    assert_eq!(vec, &[1_000_000]);\n    assert_eq!(vec.capacity(), 16);\n}
\n
source

pub fn into_raw_parts(self) -> (*mut T, usize, usize)

🔬This is a nightly-only experimental API. (vec_into_raw_parts)

Decomposes a Vec<T> into its raw components: (pointer, length, capacity).

\n

Returns the raw pointer to the underlying data, the length of\nthe vector (in elements), and the allocated capacity of the\ndata (in elements). These are the same arguments in the same\norder as the arguments to from_raw_parts.

\n

After calling this function, the caller is responsible for the\nmemory previously managed by the Vec. The only way to do\nthis is to convert the raw pointer, length, and capacity back\ninto a Vec with the from_raw_parts function, allowing\nthe destructor to perform the cleanup.

\n
§Examples
\n
#![feature(vec_into_raw_parts)]\nlet v: Vec<i32> = vec![-1, 0, 1];\n\nlet (ptr, len, cap) = v.into_raw_parts();\n\nlet rebuilt = unsafe {\n    // We can now make changes to the components, such as\n    // transmuting the raw pointer to a compatible type.\n    let ptr = ptr as *mut u32;\n\n    Vec::from_raw_parts(ptr, len, cap)\n};\nassert_eq!(rebuilt, [4294967295, 0, 1]);
\n
source

pub fn into_raw_parts_with_alloc(self) -> (*mut T, usize, usize, A)

🔬This is a nightly-only experimental API. (allocator_api)

Decomposes a Vec<T> into its raw components: (pointer, length, capacity, allocator).

\n

Returns the raw pointer to the underlying data, the length of the vector (in elements),\nthe allocated capacity of the data (in elements), and the allocator. These are the same\narguments in the same order as the arguments to from_raw_parts_in.

\n

After calling this function, the caller is responsible for the\nmemory previously managed by the Vec. The only way to do\nthis is to convert the raw pointer, length, and capacity back\ninto a Vec with the from_raw_parts_in function, allowing\nthe destructor to perform the cleanup.

\n
§Examples
\n
#![feature(allocator_api, vec_into_raw_parts)]\n\nuse std::alloc::System;\n\nlet mut v: Vec<i32, System> = Vec::new_in(System);\nv.push(-1);\nv.push(0);\nv.push(1);\n\nlet (ptr, len, cap, alloc) = v.into_raw_parts_with_alloc();\n\nlet rebuilt = unsafe {\n    // We can now make changes to the components, such as\n    // transmuting the raw pointer to a compatible type.\n    let ptr = ptr as *mut u32;\n\n    Vec::from_raw_parts_in(ptr, len, cap, alloc)\n};\nassert_eq!(rebuilt, [4294967295, 0, 1]);
\n
1.0.0 · source

pub fn capacity(&self) -> usize

Returns the total number of elements the vector can hold without\nreallocating.

\n
§Examples
\n
let mut vec: Vec<i32> = Vec::with_capacity(10);\nvec.push(42);\nassert!(vec.capacity() >= 10);
\n
1.0.0 · source

pub fn reserve(&mut self, additional: usize)

Reserves capacity for at least additional more elements to be inserted\nin the given Vec<T>. The collection may reserve more space to\nspeculatively avoid frequent reallocations. After calling reserve,\ncapacity will be greater than or equal to self.len() + additional.\nDoes nothing if capacity is already sufficient.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1];\nvec.reserve(10);\nassert!(vec.capacity() >= 11);
\n
1.0.0 · source

pub fn reserve_exact(&mut self, additional: usize)

Reserves the minimum capacity for at least additional more elements to\nbe inserted in the given Vec<T>. Unlike reserve, this will not\ndeliberately over-allocate to speculatively avoid frequent allocations.\nAfter calling reserve_exact, capacity will be greater than or equal to\nself.len() + additional. Does nothing if the capacity is already\nsufficient.

\n

Note that the allocator may give the collection more space than it\nrequests. Therefore, capacity can not be relied upon to be precisely\nminimal. Prefer reserve if future insertions are expected.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1];\nvec.reserve_exact(10);\nassert!(vec.capacity() >= 11);
\n
1.57.0 · source

pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>

Tries to reserve capacity for at least additional more elements to be inserted\nin the given Vec<T>. The collection may reserve more space to speculatively avoid\nfrequent reallocations. After calling try_reserve, capacity will be\ngreater than or equal to self.len() + additional if it returns\nOk(()). Does nothing if capacity is already sufficient. This method\npreserves the contents even if an error occurs.

\n
§Errors
\n

If the capacity overflows, or the allocator reports a failure, then an error\nis returned.

\n
§Examples
\n
use std::collections::TryReserveError;\n\nfn process_data(data: &[u32]) -> Result<Vec<u32>, TryReserveError> {\n    let mut output = Vec::new();\n\n    // Pre-reserve the memory, exiting if we can't\n    output.try_reserve(data.len())?;\n\n    // Now we know this can't OOM in the middle of our complex work\n    output.extend(data.iter().map(|&val| {\n        val * 2 + 5 // very complicated\n    }));\n\n    Ok(output)\n}
\n
1.57.0 · source

pub fn try_reserve_exact(\n &mut self,\n additional: usize,\n) -> Result<(), TryReserveError>

Tries to reserve the minimum capacity for at least additional\nelements to be inserted in the given Vec<T>. Unlike try_reserve,\nthis will not deliberately over-allocate to speculatively avoid frequent\nallocations. After calling try_reserve_exact, capacity will be greater\nthan or equal to self.len() + additional if it returns Ok(()).\nDoes nothing if the capacity is already sufficient.

\n

Note that the allocator may give the collection more space than it\nrequests. Therefore, capacity can not be relied upon to be precisely\nminimal. Prefer try_reserve if future insertions are expected.

\n
§Errors
\n

If the capacity overflows, or the allocator reports a failure, then an error\nis returned.

\n
§Examples
\n
use std::collections::TryReserveError;\n\nfn process_data(data: &[u32]) -> Result<Vec<u32>, TryReserveError> {\n    let mut output = Vec::new();\n\n    // Pre-reserve the memory, exiting if we can't\n    output.try_reserve_exact(data.len())?;\n\n    // Now we know this can't OOM in the middle of our complex work\n    output.extend(data.iter().map(|&val| {\n        val * 2 + 5 // very complicated\n    }));\n\n    Ok(output)\n}
\n
1.0.0 · source

pub fn shrink_to_fit(&mut self)

Shrinks the capacity of the vector as much as possible.

\n

The behavior of this method depends on the allocator, which may either shrink the vector\nin-place or reallocate. The resulting vector might still have some excess capacity, just as\nis the case for with_capacity. See Allocator::shrink for more details.

\n
§Examples
\n
let mut vec = Vec::with_capacity(10);\nvec.extend([1, 2, 3]);\nassert!(vec.capacity() >= 10);\nvec.shrink_to_fit();\nassert!(vec.capacity() >= 3);
\n
1.56.0 · source

pub fn shrink_to(&mut self, min_capacity: usize)

Shrinks the capacity of the vector with a lower bound.

\n

The capacity will remain at least as large as both the length\nand the supplied value.

\n

If the current capacity is less than the lower limit, this is a no-op.

\n
§Examples
\n
let mut vec = Vec::with_capacity(10);\nvec.extend([1, 2, 3]);\nassert!(vec.capacity() >= 10);\nvec.shrink_to(4);\nassert!(vec.capacity() >= 4);\nvec.shrink_to(0);\nassert!(vec.capacity() >= 3);
\n
1.0.0 · source

pub fn into_boxed_slice(self) -> Box<[T], A>

Converts the vector into Box<[T]>.

\n

Before doing the conversion, this method discards excess capacity like shrink_to_fit.

\n
§Examples
\n
let v = vec![1, 2, 3];\n\nlet slice = v.into_boxed_slice();
\n

Any excess capacity is removed:

\n\n
let mut vec = Vec::with_capacity(10);\nvec.extend([1, 2, 3]);\n\nassert!(vec.capacity() >= 10);\nlet slice = vec.into_boxed_slice();\nassert_eq!(slice.into_vec().capacity(), 3);
\n
1.0.0 · source

pub fn truncate(&mut self, len: usize)

Shortens the vector, keeping the first len elements and dropping\nthe rest.

\n

If len is greater or equal to the vector’s current length, this has\nno effect.

\n

The drain method can emulate truncate, but causes the excess\nelements to be returned instead of dropped.

\n

Note that this method has no effect on the allocated capacity\nof the vector.

\n
§Examples
\n

Truncating a five element vector to two elements:

\n\n
let mut vec = vec![1, 2, 3, 4, 5];\nvec.truncate(2);\nassert_eq!(vec, [1, 2]);
\n

No truncation occurs when len is greater than the vector’s current\nlength:

\n\n
let mut vec = vec![1, 2, 3];\nvec.truncate(8);\nassert_eq!(vec, [1, 2, 3]);
\n

Truncating when len == 0 is equivalent to calling the clear\nmethod.

\n\n
let mut vec = vec![1, 2, 3];\nvec.truncate(0);\nassert_eq!(vec, []);
\n
1.7.0 · source

pub fn as_slice(&self) -> &[T]

Extracts a slice containing the entire vector.

\n

Equivalent to &s[..].

\n
§Examples
\n
use std::io::{self, Write};\nlet buffer = vec![1, 2, 3, 5, 8];\nio::sink().write(buffer.as_slice()).unwrap();
\n
1.7.0 · source

pub fn as_mut_slice(&mut self) -> &mut [T]

Extracts a mutable slice of the entire vector.

\n

Equivalent to &mut s[..].

\n
§Examples
\n
use std::io::{self, Read};\nlet mut buffer = vec![0; 3];\nio::repeat(0b101).read_exact(buffer.as_mut_slice()).unwrap();
\n
1.37.0 · source

pub fn as_ptr(&self) -> *const T

Returns a raw pointer to the vector’s buffer, or a dangling raw pointer\nvalid for zero sized reads if the vector didn’t allocate.

\n

The caller must ensure that the vector outlives the pointer this\nfunction returns, or else it will end up pointing to garbage.\nModifying the vector may cause its buffer to be reallocated,\nwhich would also make any pointers to it invalid.

\n

The caller must also ensure that the memory the pointer (non-transitively) points to\nis never written to (except inside an UnsafeCell) using this pointer or any pointer\nderived from it. If you need to mutate the contents of the slice, use as_mut_ptr.

\n

This method guarantees that for the purpose of the aliasing model, this method\ndoes not materialize a reference to the underlying slice, and thus the returned pointer\nwill remain valid when mixed with other calls to as_ptr and as_mut_ptr.\nNote that calling other methods that materialize mutable references to the slice,\nor mutable references to specific elements you are planning on accessing through this pointer,\nas well as writing to those elements, may still invalidate this pointer.\nSee the second example below for how this guarantee can be used.

\n
§Examples
\n
let x = vec![1, 2, 4];\nlet x_ptr = x.as_ptr();\n\nunsafe {\n    for i in 0..x.len() {\n        assert_eq!(*x_ptr.add(i), 1 << i);\n    }\n}
\n

Due to the aliasing guarantee, the following code is legal:

\n\n
unsafe {\n    let mut v = vec![0, 1, 2];\n    let ptr1 = v.as_ptr();\n    let _ = ptr1.read();\n    let ptr2 = v.as_mut_ptr().offset(2);\n    ptr2.write(2);\n    // Notably, the write to `ptr2` did *not* invalidate `ptr1`\n    // because it mutated a different element:\n    let _ = ptr1.read();\n}
\n
1.37.0 · source

pub fn as_mut_ptr(&mut self) -> *mut T

Returns an unsafe mutable pointer to the vector’s buffer, or a dangling\nraw pointer valid for zero sized reads if the vector didn’t allocate.

\n

The caller must ensure that the vector outlives the pointer this\nfunction returns, or else it will end up pointing to garbage.\nModifying the vector may cause its buffer to be reallocated,\nwhich would also make any pointers to it invalid.

\n

This method guarantees that for the purpose of the aliasing model, this method\ndoes not materialize a reference to the underlying slice, and thus the returned pointer\nwill remain valid when mixed with other calls to as_ptr and as_mut_ptr.\nNote that calling other methods that materialize references to the slice,\nor references to specific elements you are planning on accessing through this pointer,\nmay still invalidate this pointer.\nSee the second example below for how this guarantee can be used.

\n
§Examples
\n
// Allocate vector big enough for 4 elements.\nlet size = 4;\nlet mut x: Vec<i32> = Vec::with_capacity(size);\nlet x_ptr = x.as_mut_ptr();\n\n// Initialize elements via raw pointer writes, then set length.\nunsafe {\n    for i in 0..size {\n        *x_ptr.add(i) = i as i32;\n    }\n    x.set_len(size);\n}\nassert_eq!(&*x, &[0, 1, 2, 3]);
\n

Due to the aliasing guarantee, the following code is legal:

\n\n
unsafe {\n    let mut v = vec![0];\n    let ptr1 = v.as_mut_ptr();\n    ptr1.write(1);\n    let ptr2 = v.as_mut_ptr();\n    ptr2.write(2);\n    // Notably, the write to `ptr2` did *not* invalidate `ptr1`:\n    ptr1.write(3);\n}
\n
source

pub fn allocator(&self) -> &A

🔬This is a nightly-only experimental API. (allocator_api)

Returns a reference to the underlying allocator.

\n
1.0.0 · source

pub unsafe fn set_len(&mut self, new_len: usize)

Forces the length of the vector to new_len.

\n

This is a low-level operation that maintains none of the normal\ninvariants of the type. Normally changing the length of a vector\nis done using one of the safe operations instead, such as\ntruncate, resize, extend, or clear.

\n
§Safety
\n
    \n
  • new_len must be less than or equal to capacity().
  • \n
  • The elements at old_len..new_len must be initialized.
  • \n
\n
§Examples
\n

This method can be useful for situations in which the vector\nis serving as a buffer for other code, particularly over FFI:

\n\n
pub fn get_dictionary(&self) -> Option<Vec<u8>> {\n    // Per the FFI method's docs, \"32768 bytes is always enough\".\n    let mut dict = Vec::with_capacity(32_768);\n    let mut dict_length = 0;\n    // SAFETY: When `deflateGetDictionary` returns `Z_OK`, it holds that:\n    // 1. `dict_length` elements were initialized.\n    // 2. `dict_length` <= the capacity (32_768)\n    // which makes `set_len` safe to call.\n    unsafe {\n        // Make the FFI call...\n        let r = deflateGetDictionary(self.strm, dict.as_mut_ptr(), &mut dict_length);\n        if r == Z_OK {\n            // ...and update the length to what was initialized.\n            dict.set_len(dict_length);\n            Some(dict)\n        } else {\n            None\n        }\n    }\n}
\n

While the following example is sound, there is a memory leak since\nthe inner vectors were not freed prior to the set_len call:

\n\n
let mut vec = vec![vec![1, 0, 0],\n                   vec![0, 1, 0],\n                   vec![0, 0, 1]];\n// SAFETY:\n// 1. `old_len..0` is empty so no elements need to be initialized.\n// 2. `0 <= capacity` always holds whatever `capacity` is.\nunsafe {\n    vec.set_len(0);\n}
\n

Normally, here, one would use clear instead to correctly drop\nthe contents and thus not leak memory.

\n
1.0.0 · source

pub fn swap_remove(&mut self, index: usize) -> T

Removes an element from the vector and returns it.

\n

The removed element is replaced by the last element of the vector.

\n

This does not preserve ordering of the remaining elements, but is O(1).\nIf you need to preserve the element order, use remove instead.

\n
§Panics
\n

Panics if index is out of bounds.

\n
§Examples
\n
let mut v = vec![\"foo\", \"bar\", \"baz\", \"qux\"];\n\nassert_eq!(v.swap_remove(1), \"bar\");\nassert_eq!(v, [\"foo\", \"qux\", \"baz\"]);\n\nassert_eq!(v.swap_remove(0), \"foo\");\nassert_eq!(v, [\"baz\", \"qux\"]);
\n
1.0.0 · source

pub fn insert(&mut self, index: usize, element: T)

Inserts an element at position index within the vector, shifting all\nelements after it to the right.

\n
§Panics
\n

Panics if index > len.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nvec.insert(1, 4);\nassert_eq!(vec, [1, 4, 2, 3]);\nvec.insert(4, 5);\nassert_eq!(vec, [1, 4, 2, 3, 5]);
\n
§Time complexity
\n

Takes O(Vec::len) time. All items after the insertion index must be\nshifted to the right. In the worst case, all elements are shifted when\nthe insertion index is 0.

\n
1.0.0 · source

pub fn remove(&mut self, index: usize) -> T

Removes and returns the element at position index within the vector,\nshifting all elements after it to the left.

\n

Note: Because this shifts over the remaining elements, it has a\nworst-case performance of O(n). If you don’t need the order of elements\nto be preserved, use swap_remove instead. If you’d like to remove\nelements from the beginning of the Vec, consider using\nVecDeque::pop_front instead.

\n
§Panics
\n

Panics if index is out of bounds.

\n
§Examples
\n
let mut v = vec![1, 2, 3];\nassert_eq!(v.remove(1), 2);\nassert_eq!(v, [1, 3]);
\n
1.0.0 · source

pub fn retain<F>(&mut self, f: F)
where\n F: FnMut(&T) -> bool,

Retains only the elements specified by the predicate.

\n

In other words, remove all elements e for which f(&e) returns false.\nThis method operates in place, visiting each element exactly once in the\noriginal order, and preserves the order of the retained elements.

\n
§Examples
\n
let mut vec = vec![1, 2, 3, 4];\nvec.retain(|&x| x % 2 == 0);\nassert_eq!(vec, [2, 4]);
\n

Because the elements are visited exactly once in the original order,\nexternal state may be used to decide which elements to keep.

\n\n
let mut vec = vec![1, 2, 3, 4, 5];\nlet keep = [false, true, true, false, true];\nlet mut iter = keep.iter();\nvec.retain(|_| *iter.next().unwrap());\nassert_eq!(vec, [2, 3, 5]);
\n
1.61.0 · source

pub fn retain_mut<F>(&mut self, f: F)
where\n F: FnMut(&mut T) -> bool,

Retains only the elements specified by the predicate, passing a mutable reference to it.

\n

In other words, remove all elements e such that f(&mut e) returns false.\nThis method operates in place, visiting each element exactly once in the\noriginal order, and preserves the order of the retained elements.

\n
§Examples
\n
let mut vec = vec![1, 2, 3, 4];\nvec.retain_mut(|x| if *x <= 3 {\n    *x += 1;\n    true\n} else {\n    false\n});\nassert_eq!(vec, [2, 3, 4]);
\n
1.16.0 · source

pub fn dedup_by_key<F, K>(&mut self, key: F)
where\n F: FnMut(&mut T) -> K,\n K: PartialEq,

Removes all but the first of consecutive elements in the vector that resolve to the same\nkey.

\n

If the vector is sorted, this removes all duplicates.

\n
§Examples
\n
let mut vec = vec![10, 20, 21, 30, 20];\n\nvec.dedup_by_key(|i| *i / 10);\n\nassert_eq!(vec, [10, 20, 30, 20]);
\n
1.16.0 · source

pub fn dedup_by<F>(&mut self, same_bucket: F)
where\n F: FnMut(&mut T, &mut T) -> bool,

Removes all but the first of consecutive elements in the vector satisfying a given equality\nrelation.

\n

The same_bucket function is passed references to two elements from the vector and\nmust determine if the elements compare equal. The elements are passed in opposite order\nfrom their order in the slice, so if same_bucket(a, b) returns true, a is removed.

\n

If the vector is sorted, this removes all duplicates.

\n
§Examples
\n
let mut vec = vec![\"foo\", \"bar\", \"Bar\", \"baz\", \"bar\"];\n\nvec.dedup_by(|a, b| a.eq_ignore_ascii_case(b));\n\nassert_eq!(vec, [\"foo\", \"bar\", \"baz\", \"bar\"]);
\n
1.0.0 · source

pub fn push(&mut self, value: T)

Appends an element to the back of a collection.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1, 2];\nvec.push(3);\nassert_eq!(vec, [1, 2, 3]);
\n
§Time complexity
\n

Takes amortized O(1) time. If the vector’s length would exceed its\ncapacity after the push, O(capacity) time is taken to copy the\nvector’s elements to a larger allocation. This expensive operation is\noffset by the capacity O(1) insertions it allows.

\n
source

pub fn push_within_capacity(&mut self, value: T) -> Result<(), T>

🔬This is a nightly-only experimental API. (vec_push_within_capacity)

Appends an element if there is sufficient spare capacity, otherwise an error is returned\nwith the element.

\n

Unlike push this method will not reallocate when there’s insufficient capacity.\nThe caller should use reserve or try_reserve to ensure that there is enough capacity.

\n
§Examples
\n

A manual, panic-free alternative to FromIterator:

\n\n
#![feature(vec_push_within_capacity)]\n\nuse std::collections::TryReserveError;\nfn from_iter_fallible<T>(iter: impl Iterator<Item=T>) -> Result<Vec<T>, TryReserveError> {\n    let mut vec = Vec::new();\n    for value in iter {\n        if let Err(value) = vec.push_within_capacity(value) {\n            vec.try_reserve(1)?;\n            // this cannot fail, the previous line either returned or added at least 1 free slot\n            let _ = vec.push_within_capacity(value);\n        }\n    }\n    Ok(vec)\n}\nassert_eq!(from_iter_fallible(0..100), Ok(Vec::from_iter(0..100)));
\n
§Time complexity
\n

Takes O(1) time.

\n
1.0.0 · source

pub fn pop(&mut self) -> Option<T>

Removes the last element from a vector and returns it, or None if it\nis empty.

\n

If you’d like to pop the first element, consider using\nVecDeque::pop_front instead.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nassert_eq!(vec.pop(), Some(3));\nassert_eq!(vec, [1, 2]);
\n
§Time complexity
\n

Takes O(1) time.

\n
source

pub fn pop_if<F>(&mut self, f: F) -> Option<T>
where\n F: FnOnce(&mut T) -> bool,

🔬This is a nightly-only experimental API. (vec_pop_if)

Removes and returns the last element in a vector if the predicate\nreturns true, or None if the predicate returns false or the vector\nis empty.

\n
§Examples
\n
#![feature(vec_pop_if)]\n\nlet mut vec = vec![1, 2, 3, 4];\nlet pred = |x: &mut i32| *x % 2 == 0;\n\nassert_eq!(vec.pop_if(pred), Some(4));\nassert_eq!(vec, [1, 2, 3]);\nassert_eq!(vec.pop_if(pred), None);
\n
1.4.0 · source

pub fn append(&mut self, other: &mut Vec<T, A>)

Moves all the elements of other into self, leaving other empty.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nlet mut vec2 = vec![4, 5, 6];\nvec.append(&mut vec2);\nassert_eq!(vec, [1, 2, 3, 4, 5, 6]);\nassert_eq!(vec2, []);
\n
1.6.0 · source

pub fn drain<R>(&mut self, range: R) -> Drain<'_, T, A>
where\n R: RangeBounds<usize>,

Removes the specified range from the vector in bulk, returning all\nremoved elements as an iterator. If the iterator is dropped before\nbeing fully consumed, it drops the remaining removed elements.

\n

The returned iterator keeps a mutable borrow on the vector to optimize\nits implementation.

\n
§Panics
\n

Panics if the starting point is greater than the end point or if\nthe end point is greater than the length of the vector.

\n
§Leaking
\n

If the returned iterator goes out of scope without being dropped (due to\nmem::forget, for example), the vector may have lost and leaked\nelements arbitrarily, including elements outside the range.

\n
§Examples
\n
let mut v = vec![1, 2, 3];\nlet u: Vec<_> = v.drain(1..).collect();\nassert_eq!(v, &[1]);\nassert_eq!(u, &[2, 3]);\n\n// A full range clears the vector, like `clear()` does\nv.drain(..);\nassert_eq!(v, &[]);
\n
1.0.0 · source

pub fn clear(&mut self)

Clears the vector, removing all values.

\n

Note that this method has no effect on the allocated capacity\nof the vector.

\n
§Examples
\n
let mut v = vec![1, 2, 3];\n\nv.clear();\n\nassert!(v.is_empty());
\n
1.0.0 · source

pub fn len(&self) -> usize

Returns the number of elements in the vector, also referred to\nas its ‘length’.

\n
§Examples
\n
let a = vec![1, 2, 3];\nassert_eq!(a.len(), 3);
\n
1.0.0 · source

pub fn is_empty(&self) -> bool

Returns true if the vector contains no elements.

\n
§Examples
\n
let mut v = Vec::new();\nassert!(v.is_empty());\n\nv.push(1);\nassert!(!v.is_empty());
\n
1.4.0 · source

pub fn split_off(&mut self, at: usize) -> Vec<T, A>
where\n A: Clone,

Splits the collection into two at the given index.

\n

Returns a newly allocated vector containing the elements in the range\n[at, len). After the call, the original vector will be left containing\nthe elements [0, at) with its previous capacity unchanged.

\n
    \n
  • If you want to take ownership of the entire contents and capacity of\nthe vector, see mem::take or mem::replace.
  • \n
  • If you don’t need the returned vector at all, see Vec::truncate.
  • \n
  • If you want to take ownership of an arbitrary subslice, or you don’t\nnecessarily want to store the removed items in a vector, see Vec::drain.
  • \n
\n
§Panics
\n

Panics if at > len.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nlet vec2 = vec.split_off(1);\nassert_eq!(vec, [1]);\nassert_eq!(vec2, [2, 3]);
\n
1.33.0 · source

pub fn resize_with<F>(&mut self, new_len: usize, f: F)
where\n F: FnMut() -> T,

Resizes the Vec in-place so that len is equal to new_len.

\n

If new_len is greater than len, the Vec is extended by the\ndifference, with each additional slot filled with the result of\ncalling the closure f. The return values from f will end up\nin the Vec in the order they have been generated.

\n

If new_len is less than len, the Vec is simply truncated.

\n

This method uses a closure to create new values on every push. If\nyou’d rather Clone a given value, use Vec::resize. If you\nwant to use the Default trait to generate values, you can\npass Default::default as the second argument.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nvec.resize_with(5, Default::default);\nassert_eq!(vec, [1, 2, 3, 0, 0]);\n\nlet mut vec = vec![];\nlet mut p = 1;\nvec.resize_with(4, || { p *= 2; p });\nassert_eq!(vec, [2, 4, 8, 16]);
\n
1.47.0 · source

pub fn leak<'a>(self) -> &'a mut [T]
where\n A: 'a,

Consumes and leaks the Vec, returning a mutable reference to the contents,\n&'a mut [T]. Note that the type T must outlive the chosen lifetime\n'a. If the type has only static references, or none at all, then this\nmay be chosen to be 'static.

\n

As of Rust 1.57, this method does not reallocate or shrink the Vec,\nso the leaked allocation may include unused capacity that is not part\nof the returned slice.

\n

This function is mainly useful for data that lives for the remainder of\nthe program’s life. Dropping the returned reference will cause a memory\nleak.

\n
§Examples
\n

Simple usage:

\n\n
let x = vec![1, 2, 3];\nlet static_ref: &'static mut [usize] = x.leak();\nstatic_ref[0] += 1;\nassert_eq!(static_ref, &[2, 2, 3]);
\n
1.60.0 · source

pub fn spare_capacity_mut(&mut self) -> &mut [MaybeUninit<T>]

Returns the remaining spare capacity of the vector as a slice of\nMaybeUninit<T>.

\n

The returned slice can be used to fill the vector with data (e.g. by\nreading from a file) before marking the data as initialized using the\nset_len method.

\n
§Examples
\n
// Allocate vector big enough for 10 elements.\nlet mut v = Vec::with_capacity(10);\n\n// Fill in the first 3 elements.\nlet uninit = v.spare_capacity_mut();\nuninit[0].write(0);\nuninit[1].write(1);\nuninit[2].write(2);\n\n// Mark the first 3 elements of the vector as being initialized.\nunsafe {\n    v.set_len(3);\n}\n\nassert_eq!(&v, &[0, 1, 2]);
\n
source

pub fn split_at_spare_mut(&mut self) -> (&mut [T], &mut [MaybeUninit<T>])

🔬This is a nightly-only experimental API. (vec_split_at_spare)

Returns vector content as a slice of T, along with the remaining spare\ncapacity of the vector as a slice of MaybeUninit<T>.

\n

The returned spare capacity slice can be used to fill the vector with data\n(e.g. by reading from a file) before marking the data as initialized using\nthe set_len method.

\n

Note that this is a low-level API, which should be used with care for\noptimization purposes. If you need to append data to a Vec\nyou can use push, extend, extend_from_slice,\nextend_from_within, insert, append, resize or\nresize_with, depending on your exact needs.

\n
§Examples
\n
#![feature(vec_split_at_spare)]\n\nlet mut v = vec![1, 1, 2];\n\n// Reserve additional space big enough for 10 elements.\nv.reserve(10);\n\nlet (init, uninit) = v.split_at_spare_mut();\nlet sum = init.iter().copied().sum::<u32>();\n\n// Fill in the next 4 elements.\nuninit[0].write(sum);\nuninit[1].write(sum * 2);\nuninit[2].write(sum * 3);\nuninit[3].write(sum * 4);\n\n// Mark the 4 elements of the vector as being initialized.\nunsafe {\n    let len = v.len();\n    v.set_len(len + 4);\n}\n\nassert_eq!(&v, &[1, 1, 2, 4, 8, 12, 16]);
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> DerefPure for Vec<T, A>
where\n A: Allocator,

","DerefPure","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Eq for Vec<T, A>
where\n T: Eq,\n A: Allocator,

","Eq","redstone::core::aggregator::Matrix"]] };if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/type.impl/redstone/network/pure/struct.Std.js b/static/rust/redstone/crypto_secp256k1/doc/type.impl/redstone/network/pure/struct.Std.js index b85e8d1d..3ccc18b4 100644 --- a/static/rust/redstone/crypto_secp256k1/doc/type.impl/redstone/network/pure/struct.Std.js +++ b/static/rust/redstone/crypto_secp256k1/doc/type.impl/redstone/network/pure/struct.Std.js @@ -1,3 +1,3 @@ (function() {var type_impls = { -"redstone":[["
source§

impl NetworkSpecific for Std

§

type BytesRepr = Vec<u8>

§

type ValueRepr = U256

§

type _Self = Std

source§

const VALUE_SIZE: usize = 32usize

source§

fn print(text: String)

source§

fn revert(error: Error) -> !

","NetworkSpecific","redstone::network::_Network"]] +"redstone":[["
source§

impl NetworkSpecific for Std

§

type BytesRepr = Vec<u8>

§

type ValueRepr = U256

§

type _Self = Std

source§

const VALUE_SIZE: usize = 32usize

source§

fn print(text: String)

source§

fn revert(error: Error) -> !

","NetworkSpecific","redstone::network::_Network"]] };if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/type.impl/std/primitive.array.js b/static/rust/redstone/crypto_secp256k1/doc/type.impl/std/primitive.array.js new file mode 100644 index 00000000..53f96772 --- /dev/null +++ b/static/rust/redstone/crypto_secp256k1/doc/type.impl/std/primitive.array.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"redstone":[] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/help.html b/static/rust/redstone/crypto_secp256k1/help.html index f173d86a..616df0e4 100644 --- a/static/rust/redstone/crypto_secp256k1/help.html +++ b/static/rust/redstone/crypto_secp256k1/help.html @@ -1 +1 @@ -Help

Rustdoc help

Back
\ No newline at end of file +Help

Rustdoc help

Back
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/all.html b/static/rust/redstone/crypto_secp256k1/redstone/all.html index b5973a6f..2d0d1d5a 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/all.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/all.html @@ -1 +1 @@ -List of all items in this crate

List of all items

Structs

Enums

Traits

Macros

Functions

Type Aliases

Constants

\ No newline at end of file +List of all items in this crate

List of all items

Structs

Enums

Traits

Macros

Functions

Type Aliases

Constants

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/core/aggregator/fn.aggregate_matrix.html b/static/rust/redstone/crypto_secp256k1/redstone/core/aggregator/fn.aggregate_matrix.html index 0792edbc..218d36be 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/core/aggregator/fn.aggregate_matrix.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/core/aggregator/fn.aggregate_matrix.html @@ -1 +1 @@ -aggregate_matrix in redstone::core::aggregator - Rust

Function redstone::core::aggregator::aggregate_matrix

source ·
fn aggregate_matrix(matrix: Vec<Vec<Option<U256>>>, config: Config) -> Vec<U256>
\ No newline at end of file +aggregate_matrix in redstone::core::aggregator - Rust

Function redstone::core::aggregator::aggregate_matrix

source ·
fn aggregate_matrix(matrix: Vec<Vec<Option<U256>>>, config: Config) -> Vec<U256>
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/core/aggregator/fn.aggregate_values.html b/static/rust/redstone/crypto_secp256k1/redstone/core/aggregator/fn.aggregate_values.html index 15726f8e..56391872 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/core/aggregator/fn.aggregate_values.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/core/aggregator/fn.aggregate_values.html @@ -1,7 +1,7 @@ -aggregate_values in redstone::core::aggregator - Rust

Function redstone::core::aggregator::aggregate_values

source ·
pub(crate) fn aggregate_values(
+aggregate_values in redstone::core::aggregator - Rust

Function redstone::core::aggregator::aggregate_values

source ·
pub(crate) fn aggregate_values(
     config: Config,
-    data_packages: Vec<DataPackage>,
-) -> Vec<U256>
Expand description

Aggregates values from a collection of data packages according to the provided configuration.

+ data_packages: Vec<DataPackage>, +) -> Vec<U256>
Expand description

Aggregates values from a collection of data packages according to the provided configuration.

This function takes a configuration and a vector of data packages, constructs a matrix of values and their corresponding signers, and then aggregates these values based on the aggregation logic defined in the provided configuration. The aggregation strategy could vary, for example, by taking diff --git a/static/rust/redstone/crypto_secp256k1/redstone/core/aggregator/fn.make_value_signer_matrix.html b/static/rust/redstone/crypto_secp256k1/redstone/core/aggregator/fn.make_value_signer_matrix.html index f3dc8819..f3c03b87 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/core/aggregator/fn.make_value_signer_matrix.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/core/aggregator/fn.make_value_signer_matrix.html @@ -1,4 +1,4 @@ -make_value_signer_matrix in redstone::core::aggregator - Rust

Function redstone::core::aggregator::make_value_signer_matrix

source ·
fn make_value_signer_matrix(
+make_value_signer_matrix in redstone::core::aggregator - Rust

Function redstone::core::aggregator::make_value_signer_matrix

source ·
fn make_value_signer_matrix(
     config: &Config,
-    data_packages: Vec<DataPackage>,
-) -> Vec<Vec<Option<U256>>>
\ No newline at end of file + data_packages: Vec<DataPackage>, +) -> Vec<Vec<Option<U256>>>
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/core/aggregator/index.html b/static/rust/redstone/crypto_secp256k1/redstone/core/aggregator/index.html index 7aa39374..d9b656ee 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/core/aggregator/index.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/core/aggregator/index.html @@ -1 +1 @@ -redstone::core::aggregator - Rust

Module redstone::core::aggregator

source ·

Functions§

Type Aliases§

\ No newline at end of file +redstone::core::aggregator - Rust

Module redstone::core::aggregator

source ·

Functions§

Type Aliases§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/core/aggregator/type.Matrix.html b/static/rust/redstone/crypto_secp256k1/redstone/core/aggregator/type.Matrix.html index 61c3f974..5fadd5eb 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/core/aggregator/type.Matrix.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/core/aggregator/type.Matrix.html @@ -1 +1 @@ -Matrix in redstone::core::aggregator - Rust

Type Alias redstone::core::aggregator::Matrix

source ·
type Matrix = Vec<Vec<Option<U256>>>;

Aliased Type§

struct Matrix { /* private fields */ }
\ No newline at end of file +Matrix in redstone::core::aggregator - Rust

Type Alias redstone::core::aggregator::Matrix

source ·
type Matrix = Vec<Vec<Option<U256>>>;

Aliased Type§

struct Matrix { /* private fields */ }
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/core/config/index.html b/static/rust/redstone/crypto_secp256k1/redstone/core/config/index.html index 32a77abc..5badc729 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/core/config/index.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/core/config/index.html @@ -1 +1 @@ -redstone::core::config - Rust

Module redstone::core::config

source ·

Structs§

  • Configuration for a RedStone payload processor.
\ No newline at end of file +redstone::core::config - Rust

Module redstone::core::config

source ·

Structs§

  • Configuration for a RedStone payload processor.
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/core/config/struct.Config.html b/static/rust/redstone/crypto_secp256k1/redstone/core/config/struct.Config.html index 5f859175..f80ce0c8 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/core/config/struct.Config.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/core/config/struct.Config.html @@ -1,38 +1,38 @@ -Config in redstone::core::config - Rust

Struct redstone::core::config::Config

source ·
pub struct Config {
-    pub signer_count_threshold: u8,
-    pub signers: Vec<Bytes>,
-    pub feed_ids: Vec<U256>,
-    pub block_timestamp: u64,
+Config in redstone::core::config - Rust

Struct redstone::core::config::Config

source ·
pub struct Config {
+    pub signer_count_threshold: u8,
+    pub signers: Vec<Bytes>,
+    pub feed_ids: Vec<U256>,
+    pub block_timestamp: u64,
 }
Expand description

Configuration for a RedStone payload processor.

Specifies the parameters necessary for the verification and aggregation of values from various data points passed by the RedStone payload.

-

Fields§

§signer_count_threshold: u8

The minimum number of signers required validating the data.

+

Fields§

§signer_count_threshold: u8

The minimum number of signers required validating the data.

Specifies how many unique signers (from different addresses) are required for the data to be considered valid and trustworthy.

-
§signers: Vec<Bytes>

List of identifiers for signers authorized to sign the data.

+
§signers: Vec<Bytes>

List of identifiers for signers authorized to sign the data.

Each signer is identified by a unique, network-specific byte string (Bytes), which represents their address.

-
§feed_ids: Vec<U256>

Identifiers for the data feeds from which values are aggregated.

+
§feed_ids: Vec<U256>

Identifiers for the data feeds from which values are aggregated.

Each data feed id is represented by the network-specific U256 type.

-
§block_timestamp: u64

The current block time in timestamp format, used for verifying data timeliness.

+
§block_timestamp: u64

The current block time in timestamp format, used for verifying data timeliness.

The value’s been expressed in milliseconds since the Unix epoch (January 1, 1970) and allows for determining whether the data is current in the context of blockchain time.

-

Trait Implementations§

source§

impl Debug for Config

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Validator for Config

source§

fn feed_index(&self, feed_id: U256) -> Option<usize>

Retrieves the index of a given data feed. Read more
source§

fn signer_index(&self, signer: &[u8]) -> Option<usize>

Retrieves the index of a given signer. Read more
source§

fn validate_signer_count_threshold( +

Trait Implementations§

source§

impl Debug for Config

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Validator for Config

source§

fn feed_index(&self, feed_id: U256) -> Option<usize>

Retrieves the index of a given data feed. Read more
source§

fn signer_index(&self, signer: &[u8]) -> Option<usize>

Retrieves the index of a given signer. Read more
source§

fn validate_signer_count_threshold( &self, - index: usize, - values: &[Option<U256>], -) -> Vec<U256>

Validates the signer count threshold for a given index within a set of values. Read more
source§

fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64

Validates the timestamp for a given index. Read more

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

Blanket Implementations§

source§

impl<T> Any for T
where - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where - T: Debug, - F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where - E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for T
where - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+ index: usize, + values: &[Option<U256>], +) -> Vec<U256>
Validates the signer count threshold for a given index within a set of values. Read more
source§

fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64

Validates the timestamp for a given index. Read more

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where + T: Debug, + F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where + E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where +From<T> for U chooses to do.

+

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/core/index.html b/static/rust/redstone/crypto_secp256k1/redstone/core/index.html index e427a2e8..e5c1246b 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/core/index.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/core/index.html @@ -1 +1 @@ -redstone::core - Rust

Module redstone::core

source ·

Modules§

\ No newline at end of file +redstone::core - Rust

Module redstone::core

source ·

Modules§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/core/processor/fn.make_processor_result.html b/static/rust/redstone/crypto_secp256k1/redstone/core/processor/fn.make_processor_result.html index d15046f1..33203759 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/core/processor/fn.make_processor_result.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/core/processor/fn.make_processor_result.html @@ -1 +1 @@ -make_processor_result in redstone::core::processor - Rust

Function redstone::core::processor::make_processor_result

source ·
fn make_processor_result(config: Config, payload: Payload) -> ProcessorResult
\ No newline at end of file +make_processor_result in redstone::core::processor - Rust

Function redstone::core::processor::make_processor_result

source ·
fn make_processor_result(config: Config, payload: Payload) -> ProcessorResult
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/core/processor/fn.process_payload.html b/static/rust/redstone/crypto_secp256k1/redstone/core/processor/fn.process_payload.html index b1ad0b84..6a5eb34e 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/core/processor/fn.process_payload.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/core/processor/fn.process_payload.html @@ -1,4 +1,4 @@ -process_payload in redstone::core::processor - Rust

Function redstone::core::processor::process_payload

source ·
pub fn process_payload(config: Config, payload_bytes: Bytes) -> ProcessorResult
Expand description

The main processor of the RedStone payload.

+process_payload in redstone::core::processor - Rust

Function redstone::core::processor::process_payload

source ·
pub fn process_payload(config: Config, payload_bytes: Bytes) -> ProcessorResult
Expand description

The main processor of the RedStone payload.

§Arguments

  • config - Configuration of the payload processing.
  • diff --git a/static/rust/redstone/crypto_secp256k1/redstone/core/processor/index.html b/static/rust/redstone/crypto_secp256k1/redstone/core/processor/index.html index ccd25006..5b72173e 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/core/processor/index.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/core/processor/index.html @@ -1 +1 @@ -redstone::core::processor - Rust

    Module redstone::core::processor

    source ·

    Functions§

    \ No newline at end of file +redstone::core::processor - Rust

    Module redstone::core::processor

    source ·

    Functions§

    \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/core/processor_result/index.html b/static/rust/redstone/crypto_secp256k1/redstone/core/processor_result/index.html index 52eaf103..fb6292fd 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/core/processor_result/index.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/core/processor_result/index.html @@ -1 +1 @@ -redstone::core::processor_result - Rust

    Module redstone::core::processor_result

    source ·

    Structs§

    \ No newline at end of file +redstone::core::processor_result - Rust

    Module redstone::core::processor_result

    source ·

    Structs§

    \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/core/processor_result/struct.ProcessorResult.html b/static/rust/redstone/crypto_secp256k1/redstone/core/processor_result/struct.ProcessorResult.html index c095c115..ff97643c 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/core/processor_result/struct.ProcessorResult.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/core/processor_result/struct.ProcessorResult.html @@ -1,29 +1,29 @@ -ProcessorResult in redstone::core::processor_result - Rust

    Struct redstone::core::processor_result::ProcessorResult

    source ·
    pub struct ProcessorResult {
    -    pub min_timestamp: u64,
    -    pub values: Vec<U256>,
    +ProcessorResult in redstone::core::processor_result - Rust

    Struct redstone::core::processor_result::ProcessorResult

    source ·
    pub struct ProcessorResult {
    +    pub min_timestamp: u64,
    +    pub values: Vec<U256>,
     }
    Expand description

    Represents the result of processing the RedStone payload.

    This structure is used to encapsulate the outcome of a RedStone payload processing operation, particularly focusing on time-sensitive data and its associated values, according to the Config.

    -

    Fields§

    §min_timestamp: u64

    The minimum timestamp encountered during processing.

    +

Fields§

§min_timestamp: u64

The minimum timestamp encountered during processing.

This field captures the earliest time point (in milliseconds since the Unix epoch) among the processed data packages, indicating the starting boundary of the dataset’s time range.

-
§values: Vec<U256>

A collection of values processed during the operation.

+
§values: Vec<U256>

A collection of values processed during the operation.

Each element in this vector represents a processed value corresponding to the passed data_feed item in the Config.

-

Trait Implementations§

source§

impl Debug for ProcessorResult

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<ProcessorResult> for (u64, Vec<U256>)

source§

fn from(result: ProcessorResult) -> Self

Converts to this type from the input type.
source§

impl PartialEq for ProcessorResult

source§

fn eq(&self, other: &ProcessorResult) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Eq for ProcessorResult

source§

impl StructuralPartialEq for ProcessorResult

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where - T: Debug, - F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where - E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for T
where - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

source§

impl Debug for ProcessorResult

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<ProcessorResult> for (u64, Vec<U256>)

source§

fn from(result: ProcessorResult) -> Self

Converts to this type from the input type.
source§

impl PartialEq for ProcessorResult

source§

fn eq(&self, other: &ProcessorResult) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for ProcessorResult

source§

impl StructuralPartialEq for ProcessorResult

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where + T: Debug, + F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where + E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where +From<T> for U chooses to do.

+

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/core/validator/index.html b/static/rust/redstone/crypto_secp256k1/redstone/core/validator/index.html index 141d82cd..63c305f0 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/core/validator/index.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/core/validator/index.html @@ -1 +1 @@ -redstone::core::validator - Rust

Module redstone::core::validator

source ·

Traits§

  • Validator 🔒
    A trait defining validation operations for data feeds and signers.
\ No newline at end of file +redstone::core::validator - Rust

Module redstone::core::validator

source ·

Traits§

  • Validator 🔒
    A trait defining validation operations for data feeds and signers.
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/core/validator/trait.Validator.html b/static/rust/redstone/crypto_secp256k1/redstone/core/validator/trait.Validator.html index ffbec709..4ad4fa99 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/core/validator/trait.Validator.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/core/validator/trait.Validator.html @@ -1,19 +1,19 @@ -Validator in redstone::core::validator - Rust

Trait redstone::core::validator::Validator

source ·
pub(crate) trait Validator {
+Validator in redstone::core::validator - Rust

Trait redstone::core::validator::Validator

source ·
pub(crate) trait Validator {
     // Required methods
-    fn feed_index(&self, feed_id: U256) -> Option<usize>;
-    fn signer_index(&self, signer: &[u8]) -> Option<usize>;
+    fn feed_index(&self, feed_id: U256) -> Option<usize>;
+    fn signer_index(&self, signer: &[u8]) -> Option<usize>;
     fn validate_signer_count_threshold(
         &self,
-        index: usize,
-        values: &[Option<U256>],
-    ) -> Vec<U256>;
-    fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64;
+        index: usize,
+        values: &[Option<U256>],
+    ) -> Vec<U256>;
+    fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64;
 }
Expand description

A trait defining validation operations for data feeds and signers.

This trait specifies methods for validating aspects of data feeds and signers within a system that requires data integrity and authenticity checks. Implementations of this trait are responsible for defining the logic behind each validation step, ensuring that data conforms to expected rules and conditions.

-

Required Methods§

source

fn feed_index(&self, feed_id: U256) -> Option<usize>

Retrieves the index of a given data feed.

+

Required Methods§

source

fn feed_index(&self, feed_id: U256) -> Option<usize>

Retrieves the index of a given data feed.

This method takes a feed_id representing the unique identifier of a data feed and returns an Option<usize> indicating the index of the feed within a collection of feeds. If the feed does not exist, None is returned.

@@ -25,7 +25,7 @@
§Returns
  • Option<usize> - The index of the feed if it exists, or None if it does not.
-
source

fn signer_index(&self, signer: &[u8]) -> Option<usize>

Retrieves the index of a given signer.

+
source

fn signer_index(&self, signer: &[u8]) -> Option<usize>

Retrieves the index of a given signer.

This method accepts a signer identifier in the form of a byte slice and returns an Option<usize> indicating the signer’s index within a collection of signers. If the signer is not found, None is returned.

@@ -39,9 +39,9 @@
§Returns
source

fn validate_signer_count_threshold( &self, - index: usize, - values: &[Option<U256>], -) -> Vec<U256>

Validates the signer count threshold for a given index within a set of values.

+ index: usize, + values: &[Option<U256>], +) -> Vec<U256>

Validates the signer count threshold for a given index within a set of values.

This method is responsible for ensuring that the number of valid signers meets or exceeds a specified threshold necessary for a set of data values to be considered valid. It returns a vector of U256 if the values pass the validation, to be processed in other steps.

@@ -54,7 +54,7 @@
§Returns
  • Vec<U256> - A vector of U256 values that meet the validation criteria.
-
source

fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64

Validates the timestamp for a given index.

+
source

fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64

Validates the timestamp for a given index.

This method checks whether a timestamp associated with a data value at a given index meets specific conditions (e.g., being within an acceptable time range). It returns the validated timestamp if it’s valid, to be processed in other steps.

diff --git a/static/rust/redstone/crypto_secp256k1/redstone/crypto/index.html b/static/rust/redstone/crypto_secp256k1/redstone/crypto/index.html index 541ea6ec..47b354db 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/crypto/index.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/crypto/index.html @@ -1 +1 @@ -redstone::crypto - Rust

Module redstone::crypto

source ·

Modules§

\ No newline at end of file +redstone::crypto - Rust

Module redstone::crypto

source ·

Modules§

Type Aliases§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/crypto/keccak256/fn.keccak256.html b/static/rust/redstone/crypto_secp256k1/redstone/crypto/keccak256/fn.keccak256.html index 2665643a..63420eda 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/crypto/keccak256/fn.keccak256.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/crypto/keccak256/fn.keccak256.html @@ -1 +1 @@ -keccak256 in redstone::crypto::keccak256 - Rust

Function redstone::crypto::keccak256::keccak256

source ·
pub fn keccak256(data: &[u8]) -> Box<[u8]>
\ No newline at end of file +keccak256 in redstone::crypto::keccak256 - Rust

Function redstone::crypto::keccak256::keccak256

source ·
pub fn keccak256(data: &[u8]) -> [u8; 32]
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/crypto/keccak256/index.html b/static/rust/redstone/crypto_secp256k1/redstone/crypto/keccak256/index.html index 96fe770a..e0b65a28 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/crypto/keccak256/index.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/crypto/keccak256/index.html @@ -1 +1 @@ -redstone::crypto::keccak256 - Rust

Module redstone::crypto::keccak256

source ·

Functions§

\ No newline at end of file +redstone::crypto::keccak256 - Rust

Module redstone::crypto::keccak256

source ·

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/crypto/recover/crypto256/fn.recover_public_key.html b/static/rust/redstone/crypto_secp256k1/redstone/crypto/recover/crypto256/fn.recover_public_key.html index ba2beac0..039b3003 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/crypto/recover/crypto256/fn.recover_public_key.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/crypto/recover/crypto256/fn.recover_public_key.html @@ -1,5 +1,5 @@ -recover_public_key in redstone::crypto::recover::crypto256 - Rust

Function redstone::crypto::recover::crypto256::recover_public_key

source ·
pub(crate) fn recover_public_key(
-    message_hash: Box<[u8]>,
-    signature_bytes: &[u8],
-    recovery_byte: u8,
-) -> Box<[u8]>
\ No newline at end of file +recover_public_key in redstone::crypto::recover::crypto256 - Rust

Function redstone::crypto::recover::crypto256::recover_public_key

source ·
pub(crate) fn recover_public_key(
+    message_hash: [u8; 32],
+    signature_bytes: [u8; 64],
+    recovery_byte: u8,
+) -> [u8; 65]
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/crypto/recover/crypto256/index.html b/static/rust/redstone/crypto_secp256k1/redstone/crypto/recover/crypto256/index.html index b5563f5f..1abee86b 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/crypto/recover/crypto256/index.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/crypto/recover/crypto256/index.html @@ -1 +1 @@ -redstone::crypto::recover::crypto256 - Rust

Module redstone::crypto::recover::crypto256

source ·

Functions§

\ No newline at end of file +redstone::crypto::recover::crypto256 - Rust

Module redstone::crypto::recover::crypto256

source ·

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/crypto/recover/fn.recover_address.html b/static/rust/redstone/crypto_secp256k1/redstone/crypto/recover/fn.recover_address.html index aba3bde0..c38049cf 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/crypto/recover/fn.recover_address.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/crypto/recover/fn.recover_address.html @@ -1 +1 @@ -recover_address in redstone::crypto::recover - Rust

Function redstone::crypto::recover::recover_address

source ·
pub fn recover_address(message: Vec<u8>, signature: Vec<u8>) -> Vec<u8> 
\ No newline at end of file +recover_address in redstone::crypto::recover - Rust

Function redstone::crypto::recover::recover_address

source ·
pub fn recover_address(message: Vec<u8>, signature: Vec<u8>) -> Vec<u8> 
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/crypto/recover/index.html b/static/rust/redstone/crypto_secp256k1/redstone/crypto/recover/index.html index e7703e69..6165a1e8 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/crypto/recover/index.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/crypto/recover/index.html @@ -1 +1 @@ -redstone::crypto::recover - Rust

Module redstone::crypto::recover

source ·

Modules§

Functions§

\ No newline at end of file +redstone::crypto::recover - Rust

Module redstone::crypto::recover

source ·

Modules§

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/crypto/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/redstone/crypto/sidebar-items.js index 521fe7cb..41e67b75 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/crypto/sidebar-items.js +++ b/static/rust/redstone/crypto_secp256k1/redstone/crypto/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"mod":["keccak256","recover"]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"mod":["keccak256","recover"],"type":["EcdsaUncompressedPublicKey","Keccak256Hash","Secp256SigRs"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/crypto/type.EcdsaUncompressedPublicKey.html b/static/rust/redstone/crypto_secp256k1/redstone/crypto/type.EcdsaUncompressedPublicKey.html new file mode 100644 index 00000000..5b852c97 --- /dev/null +++ b/static/rust/redstone/crypto_secp256k1/redstone/crypto/type.EcdsaUncompressedPublicKey.html @@ -0,0 +1 @@ +EcdsaUncompressedPublicKey in redstone::crypto - Rust

Type Alias redstone::crypto::EcdsaUncompressedPublicKey

source ·
pub(crate) type EcdsaUncompressedPublicKey = [u8; 65];
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/crypto/type.Keccak256Hash.html b/static/rust/redstone/crypto_secp256k1/redstone/crypto/type.Keccak256Hash.html new file mode 100644 index 00000000..2f59bdeb --- /dev/null +++ b/static/rust/redstone/crypto_secp256k1/redstone/crypto/type.Keccak256Hash.html @@ -0,0 +1 @@ +Keccak256Hash in redstone::crypto - Rust

Type Alias redstone::crypto::Keccak256Hash

source ·
pub(crate) type Keccak256Hash = [u8; 32];
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/crypto/type.Secp256SigRs.html b/static/rust/redstone/crypto_secp256k1/redstone/crypto/type.Secp256SigRs.html new file mode 100644 index 00000000..cbead115 --- /dev/null +++ b/static/rust/redstone/crypto_secp256k1/redstone/crypto/type.Secp256SigRs.html @@ -0,0 +1 @@ +Secp256SigRs in redstone::crypto - Rust

Type Alias redstone::crypto::Secp256SigRs

source ·
pub(crate) type Secp256SigRs = [u8; 64];
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/index.html b/static/rust/redstone/crypto_secp256k1/redstone/index.html index ea091ee8..1c83a111 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/index.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/index.html @@ -1,4 +1,4 @@ -redstone - Rust

Crate redstone

source ·
Expand description

§RedStone

+redstone - Rust

Crate redstone

source ·
Expand description

§RedStone

redstone is a collection of utilities to make deserializing&decrypting RedStone payload. It includes a pure Rust implementation, along with extensions for certain networks.

Different crypto-mechanisms are easily injectable. diff --git a/static/rust/redstone/crypto_secp256k1/redstone/macro.print_and_panic.html b/static/rust/redstone/crypto_secp256k1/redstone/macro.print_and_panic.html index b308eb68..468e62fc 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/macro.print_and_panic.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/macro.print_and_panic.html @@ -1,4 +1,4 @@ -print_and_panic in redstone - Rust

Macro redstone::print_and_panic

source ·
macro_rules! print_and_panic {
+print_and_panic in redstone - Rust

Macro redstone::print_and_panic

source ·
macro_rules! print_and_panic {
     ($fmt:expr) => { ... };
     ($fmt:expr, $($args:tt)*) => { ... };
 }
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/macro.print_debug.html b/static/rust/redstone/crypto_secp256k1/redstone/macro.print_debug.html index 3cb863d6..a8847b09 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/macro.print_debug.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/macro.print_debug.html @@ -1,4 +1,4 @@ -print_debug in redstone - Rust

Macro redstone::print_debug

source ·
macro_rules! print_debug {
+print_debug in redstone - Rust

Macro redstone::print_debug

source ·
macro_rules! print_debug {
     ($fmt:expr) => { ... };
     ($fmt:expr, $($args:tt)*) => { ... };
 }
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/network/as_str/index.html b/static/rust/redstone/crypto_secp256k1/redstone/network/as_str/index.html index 9f63a8ad..05ce8ab0 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/as_str/index.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/network/as_str/index.html @@ -1 +1 @@ -redstone::network::as_str - Rust

Module redstone::network::as_str

source ·

Traits§

\ No newline at end of file +redstone::network::as_str - Rust

Module redstone::network::as_str

source ·

Traits§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/network/as_str/trait.AsAsciiStr.html b/static/rust/redstone/crypto_secp256k1/redstone/network/as_str/trait.AsAsciiStr.html index 094c2e3e..a95b846f 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/as_str/trait.AsAsciiStr.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/network/as_str/trait.AsAsciiStr.html @@ -1,4 +1,4 @@ -AsAsciiStr in redstone::network::as_str - Rust

Trait redstone::network::as_str::AsAsciiStr

source ·
pub trait AsAsciiStr {
+AsAsciiStr in redstone::network::as_str - Rust

Trait redstone::network::as_str::AsAsciiStr

source ·
pub trait AsAsciiStr {
     // Required method
-    fn as_ascii_str(&self) -> String;
-}

Required Methods§

Implementations on Foreign Types§

source§

impl AsAsciiStr for &[u8]

source§

impl AsAsciiStr for Vec<u8>

Implementors§

\ No newline at end of file + fn as_ascii_str(&self) -> String; +}

Required Methods§

Implementations on Foreign Types§

source§

impl AsAsciiStr for &[u8]

source§

impl AsAsciiStr for Vec<u8>

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/network/as_str/trait.AsHexStr.html b/static/rust/redstone/crypto_secp256k1/redstone/network/as_str/trait.AsHexStr.html index 71d1669c..c236bef3 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/as_str/trait.AsHexStr.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/network/as_str/trait.AsHexStr.html @@ -1,4 +1,4 @@ -AsHexStr in redstone::network::as_str - Rust

Trait redstone::network::as_str::AsHexStr

source ·
pub trait AsHexStr {
+AsHexStr in redstone::network::as_str - Rust

Trait redstone::network::as_str::AsHexStr

source ·
pub trait AsHexStr {
     // Required method
-    fn as_hex_str(&self) -> String;
-}

Required Methods§

Implementations on Foreign Types§

source§

impl AsHexStr for &[u8]

source§

impl AsHexStr for Box<[u8]>

source§

impl AsHexStr for Vec<u8>

Implementors§

\ No newline at end of file + fn as_hex_str(&self) -> String; +}

Required Methods§

Implementations on Foreign Types§

source§

impl AsHexStr for &[u8]

source§

impl AsHexStr for Box<[u8]>

source§

impl AsHexStr for Vec<u8>

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/network/assert/fn.assert_or_revert.html b/static/rust/redstone/crypto_secp256k1/redstone/network/assert/fn.assert_or_revert.html index 13078112..1c579f09 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/assert/fn.assert_or_revert.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/network/assert/fn.assert_or_revert.html @@ -1,7 +1,7 @@ -assert_or_revert in redstone::network::assert - Rust

Function redstone::network::assert::assert_or_revert

source ·
fn assert_or_revert<F, T, E: FnOnce(&T) -> Error>(
+assert_or_revert in redstone::network::assert - Rust

Function redstone::network::assert::assert_or_revert

source ·
fn assert_or_revert<F, T, E: FnOnce(&T) -> Error>(
     arg: T,
     check: F,
     error: E,
 ) -> T
where - F: Fn(&T) -> bool, - T: Debug,
\ No newline at end of file + F: Fn(&T) -> bool, + T: Debug,
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/network/assert/fn.assert_or_revert_bool_with.html b/static/rust/redstone/crypto_secp256k1/redstone/network/assert/fn.assert_or_revert_bool_with.html index 385fc71e..7fd4c914 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/assert/fn.assert_or_revert_bool_with.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/network/assert/fn.assert_or_revert_bool_with.html @@ -1 +1 @@ -assert_or_revert_bool_with in redstone::network::assert - Rust

Function redstone::network::assert::assert_or_revert_bool_with

source ·
fn assert_or_revert_bool_with<E: FnOnce() -> Error>(check: bool, error: E)
\ No newline at end of file +assert_or_revert_bool_with in redstone::network::assert - Rust

Function redstone::network::assert::assert_or_revert_bool_with

source ·
fn assert_or_revert_bool_with<E: FnOnce() -> Error>(check: bool, error: E)
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/network/assert/index.html b/static/rust/redstone/crypto_secp256k1/redstone/network/assert/index.html index 680c61a9..a573fd72 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/assert/index.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/network/assert/index.html @@ -1 +1 @@ -redstone::network::assert - Rust

Module redstone::network::assert

source ·

Traits§

Functions§

\ No newline at end of file +redstone::network::assert - Rust

Module redstone::network::assert

source ·

Traits§

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/network/assert/trait.Assert.html b/static/rust/redstone/crypto_secp256k1/redstone/network/assert/trait.Assert.html index e068a406..0a3d27da 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/assert/trait.Assert.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/network/assert/trait.Assert.html @@ -1,6 +1,6 @@ -Assert in redstone::network::assert - Rust

Trait redstone::network::assert::Assert

source ·
pub trait Assert<F> {
+Assert in redstone::network::assert - Rust

Trait redstone::network::assert::Assert

source ·
pub trait Assert<F> {
     // Required method
-    fn assert_or_revert<E: Fn(&Self) -> Error>(self, check: F, error: E) -> Self;
-}

Required Methods§

source

fn assert_or_revert<E: Fn(&Self) -> Error>(self, check: F, error: E) -> Self

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T, F> Assert<F> for T
where - T: Debug, - F: Fn(&Self) -> bool,

\ No newline at end of file + fn assert_or_revert<E: Fn(&Self) -> Error>(self, check: F, error: E) -> Self; +}

Required Methods§

source

fn assert_or_revert<E: Fn(&Self) -> Error>(self, check: F, error: E) -> Self

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T, F> Assert<F> for T
where + T: Debug, + F: Fn(&Self) -> bool,

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/network/assert/trait.Unwrap.html b/static/rust/redstone/crypto_secp256k1/redstone/network/assert/trait.Unwrap.html index db1ea7bc..b995f4cd 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/assert/trait.Unwrap.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/network/assert/trait.Unwrap.html @@ -1,9 +1,9 @@ -Unwrap in redstone::network::assert - Rust

Trait redstone::network::assert::Unwrap

source ·
pub trait Unwrap<R> {
+Unwrap in redstone::network::assert - Rust

Trait redstone::network::assert::Unwrap

source ·
pub trait Unwrap<R> {
     type ErrorArg;
 
     // Required method
-    fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> R;
-}

Required Associated Types§

Required Methods§

source

fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> R

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T> Unwrap<T> for Option<T>
where - T: Debug,

§

type ErrorArg = ()

source§

fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> T

source§

impl<T, Err> Unwrap<T> for Result<T, Err>
where - T: Debug, - Err: Debug,

§

type ErrorArg = Err

source§

fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> T

Implementors§

\ No newline at end of file + fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> R; +}

Required Associated Types§

Required Methods§

source

fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> R

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T> Unwrap<T> for Option<T>
where + T: Debug,

§

type ErrorArg = ()

source§

fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> T

source§

impl<T, Err> Unwrap<T> for Result<T, Err>
where + T: Debug, + Err: Debug,

§

type ErrorArg = Err

source§

fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> T

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/network/error/enum.Error.html b/static/rust/redstone/crypto_secp256k1/redstone/network/error/enum.Error.html index 9cb4c379..d60089d3 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/error/enum.Error.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/network/error/enum.Error.html @@ -1,19 +1,19 @@ -Error in redstone::network::error - Rust

Enum redstone::network::error::Error

source ·
pub enum Error {
-    ContractError(Box<dyn ContractErrorContent>),
+Error in redstone::network::error - Rust

Enum redstone::network::error::Error

source ·
pub enum Error {
+    ContractError(Box<dyn ContractErrorContent>),
     NumberOverflow(U256),
     ArrayIsEmpty,
-    CryptographicError(usize),
-    SizeNotSupported(usize),
-    WrongRedStoneMarker(Vec<u8>),
-    NonEmptyPayloadRemainder(Vec<u8>),
-    InsufficientSignerCount(usize, usize, U256),
-    TimestampTooOld(usize, u64),
-    TimestampTooFuture(usize, u64),
-    ClonedContractError(u8, String),
+    CryptographicError(usize),
+    SizeNotSupported(usize),
+    WrongRedStoneMarker(Vec<u8>),
+    NonEmptyPayloadRemainder(Vec<u8>),
+    InsufficientSignerCount(usize, usize, U256),
+    TimestampTooOld(usize, u64),
+    TimestampTooFuture(usize, u64),
+    ClonedContractError(u8, String),
 }
Expand description

Errors that can be encountered in the deserializing&decrypting the RedStone payload or just contract execution process.

These errors include issues with contract logic, data types, cryptographic operations, and conditions specific to the requirements.

-

Variants§

§

ContractError(Box<dyn ContractErrorContent>)

Represents errors that arise from the contract itself.

+

Variants§

§

ContractError(Box<dyn ContractErrorContent>)

Represents errors that arise from the contract itself.

This variant is used for encapsulating errors that are specific to the contract’s logic or execution conditions that aren’t covered by more specific error types.

§

NumberOverflow(U256)

Indicates an overflow error with U256 numbers.

@@ -22,44 +22,45 @@
§

ArrayIsEmpty

Used when an expected non-empty array or vector is found to be empty.

This could occur in scenarios where the contract logic requires a non-empty collection of items for the correct operation, for example, during aggregating the values.

-
§

CryptographicError(usize)

Represents errors related to cryptographic operations.

+
§

CryptographicError(usize)

Represents errors related to cryptographic operations.

This includes failures in signature verification, hashing, or other cryptographic processes, with the usize indicating the position or identifier of the failed operation.

-
§

SizeNotSupported(usize)

Signifies that an unsupported size was encountered.

+
§

SizeNotSupported(usize)

Signifies that an unsupported size was encountered.

This could be used when a data structure or input does not meet the expected size requirements for processing.

-
§

WrongRedStoneMarker(Vec<u8>)

Indicates that the marker bytes for RedStone are incorrect.

+
§

WrongRedStoneMarker(Vec<u8>)

Indicates that the marker bytes for RedStone are incorrect.

This error is specific to scenarios where marker or identifier bytes do not match expected values, potentially indicating corrupted or tampered data.

-
§

NonEmptyPayloadRemainder(Vec<u8>)

Used when there is leftover data in a payload that should have been empty.

+
§

NonEmptyPayloadRemainder(Vec<u8>)

Used when there is leftover data in a payload that should have been empty.

This could indicate an error in data parsing or that additional, unexpected data was included in a message or transaction.

-
§

InsufficientSignerCount(usize, usize, U256)

Indicates that the number of signers does not meet the required threshold.

+
§

InsufficientSignerCount(usize, usize, U256)

Indicates that the number of signers does not meet the required threshold.

This variant includes the current number of signers, the required threshold, and potentially a feed_id related to the operation that failed due to insufficient signers.

-
§

TimestampTooOld(usize, u64)

Used when a timestamp is older than allowed by the processor logic.

+
§

TimestampTooOld(usize, u64)

Used when a timestamp is older than allowed by the processor logic.

Includes the position or identifier of the timestamp and the threshold value, indicating that the provided timestamp is too far in the past.

-
§

TimestampTooFuture(usize, u64)

Indicates that a timestamp is further in the future than allowed.

+
§

TimestampTooFuture(usize, u64)

Indicates that a timestamp is further in the future than allowed.

Similar to TimestampTooOld, but for future timestamps exceeding the contract’s acceptance window.

-
§

ClonedContractError(u8, String)

Represents errors that need to clone ContractErrorContent, which is not supported by default.

+
§

ClonedContractError(u8, String)

Represents errors that need to clone ContractErrorContent, which is not supported by default.

This variant allows for the manual duplication of contract error information, including an error code and a descriptive message.

-

Implementations§

source§

impl Error

source

pub fn contract_error<T: ContractErrorContent + 'static>(value: T) -> Error

source

pub(crate) fn code(&self) -> u16

Trait Implementations§

source§

impl Clone for Error

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Error

§

impl !RefUnwindSafe for Error

§

impl !Send for Error

§

impl !Sync for Error

§

impl Unpin for Error

§

impl !UnwindSafe for Error

Blanket Implementations§

source§

impl<T> Any for T
where - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where - T: Debug, - F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where - E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for T
where - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Implementations§

source§

impl Error

source

pub fn contract_error<T: ContractErrorContent + 'static>(value: T) -> Error

source

pub(crate) fn code(&self) -> u16

Trait Implementations§

source§

impl Clone for Error

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Error

§

impl !RefUnwindSafe for Error

§

impl !Send for Error

§

impl !Sync for Error

§

impl Unpin for Error

§

impl !UnwindSafe for Error

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where + T: Debug, + F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where + E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where + T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where - T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where +From<T> for U chooses to do.

+

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/network/error/index.html b/static/rust/redstone/crypto_secp256k1/redstone/network/error/index.html index e083b3b4..96a07109 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/error/index.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/network/error/index.html @@ -1 +1 @@ -redstone::network::error - Rust

Module redstone::network::error

source ·

Enums§

  • Errors that can be encountered in the deserializing&decrypting the RedStone payload or just contract execution process.

Traits§

\ No newline at end of file +redstone::network::error - Rust

Module redstone::network::error

source ·

Enums§

  • Errors that can be encountered in the deserializing&decrypting the RedStone payload or just contract execution process.

Traits§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/network/error/trait.ContractErrorContent.html b/static/rust/redstone/crypto_secp256k1/redstone/network/error/trait.ContractErrorContent.html index 577c3a6f..03e752aa 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/error/trait.ContractErrorContent.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/network/error/trait.ContractErrorContent.html @@ -1,5 +1,5 @@ -ContractErrorContent in redstone::network::error - Rust

Trait redstone::network::error::ContractErrorContent

source ·
pub trait ContractErrorContent: Debug {
+ContractErrorContent in redstone::network::error - Rust

Trait redstone::network::error::ContractErrorContent

source ·
pub trait ContractErrorContent: Debug {
     // Required methods
-    fn code(&self) -> u8;
-    fn message(&self) -> String;
-}

Required Methods§

source

fn code(&self) -> u8

source

fn message(&self) -> String

Implementors§

\ No newline at end of file + fn code(&self) -> u8; + fn message(&self) -> String; +}

Required Methods§

source

fn code(&self) -> u8

source

fn message(&self) -> String

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/network/flattened/index.html b/static/rust/redstone/crypto_secp256k1/redstone/network/flattened/index.html index e62982d8..1c855537 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/flattened/index.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/network/flattened/index.html @@ -1 +1 @@ -redstone::network::flattened - Rust

Module redstone::network::flattened

source ·

Traits§

\ No newline at end of file +redstone::network::flattened - Rust

Module redstone::network::flattened

source ·

Traits§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/network/flattened/trait.Flattened.html b/static/rust/redstone/crypto_secp256k1/redstone/network/flattened/trait.Flattened.html index 6e4f71a3..61e013cc 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/flattened/trait.Flattened.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/network/flattened/trait.Flattened.html @@ -1,4 +1,4 @@ -Flattened in redstone::network::flattened - Rust

Trait redstone::network::flattened::Flattened

source ·
pub trait Flattened<T> {
+Flattened in redstone::network::flattened - Rust

Trait redstone::network::flattened::Flattened

source ·
pub trait Flattened<T> {
     // Required method
     fn flattened(&self) -> T;
-}

Required Methods§

source

fn flattened(&self) -> T

Implementations on Foreign Types§

source§

impl Flattened<<Std as NetworkSpecific>::BytesRepr> for Vec<Bytes>

Implementors§

\ No newline at end of file +}

Required Methods§

source

fn flattened(&self) -> T

Implementations on Foreign Types§

source§

impl Flattened<<Std as NetworkSpecific>::BytesRepr> for Vec<Bytes>

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/network/from_bytes_repr/index.html b/static/rust/redstone/crypto_secp256k1/redstone/network/from_bytes_repr/index.html index 037b0f7e..3e91d071 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/from_bytes_repr/index.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/network/from_bytes_repr/index.html @@ -1 +1 @@ -redstone::network::from_bytes_repr - Rust

Module redstone::network::from_bytes_repr

source ·

Traits§

\ No newline at end of file +redstone::network::from_bytes_repr - Rust

Module redstone::network::from_bytes_repr

source ·

Traits§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/network/from_bytes_repr/trait.FromBytesRepr.html b/static/rust/redstone/crypto_secp256k1/redstone/network/from_bytes_repr/trait.FromBytesRepr.html index 54139e47..33cea492 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/from_bytes_repr/trait.FromBytesRepr.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/network/from_bytes_repr/trait.FromBytesRepr.html @@ -1,4 +1,4 @@ -FromBytesRepr in redstone::network::from_bytes_repr - Rust

Trait redstone::network::from_bytes_repr::FromBytesRepr

source ·
pub trait FromBytesRepr<T> {
+FromBytesRepr in redstone::network::from_bytes_repr - Rust

Trait redstone::network::from_bytes_repr::FromBytesRepr

source ·
pub trait FromBytesRepr<T> {
     // Required method
     fn from_bytes_repr(bytes: T) -> Self;
-}

Required Methods§

source

fn from_bytes_repr(bytes: T) -> Self

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file +}

Required Methods§

source

fn from_bytes_repr(bytes: T) -> Self

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/network/from_bytes_repr/trait.Sanitized.html b/static/rust/redstone/crypto_secp256k1/redstone/network/from_bytes_repr/trait.Sanitized.html index 79baf865..564f236f 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/from_bytes_repr/trait.Sanitized.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/network/from_bytes_repr/trait.Sanitized.html @@ -1,4 +1,4 @@ -Sanitized in redstone::network::from_bytes_repr - Rust

Trait redstone::network::from_bytes_repr::Sanitized

source ·
pub trait Sanitized {
+Sanitized in redstone::network::from_bytes_repr - Rust

Trait redstone::network::from_bytes_repr::Sanitized

source ·
pub trait Sanitized {
     // Required method
     fn sanitized(self) -> Self;
-}

Required Methods§

source

fn sanitized(self) -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Sanitized for Vec<u8>

source§

fn sanitized(self) -> Self

Implementors§

\ No newline at end of file +}

Required Methods§

source

fn sanitized(self) -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Sanitized for Vec<u8>

source§

fn sanitized(self) -> Self

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/network/index.html b/static/rust/redstone/crypto_secp256k1/redstone/network/index.html index a9fc43da..0331e2ad 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/index.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/network/index.html @@ -1 +1 @@ -redstone::network - Rust
\ No newline at end of file +redstone::network - Rust
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/network/print_debug/index.html b/static/rust/redstone/crypto_secp256k1/redstone/network/print_debug/index.html index ac53c72e..18bca892 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/print_debug/index.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/network/print_debug/index.html @@ -1 +1 @@ -redstone::network::print_debug - Rust

Module redstone::network::print_debug

source ·
\ No newline at end of file +redstone::network::print_debug - Rust

Module redstone::network::print_debug

source ·
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/network/pure/from_bytes_repr/index.html b/static/rust/redstone/crypto_secp256k1/redstone/network/pure/from_bytes_repr/index.html index f9f75a32..4527a046 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/pure/from_bytes_repr/index.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/network/pure/from_bytes_repr/index.html @@ -1 +1 @@ -redstone::network::pure::from_bytes_repr - Rust

Module redstone::network::pure::from_bytes_repr

source ·
\ No newline at end of file +redstone::network::pure::from_bytes_repr - Rust

Module redstone::network::pure::from_bytes_repr

source ·
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/network/pure/index.html b/static/rust/redstone/crypto_secp256k1/redstone/network/pure/index.html index fd752087..0a375ec9 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/pure/index.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/network/pure/index.html @@ -1 +1 @@ -redstone::network::pure - Rust

Module redstone::network::pure

source ·

Modules§

Structs§

\ No newline at end of file +redstone::network::pure - Rust

Module redstone::network::pure

source ·

Modules§

Structs§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/network/pure/struct.Std.html b/static/rust/redstone/crypto_secp256k1/redstone/network/pure/struct.Std.html index 3138ed4c..eae3d27e 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/pure/struct.Std.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/network/pure/struct.Std.html @@ -1,12 +1,12 @@ -Std in redstone::network::pure - Rust

Struct redstone::network::pure::Std

source ·
pub struct Std;

Trait Implementations§

Auto Trait Implementations§

§

impl Freeze for Std

§

impl RefUnwindSafe for Std

§

impl Send for Std

§

impl Sync for Std

§

impl Unpin for Std

§

impl UnwindSafe for Std

Blanket Implementations§

source§

impl<T> Any for T
where - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for T
where - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+Std in redstone::network::pure - Rust

Struct redstone::network::pure::Std

source ·
pub struct Std;

Trait Implementations§

Auto Trait Implementations§

§

impl Freeze for Std

§

impl RefUnwindSafe for Std

§

impl Send for Std

§

impl Sync for Std

§

impl Unpin for Std

§

impl UnwindSafe for Std

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where +From<T> for U chooses to do.

+

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/network/specific/constant.VALUE_SIZE.html b/static/rust/redstone/crypto_secp256k1/redstone/network/specific/constant.VALUE_SIZE.html index 2e47400c..286c9ec3 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/specific/constant.VALUE_SIZE.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/network/specific/constant.VALUE_SIZE.html @@ -1 +1 @@ -VALUE_SIZE in redstone::network::specific - Rust

Constant redstone::network::specific::VALUE_SIZE

source ·
pub const VALUE_SIZE: usize = <_Network as NetworkSpecific>::VALUE_SIZE; // 32usize
\ No newline at end of file +VALUE_SIZE in redstone::network::specific - Rust

Constant redstone::network::specific::VALUE_SIZE

source ·
pub const VALUE_SIZE: usize = <_Network as NetworkSpecific>::VALUE_SIZE; // 32usize
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/network/specific/fn.print.html b/static/rust/redstone/crypto_secp256k1/redstone/network/specific/fn.print.html index 414a9953..267b3a19 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/specific/fn.print.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/network/specific/fn.print.html @@ -1 +1 @@ -print in redstone::network::specific - Rust

Function redstone::network::specific::print

source ·
pub fn print(_text: String)
\ No newline at end of file +print in redstone::network::specific - Rust

Function redstone::network::specific::print

source ·
pub fn print(_text: String)
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/network/specific/fn.revert.html b/static/rust/redstone/crypto_secp256k1/redstone/network/specific/fn.revert.html index 2e9edf89..b38daa81 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/specific/fn.revert.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/network/specific/fn.revert.html @@ -1 +1 @@ -revert in redstone::network::specific - Rust

Function redstone::network::specific::revert

source ·
pub fn revert(error: Error) -> !
\ No newline at end of file +revert in redstone::network::specific - Rust

Function redstone::network::specific::revert

source ·
pub fn revert(error: Error) -> !
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/network/specific/index.html b/static/rust/redstone/crypto_secp256k1/redstone/network/specific/index.html index 1378d9dc..36a5939d 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/specific/index.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/network/specific/index.html @@ -1 +1 @@ -redstone::network::specific - Rust

Module redstone::network::specific

source ·

Constants§

Traits§

Functions§

Type Aliases§

\ No newline at end of file +redstone::network::specific - Rust

Module redstone::network::specific

source ·

Constants§

Traits§

Functions§

Type Aliases§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/network/specific/trait.NetworkSpecific.html b/static/rust/redstone/crypto_secp256k1/redstone/network/specific/trait.NetworkSpecific.html index 85367773..ba2a3d79 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/specific/trait.NetworkSpecific.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/network/specific/trait.NetworkSpecific.html @@ -1,11 +1,11 @@ -NetworkSpecific in redstone::network::specific - Rust

Trait redstone::network::specific::NetworkSpecific

source ·
pub trait NetworkSpecific {
-    type BytesRepr: From<Vec<u8>> + Into<Vec<u8>>;
-    type ValueRepr: FromBytesRepr<Vec<u8>>;
+NetworkSpecific in redstone::network::specific - Rust

Trait redstone::network::specific::NetworkSpecific

source ·
pub trait NetworkSpecific {
+    type BytesRepr: From<Vec<u8>> + Into<Vec<u8>>;
+    type ValueRepr: FromBytesRepr<Vec<u8>>;
     type _Self;
 
-    const VALUE_SIZE: usize;
+    const VALUE_SIZE: usize;
 
     // Required methods
-    fn print(_text: String);
-    fn revert(error: Error) -> !;
-}

Required Associated Types§

Required Associated Constants§

Required Methods§

source

fn print(_text: String)

source

fn revert(error: Error) -> !

Object Safety§

This trait is not object safe.

Implementors§

source§

impl NetworkSpecific for Std

§

type BytesRepr = Vec<u8>

§

type ValueRepr = U256

§

type _Self = Std

source§

const VALUE_SIZE: usize = 32usize

\ No newline at end of file + fn print(_text: String); + fn revert(error: Error) -> !; +}

Required Associated Types§

Required Associated Constants§

Required Methods§

source

fn print(_text: String)

source

fn revert(error: Error) -> !

Object Safety§

This trait is not object safe.

Implementors§

source§

impl NetworkSpecific for Std

§

type BytesRepr = Vec<u8>

§

type ValueRepr = U256

§

type _Self = Std

source§

const VALUE_SIZE: usize = 32usize

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/network/specific/type.Bytes.html b/static/rust/redstone/crypto_secp256k1/redstone/network/specific/type.Bytes.html index 04a40a5a..4f99def8 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/specific/type.Bytes.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/network/specific/type.Bytes.html @@ -1 +1 @@ -Bytes in redstone::network::specific - Rust

Type Alias redstone::network::specific::Bytes

source ·
pub type Bytes = <_Network as NetworkSpecific>::BytesRepr;
\ No newline at end of file +Bytes in redstone::network::specific - Rust

Type Alias redstone::network::specific::Bytes

source ·
pub type Bytes = <_Network as NetworkSpecific>::BytesRepr;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/network/specific/type.Network.html b/static/rust/redstone/crypto_secp256k1/redstone/network/specific/type.Network.html index 40e404c9..506ed82a 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/specific/type.Network.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/network/specific/type.Network.html @@ -1 +1 @@ -Network in redstone::network::specific - Rust

Type Alias redstone::network::specific::Network

source ·
pub(crate) type Network = <_Network as NetworkSpecific>::_Self;
\ No newline at end of file +Network in redstone::network::specific - Rust

Type Alias redstone::network::specific::Network

source ·
pub(crate) type Network = <_Network as NetworkSpecific>::_Self;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/network/specific/type.U256.html b/static/rust/redstone/crypto_secp256k1/redstone/network/specific/type.U256.html index f3f9c595..a6293b54 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/specific/type.U256.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/network/specific/type.U256.html @@ -1 +1 @@ -U256 in redstone::network::specific - Rust

Type Alias redstone::network::specific::U256

source ·
pub type U256 = <_Network as NetworkSpecific>::ValueRepr;

Trait Implementations§

\ No newline at end of file +U256 in redstone::network::specific - Rust

Type Alias redstone::network::specific::U256

source ·
pub type U256 = <_Network as NetworkSpecific>::ValueRepr;

Trait Implementations§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/network/type._Network.html b/static/rust/redstone/crypto_secp256k1/redstone/network/type._Network.html index 72f68b07..f3eb1236 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/type._Network.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/network/type._Network.html @@ -1 +1 @@ -_Network in redstone::network - Rust

Type Alias redstone::network::_Network

source ·
pub type _Network = Std;

Aliased Type§

struct _Network;
\ No newline at end of file +_Network in redstone::network - Rust

Type Alias redstone::network::_Network

source ·
pub type _Network = Std;

Aliased Type§

struct _Network;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.DATA_FEED_ID_BS.html b/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.DATA_FEED_ID_BS.html index 72b04b86..8a6e1da5 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.DATA_FEED_ID_BS.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.DATA_FEED_ID_BS.html @@ -1 +1 @@ -DATA_FEED_ID_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::DATA_FEED_ID_BS

source ·
pub(crate) const DATA_FEED_ID_BS: usize = 32;
\ No newline at end of file +DATA_FEED_ID_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::DATA_FEED_ID_BS

source ·
pub(crate) const DATA_FEED_ID_BS: usize = 32;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.DATA_PACKAGES_COUNT_BS.html b/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.DATA_PACKAGES_COUNT_BS.html index fed432b2..5785e972 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.DATA_PACKAGES_COUNT_BS.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.DATA_PACKAGES_COUNT_BS.html @@ -1 +1 @@ -DATA_PACKAGES_COUNT_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::DATA_PACKAGES_COUNT_BS

source ·
pub(crate) const DATA_PACKAGES_COUNT_BS: usize = 2;
\ No newline at end of file +DATA_PACKAGES_COUNT_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::DATA_PACKAGES_COUNT_BS

source ·
pub(crate) const DATA_PACKAGES_COUNT_BS: usize = 2;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.DATA_POINTS_COUNT_BS.html b/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.DATA_POINTS_COUNT_BS.html index f25ed2f5..dfe6f9fa 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.DATA_POINTS_COUNT_BS.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.DATA_POINTS_COUNT_BS.html @@ -1 +1 @@ -DATA_POINTS_COUNT_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::DATA_POINTS_COUNT_BS

source ·
pub(crate) const DATA_POINTS_COUNT_BS: usize = 3;
\ No newline at end of file +DATA_POINTS_COUNT_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::DATA_POINTS_COUNT_BS

source ·
pub(crate) const DATA_POINTS_COUNT_BS: usize = 3;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.DATA_POINT_VALUE_BYTE_SIZE_BS.html b/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.DATA_POINT_VALUE_BYTE_SIZE_BS.html index 95f9c3d5..2ac22658 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.DATA_POINT_VALUE_BYTE_SIZE_BS.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.DATA_POINT_VALUE_BYTE_SIZE_BS.html @@ -1 +1 @@ -DATA_POINT_VALUE_BYTE_SIZE_BS in redstone::protocol::constants - Rust
pub(crate) const DATA_POINT_VALUE_BYTE_SIZE_BS: usize = 4;
\ No newline at end of file +DATA_POINT_VALUE_BYTE_SIZE_BS in redstone::protocol::constants - Rust
pub(crate) const DATA_POINT_VALUE_BYTE_SIZE_BS: usize = 4;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.MAX_TIMESTAMP_AHEAD_MS.html b/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.MAX_TIMESTAMP_AHEAD_MS.html index 160a69a6..748a6718 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.MAX_TIMESTAMP_AHEAD_MS.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.MAX_TIMESTAMP_AHEAD_MS.html @@ -1 +1 @@ -MAX_TIMESTAMP_AHEAD_MS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::MAX_TIMESTAMP_AHEAD_MS

source ·
pub(crate) const MAX_TIMESTAMP_AHEAD_MS: u64 = _; // 180_000u64
\ No newline at end of file +MAX_TIMESTAMP_AHEAD_MS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::MAX_TIMESTAMP_AHEAD_MS

source ·
pub(crate) const MAX_TIMESTAMP_AHEAD_MS: u64 = _; // 180_000u64
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.MAX_TIMESTAMP_DELAY_MS.html b/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.MAX_TIMESTAMP_DELAY_MS.html index 47c72d3b..29966450 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.MAX_TIMESTAMP_DELAY_MS.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.MAX_TIMESTAMP_DELAY_MS.html @@ -1 +1 @@ -MAX_TIMESTAMP_DELAY_MS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::MAX_TIMESTAMP_DELAY_MS

source ·
pub(crate) const MAX_TIMESTAMP_DELAY_MS: u64 = _; // 900_000u64
\ No newline at end of file +MAX_TIMESTAMP_DELAY_MS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::MAX_TIMESTAMP_DELAY_MS

source ·
pub(crate) const MAX_TIMESTAMP_DELAY_MS: u64 = _; // 900_000u64
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.REDSTONE_MARKER.html b/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.REDSTONE_MARKER.html index 07258216..29b8c249 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.REDSTONE_MARKER.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.REDSTONE_MARKER.html @@ -1 +1 @@ -REDSTONE_MARKER in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::REDSTONE_MARKER

source ·
pub(crate) const REDSTONE_MARKER: [u8; 9];
\ No newline at end of file +REDSTONE_MARKER in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::REDSTONE_MARKER

source ·
pub(crate) const REDSTONE_MARKER: [u8; 9];
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.REDSTONE_MARKER_BS.html b/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.REDSTONE_MARKER_BS.html index 21ea69ca..6a9ebb32 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.REDSTONE_MARKER_BS.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.REDSTONE_MARKER_BS.html @@ -1 +1 @@ -REDSTONE_MARKER_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::REDSTONE_MARKER_BS

source ·
pub(crate) const REDSTONE_MARKER_BS: usize = 9;
\ No newline at end of file +REDSTONE_MARKER_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::REDSTONE_MARKER_BS

source ·
pub(crate) const REDSTONE_MARKER_BS: usize = 9;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.SIGNATURE_BS.html b/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.SIGNATURE_BS.html index 2a3a5b7f..ca094747 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.SIGNATURE_BS.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.SIGNATURE_BS.html @@ -1 +1 @@ -SIGNATURE_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::SIGNATURE_BS

source ·
pub(crate) const SIGNATURE_BS: usize = 65;
\ No newline at end of file +SIGNATURE_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::SIGNATURE_BS

source ·
pub(crate) const SIGNATURE_BS: usize = 65;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.TIMESTAMP_BS.html b/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.TIMESTAMP_BS.html index 1635207a..38d27451 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.TIMESTAMP_BS.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.TIMESTAMP_BS.html @@ -1 +1 @@ -TIMESTAMP_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::TIMESTAMP_BS

source ·
pub(crate) const TIMESTAMP_BS: usize = 6;
\ No newline at end of file +TIMESTAMP_BS in redstone::protocol::constants - Rust

Constant redstone::protocol::constants::TIMESTAMP_BS

source ·
pub(crate) const TIMESTAMP_BS: usize = 6;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.UNSIGNED_METADATA_BYTE_SIZE_BS.html b/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.UNSIGNED_METADATA_BYTE_SIZE_BS.html index a7ccdc60..3b0a9907 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.UNSIGNED_METADATA_BYTE_SIZE_BS.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.UNSIGNED_METADATA_BYTE_SIZE_BS.html @@ -1 +1 @@ -UNSIGNED_METADATA_BYTE_SIZE_BS in redstone::protocol::constants - Rust
pub(crate) const UNSIGNED_METADATA_BYTE_SIZE_BS: usize = 3;
\ No newline at end of file +UNSIGNED_METADATA_BYTE_SIZE_BS in redstone::protocol::constants - Rust
pub(crate) const UNSIGNED_METADATA_BYTE_SIZE_BS: usize = 3;
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/index.html b/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/index.html index 0268cb89..2eb1f7cf 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/index.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/index.html @@ -1 +1 @@ -redstone::protocol::constants - Rust
\ No newline at end of file +redstone::protocol::constants - Rust
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_package/fn.trim_data_package.html b/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_package/fn.trim_data_package.html index f1456016..25bf7e05 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_package/fn.trim_data_package.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_package/fn.trim_data_package.html @@ -1 +1 @@ -trim_data_package in redstone::protocol::data_package - Rust

Function redstone::protocol::data_package::trim_data_package

source ·
fn trim_data_package(payload: &mut Vec<u8>) -> DataPackage
\ No newline at end of file +trim_data_package in redstone::protocol::data_package - Rust

Function redstone::protocol::data_package::trim_data_package

source ·
fn trim_data_package(payload: &mut Vec<u8>) -> DataPackage
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_package/fn.trim_data_packages.html b/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_package/fn.trim_data_packages.html index 393e9998..7ae9270e 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_package/fn.trim_data_packages.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_package/fn.trim_data_packages.html @@ -1,4 +1,4 @@ -trim_data_packages in redstone::protocol::data_package - Rust

Function redstone::protocol::data_package::trim_data_packages

source ·
pub(crate) fn trim_data_packages(
-    payload: &mut Vec<u8>,
-    count: usize,
-) -> Vec<DataPackage>
\ No newline at end of file +trim_data_packages in redstone::protocol::data_package - Rust

Function redstone::protocol::data_package::trim_data_packages

source ·
pub(crate) fn trim_data_packages(
+    payload: &mut Vec<u8>,
+    count: usize,
+) -> Vec<DataPackage>
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_package/index.html b/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_package/index.html index 4f7ef4c4..71e2a3df 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_package/index.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_package/index.html @@ -1 +1 @@ -redstone::protocol::data_package - Rust

Module redstone::protocol::data_package

source ·

Structs§

Functions§

\ No newline at end of file +redstone::protocol::data_package - Rust

Module redstone::protocol::data_package

source ·

Structs§

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_package/struct.DataPackage.html b/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_package/struct.DataPackage.html index b77c9d35..1cdc961b 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_package/struct.DataPackage.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_package/struct.DataPackage.html @@ -1,22 +1,23 @@ -DataPackage in redstone::protocol::data_package - Rust

Struct redstone::protocol::data_package::DataPackage

source ·
pub(crate) struct DataPackage {
-    pub(crate) signer_address: Vec<u8>,
-    pub(crate) timestamp: u64,
-    pub(crate) data_points: Vec<DataPoint>,
-}

Fields§

§signer_address: Vec<u8>§timestamp: u64§data_points: Vec<DataPoint>

Trait Implementations§

source§

impl Clone for DataPackage

source§

fn clone(&self) -> DataPackage

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DataPackage

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for DataPackage

source§

fn eq(&self, other: &DataPackage) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Eq for DataPackage

source§

impl StructuralPartialEq for DataPackage

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where - T: Debug, - F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where - E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for T
where - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+DataPackage in redstone::protocol::data_package - Rust

Struct redstone::protocol::data_package::DataPackage

source ·
pub(crate) struct DataPackage {
+    pub(crate) signer_address: Vec<u8>,
+    pub(crate) timestamp: u64,
+    pub(crate) data_points: Vec<DataPoint>,
+}

Fields§

§signer_address: Vec<u8>§timestamp: u64§data_points: Vec<DataPoint>

Trait Implementations§

source§

impl Clone for DataPackage

source§

fn clone(&self) -> DataPackage

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DataPackage

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for DataPackage

source§

fn eq(&self, other: &DataPackage) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for DataPackage

source§

impl StructuralPartialEq for DataPackage

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where + T: Debug, + F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where + E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where + T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where +From<T> for U chooses to do.

+

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_point/fn.trim_data_point.html b/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_point/fn.trim_data_point.html index 10a3aa68..ef63a213 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_point/fn.trim_data_point.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_point/fn.trim_data_point.html @@ -1 +1 @@ -trim_data_point in redstone::protocol::data_point - Rust

Function redstone::protocol::data_point::trim_data_point

source ·
fn trim_data_point(payload: &mut Vec<u8>, value_size: usize) -> DataPoint
\ No newline at end of file +trim_data_point in redstone::protocol::data_point - Rust

Function redstone::protocol::data_point::trim_data_point

source ·
fn trim_data_point(payload: &mut Vec<u8>, value_size: usize) -> DataPoint
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_point/fn.trim_data_points.html b/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_point/fn.trim_data_points.html index 4bc76a0f..6c2d70c3 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_point/fn.trim_data_points.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_point/fn.trim_data_points.html @@ -1,5 +1,5 @@ -trim_data_points in redstone::protocol::data_point - Rust

Function redstone::protocol::data_point::trim_data_points

source ·
pub(crate) fn trim_data_points(
-    payload: &mut Vec<u8>,
-    count: usize,
-    value_size: usize,
-) -> Vec<DataPoint>
\ No newline at end of file +trim_data_points in redstone::protocol::data_point - Rust

Function redstone::protocol::data_point::trim_data_points

source ·
pub(crate) fn trim_data_points(
+    payload: &mut Vec<u8>,
+    count: usize,
+    value_size: usize,
+) -> Vec<DataPoint>
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_point/index.html b/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_point/index.html index 6ab1baf0..47323ad6 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_point/index.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_point/index.html @@ -1 +1 @@ -redstone::protocol::data_point - Rust

Module redstone::protocol::data_point

source ·

Structs§

Functions§

\ No newline at end of file +redstone::protocol::data_point - Rust

Module redstone::protocol::data_point

source ·

Structs§

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_point/struct.DataPoint.html b/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_point/struct.DataPoint.html index 4cee4899..eee0d029 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_point/struct.DataPoint.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_point/struct.DataPoint.html @@ -1,21 +1,22 @@ -DataPoint in redstone::protocol::data_point - Rust

Struct redstone::protocol::data_point::DataPoint

source ·
pub(crate) struct DataPoint {
+DataPoint in redstone::protocol::data_point - Rust

Struct redstone::protocol::data_point::DataPoint

source ·
pub(crate) struct DataPoint {
     pub(crate) feed_id: U256,
     pub(crate) value: U256,
-}

Fields§

§feed_id: U256§value: U256

Trait Implementations§

source§

impl Clone for DataPoint

source§

fn clone(&self) -> DataPoint

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DataPoint

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for DataPoint

source§

fn eq(&self, other: &DataPoint) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Eq for DataPoint

source§

impl StructuralPartialEq for DataPoint

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where - T: Debug, - F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where - E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for T
where - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+}

Fields§

§feed_id: U256§value: U256

Trait Implementations§

source§

impl Clone for DataPoint

source§

fn clone(&self) -> DataPoint

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DataPoint

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for DataPoint

source§

fn eq(&self, other: &DataPoint) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for DataPoint

source§

impl StructuralPartialEq for DataPoint

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where + T: Debug, + F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where + E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where + T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where +From<T> for U chooses to do.

+

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/protocol/index.html b/static/rust/redstone/crypto_secp256k1/redstone/protocol/index.html index d221f7b2..933f37aa 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/index.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/protocol/index.html @@ -1 +1 @@ -redstone::protocol - Rust

Module redstone::protocol

source ·

Modules§

\ No newline at end of file +redstone::protocol - Rust

Module redstone::protocol

source ·

Modules§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/protocol/marker/fn.trim_redstone_marker.html b/static/rust/redstone/crypto_secp256k1/redstone/protocol/marker/fn.trim_redstone_marker.html index fb7c7144..01093e84 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/marker/fn.trim_redstone_marker.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/protocol/marker/fn.trim_redstone_marker.html @@ -1 +1 @@ -trim_redstone_marker in redstone::protocol::marker - Rust

Function redstone::protocol::marker::trim_redstone_marker

source ·
pub fn trim_redstone_marker(payload: &mut Vec<u8>)
\ No newline at end of file +trim_redstone_marker in redstone::protocol::marker - Rust

Function redstone::protocol::marker::trim_redstone_marker

source ·
pub fn trim_redstone_marker(payload: &mut Vec<u8>)
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/protocol/marker/index.html b/static/rust/redstone/crypto_secp256k1/redstone/protocol/marker/index.html index 9844daf7..0ac4ef1d 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/marker/index.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/protocol/marker/index.html @@ -1 +1 @@ -redstone::protocol::marker - Rust

Module redstone::protocol::marker

source ·

Functions§

\ No newline at end of file +redstone::protocol::marker - Rust

Module redstone::protocol::marker

source ·

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/protocol/payload/fn.trim_metadata.html b/static/rust/redstone/crypto_secp256k1/redstone/protocol/payload/fn.trim_metadata.html index b3e6350e..ce8dcf29 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/payload/fn.trim_metadata.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/protocol/payload/fn.trim_metadata.html @@ -1 +1 @@ -trim_metadata in redstone::protocol::payload - Rust

Function redstone::protocol::payload::trim_metadata

source ·
fn trim_metadata(payload: &mut Vec<u8>) -> usize
\ No newline at end of file +trim_metadata in redstone::protocol::payload - Rust

Function redstone::protocol::payload::trim_metadata

source ·
fn trim_metadata(payload: &mut Vec<u8>) -> usize
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/protocol/payload/fn.trim_payload.html b/static/rust/redstone/crypto_secp256k1/redstone/protocol/payload/fn.trim_payload.html index 9eae9fdd..9805f954 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/payload/fn.trim_payload.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/protocol/payload/fn.trim_payload.html @@ -1 +1 @@ -trim_payload in redstone::protocol::payload - Rust

Function redstone::protocol::payload::trim_payload

source ·
fn trim_payload(payload: &mut Vec<u8>) -> Payload
\ No newline at end of file +trim_payload in redstone::protocol::payload - Rust

Function redstone::protocol::payload::trim_payload

source ·
fn trim_payload(payload: &mut Vec<u8>) -> Payload
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/protocol/payload/index.html b/static/rust/redstone/crypto_secp256k1/redstone/protocol/payload/index.html index 7bedf304..7ef700d8 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/payload/index.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/protocol/payload/index.html @@ -1 +1 @@ -redstone::protocol::payload - Rust

Module redstone::protocol::payload

source ·

Structs§

Functions§

\ No newline at end of file +redstone::protocol::payload - Rust

Module redstone::protocol::payload

source ·

Structs§

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/protocol/payload/struct.Payload.html b/static/rust/redstone/crypto_secp256k1/redstone/protocol/payload/struct.Payload.html index 9234341b..94e5a48e 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/payload/struct.Payload.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/protocol/payload/struct.Payload.html @@ -1,18 +1,19 @@ -Payload in redstone::protocol::payload - Rust

Struct redstone::protocol::payload::Payload

source ·
pub(crate) struct Payload {
-    pub(crate) data_packages: Vec<DataPackage>,
-}

Fields§

§data_packages: Vec<DataPackage>

Implementations§

source§

impl Payload

source

pub(crate) fn make(payload_bytes: &mut Vec<u8>) -> Payload

Trait Implementations§

source§

impl Clone for Payload

source§

fn clone(&self) -> Payload

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Payload

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where - T: Debug, - F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where - E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for T
where - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+Payload in redstone::protocol::payload - Rust

Struct redstone::protocol::payload::Payload

source ·
pub(crate) struct Payload {
+    pub(crate) data_packages: Vec<DataPackage>,
+}

Fields§

§data_packages: Vec<DataPackage>

Implementations§

source§

impl Payload

source

pub(crate) fn make(payload_bytes: &mut Vec<u8>) -> Payload

Trait Implementations§

source§

impl Clone for Payload

source§

fn clone(&self) -> Payload

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Payload

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, F> Assert<F> for T
where + T: Debug, + F: Fn(&T) -> bool,

source§

fn assert_or_revert<E>(self, check: F, error: E) -> T
where + E: FnOnce(&T) -> Error,

source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where + T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

-
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where +From<T> for U chooses to do.

+

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/utils/filter/index.html b/static/rust/redstone/crypto_secp256k1/redstone/utils/filter/index.html index a153fc5f..fa4dd4df 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/utils/filter/index.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/utils/filter/index.html @@ -1 +1 @@ -redstone::utils::filter - Rust

Module redstone::utils::filter

source ·

Traits§

\ No newline at end of file +redstone::utils::filter - Rust

Module redstone::utils::filter

source ·

Traits§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/utils/filter/trait.FilterSome.html b/static/rust/redstone/crypto_secp256k1/redstone/utils/filter/trait.FilterSome.html index 69bc1f28..d00cce8b 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/utils/filter/trait.FilterSome.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/utils/filter/trait.FilterSome.html @@ -1,4 +1,4 @@ -FilterSome in redstone::utils::filter - Rust

Trait redstone::utils::filter::FilterSome

source ·
pub(crate) trait FilterSome<Output> {
+FilterSome in redstone::utils::filter - Rust

Trait redstone::utils::filter::FilterSome

source ·
pub(crate) trait FilterSome<Output> {
     // Required method
     fn filter_some(&self) -> Output;
-}

Required Methods§

source

fn filter_some(&self) -> Output

Implementations on Foreign Types§

source§

impl<T: Copy> FilterSome<Vec<T>> for [Option<T>]

source§

fn filter_some(&self) -> Vec<T>

Implementors§

\ No newline at end of file +}

Required Methods§

source

fn filter_some(&self) -> Output

Implementations on Foreign Types§

source§

impl<T: Copy> FilterSome<Vec<T>> for [Option<T>]

source§

fn filter_some(&self) -> Vec<T>

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/utils/index.html b/static/rust/redstone/crypto_secp256k1/redstone/utils/index.html index ef51ef17..d5ce81a0 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/utils/index.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/utils/index.html @@ -1 +1 @@ -redstone::utils - Rust

Module redstone::utils

source ·

Modules§

\ No newline at end of file +redstone::utils - Rust

Module redstone::utils

source ·

Modules§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/utils/median/fn.maybe_pick_median.html b/static/rust/redstone/crypto_secp256k1/redstone/utils/median/fn.maybe_pick_median.html index ebb4b4a4..027bd4bd 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/utils/median/fn.maybe_pick_median.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/utils/median/fn.maybe_pick_median.html @@ -1,2 +1,2 @@ -maybe_pick_median in redstone::utils::median - Rust

Function redstone::utils::median::maybe_pick_median

source ·
fn maybe_pick_median<T>(a: T, b: T, c: T) -> Option<T>
where - T: PartialOrd,
\ No newline at end of file +maybe_pick_median in redstone::utils::median - Rust

Function redstone::utils::median::maybe_pick_median

source ·
fn maybe_pick_median<T>(a: T, b: T, c: T) -> Option<T>
where + T: PartialOrd,
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/utils/median/index.html b/static/rust/redstone/crypto_secp256k1/redstone/utils/median/index.html index 9a4952c3..18678dad 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/utils/median/index.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/utils/median/index.html @@ -1 +1 @@ -redstone::utils::median - Rust

Module redstone::utils::median

source ·

Traits§

Functions§

\ No newline at end of file +redstone::utils::median - Rust

Module redstone::utils::median

source ·

Traits§

Functions§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/utils/median/trait.Averageable.html b/static/rust/redstone/crypto_secp256k1/redstone/utils/median/trait.Averageable.html index 3ef3b4b4..6e55e2ec 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/utils/median/trait.Averageable.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/utils/median/trait.Averageable.html @@ -1 +1 @@ -Averageable in redstone::utils::median - Rust

Trait redstone::utils::median::Averageable

source ·
trait Averageable: Add<Output = Self> + Shr<Output = Self> + From<u8> + Rem<Output = Self> + Copy { }

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Averageable for i32

Implementors§

\ No newline at end of file +Averageable in redstone::utils::median - Rust

Trait redstone::utils::median::Averageable

source ·
trait Averageable: Add<Output = Self> + Shr<Output = Self> + From<u8> + Rem<Output = Self> + Copy { }

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Averageable for i32

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/utils/median/trait.Avg.html b/static/rust/redstone/crypto_secp256k1/redstone/utils/median/trait.Avg.html index 200d300b..bd2c4cfd 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/utils/median/trait.Avg.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/utils/median/trait.Avg.html @@ -1,5 +1,5 @@ -Avg in redstone::utils::median - Rust

Trait redstone::utils::median::Avg

source ·
trait Avg {
+Avg in redstone::utils::median - Rust

Trait redstone::utils::median::Avg

source ·
trait Avg {
     // Required method
     fn avg(self, other: Self) -> Self;
-}

Required Methods§

source

fn avg(self, other: Self) -> Self

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> Avg for T
where +}

Required Methods§

source

fn avg(self, other: Self) -> Self

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> Avg for T
where T: Averageable,

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/utils/median/trait.Median.html b/static/rust/redstone/crypto_secp256k1/redstone/utils/median/trait.Median.html index 60047574..405ac93d 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/utils/median/trait.Median.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/utils/median/trait.Median.html @@ -1,7 +1,7 @@ -Median in redstone::utils::median - Rust

Trait redstone::utils::median::Median

source ·
pub(crate) trait Median {
+Median in redstone::utils::median - Rust

Trait redstone::utils::median::Median

source ·
pub(crate) trait Median {
     type Item;
 
     // Required method
     fn median(self) -> Self::Item;
-}

Required Associated Types§

Required Methods§

source

fn median(self) -> Self::Item

Implementations on Foreign Types§

source§

impl<T> Median for Vec<T>
where - T: Copy + Ord + Avg,

§

type Item = T

source§

fn median(self) -> Self::Item

Implementors§

\ No newline at end of file +}

Required Associated Types§

Required Methods§

source

fn median(self) -> Self::Item

Implementations on Foreign Types§

source§

impl<T> Median for Vec<T>
where + T: Copy + Ord + Avg,

§

type Item = T

source§

fn median(self) -> Self::Item

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/utils/trim/index.html b/static/rust/redstone/crypto_secp256k1/redstone/utils/trim/index.html index e7e6608a..b4c2c47c 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/utils/trim/index.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/utils/trim/index.html @@ -1 +1 @@ -redstone::utils::trim - Rust

Module redstone::utils::trim

source ·

Traits§

\ No newline at end of file +redstone::utils::trim - Rust

Module redstone::utils::trim

source ·

Traits§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/utils/trim/trait.Trim.html b/static/rust/redstone/crypto_secp256k1/redstone/utils/trim/trait.Trim.html index 9e458a9e..720a0534 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/utils/trim/trait.Trim.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/utils/trim/trait.Trim.html @@ -1,5 +1,5 @@ -Trim in redstone::utils::trim - Rust

Trait redstone::utils::trim::Trim

source ·
pub trait Trim<T>
where - Self: Sized,
{ +Trim in redstone::utils::trim - Rust

Trait redstone::utils::trim::Trim

source ·
pub trait Trim<T>
where + Self: Sized,
{ // Required method - fn trim_end(&mut self, len: usize) -> T; -}

Required Methods§

source

fn trim_end(&mut self, len: usize) -> T

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Trim<<Std as NetworkSpecific>::ValueRepr> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> U256

source§

impl Trim<u64> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> u64

source§

impl Trim<usize> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> usize

source§

impl Trim<Vec<u8>> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> Self

Implementors§

\ No newline at end of file + fn trim_end(&mut self, len: usize) -> T; +}

Required Methods§

source

fn trim_end(&mut self, len: usize) -> T

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Trim<<Std as NetworkSpecific>::ValueRepr> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> U256

source§

impl Trim<u64> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> u64

source§

impl Trim<usize> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> usize

source§

impl Trim<Vec<u8>> for Vec<u8>

source§

fn trim_end(&mut self, len: usize) -> Self

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/utils/trim_zeros/index.html b/static/rust/redstone/crypto_secp256k1/redstone/utils/trim_zeros/index.html index 2a2fd9e0..9377f30d 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/utils/trim_zeros/index.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/utils/trim_zeros/index.html @@ -1 +1 @@ -redstone::utils::trim_zeros - Rust

Module redstone::utils::trim_zeros

source ·

Traits§

\ No newline at end of file +redstone::utils::trim_zeros - Rust

Module redstone::utils::trim_zeros

source ·

Traits§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/utils/trim_zeros/trait.TrimZeros.html b/static/rust/redstone/crypto_secp256k1/redstone/utils/trim_zeros/trait.TrimZeros.html index f1299ca4..ae49a55d 100644 --- a/static/rust/redstone/crypto_secp256k1/redstone/utils/trim_zeros/trait.TrimZeros.html +++ b/static/rust/redstone/crypto_secp256k1/redstone/utils/trim_zeros/trait.TrimZeros.html @@ -1,4 +1,4 @@ -TrimZeros in redstone::utils::trim_zeros - Rust

Trait redstone::utils::trim_zeros::TrimZeros

source ·
pub trait TrimZeros {
+TrimZeros in redstone::utils::trim_zeros - Rust

Trait redstone::utils::trim_zeros::TrimZeros

source ·
pub trait TrimZeros {
     // Required method
     fn trim_zeros(self) -> Self;
-}

Required Methods§

source

fn trim_zeros(self) -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl TrimZeros for Vec<u8>

source§

fn trim_zeros(self) -> Self

Implementors§

\ No newline at end of file +}

Required Methods§

source

fn trim_zeros(self) -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl TrimZeros for Vec<u8>

source§

fn trim_zeros(self) -> Self

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/search-index.js b/static/rust/redstone/crypto_secp256k1/search-index.js index 09c72cca..1b5280bb 100644 --- a/static/rust/redstone/crypto_secp256k1/search-index.js +++ b/static/rust/redstone/crypto_secp256k1/search-index.js @@ -1,5 +1,5 @@ var searchIndex = new Map(JSON.parse('[\ -["redstone",{"t":"CCCQQCCCCCCCIHHHFNONNONNNNONONNNNNNHHFNNNNNNNONNNONKMMMMCCHCHHICCCCCCCCKKMMKRKHMHMPPPKPGPPPPPPPNNNNNMNNNNNNMNNNNNNKMKKMMFNNNCNNNNNNNIRIKISTRRNNNHMHMCCCCCSSSSSSSSSSSFNNNNNONNNNOONHHNNNNFNNNNNNONNNNHHNNNONHFNNNNNONNNNNHHNNNNCCCCKMKKRKMHMKMKM","n":["core","crypto","network","print_and_panic","print_debug","protocol","utils","aggregator","config","processor","processor_result","validator","Matrix","aggregate_matrix","aggregate_values","make_value_signer_matrix","Config","assert_or_revert","block_timestamp","borrow","borrow_mut","feed_ids","feed_index","fmt","from","into","signer_count_threshold","signer_index","signers","try_from","try_into","type_id","validate_signer_count_threshold","validate_timestamp","vzip","make_processor_result","process_payload","ProcessorResult","assert_or_revert","borrow","borrow_mut","eq","fmt","from","into","min_timestamp","try_from","try_into","type_id","values","vzip","Validator","feed_index","signer_index","validate_signer_count_threshold","validate_timestamp","keccak256","recover","keccak256","crypto256","recover_address","recover_public_key","_Network","as_str","assert","error","flattened","from_bytes_repr","print_debug","pure","specific","AsAsciiStr","AsHexStr","as_ascii_str","as_hex_str","Assert","ErrorArg","Unwrap","assert_or_revert","assert_or_revert","assert_or_revert_bool_with","unwrap_or_revert","ArrayIsEmpty","ClonedContractError","ContractError","ContractErrorContent","CryptographicError","Error","InsufficientSignerCount","NonEmptyPayloadRemainder","NumberOverflow","SizeNotSupported","TimestampTooFuture","TimestampTooOld","WrongRedStoneMarker","assert_or_revert","borrow","borrow_mut","clone","clone_into","code","code","contract_error","fmt","fmt","from","into","message","to_owned","to_string","try_from","try_into","type_id","vzip","Flattened","flattened","FromBytesRepr","Sanitized","from_bytes_repr","sanitized","Std","borrow","borrow_mut","from","from_bytes_repr","into","print","revert","try_from","try_into","type_id","vzip","Bytes","BytesRepr","Network","NetworkSpecific","U256","VALUE_SIZE","VALUE_SIZE","ValueRepr","_Self","as_ascii_str","as_hex_str","from_bytes_repr","print","print","revert","revert","constants","data_package","data_point","marker","payload","DATA_FEED_ID_BS","DATA_PACKAGES_COUNT_BS","DATA_POINTS_COUNT_BS","DATA_POINT_VALUE_BYTE_SIZE_BS","MAX_TIMESTAMP_AHEAD_MS","MAX_TIMESTAMP_DELAY_MS","REDSTONE_MARKER","REDSTONE_MARKER_BS","SIGNATURE_BS","TIMESTAMP_BS","UNSIGNED_METADATA_BYTE_SIZE_BS","DataPackage","assert_or_revert","borrow","borrow_mut","clone","clone_into","data_points","eq","fmt","from","into","signer_address","timestamp","to_owned","trim_data_package","trim_data_packages","try_from","try_into","type_id","vzip","DataPoint","assert_or_revert","borrow","borrow_mut","clone","clone_into","eq","feed_id","fmt","from","into","to_owned","trim_data_point","trim_data_points","try_from","try_into","type_id","value","vzip","trim_redstone_marker","Payload","assert_or_revert","borrow","borrow_mut","clone","clone_into","data_packages","fmt","from","into","make","to_owned","trim_metadata","trim_payload","try_from","try_into","type_id","vzip","filter","median","trim","trim_zeros","FilterSome","filter_some","Averageable","Avg","Item","Median","avg","maybe_pick_median","median","Trim","trim_end","TrimZeros","trim_zeros"],"q":[[0,"redstone"],[7,"redstone::core"],[12,"redstone::core::aggregator"],[16,"redstone::core::config"],[35,"redstone::core::processor"],[37,"redstone::core::processor_result"],[51,"redstone::core::validator"],[56,"redstone::crypto"],[58,"redstone::crypto::keccak256"],[59,"redstone::crypto::recover"],[61,"redstone::crypto::recover::crypto256"],[62,"redstone::network"],[71,"redstone::network::as_str"],[75,"redstone::network::assert"],[82,"redstone::network::error"],[114,"redstone::network::flattened"],[116,"redstone::network::from_bytes_repr"],[120,"redstone::network::pure"],[132,"redstone::network::specific"],[148,"redstone::protocol"],[153,"redstone::protocol::constants"],[164,"redstone::protocol::data_package"],[184,"redstone::protocol::data_point"],[203,"redstone::protocol::marker"],[204,"redstone::protocol::payload"],[222,"redstone::utils"],[226,"redstone::utils::filter"],[228,"redstone::utils::median"],[235,"redstone::utils::trim"],[237,"redstone::utils::trim_zeros"],[239,"core::option"],[240,"alloc::vec"],[241,"core::ops::function"],[242,"core::fmt"],[243,"core::result"],[244,"core::any"],[245,"alloc::boxed"],[246,"alloc::string"],[247,"core::cmp"]],"i":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,20,20,20,20,20,20,20,20,20,20,20,20,20,0,23,23,23,23,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,27,0,33,0,0,30,0,33,8,8,8,0,8,0,8,8,8,8,8,8,8,8,8,8,8,8,34,8,8,8,8,8,8,34,8,8,8,8,8,8,0,36,0,0,37,38,0,48,48,48,0,48,48,48,48,48,48,48,0,49,0,0,0,0,49,49,49,1,1,1,0,49,0,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,5,5,5,5,0,40,40,40,40,40,40,40,40,40,40,40,0,0,40,40,40,40,40,0,0,19,19,19,19,19,19,19,19,19,19,19,0,0,19,19,19,19,0,0,0,0,0,41,0,0,45,0,42,0,45,0,46,0,47],"f":"`````````````{{{f{{f{{d{b}}}}}}h}{{f{b}}}}{{h{f{j}}}{{f{b}}}}{{{l{h}}{f{j}}}{{f{{f{{d{b}}}}}}}}`{{cei}g{}{}{}{{Ab{{l{g}}}{{n{A`}}}}}}`{{{l{c}}}{{l{e}}}{}{}}{{{l{Adc}}}{{l{Ade}}}{}{}}`{{{l{h}}b}{{d{Af}}}}{{{l{h}}{l{AdAh}}}Aj}{cc{}}{ce{}{}}`{{{l{h}}{l{{An{Al}}}}}{{d{Af}}}}`{c{{B`{e}}}{}{}}0{{{l{c}}}Bb{}}{{{l{h}}Af{l{{An{{d{b}}}}}}}{{f{b}}}}{{{l{h}}AfBd}Bd}5{{hBf}Bh}{{hBj}Bh}`=<;{{{l{Bh}}{l{Bh}}}Bl}{{{l{Bh}}{l{AdAh}}}Aj}:9`776`9`{{{l{Bn}}b}{{d{Af}}}}{{{l{Bn}}{l{{An{Al}}}}}{{d{Af}}}}{{{l{Bn}}Af{l{{An{{d{b}}}}}}}{{f{b}}}}{{{l{Bn}}AfBd}Bd}``{{{l{{An{Al}}}}}{{C`{{An{Al}}}}}}`{{{f{Al}}{f{Al}}}{{f{Al}}}}{{{C`{{An{Al}}}}{l{{An{Al}}}}Al}{{C`{{An{Al}}}}}}```````````{{{l{Cb}}}Cd}{{{l{Cf}}}Cd}```{{ceg}cCh{{Cj{{l{c}}}{{n{Bl}}}}}{{Ab{{l{c}}}{{n{A`}}}}}}{{Clce}Cl{}{{Cj{{l{Cl}}}{{n{A`}}}}}}{{Blc}Cn{{Ab{}{{n{A`}}}}}}{{{Db{}{{D`{c}}}}e}g{}{{Cj{{l{c}}}{{n{A`}}}}}{}}`````````````{{cei}g{}{}{}{{Ab{{l{g}}}{{n{A`}}}}}}{{{l{c}}}{{l{e}}}{}{}}{{{l{Adc}}}{{l{Ade}}}{}{}}{{{l{A`}}}A`}{{{l{c}}{l{Ade}}}Cn{}{}}{{{l{Dd}}}Al}{{{l{A`}}}Df}{cA`Dd}{{{l{A`}}{l{AdAh}}}Aj}0{cc{}}{ce{}{}}{{{l{Dd}}}Cd}{{{l{c}}}e{}{}}{{{l{c}}}Cd{}}{c{{B`{e}}}{}{}}0{{{l{c}}}Bb{}}5`{{{l{Dh}}}c{}}``{cDj{}}{DlDl}`{{{l{c}}}{{l{e}}}{}{}}{{{l{Adc}}}{{l{Ade}}}{}{}};`:{CdCn}{A`Dn}887<`````````{{{l{b}}}Cd}0{{{f{Al}}}b}3322`````````````````{{cei}g{}{}{}{{Ab{{l{g}}}{{n{A`}}}}}}65{{{l{j}}}j}{{{l{c}}{l{Ade}}}Cn{}{}}`{{{l{j}}{l{j}}}Bl}{{{l{j}}{l{AdAh}}}Aj}{cc{}}{ce{}{}}``{{{l{c}}}e{}{}}{{{l{Ad{f{Al}}}}}j}{{{l{Ad{f{Al}}}}Af}{{f{j}}}}{c{{B`{e}}}{}{}}0{{{l{c}}}Bb{}}5`;{{{l{c}}}{{l{e}}}{}{}}{{{l{Adc}}}{{l{Ade}}}{}{}}{{{l{E`}}}E`}<{{{l{E`}}{l{E`}}}Bl}`{{{l{E`}}{l{AdAh}}}Aj};:9{{{l{Ad{f{Al}}}}Af}E`}{{{l{Ad{f{Al}}}}AfAf}{{f{E`}}}}887`<{{{l{Ad{f{Al}}}}}Cn}`{{cei}g{}{}{}{{Ab{{l{g}}}{{n{A`}}}}}}87{{{l{Bf}}}Bf}{{{l{c}}{l{Ade}}}Cn{}{}}`{{{l{Bf}}{l{AdAh}}}Aj}{cc{}}{ce{}{}}{{{l{Ad{f{Al}}}}}Bf}{{{l{c}}}e{}{}}{{{l{Ad{f{Al}}}}}Af}2{c{{B`{e}}}{}{}}0{{{l{c}}}Bb{}}5`````{{{l{Eb}}}c{}}````{{EdEd}Ed}{{ccc}{{d{c}}}Ef}{{{Ej{}{{Eh{c}}}}}c{}}`{{{l{AdEl}}Af}c{}}`{EnEn}","D":"Ed","p":[[8,"U256",132],[6,"Option",239],[5,"Vec",240],[5,"Config",16],[5,"DataPackage",164],[1,"reference"],[17,"Output"],[6,"Error",82],[10,"FnOnce",241],[0,"mut"],[1,"usize"],[5,"Formatter",242],[8,"Result",242],[1,"u8"],[1,"slice"],[6,"Result",243],[5,"TypeId",244],[1,"u64"],[5,"Payload",204],[5,"ProcessorResult",37],[8,"Bytes",132],[1,"bool"],[10,"Validator",51],[5,"Box",245],[10,"AsAsciiStr",71],[5,"String",246],[10,"AsHexStr",71],[10,"Debug",242],[10,"Fn",241],[10,"Assert",75],[1,"unit"],[17,"ErrorArg"],[10,"Unwrap",75],[10,"ContractErrorContent",82],[1,"u16"],[10,"Flattened",114],[10,"FromBytesRepr",116],[10,"Sanitized",116],[1,"never"],[5,"DataPoint",184],[10,"FilterSome",226],[10,"Avg",228],[10,"PartialOrd",247],[17,"Item"],[10,"Median",228],[10,"Trim",235],[10,"TrimZeros",237],[5,"Std",120],[10,"NetworkSpecific",132]],"r":[],"b":[[103,"impl-Display-for-Error"],[104,"impl-Debug-for-Error"]],"c":"OjAAAAAAAAA=","e":"OzAAAAEAAMUAEwABAA0AEAAAABIAAAAUAAEAFwABABwAAAAeAAYAJwAEAC8AAgAzAAAAOQAZAFYAAABgAAkAbAAPAH0AAAB/AC4AsAARAMQAEADXABgA"}]\ +["redstone",{"t":"CCCQQCCCCCCCIHHHFNONNONNNNONONNNNNNHHFNNNNNNNONNNONKMMMMIIICCHCHHICCCCCCCCKKMMKRKHMHMPPPKPGPPPPPPPNNNNNNMNNNNNNMNNNNNNKMKKMMFNNNCNNNNNNNIRIKISTRRNNNHMHMCCCCCSSSSSSSSSSSFNNNNNNONNNNOONHHNNNNFNNNNNNNONNNNHHNNNONHFNNNNNNONNNNNHHNNNNCCCCKMKKRKMHMKMKM","n":["core","crypto","network","print_and_panic","print_debug","protocol","utils","aggregator","config","processor","processor_result","validator","Matrix","aggregate_matrix","aggregate_values","make_value_signer_matrix","Config","assert_or_revert","block_timestamp","borrow","borrow_mut","feed_ids","feed_index","fmt","from","into","signer_count_threshold","signer_index","signers","try_from","try_into","type_id","validate_signer_count_threshold","validate_timestamp","vzip","make_processor_result","process_payload","ProcessorResult","assert_or_revert","borrow","borrow_mut","eq","fmt","from","into","min_timestamp","try_from","try_into","type_id","values","vzip","Validator","feed_index","signer_index","validate_signer_count_threshold","validate_timestamp","EcdsaUncompressedPublicKey","Keccak256Hash","Secp256SigRs","keccak256","recover","keccak256","crypto256","recover_address","recover_public_key","_Network","as_str","assert","error","flattened","from_bytes_repr","print_debug","pure","specific","AsAsciiStr","AsHexStr","as_ascii_str","as_hex_str","Assert","ErrorArg","Unwrap","assert_or_revert","assert_or_revert","assert_or_revert_bool_with","unwrap_or_revert","ArrayIsEmpty","ClonedContractError","ContractError","ContractErrorContent","CryptographicError","Error","InsufficientSignerCount","NonEmptyPayloadRemainder","NumberOverflow","SizeNotSupported","TimestampTooFuture","TimestampTooOld","WrongRedStoneMarker","assert_or_revert","borrow","borrow_mut","clone","clone_into","clone_to_uninit","code","code","contract_error","fmt","fmt","from","into","message","to_owned","to_string","try_from","try_into","type_id","vzip","Flattened","flattened","FromBytesRepr","Sanitized","from_bytes_repr","sanitized","Std","borrow","borrow_mut","from","from_bytes_repr","into","print","revert","try_from","try_into","type_id","vzip","Bytes","BytesRepr","Network","NetworkSpecific","U256","VALUE_SIZE","VALUE_SIZE","ValueRepr","_Self","as_ascii_str","as_hex_str","from_bytes_repr","print","print","revert","revert","constants","data_package","data_point","marker","payload","DATA_FEED_ID_BS","DATA_PACKAGES_COUNT_BS","DATA_POINTS_COUNT_BS","DATA_POINT_VALUE_BYTE_SIZE_BS","MAX_TIMESTAMP_AHEAD_MS","MAX_TIMESTAMP_DELAY_MS","REDSTONE_MARKER","REDSTONE_MARKER_BS","SIGNATURE_BS","TIMESTAMP_BS","UNSIGNED_METADATA_BYTE_SIZE_BS","DataPackage","assert_or_revert","borrow","borrow_mut","clone","clone_into","clone_to_uninit","data_points","eq","fmt","from","into","signer_address","timestamp","to_owned","trim_data_package","trim_data_packages","try_from","try_into","type_id","vzip","DataPoint","assert_or_revert","borrow","borrow_mut","clone","clone_into","clone_to_uninit","eq","feed_id","fmt","from","into","to_owned","trim_data_point","trim_data_points","try_from","try_into","type_id","value","vzip","trim_redstone_marker","Payload","assert_or_revert","borrow","borrow_mut","clone","clone_into","clone_to_uninit","data_packages","fmt","from","into","make","to_owned","trim_metadata","trim_payload","try_from","try_into","type_id","vzip","filter","median","trim","trim_zeros","FilterSome","filter_some","Averageable","Avg","Item","Median","avg","maybe_pick_median","median","Trim","trim_end","TrimZeros","trim_zeros"],"q":[[0,"redstone"],[7,"redstone::core"],[12,"redstone::core::aggregator"],[16,"redstone::core::config"],[35,"redstone::core::processor"],[37,"redstone::core::processor_result"],[51,"redstone::core::validator"],[56,"redstone::crypto"],[61,"redstone::crypto::keccak256"],[62,"redstone::crypto::recover"],[64,"redstone::crypto::recover::crypto256"],[65,"redstone::network"],[74,"redstone::network::as_str"],[78,"redstone::network::assert"],[85,"redstone::network::error"],[118,"redstone::network::flattened"],[120,"redstone::network::from_bytes_repr"],[124,"redstone::network::pure"],[136,"redstone::network::specific"],[152,"redstone::protocol"],[157,"redstone::protocol::constants"],[168,"redstone::protocol::data_package"],[189,"redstone::protocol::data_point"],[209,"redstone::protocol::marker"],[210,"redstone::protocol::payload"],[229,"redstone::utils"],[233,"redstone::utils::filter"],[235,"redstone::utils::median"],[242,"redstone::utils::trim"],[244,"redstone::utils::trim_zeros"],[246,"core::option"],[247,"alloc::vec"],[248,"core::ops::function"],[249,"core::fmt"],[250,"core::result"],[251,"core::any"],[252,"alloc::string"],[253,"core::cmp"]],"i":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,20,20,20,20,20,20,20,20,20,20,20,20,20,0,23,23,23,23,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,27,0,33,0,0,30,0,33,8,8,8,0,8,0,8,8,8,8,8,8,8,8,8,8,8,8,8,34,8,8,8,8,8,8,34,8,8,8,8,8,8,0,36,0,0,37,38,0,48,48,48,0,48,48,48,48,48,48,48,0,49,0,0,0,0,49,49,49,1,1,1,0,49,0,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,5,5,5,5,0,40,40,40,40,40,40,40,40,40,40,40,40,0,0,40,40,40,40,40,0,0,19,19,19,19,19,19,19,19,19,19,19,19,0,0,19,19,19,19,0,0,0,0,0,41,0,0,45,0,42,0,45,0,46,0,47],"f":"`````````````{{{f{{f{{d{b}}}}}}h}{{f{b}}}}{{h{f{j}}}{{f{b}}}}{{{l{h}}{f{j}}}{{f{{f{{d{b}}}}}}}}`{{cei}g{}{}{}{{Ab{{l{g}}}{{n{A`}}}}}}`{{{l{c}}}{{l{e}}}{}{}}{{{l{Adc}}}{{l{Ade}}}{}{}}`{{{l{h}}b}{{d{Af}}}}{{{l{h}}{l{AdAh}}}Aj}{cc{}}{ce{}{}}`{{{l{h}}{l{{An{Al}}}}}{{d{Af}}}}`{c{{B`{e}}}{}{}}0{{{l{c}}}Bb{}}{{{l{h}}Af{l{{An{{d{b}}}}}}}{{f{b}}}}{{{l{h}}AfBd}Bd}5{{hBf}Bh}{{hBj}Bh}`=<;{{{l{Bh}}{l{Bh}}}Bl}{{{l{Bh}}{l{AdAh}}}Aj}:9`776`9`{{{l{Bn}}b}{{d{Af}}}}{{{l{Bn}}{l{{An{Al}}}}}{{d{Af}}}}{{{l{Bn}}Af{l{{An{{d{b}}}}}}}{{f{b}}}}{{{l{Bn}}AfBd}Bd}`````{{{l{{An{Al}}}}}{{C`{Al}}}}`{{{f{Al}}{f{Al}}}{{f{Al}}}}{{{C`{Al}}{C`{Al}}Al}{{C`{Al}}}}```````````{{{l{Cb}}}Cd}{{{l{Cf}}}Cd}```{{ceg}cCh{{Cj{{l{c}}}{{n{Bl}}}}}{{Ab{{l{c}}}{{n{A`}}}}}}{{Clce}Cl{}{{Cj{{l{Cl}}}{{n{A`}}}}}}{{Blc}Cn{{Ab{}{{n{A`}}}}}}{{{Db{}{{D`{c}}}}e}g{}{{Cj{{l{c}}}{{n{A`}}}}}{}}`````````````{{cei}g{}{}{}{{Ab{{l{g}}}{{n{A`}}}}}}{{{l{c}}}{{l{e}}}{}{}}{{{l{Adc}}}{{l{Ade}}}{}{}}{{{l{A`}}}A`}{{{l{c}}{l{Ade}}}Cn{}{}}{{{l{c}}}Cn{}}{{{l{Dd}}}Al}{{{l{A`}}}Df}{cA`Dd}{{{l{A`}}{l{AdAh}}}Aj}0{cc{}}{ce{}{}}{{{l{Dd}}}Cd}{{{l{c}}}e{}{}}{{{l{c}}}Cd{}}{c{{B`{e}}}{}{}}0{{{l{c}}}Bb{}}5`{{{l{Dh}}}c{}}``{cDj{}}{DlDl}`{{{l{c}}}{{l{e}}}{}{}}{{{l{Adc}}}{{l{Ade}}}{}{}};`:{CdCn}{A`Dn}887<`````````{{{l{b}}}Cd}0{{{f{Al}}}b}3322`````````````````{{cei}g{}{}{}{{Ab{{l{g}}}{{n{A`}}}}}}65{{{l{j}}}j}{{{l{c}}{l{Ade}}}Cn{}{}}{{{l{c}}}Cn{}}`{{{l{j}}{l{j}}}Bl}{{{l{j}}{l{AdAh}}}Aj}{cc{}}{ce{}{}}``{{{l{c}}}e{}{}}{{{l{Ad{f{Al}}}}}j}{{{l{Ad{f{Al}}}}Af}{{f{j}}}}{c{{B`{e}}}{}{}}0{{{l{c}}}Bb{}}5`<{{{l{c}}}{{l{e}}}{}{}}{{{l{Adc}}}{{l{Ade}}}{}{}}{{{l{E`}}}E`}=<{{{l{E`}}{l{E`}}}Bl}`{{{l{E`}}{l{AdAh}}}Aj};:9{{{l{Ad{f{Al}}}}Af}E`}{{{l{Ad{f{Al}}}}AfAf}{{f{E`}}}}887`<{{{l{Ad{f{Al}}}}}Cn}`{{cei}g{}{}{}{{Ab{{l{g}}}{{n{A`}}}}}}87{{{l{Bf}}}Bf}{{{l{c}}{l{Ade}}}Cn{}{}}{{{l{c}}}Cn{}}`{{{l{Bf}}{l{AdAh}}}Aj}{cc{}}{ce{}{}}{{{l{Ad{f{Al}}}}}Bf}{{{l{c}}}e{}{}}{{{l{Ad{f{Al}}}}}Af}2{c{{B`{e}}}{}{}}0{{{l{c}}}Bb{}}5`````{{{l{Eb}}}c{}}````{{EdEd}Ed}{{ccc}{{d{c}}}Ef}{{{Ej{}{{Eh{c}}}}}c{}}`{{{l{AdEl}}Af}c{}}`{EnEn}","D":"Ed","p":[[8,"U256",136],[6,"Option",246],[5,"Vec",247],[5,"Config",16],[5,"DataPackage",168],[1,"reference"],[17,"Output"],[6,"Error",85],[10,"FnOnce",248],[0,"mut"],[1,"usize"],[5,"Formatter",249],[8,"Result",249],[1,"u8"],[1,"slice"],[6,"Result",250],[5,"TypeId",251],[1,"u64"],[5,"Payload",210],[5,"ProcessorResult",37],[8,"Bytes",136],[1,"bool"],[10,"Validator",51],[1,"array"],[10,"AsAsciiStr",74],[5,"String",252],[10,"AsHexStr",74],[10,"Debug",249],[10,"Fn",248],[10,"Assert",78],[1,"unit"],[17,"ErrorArg"],[10,"Unwrap",78],[10,"ContractErrorContent",85],[1,"u16"],[10,"Flattened",118],[10,"FromBytesRepr",120],[10,"Sanitized",120],[1,"never"],[5,"DataPoint",189],[10,"FilterSome",233],[10,"Avg",235],[10,"PartialOrd",253],[17,"Item"],[10,"Median",235],[10,"Trim",242],[10,"TrimZeros",244],[5,"Std",124],[10,"NetworkSpecific",136]],"r":[],"b":[[107,"impl-Debug-for-Error"],[108,"impl-Display-for-Error"]],"c":"OjAAAAAAAAA=","e":"OzAAAAEAAMwAEwABAA0AEAAAABIAAAAUAAEAFwABABwAAAAeAAYAJwAEAC8AAgAzAAAAOQAcAFkAAABjAAoAcAAPAIEAAACDAC8AtQASAMoAEQDeABgA"}]\ ]')); if (typeof exports !== 'undefined') exports.searchIndex = searchIndex; else if (window.initSearch) window.initSearch(searchIndex); diff --git a/static/rust/redstone/crypto_secp256k1/settings.html b/static/rust/redstone/crypto_secp256k1/settings.html index 9631dcb2..6da7f2d5 100644 --- a/static/rust/redstone/crypto_secp256k1/settings.html +++ b/static/rust/redstone/crypto_secp256k1/settings.html @@ -1 +1 @@ -Settings

Rustdoc settings

Back
\ No newline at end of file +Settings

Rustdoc settings

Back
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/src/redstone/core/aggregator.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/core/aggregator.rs.html index e839b506..ed9efa50 100644 --- a/static/rust/redstone/crypto_secp256k1/src/redstone/core/aggregator.rs.html +++ b/static/rust/redstone/crypto_secp256k1/src/redstone/core/aggregator.rs.html @@ -1,4 +1,4 @@ -aggregator.rs - source
1
+aggregator.rs - source
1
 2
 3
 4
@@ -289,6 +289,12 @@
 289
 290
 291
+292
+293
+294
+295
+296
+297
 
use crate::{
     core::{config::Config, validator::Validator},
     network::specific::U256,
@@ -368,6 +374,9 @@
         helpers::iter_into::{IterInto, IterIntoOpt, OptIterIntoOpt},
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_aggregate_matrix() {
         let matrix = vec![
@@ -445,6 +454,9 @@
         protocol::data_package::DataPackage,
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_make_value_signer_matrix_empty() {
         let config = Config::test();
diff --git a/static/rust/redstone/crypto_secp256k1/src/redstone/core/config.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/core/config.rs.html
index 0b9ca7f7..a5b2ec60 100644
--- a/static/rust/redstone/crypto_secp256k1/src/redstone/core/config.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/src/redstone/core/config.rs.html
@@ -1,4 +1,4 @@
-config.rs - source
1
+config.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1/src/redstone/core/mod.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/core/mod.rs.html
index f278fb16..3aa3fec4 100644
--- a/static/rust/redstone/crypto_secp256k1/src/redstone/core/mod.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/src/redstone/core/mod.rs.html
@@ -1,4 +1,4 @@
-mod.rs - source
1
+mod.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1/src/redstone/core/processor.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/core/processor.rs.html
index 2e92e10d..15860266 100644
--- a/static/rust/redstone/crypto_secp256k1/src/redstone/core/processor.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/src/redstone/core/processor.rs.html
@@ -1,4 +1,4 @@
-processor.rs - source
1
+processor.rs - source
1
 2
 3
 4
@@ -99,6 +99,9 @@
 99
 100
 101
+102
+103
+104
 
use crate::{
     core::{
         aggregator::aggregate_values, config::Config, processor_result::ProcessorResult,
@@ -160,6 +163,9 @@
         protocol::{data_package::DataPackage, payload::Payload},
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_make_processor_result() {
         let data_packages = vec![
diff --git a/static/rust/redstone/crypto_secp256k1/src/redstone/core/processor_result.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/core/processor_result.rs.html
index ecdffb37..8352b915 100644
--- a/static/rust/redstone/crypto_secp256k1/src/redstone/core/processor_result.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/src/redstone/core/processor_result.rs.html
@@ -1,4 +1,4 @@
-processor_result.rs - source
1
+processor_result.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1/src/redstone/core/validator.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/core/validator.rs.html
index 1fed8ca0..30f7ee53 100644
--- a/static/rust/redstone/crypto_secp256k1/src/redstone/core/validator.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/src/redstone/core/validator.rs.html
@@ -1,4 +1,4 @@
-validator.rs - source
1
+validator.rs - source
1
 2
 3
 4
@@ -284,6 +284,9 @@
 284
 285
 286
+287
+288
+289
 
use crate::{
     core::config::Config,
     network::{
@@ -421,6 +424,9 @@
     };
     use itertools::Itertools;
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_feed_index() {
         let config = Config::test();
diff --git a/static/rust/redstone/crypto_secp256k1/src/redstone/crypto/keccak256.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/crypto/keccak256.rs.html
index 7e62e207..aadbac5d 100644
--- a/static/rust/redstone/crypto_secp256k1/src/redstone/crypto/keccak256.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/src/redstone/crypto/keccak256.rs.html
@@ -1,4 +1,4 @@
-keccak256.rs - source
1
+keccak256.rs - source
1
 2
 3
 4
@@ -34,20 +34,46 @@
 34
 35
 36
-
use sha3::{Digest, Keccak256};
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+
use crate::crypto::Keccak256Hash;
+#[cfg(not(all(feature = "crypto_radix", target_arch = "wasm32")))]
+use sha3::Digest;
 
-pub fn keccak256(data: &[u8]) -> Box<[u8]> {
-    Keccak256::new_with_prefix(data)
+#[cfg(not(all(feature = "crypto_radix", target_arch = "wasm32")))]
+pub fn keccak256(data: &[u8]) -> Keccak256Hash {
+    sha3::Keccak256::new_with_prefix(data)
         .finalize()
         .as_slice()
-        .into()
+        .try_into()
+        .unwrap()
 }
 
-#[cfg(feature = "helpers")]
+#[cfg(all(feature = "crypto_radix", target_arch = "wasm32"))]
+pub fn keccak256(data: &[u8]) -> Keccak256Hash {
+    scrypto::prelude::CryptoUtils::keccak256_hash(data).0
+}
+
+#[cfg(not(all(feature = "crypto_radix", target_arch = "wasm32")))]
+#[cfg(feature = "helpers")]
 #[cfg(test)]
 mod tests {
     use crate::{crypto::keccak256::keccak256, helpers::hex::hex_to_bytes};
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const MESSAGE: &str = "415641580000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d394303d018d79bf0ba000000020000001";
     const MESSAGE_HASH: &str = "f0805644755393876d0e917e553f0c206f8bc68b7ebfe73a79d2a9e7f5a4cea6";
     const EMPTY_MESSAGE_HASH: &str =
diff --git a/static/rust/redstone/crypto_secp256k1/src/redstone/crypto/mod.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/crypto/mod.rs.html
index fa282223..c3470603 100644
--- a/static/rust/redstone/crypto_secp256k1/src/redstone/crypto/mod.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/src/redstone/crypto/mod.rs.html
@@ -1,5 +1,13 @@
-mod.rs - source
1
+mod.rs - source
1
 2
+3
+4
+5
+6
 
mod keccak256;
 pub(crate) mod recover;
+
+pub(crate) type Keccak256Hash = [u8; 32];
+pub(crate) type Secp256SigRs = [u8; 64];
+pub(crate) type EcdsaUncompressedPublicKey = [u8; 65];
 
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/src/redstone/crypto/recover.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/crypto/recover.rs.html index f03e84b0..3b917f5c 100644 --- a/static/rust/redstone/crypto_secp256k1/src/redstone/crypto/recover.rs.html +++ b/static/rust/redstone/crypto_secp256k1/src/redstone/crypto/recover.rs.html @@ -1,4 +1,4 @@ -recover.rs - source
1
+recover.rs - source
1
 2
 3
 4
@@ -131,14 +131,59 @@
 131
 132
 133
-
use crate::crypto::{keccak256, recover::crypto256::recover_public_key};
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+
use crate::crypto::{
+    keccak256, recover::crypto256::recover_public_key, EcdsaUncompressedPublicKey, Keccak256Hash,
+    Secp256SigRs,
+};
 
 pub fn recover_address(message: Vec<u8>, signature: Vec<u8>) -> Vec<u8> {
-    let recovery_byte = signature[64]; // 65-byte representation
+    //TODO: check malleability support by the libraries
+    let recovery_byte = signature[64]; // 65-byte representation
     let msg_hash = keccak256::keccak256(message.as_slice());
     let key = recover_public_key(
         msg_hash,
-        &signature[..64],
+        signature[..64].try_into().unwrap(),
         recovery_byte - (if recovery_byte >= 27 { 27 } else { 0 }),
     );
     let key_hash = keccak256::keccak256(&key[1..]); // skip first uncompressed-key byte
@@ -148,66 +193,100 @@
 
 #[cfg(feature = "crypto_secp256k1")]
 pub(crate) mod crypto256 {
+    use super::{EcdsaUncompressedPublicKey, Keccak256Hash, Secp256SigRs};
     use crate::network::{assert::Unwrap, error::Error};
     use secp256k1::{ecdsa::RecoverableSignature, Message, Secp256k1 as Secp256k1Curve};
 
     pub(crate) fn recover_public_key(
-        message_hash: Box<[u8]>,
-        signature_bytes: &[u8],
+        message_hash: Keccak256Hash,
+        signature_bytes: Secp256SigRs,
         recovery_byte: u8,
-    ) -> Box<[u8]> {
-        let msg = Message::from_digest_slice(message_hash.as_ref())
-            .unwrap_or_revert(|_| Error::CryptographicError(message_hash.len()));
+    ) -> EcdsaUncompressedPublicKey {
+        let msg = Message::from_digest(message_hash);
 
         let recovery_id = secp256k1::ecdsa::RecoveryId::from_i32(recovery_byte.into())
             .unwrap_or_revert(|_| Error::CryptographicError(recovery_byte.into()));
 
         let sig: RecoverableSignature =
-            RecoverableSignature::from_compact(signature_bytes, recovery_id)
+            RecoverableSignature::from_compact(signature_bytes.as_slice(), recovery_id)
                 .unwrap_or_revert(|_| Error::CryptographicError(signature_bytes.len()));
 
         let public_key = Secp256k1Curve::new().recover_ecdsa(&msg, &sig);
 
-        public_key.unwrap().serialize_uncompressed().into()
+        public_key.unwrap().serialize_uncompressed()
     }
 }
 
 #[cfg(feature = "crypto_k256")]
 pub(crate) mod crypto256 {
+    use super::{EcdsaUncompressedPublicKey, Keccak256Hash, Secp256SigRs};
     use crate::network::{assert::Unwrap, error::Error};
     use k256::ecdsa::{RecoveryId, Signature, VerifyingKey};
 
     pub(crate) fn recover_public_key(
-        message_hash: Box<[u8]>,
-        signature_bytes: &[u8],
+        message_hash: Keccak256Hash,
+        signature_bytes: Secp256SigRs,
         recovery_byte: u8,
-    ) -> Box<[u8]> {
+    ) -> EcdsaUncompressedPublicKey {
         let recovery_id = RecoveryId::from_byte(recovery_byte)
             .unwrap_or_revert(|_| Error::CryptographicError(recovery_byte.into()));
 
-        let signature = Signature::try_from(signature_bytes)
+        let signature = Signature::try_from(signature_bytes.as_slice())
             .unwrap_or_revert(|_| Error::CryptographicError(signature_bytes.len()));
 
         let recovered_key =
             VerifyingKey::recover_from_prehash(message_hash.as_ref(), &signature, recovery_id)
-                .map(|key| key.to_encoded_point(false).to_bytes());
+                .map(|key| key.to_encoded_point(false).to_bytes())
+                .unwrap_or_revert(|_| Error::CryptographicError(0));
 
-        recovered_key.unwrap()
+        recovered_key.as_ref().try_into().unwrap()
     }
 }
 
-#[cfg(all(not(feature = "crypto_k256"), not(feature = "crypto_secp256k1")))]
+#[cfg(all(feature = "crypto_radix", target_arch = "wasm32"))]
 pub(crate) mod crypto256 {
+    use super::{EcdsaUncompressedPublicKey, Keccak256Hash, Secp256SigRs};
+    use crate::network::assert::Unwrap;
+    use crate::network::error::Error;
+    use radix_common::crypto::{Hash, IsHash, Secp256k1Signature};
+    use scrypto::crypto_utils::CryptoUtils;
+
     pub(crate) fn recover_public_key(
-        _message_hash: Box<[u8]>,
-        _signature_bytes: &[u8],
+        message_hash: Keccak256Hash,
+        signature_bytes: Secp256SigRs,
+        recovery_byte: u8,
+    ) -> EcdsaUncompressedPublicKey {
+        let hash = Hash::from_bytes(message_hash);
+
+        let mut sig_vec = Vec::with_capacity(65);
+        sig_vec.push(recovery_byte);
+        sig_vec.extend(signature_bytes);
+        let signature = Secp256k1Signature::try_from(sig_vec.as_slice())
+            .unwrap_or_revert(|_| Error::CryptographicError(signature_bytes.len()));
+
+        CryptoUtils::secp256k1_ecdsa_verify_and_key_recover_uncompressed(hash, signature).0
+    }
+}
+
+#[cfg(all(
+    not(feature = "crypto_k256"),
+    not(feature = "crypto_secp256k1"),
+    not(all(feature = "crypto_radix", target_arch = "wasm32"))
+))]
+pub(crate) mod crypto256 {
+    use super::{EcdsaUncompressedPublicKey, Keccak256Hash, Secp256SigRs};
+
+    pub(crate) fn recover_public_key(
+        _message_hash: Keccak256Hash,
+        _signature_bytes: Secp256SigRs,
         _recovery_byte: u8,
-    ) -> Box<[u8]> {
+    ) -> EcdsaUncompressedPublicKey {
         panic!("Not implemented!")
     }
 }
 
-#[cfg(feature = "helpers")]
+#[cfg(not(all(feature = "crypto_radix", target_arch = "wasm32")))]
+#[cfg(feature = "helpers")]
 #[cfg(test)]
 mod tests {
     use crate::{
@@ -215,6 +294,9 @@
         helpers::hex::hex_to_bytes,
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const MESSAGE: &str = "415641580000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d394303d018d79bf0ba000000020000001";
     const MESSAGE_HASH: &str = "f0805644755393876d0e917e553f0c206f8bc68b7ebfe73a79d2a9e7f5a4cea6";
     const SIG_V27: &str = "475195641dae43318e194c3d9e5fc308773d6fdf5e197e02644dfd9ca3d19e3e2bd7d8656428f7f02e658a16b8f83722169c57126cc50bec8fad188b1bac6d19";
@@ -228,16 +310,16 @@
 
     #[test]
     fn test_recover_public_key_v27() {
-        let public_key = recover_public_key(u8_box(MESSAGE_HASH), &u8_box(SIG_V27), 0);
+        let public_key = recover_public_key(u8_slice(MESSAGE_HASH), u8_slice(SIG_V27), 0);
 
-        assert_eq!(u8_box(PUBLIC_KEY_V27), public_key);
+        assert_eq!(u8_slice(PUBLIC_KEY_V27), public_key);
     }
 
     #[test]
     fn test_recover_public_key_v28() {
-        let public_key = recover_public_key(u8_box(MESSAGE_HASH), &u8_box(SIG_V28), 1);
+        let public_key = recover_public_key(u8_slice(MESSAGE_HASH), u8_slice(SIG_V28), 1);
 
-        assert_eq!(u8_box(PUBLIC_KEY_V28), public_key);
+        assert_eq!(u8_slice(PUBLIC_KEY_V28), public_key);
     }
 
     #[test]
@@ -260,8 +342,8 @@
         assert_eq!(hex_to_bytes(ADDRESS_V28.into()), address);
     }
 
-    fn u8_box(str: &str) -> Box<[u8]> {
-        hex_to_bytes(str.into()).as_slice().into()
+    fn u8_slice<const N: usize>(str: &str) -> [u8; N] {
+        hex_to_bytes(str.into()).as_slice().try_into().unwrap()
     }
 }
 
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/src/redstone/lib.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/lib.rs.html index a1f164bf..dc7e6ba2 100644 --- a/static/rust/redstone/crypto_secp256k1/src/redstone/lib.rs.html +++ b/static/rust/redstone/crypto_secp256k1/src/redstone/lib.rs.html @@ -1,4 +1,4 @@ -lib.rs - source
1
+lib.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1/src/redstone/network/as_str.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/network/as_str.rs.html
index f0b58bfb..95d88b4b 100644
--- a/static/rust/redstone/crypto_secp256k1/src/redstone/network/as_str.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/src/redstone/network/as_str.rs.html
@@ -1,4 +1,4 @@
-as_str.rs - source
1
+as_str.rs - source
1
 2
 3
 4
@@ -115,6 +115,9 @@
 115
 116
 117
+118
+119
+120
 
extern crate alloc;
 
 use crate::network::specific::U256;
@@ -214,6 +217,9 @@
         specific::U256,
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const ETH: u32 = 4543560u32;
 
     #[test]
diff --git a/static/rust/redstone/crypto_secp256k1/src/redstone/network/assert.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/network/assert.rs.html
index cfd43818..c6e40334 100644
--- a/static/rust/redstone/crypto_secp256k1/src/redstone/network/assert.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/src/redstone/network/assert.rs.html
@@ -1,4 +1,4 @@
-assert.rs - source
1
+assert.rs - source
1
 2
 3
 4
@@ -134,6 +134,12 @@
 134
 135
 136
+137
+138
+139
+140
+141
+142
 
use crate::{
     network::{error::Error, specific::revert},
     print_debug,
@@ -217,6 +223,9 @@
         error::Error,
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_assert_or_revert_bool_with_true() {
         assert_or_revert_bool_with(true, || Error::ArrayIsEmpty);
@@ -244,6 +253,9 @@
 mod unwrap_or_revert_tests {
     use crate::network::{assert::Unwrap, error::Error};
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_unwrap_or_revert_some() {
         let result = Some(543).unwrap_or_revert(|_| Error::CryptographicError(333));
diff --git a/static/rust/redstone/crypto_secp256k1/src/redstone/network/error.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/network/error.rs.html
index 4c0588a6..e61e278d 100644
--- a/static/rust/redstone/crypto_secp256k1/src/redstone/network/error.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/src/redstone/network/error.rs.html
@@ -1,4 +1,4 @@
-error.rs - source
1
+error.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1/src/redstone/network/flattened.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/network/flattened.rs.html
index f8226f69..3dd50203 100644
--- a/static/rust/redstone/crypto_secp256k1/src/redstone/network/flattened.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/src/redstone/network/flattened.rs.html
@@ -1,4 +1,4 @@
-flattened.rs - source
1
+flattened.rs - source
1
 2
 3
 4
@@ -33,6 +33,9 @@
 33
 34
 35
+36
+37
+38
 
use crate::network::specific::Bytes;
 
 pub trait Flattened<T> {
@@ -50,6 +53,9 @@
 mod tests {
     use crate::network::{flattened::Flattened, specific::Bytes};
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_bytes_flattened() {
         #[allow(clippy::useless_conversion)]
diff --git a/static/rust/redstone/crypto_secp256k1/src/redstone/network/from_bytes_repr.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/network/from_bytes_repr.rs.html
index 0c7663c5..46079bf7 100644
--- a/static/rust/redstone/crypto_secp256k1/src/redstone/network/from_bytes_repr.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/src/redstone/network/from_bytes_repr.rs.html
@@ -1,4 +1,4 @@
-from_bytes_repr.rs - source
1
+from_bytes_repr.rs - source
1
 2
 3
 4
@@ -126,6 +126,9 @@
 126
 127
 128
+129
+130
+131
 
use crate::network::specific::VALUE_SIZE;
 
 pub trait FromBytesRepr<T> {
@@ -160,6 +163,9 @@
         specific::{U256, VALUE_SIZE},
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[cfg(feature = "network_radix")]
     use crate::network::radix::u256_ext::U256Ext;
 
diff --git a/static/rust/redstone/crypto_secp256k1/src/redstone/network/mod.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/network/mod.rs.html
index f79fb758..55e94cdf 100644
--- a/static/rust/redstone/crypto_secp256k1/src/redstone/network/mod.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/src/redstone/network/mod.rs.html
@@ -1,4 +1,4 @@
-mod.rs - source
1
+mod.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1/src/redstone/network/print_debug.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/network/print_debug.rs.html
index 1fca4faf..52808df8 100644
--- a/static/rust/redstone/crypto_secp256k1/src/redstone/network/print_debug.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/src/redstone/network/print_debug.rs.html
@@ -1,4 +1,4 @@
-print_debug.rs - source
1
+print_debug.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1/src/redstone/network/pure/from_bytes_repr.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/network/pure/from_bytes_repr.rs.html
index dfb1ae60..b399e708 100644
--- a/static/rust/redstone/crypto_secp256k1/src/redstone/network/pure/from_bytes_repr.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/src/redstone/network/pure/from_bytes_repr.rs.html
@@ -1,4 +1,4 @@
-from_bytes_repr.rs - source
1
+from_bytes_repr.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1/src/redstone/network/pure/mod.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/network/pure/mod.rs.html
index 36cc7a10..09bddebe 100644
--- a/static/rust/redstone/crypto_secp256k1/src/redstone/network/pure/mod.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/src/redstone/network/pure/mod.rs.html
@@ -1,4 +1,4 @@
-mod.rs - source
1
+mod.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1/src/redstone/network/specific.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/network/specific.rs.html
index 8d698709..33830b2a 100644
--- a/static/rust/redstone/crypto_secp256k1/src/redstone/network/specific.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/src/redstone/network/specific.rs.html
@@ -1,4 +1,4 @@
-specific.rs - source
1
+specific.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1/src/redstone/protocol/constants.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/protocol/constants.rs.html
index 3e2f4fd5..7b1e4887 100644
--- a/static/rust/redstone/crypto_secp256k1/src/redstone/protocol/constants.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/src/redstone/protocol/constants.rs.html
@@ -1,4 +1,4 @@
-constants.rs - source
1
+constants.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1/src/redstone/protocol/data_package.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/protocol/data_package.rs.html
index a1d603e6..f3e8cc32 100644
--- a/static/rust/redstone/crypto_secp256k1/src/redstone/protocol/data_package.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/src/redstone/protocol/data_package.rs.html
@@ -1,4 +1,4 @@
-data_package.rs - source
1
+data_package.rs - source
1
 2
 3
 4
@@ -213,6 +213,10 @@
 213
 214
 215
+216
+217
+218
+219
 
use crate::{
     crypto::recover::recover_address,
     network::as_str::AsHexStr,
@@ -281,7 +285,8 @@
     }
 }
 
-#[cfg(feature = "helpers")]
+#[cfg(not(all(feature = "crypto_radix", target_arch = "wasm32")))]
+#[cfg(feature = "helpers")]
 #[cfg(test)]
 mod tests {
     use crate::{
@@ -297,6 +302,9 @@
         },
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const DATA_PACKAGE_BYTES_1: &str = "4554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000360cafc94e018d79bf0ba00000002000000151afa8c5c3caf6004b42c0fb17723e524f993b9ecbad3b9bce5ec74930fa436a3660e8edef10e96ee5f222de7ef5787c02ca467c0ec18daa2907b43ac20c63c11c";
     const DATA_PACKAGE_BYTES_2: &str = "4554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000360cdd851e018d79bf0ba000000020000001473fd9dc72e6814a7de719b403cf4c9eba08934a643fd0666c433b806b31e69904f2226ffd3c8ef75861b11b5e32a1fda4b1458e0da4605a772dfba2a812f3ee1b";
 
diff --git a/static/rust/redstone/crypto_secp256k1/src/redstone/protocol/data_point.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/protocol/data_point.rs.html
index e643085a..b9e92d43 100644
--- a/static/rust/redstone/crypto_secp256k1/src/redstone/protocol/data_point.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/src/redstone/protocol/data_point.rs.html
@@ -1,4 +1,4 @@
-data_point.rs - source
1
+data_point.rs - source
1
 2
 3
 4
@@ -155,6 +155,9 @@
 155
 156
 157
+158
+159
+160
 
use crate::{
     network::{
         as_str::{AsAsciiStr, AsHexStr},
@@ -229,6 +232,9 @@
     };
     use std::ops::Shr;
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const DATA_POINT_BYTES_TAIL: &str = "4554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000360cafc94e";
     const VALUE: u128 = 232141080910;
 
diff --git a/static/rust/redstone/crypto_secp256k1/src/redstone/protocol/marker.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/protocol/marker.rs.html
index 15b31817..7646024c 100644
--- a/static/rust/redstone/crypto_secp256k1/src/redstone/protocol/marker.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/src/redstone/protocol/marker.rs.html
@@ -1,4 +1,4 @@
-marker.rs - source
1
+marker.rs - source
1
 2
 3
 4
@@ -64,6 +64,9 @@
 64
 65
 66
+67
+68
+69
 
use crate::{
     network::{assert::Assert, error::Error},
     protocol::constants::{REDSTONE_MARKER, REDSTONE_MARKER_BS},
@@ -87,6 +90,9 @@
         protocol::{constants::REDSTONE_MARKER_BS, marker::trim_redstone_marker},
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const PAYLOAD_TAIL: &str = "1c000f000000000002ed57011e0000";
 
     #[test]
diff --git a/static/rust/redstone/crypto_secp256k1/src/redstone/protocol/mod.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/protocol/mod.rs.html
index fbd60f5b..e7d0b176 100644
--- a/static/rust/redstone/crypto_secp256k1/src/redstone/protocol/mod.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/src/redstone/protocol/mod.rs.html
@@ -1,4 +1,4 @@
-mod.rs - source
1
+mod.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1/src/redstone/protocol/payload.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/protocol/payload.rs.html
index 1cd14131..bfb8b9b0 100644
--- a/static/rust/redstone/crypto_secp256k1/src/redstone/protocol/payload.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/src/redstone/protocol/payload.rs.html
@@ -1,4 +1,4 @@
-payload.rs - source
1
+payload.rs - source
1
 2
 3
 4
@@ -102,6 +102,10 @@
 102
 103
 104
+105
+106
+107
+108
 
use crate::{
     network::{assert::Assert, error::Error},
     protocol::{
@@ -145,7 +149,8 @@
     payload.trim_end(DATA_PACKAGES_COUNT_BS)
 }
 
-#[cfg(feature = "helpers")]
+#[cfg(not(all(feature = "crypto_radix", target_arch = "wasm32")))]
+#[cfg(feature = "helpers")]
 #[cfg(test)]
 mod tests {
     use crate::{
@@ -156,6 +161,9 @@
         },
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const PAYLOAD_METADATA_BYTES: &str = "000f000000";
     const PAYLOAD_METADATA_WITH_UNSIGNED_BYTE: &str = "000f55000001";
     const PAYLOAD_METADATA_WITH_UNSIGNED_BYTES: &str = "000f11223344556677889900aabbccddeeff000010";
diff --git a/static/rust/redstone/crypto_secp256k1/src/redstone/utils/filter.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/utils/filter.rs.html
index f28b29ef..7043d176 100644
--- a/static/rust/redstone/crypto_secp256k1/src/redstone/utils/filter.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/src/redstone/utils/filter.rs.html
@@ -1,4 +1,4 @@
-filter.rs - source
1
+filter.rs - source
1
 2
 3
 4
@@ -19,6 +19,9 @@
 19
 20
 21
+22
+23
+24
 
pub(crate) trait FilterSome<Output> {
     fn filter_some(&self) -> Output;
 }
@@ -33,6 +36,9 @@
 mod filter_some_tests {
     use crate::utils::filter::FilterSome;
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[test]
     fn test_filter_some() {
         let values = [None, Some(23u64), None, Some(12), Some(12), None, Some(23)];
diff --git a/static/rust/redstone/crypto_secp256k1/src/redstone/utils/median.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/utils/median.rs.html
index c329ff3b..62b2749e 100644
--- a/static/rust/redstone/crypto_secp256k1/src/redstone/utils/median.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/src/redstone/utils/median.rs.html
@@ -1,4 +1,4 @@
-median.rs - source
1
+median.rs - source
1
 2
 3
 4
@@ -185,6 +185,9 @@
 185
 186
 187
+188
+189
+190
 
use crate::network::{assert::Assert, error::Error::ArrayIsEmpty, specific::U256};
 use std::ops::{Add, Rem, Shr};
 
@@ -281,6 +284,9 @@
     use itertools::Itertools;
     use std::fmt::Debug;
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     #[cfg(feature = "network_radix")]
     use crate::network::radix::u256_ext::U256Ext;
 
diff --git a/static/rust/redstone/crypto_secp256k1/src/redstone/utils/mod.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/utils/mod.rs.html
index 44258e67..a99c109d 100644
--- a/static/rust/redstone/crypto_secp256k1/src/redstone/utils/mod.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/src/redstone/utils/mod.rs.html
@@ -1,4 +1,4 @@
-mod.rs - source
1
+mod.rs - source
1
 2
 3
 4
diff --git a/static/rust/redstone/crypto_secp256k1/src/redstone/utils/trim.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/utils/trim.rs.html
index 551a41a8..63a6ae2c 100644
--- a/static/rust/redstone/crypto_secp256k1/src/redstone/utils/trim.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/src/redstone/utils/trim.rs.html
@@ -1,4 +1,4 @@
-trim.rs - source
1
+trim.rs - source
1
 2
 3
 4
@@ -147,6 +147,19 @@
 147
 148
 149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
 
use crate::network::{
     assert::Unwrap, error::Error, from_bytes_repr::FromBytesRepr, specific::U256,
 };
@@ -196,6 +209,9 @@
         utils::trim::Trim,
     };
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     const MARKER_DECIMAL: u64 = 823907890102272;
 
     fn redstone_marker_bytes() -> Vec<u8> {
@@ -253,8 +269,11 @@
         let (_, result): (_, u64) = test_trim_end(size);
         assert_eq!(result, MARKER_DECIMAL);
 
-        let (_, result): (_, usize) = test_trim_end(size);
-        assert_eq!(result, 823907890102272usize);
+        #[cfg(not(target_arch = "wasm32"))]
+        {
+            let (_, result): (_, usize) = test_trim_end(size);
+            assert_eq!(result, 823907890102272usize);
+        }
 
         let (_rest, result): (_, Vec<u8>) = test_trim_end(size);
         assert_eq!(result.as_slice().len(), size.min(REDSTONE_MARKER_BS));
@@ -271,9 +290,16 @@
         assert_eq!(x, 18446744073709551615);
     }
 
+    #[cfg(target_arch = "wasm32")]
+    #[should_panic(expected = "Number overflow: 823907890102272")]
+    #[test]
+    fn test_trim_end_u64_overflow_usize_wasm32() {
+        let (_, _): (_, usize) = test_trim_end(REDSTONE_MARKER_BS);
+    }
+
     #[should_panic(expected = "Number overflow: 18591708106338011145")]
     #[test]
-    fn test_trim_end_u64_overflow() {
+    fn test_trim_end_u64_overflow_u64() {
         let mut bytes = vec![1u8, 2, 3, 4, 5, 6, 7, 8, 9];
 
         let _: u64 = bytes.trim_end(9);
diff --git a/static/rust/redstone/crypto_secp256k1/src/redstone/utils/trim_zeros.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/utils/trim_zeros.rs.html
index 0d223de1..9be0496f 100644
--- a/static/rust/redstone/crypto_secp256k1/src/redstone/utils/trim_zeros.rs.html
+++ b/static/rust/redstone/crypto_secp256k1/src/redstone/utils/trim_zeros.rs.html
@@ -1,4 +1,4 @@
-trim_zeros.rs - source
1
+trim_zeros.rs - source
1
 2
 3
 4
@@ -43,6 +43,9 @@
 43
 44
 45
+46
+47
+48
 
pub trait TrimZeros {
     fn trim_zeros(self) -> Self;
 }
@@ -69,6 +72,9 @@
 mod tests {
     use crate::{protocol::constants::REDSTONE_MARKER, utils::trim_zeros::TrimZeros};
 
+    #[cfg(target_arch = "wasm32")]
+    use wasm_bindgen_test::wasm_bindgen_test as test;
+
     fn redstone_marker_bytes() -> Vec<u8> {
         REDSTONE_MARKER.as_slice().into()
     }
diff --git a/static/rust/redstone/crypto_secp256k1/static.files/main-d2fab2bf619172d3.js b/static/rust/redstone/crypto_secp256k1/static.files/main-d2fab2bf619172d3.js
new file mode 100644
index 00000000..8fc48ede
--- /dev/null
+++ b/static/rust/redstone/crypto_secp256k1/static.files/main-d2fab2bf619172d3.js
@@ -0,0 +1,11 @@
+"use strict";window.RUSTDOC_TOOLTIP_HOVER_MS=300;window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS=450;function resourcePath(basename,extension){return getVar("root-path")+basename+getVar("resource-suffix")+extension}function hideMain(){addClass(document.getElementById(MAIN_ID),"hidden")}function showMain(){removeClass(document.getElementById(MAIN_ID),"hidden")}function blurHandler(event,parentElem,hideCallback){if(!parentElem.contains(document.activeElement)&&!parentElem.contains(event.relatedTarget)){hideCallback()}}window.rootPath=getVar("root-path");window.currentCrate=getVar("current-crate");function setMobileTopbar(){const mobileTopbar=document.querySelector(".mobile-topbar");const locationTitle=document.querySelector(".sidebar h2.location");if(mobileTopbar){const mobileTitle=document.createElement("h2");mobileTitle.className="location";if(hasClass(document.querySelector(".rustdoc"),"crate")){mobileTitle.innerHTML=`Crate ${window.currentCrate}`}else if(locationTitle){mobileTitle.innerHTML=locationTitle.innerHTML}mobileTopbar.appendChild(mobileTitle)}}function getVirtualKey(ev){if("key"in ev&&typeof ev.key!=="undefined"){return ev.key}const c=ev.charCode||ev.keyCode;if(c===27){return"Escape"}return String.fromCharCode(c)}const MAIN_ID="main-content";const SETTINGS_BUTTON_ID="settings-menu";const ALTERNATIVE_DISPLAY_ID="alternative-display";const NOT_DISPLAYED_ID="not-displayed";const HELP_BUTTON_ID="help-button";function getSettingsButton(){return document.getElementById(SETTINGS_BUTTON_ID)}function getHelpButton(){return document.getElementById(HELP_BUTTON_ID)}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}function insertAfter(newNode,referenceNode){referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling)}function getOrCreateSection(id,classes){let el=document.getElementById(id);if(!el){el=document.createElement("section");el.id=id;el.className=classes;insertAfter(el,document.getElementById(MAIN_ID))}return el}function getAlternativeDisplayElem(){return getOrCreateSection(ALTERNATIVE_DISPLAY_ID,"content hidden")}function getNotDisplayedElem(){return getOrCreateSection(NOT_DISPLAYED_ID,"hidden")}function switchDisplayedElement(elemToDisplay){const el=getAlternativeDisplayElem();if(el.children.length>0){getNotDisplayedElem().appendChild(el.firstElementChild)}if(elemToDisplay===null){addClass(el,"hidden");showMain();return}el.appendChild(elemToDisplay);hideMain();removeClass(el,"hidden")}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}function preLoadCss(cssUrl){const link=document.createElement("link");link.href=cssUrl;link.rel="preload";link.as="style";document.getElementsByTagName("head")[0].appendChild(link)}(function(){const isHelpPage=window.location.pathname.endsWith("/help.html");function loadScript(url,errorCallback){const script=document.createElement("script");script.src=url;if(errorCallback!==undefined){script.onerror=errorCallback}document.head.append(script)}getSettingsButton().onclick=event=>{if(event.ctrlKey||event.altKey||event.metaKey){return}window.hideAllModals(false);addClass(getSettingsButton(),"rotate");event.preventDefault();loadScript(getVar("static-root-path")+getVar("settings-js"));setTimeout(()=>{const themes=getVar("themes").split(",");for(const theme of themes){if(theme!==""){preLoadCss(getVar("root-path")+theme+".css")}}},0)};window.searchState={loadingText:"Loading search results...",input:document.getElementsByClassName("search-input")[0],outputElement:()=>{let el=document.getElementById("search");if(!el){el=document.createElement("section");el.id="search";getNotDisplayedElem().appendChild(el)}return el},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:()=>{if(searchState.timeout!==null){clearTimeout(searchState.timeout);searchState.timeout=null}},isDisplayed:()=>searchState.outputElement().parentElement.id===ALTERNATIVE_DISPLAY_ID,focus:()=>{searchState.input.focus()},defocus:()=>{searchState.input.blur()},showResults:search=>{if(search===null||typeof search==="undefined"){search=searchState.outputElement()}switchDisplayedElement(search);searchState.mouseMovedAfterSearch=false;document.title=searchState.title},removeQueryParameters:()=>{document.title=searchState.titleBeforeSearch;if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.hash)}},hideResults:()=>{switchDisplayedElement(null);searchState.removeQueryParameters()},getQueryStringParams:()=>{const params={};window.location.search.substring(1).split("&").map(s=>{const pair=s.split("=").map(x=>x.replace(/\+/g," "));params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params},setup:()=>{const search_input=searchState.input;if(!searchState.input){return}let searchLoaded=false;function sendSearchForm(){document.getElementsByClassName("search-form")[0].submit()}function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(getVar("static-root-path")+getVar("search-js"),sendSearchForm);loadScript(resourcePath("search-index",".js"),sendSearchForm)}}search_input.addEventListener("focus",()=>{search_input.origPlaceholder=search_input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});if(search_input.value!==""){loadSearch()}const params=searchState.getQueryStringParams();if(params.search!==undefined){searchState.setLoadingSearch();loadSearch()}},setLoadingSearch:()=>{const search=searchState.outputElement();search.innerHTML="

"+searchState.loadingText+"

";searchState.showResults(search)},descShards:new Map(),loadDesc:async function({descShard,descIndex}){if(descShard.promise===null){descShard.promise=new Promise((resolve,reject)=>{descShard.resolve=resolve;const ds=descShard;const fname=`${ds.crate}-desc-${ds.shard}-`;const url=resourcePath(`search.desc/${descShard.crate}/${fname}`,".js",);loadScript(url,reject)})}const list=await descShard.promise;return list[descIndex]},loadedDescShard:function(crate,shard,data){this.descShards.get(crate)[shard].resolve(data.split("\n"))},};const toggleAllDocsId="toggle-all-docs";let savedHash="";function handleHashes(ev){if(ev!==null&&searchState.isDisplayed()&&ev.newURL){switchDisplayedElement(null);const hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.search+"#"+hash)}const elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}const pageId=window.location.hash.replace(/^#/,"");if(savedHash!==pageId){savedHash=pageId;if(pageId!==""){expandSection(pageId)}}if(savedHash.startsWith("impl-")){const splitAt=savedHash.indexOf("/");if(splitAt!==-1){const implId=savedHash.slice(0,splitAt);const assocId=savedHash.slice(splitAt+1);const implElem=document.getElementById(implId);if(implElem&&implElem.parentElement.tagName==="SUMMARY"&&implElem.parentElement.parentElement.tagName==="DETAILS"){onEachLazy(implElem.parentElement.parentElement.querySelectorAll(`[id^="${assocId}"]`),item=>{const numbered=/([^-]+)-([0-9]+)/.exec(item.id);if(item.id===assocId||(numbered&&numbered[1]===assocId)){openParentDetails(item);item.scrollIntoView();setTimeout(()=>{window.location.replace("#"+item.id)},0)}},)}}}}function onHashChange(ev){hideSidebar();handleHashes(ev)}function openParentDetails(elem){while(elem){if(elem.tagName==="DETAILS"){elem.open=true}elem=elem.parentNode}}function expandSection(id){openParentDetails(document.getElementById(id))}function handleEscape(ev){searchState.clearInputTimeout();searchState.hideResults();ev.preventDefault();searchState.defocus();window.hideAllModals(true)}function handleShortcut(ev){const disableShortcuts=getSettingValue("disable-shortcuts")==="true";if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts){return}if(document.activeElement.tagName==="INPUT"&&document.activeElement.type!=="checkbox"&&document.activeElement.type!=="radio"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":case"/":ev.preventDefault();searchState.focus();break;case"+":ev.preventDefault();expandAllDocs();break;case"-":ev.preventDefault();collapseAllDocs();break;case"?":showHelp();break;default:break}}}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);function addSidebarItems(){if(!window.SIDEBAR_ITEMS){return}const sidebar=document.getElementsByClassName("sidebar-elems")[0];function block(shortty,id,longty){const filtered=window.SIDEBAR_ITEMS[shortty];if(!filtered){return}const modpath=hasClass(document.querySelector(".rustdoc"),"mod")?"../":"";const h3=document.createElement("h3");h3.innerHTML=`${longty}`;const ul=document.createElement("ul");ul.className="block "+shortty;for(const name of filtered){let path;if(shortty==="mod"){path=`${modpath}${name}/index.html`}else{path=`${modpath}${shortty}.${name}.html`}let current_page=document.location.href.toString();if(current_page.endsWith("/")){current_page+="index.html"}const link=document.createElement("a");link.href=path;link.textContent=name;const li=document.createElement("li");if(link.href===current_page){li.classList.add("current")}li.appendChild(link);ul.appendChild(li)}sidebar.appendChild(h3);sidebar.appendChild(ul)}if(sidebar){block("primitive","primitives","Primitive Types");block("mod","modules","Modules");block("macro","macros","Macros");block("struct","structs","Structs");block("enum","enums","Enums");block("constant","constants","Constants");block("static","static","Statics");block("trait","traits","Traits");block("fn","functions","Functions");block("type","types","Type Aliases");block("union","unions","Unions");block("foreigntype","foreign-types","Foreign Types");block("keyword","keywords","Keywords");block("opaque","opaque-types","Opaque Types");block("attr","attributes","Attribute Macros");block("derive","derives","Derive Macros");block("traitalias","trait-aliases","Trait Aliases")}}window.register_implementors=imp=>{const implementors=document.getElementById("implementors-list");const synthetic_implementors=document.getElementById("synthetic-implementors-list");const inlined_types=new Set();const TEXT_IDX=0;const SYNTHETIC_IDX=1;const TYPES_IDX=2;if(synthetic_implementors){onEachLazy(synthetic_implementors.getElementsByClassName("impl"),el=>{const aliases=el.getAttribute("data-aliases");if(!aliases){return}aliases.split(",").forEach(alias=>{inlined_types.add(alias)})})}let currentNbImpls=implementors.getElementsByClassName("impl").length;const traitName=document.querySelector(".main-heading h1 > .trait").textContent;const baseIdName="impl-"+traitName+"-";const libs=Object.getOwnPropertyNames(imp);const script=document.querySelector("script[data-ignore-extern-crates]");const ignoreExternCrates=new Set((script?script.getAttribute("data-ignore-extern-crates"):"").split(","),);for(const lib of libs){if(lib===window.currentCrate||ignoreExternCrates.has(lib)){continue}const structs=imp[lib];struct_loop:for(const struct of structs){const list=struct[SYNTHETIC_IDX]?synthetic_implementors:implementors;if(struct[SYNTHETIC_IDX]){for(const struct_type of struct[TYPES_IDX]){if(inlined_types.has(struct_type)){continue struct_loop}inlined_types.add(struct_type)}}const code=document.createElement("h3");code.innerHTML=struct[TEXT_IDX];addClass(code,"code-header");onEachLazy(code.getElementsByTagName("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});const currentId=baseIdName+currentNbImpls;const anchor=document.createElement("a");anchor.href="#"+currentId;addClass(anchor,"anchor");const display=document.createElement("div");display.id=currentId;addClass(display,"impl");display.appendChild(anchor);display.appendChild(code);list.appendChild(display);currentNbImpls+=1}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}window.register_type_impls=imp=>{if(!imp||!imp[window.currentCrate]){return}window.pending_type_impls=null;const idMap=new Map();let implementations=document.getElementById("implementations-list");let trait_implementations=document.getElementById("trait-implementations-list");let trait_implementations_header=document.getElementById("trait-implementations");const script=document.querySelector("script[data-self-path]");const selfPath=script?script.getAttribute("data-self-path"):null;const mainContent=document.querySelector("#main-content");const sidebarSection=document.querySelector(".sidebar section");let methods=document.querySelector(".sidebar .block.method");let associatedTypes=document.querySelector(".sidebar .block.associatedtype");let associatedConstants=document.querySelector(".sidebar .block.associatedconstant");let sidebarTraitList=document.querySelector(".sidebar .block.trait-implementation");for(const impList of imp[window.currentCrate]){const types=impList.slice(2);const text=impList[0];const isTrait=impList[1]!==0;const traitName=impList[1];if(types.indexOf(selfPath)===-1){continue}let outputList=isTrait?trait_implementations:implementations;if(outputList===null){const outputListName=isTrait?"Trait Implementations":"Implementations";const outputListId=isTrait?"trait-implementations-list":"implementations-list";const outputListHeaderId=isTrait?"trait-implementations":"implementations";const outputListHeader=document.createElement("h2");outputListHeader.id=outputListHeaderId;outputListHeader.innerText=outputListName;outputList=document.createElement("div");outputList.id=outputListId;if(isTrait){const link=document.createElement("a");link.href=`#${outputListHeaderId}`;link.innerText="Trait Implementations";const h=document.createElement("h3");h.appendChild(link);trait_implementations=outputList;trait_implementations_header=outputListHeader;sidebarSection.appendChild(h);sidebarTraitList=document.createElement("ul");sidebarTraitList.className="block trait-implementation";sidebarSection.appendChild(sidebarTraitList);mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList)}else{implementations=outputList;if(trait_implementations){mainContent.insertBefore(outputListHeader,trait_implementations_header);mainContent.insertBefore(outputList,trait_implementations_header)}else{const mainContent=document.querySelector("#main-content");mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList)}}}const template=document.createElement("template");template.innerHTML=text;onEachLazy(template.content.querySelectorAll("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});onEachLazy(template.content.querySelectorAll("[id]"),el=>{let i=0;if(idMap.has(el.id)){i=idMap.get(el.id)}else if(document.getElementById(el.id)){i=1;while(document.getElementById(`${el.id}-${2 * i}`)){i=2*i}while(document.getElementById(`${el.id}-${i}`)){i+=1}}if(i!==0){const oldHref=`#${el.id}`;const newHref=`#${el.id}-${i}`;el.id=`${el.id}-${i}`;onEachLazy(template.content.querySelectorAll("a[href]"),link=>{if(link.getAttribute("href")===oldHref){link.href=newHref}})}idMap.set(el.id,i+1)});const templateAssocItems=template.content.querySelectorAll("section.tymethod, "+"section.method, section.associatedtype, section.associatedconstant");if(isTrait){const li=document.createElement("li");const a=document.createElement("a");a.href=`#${template.content.querySelector(".impl").id}`;a.textContent=traitName;li.appendChild(a);sidebarTraitList.append(li)}else{onEachLazy(templateAssocItems,item=>{let block=hasClass(item,"associatedtype")?associatedTypes:(hasClass(item,"associatedconstant")?associatedConstants:(methods));if(!block){const blockTitle=hasClass(item,"associatedtype")?"Associated Types":(hasClass(item,"associatedconstant")?"Associated Constants":("Methods"));const blockClass=hasClass(item,"associatedtype")?"associatedtype":(hasClass(item,"associatedconstant")?"associatedconstant":("method"));const blockHeader=document.createElement("h3");const blockLink=document.createElement("a");blockLink.href="#implementations";blockLink.innerText=blockTitle;blockHeader.appendChild(blockLink);block=document.createElement("ul");block.className=`block ${blockClass}`;const insertionReference=methods||sidebarTraitList;if(insertionReference){const insertionReferenceH=insertionReference.previousElementSibling;sidebarSection.insertBefore(blockHeader,insertionReferenceH);sidebarSection.insertBefore(block,insertionReferenceH)}else{sidebarSection.appendChild(blockHeader);sidebarSection.appendChild(block)}if(hasClass(item,"associatedtype")){associatedTypes=block}else if(hasClass(item,"associatedconstant")){associatedConstants=block}else{methods=block}}const li=document.createElement("li");const a=document.createElement("a");a.innerText=item.id.split("-")[0].split(".")[1];a.href=`#${item.id}`;li.appendChild(a);block.appendChild(li)})}outputList.appendChild(template.content)}for(const list of[methods,associatedTypes,associatedConstants,sidebarTraitList]){if(!list){continue}const newChildren=Array.prototype.slice.call(list.children);newChildren.sort((a,b)=>{const aI=a.innerText;const bI=b.innerText;return aIbI?1:0});list.replaceChildren(...newChildren)}};if(window.pending_type_impls){window.register_type_impls(window.pending_type_impls)}function addSidebarCrates(){if(!window.ALL_CRATES){return}const sidebarElems=document.getElementsByClassName("sidebar-elems")[0];if(!sidebarElems){return}const h3=document.createElement("h3");h3.innerHTML="Crates";const ul=document.createElement("ul");ul.className="block crate";for(const crate of window.ALL_CRATES){const link=document.createElement("a");link.href=window.rootPath+crate+"/index.html";link.textContent=crate;const li=document.createElement("li");if(window.rootPath!=="./"&&crate===window.currentCrate){li.className="current"}li.appendChild(link);ul.appendChild(li)}sidebarElems.appendChild(h3);sidebarElems.appendChild(ul)}function expandAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);removeClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hasClass(e,"type-contents-toggle")&&!hasClass(e,"more-examples-toggle")){e.open=true}});innerToggle.title="collapse all docs";innerToggle.children[0].innerText="\u2212"}function collapseAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);addClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(e.parentNode.id!=="implementations-list"||(!hasClass(e,"implementors-toggle")&&!hasClass(e,"type-contents-toggle"))){e.open=false}});innerToggle.title="expand all docs";innerToggle.children[0].innerText="+"}function toggleAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);if(!innerToggle){return}if(hasClass(innerToggle,"will-expand")){expandAllDocs()}else{collapseAllDocs()}}(function(){const toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}const hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";const hideImplementations=getSettingValue("auto-hide-trait-implementations")==="true";const hideLargeItemContents=getSettingValue("auto-hide-large-items")!=="false";function setImplementorsTogglesOpen(id,open){const list=document.getElementById(id);if(list!==null){onEachLazy(list.getElementsByClassName("implementors-toggle"),e=>{e.open=open})}}if(hideImplementations){setImplementorsTogglesOpen("trait-implementations-list",false);setImplementorsTogglesOpen("blanket-implementations-list",false)}onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hideLargeItemContents&&hasClass(e,"type-contents-toggle")){e.open=true}if(hideMethodDocs&&hasClass(e,"method-toggle")){e.open=false}})}());window.rustdoc_add_line_numbers_to_examples=()=>{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");if(line_numbers.length>0){return}const count=x.textContent.split("\n").length;const elems=[];for(let i=0;i{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");for(const node of line_numbers){parent.removeChild(node)}})};if(getSettingValue("line-numbers")==="true"){window.rustdoc_add_line_numbers_to_examples()}function showSidebar(){window.hideAllModals(false);const sidebar=document.getElementsByClassName("sidebar")[0];addClass(sidebar,"shown")}function hideSidebar(){const sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"shown")}window.addEventListener("resize",()=>{if(window.CURRENT_TOOLTIP_ELEMENT){const base=window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE;const force_visible=base.TOOLTIP_FORCE_VISIBLE;hideTooltip(false);if(force_visible){showTooltip(base);base.TOOLTIP_FORCE_VISIBLE=true}}});const mainElem=document.getElementById(MAIN_ID);if(mainElem){mainElem.addEventListener("click",hideSidebar)}onEachLazy(document.querySelectorAll("a[href^='#']"),el=>{el.addEventListener("click",()=>{expandSection(el.hash.slice(1));hideSidebar()})});onEachLazy(document.querySelectorAll(".toggle > summary:not(.hideme)"),el=>{el.addEventListener("click",e=>{if(e.target.tagName!=="SUMMARY"&&e.target.tagName!=="A"){e.preventDefault()}})});function showTooltip(e){const notable_ty=e.getAttribute("data-notable-ty");if(!window.NOTABLE_TRAITS&¬able_ty){const data=document.getElementById("notable-traits-data");if(data){window.NOTABLE_TRAITS=JSON.parse(data.innerText)}else{throw new Error("showTooltip() called with notable without any notable traits!")}}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE===e){clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);return}window.hideAllModals(false);const wrapper=document.createElement("div");if(notable_ty){wrapper.innerHTML="
"+window.NOTABLE_TRAITS[notable_ty]+"
"}else{if(e.getAttribute("title")!==null){e.setAttribute("data-title",e.getAttribute("title"));e.removeAttribute("title")}if(e.getAttribute("data-title")!==null){const titleContent=document.createElement("div");titleContent.className="content";titleContent.appendChild(document.createTextNode(e.getAttribute("data-title")));wrapper.appendChild(titleContent)}}wrapper.className="tooltip popover";const focusCatcher=document.createElement("div");focusCatcher.setAttribute("tabindex","0");focusCatcher.onfocus=hideTooltip;wrapper.appendChild(focusCatcher);const pos=e.getBoundingClientRect();wrapper.style.top=(pos.top+window.scrollY+pos.height)+"px";wrapper.style.left=0;wrapper.style.right="auto";wrapper.style.visibility="hidden";const body=document.getElementsByTagName("body")[0];body.appendChild(wrapper);const wrapperPos=wrapper.getBoundingClientRect();const finalPos=pos.left+window.scrollX-wrapperPos.width+24;if(finalPos>0){wrapper.style.left=finalPos+"px"}else{wrapper.style.setProperty("--popover-arrow-offset",(wrapperPos.right-pos.right+4)+"px",)}wrapper.style.visibility="";window.CURRENT_TOOLTIP_ELEMENT=wrapper;window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE=e;clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);wrapper.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}clearTooltipHoverTimeout(e)};wrapper.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&!e.contains(ev.relatedTarget)){setTooltipHoverTimeout(e,false);addClass(wrapper,"fade-out")}}}function setTooltipHoverTimeout(element,show){clearTooltipHoverTimeout(element);if(!show&&!window.CURRENT_TOOLTIP_ELEMENT){return}if(show&&window.CURRENT_TOOLTIP_ELEMENT){return}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE!==element){return}element.TOOLTIP_HOVER_TIMEOUT=setTimeout(()=>{if(show){showTooltip(element)}else if(!element.TOOLTIP_FORCE_VISIBLE){hideTooltip(false)}},show?window.RUSTDOC_TOOLTIP_HOVER_MS:window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS)}function clearTooltipHoverTimeout(element){if(element.TOOLTIP_HOVER_TIMEOUT!==undefined){removeClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out");clearTimeout(element.TOOLTIP_HOVER_TIMEOUT);delete element.TOOLTIP_HOVER_TIMEOUT}}function tooltipBlurHandler(event){if(window.CURRENT_TOOLTIP_ELEMENT&&!window.CURRENT_TOOLTIP_ELEMENT.contains(document.activeElement)&&!window.CURRENT_TOOLTIP_ELEMENT.contains(event.relatedTarget)&&!window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.contains(document.activeElement)&&!window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.contains(event.relatedTarget)){setTimeout(()=>hideTooltip(false),0)}}function hideTooltip(focus){if(window.CURRENT_TOOLTIP_ELEMENT){if(window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE){if(focus){window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.focus()}window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE=false}const body=document.getElementsByTagName("body")[0];body.removeChild(window.CURRENT_TOOLTIP_ELEMENT);clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);window.CURRENT_TOOLTIP_ELEMENT=null}}onEachLazy(document.getElementsByClassName("tooltip"),e=>{e.onclick=()=>{e.TOOLTIP_FORCE_VISIBLE=e.TOOLTIP_FORCE_VISIBLE?false:true;if(window.CURRENT_TOOLTIP_ELEMENT&&!e.TOOLTIP_FORCE_VISIBLE){hideTooltip(true)}else{showTooltip(e);window.CURRENT_TOOLTIP_ELEMENT.setAttribute("tabindex","0");window.CURRENT_TOOLTIP_ELEMENT.focus();window.CURRENT_TOOLTIP_ELEMENT.onblur=tooltipBlurHandler}return false};e.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointermove=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&window.CURRENT_TOOLTIP_ELEMENT&&!window.CURRENT_TOOLTIP_ELEMENT.contains(ev.relatedTarget)){setTooltipHoverTimeout(e,false);addClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out")}}});const sidebar_menu_toggle=document.getElementsByClassName("sidebar-menu-toggle")[0];if(sidebar_menu_toggle){sidebar_menu_toggle.addEventListener("click",()=>{const sidebar=document.getElementsByClassName("sidebar")[0];if(!hasClass(sidebar,"shown")){showSidebar()}else{hideSidebar()}})}function helpBlurHandler(event){blurHandler(event,getHelpButton(),window.hidePopoverMenus)}function buildHelpMenu(){const book_info=document.createElement("span");const channel=getVar("channel");book_info.className="top";book_info.innerHTML=`You can find more information in \ +the rustdoc book.`;const shortcuts=[["?","Show this help dialog"],["S / /","Focus the search field"],["↑","Move up in search results"],["↓","Move down in search results"],["← / →","Switch result tab (when results focused)"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(x=>"
"+x[0].split(" ").map((y,index)=>((index&1)===0?""+y+"":" "+y+" ")).join("")+"
"+x[1]+"
").join("");const div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

"+shortcuts+"
";const infos=[`For a full list of all search features, take a look here.`,"Prefix searches with a type followed by a colon (e.g., fn:) to \ + restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ + enum, trait, type, macro, \ + and const.","Search functions by type signature (e.g., vec -> usize or \ + -> vec or String, enum:Cow -> bool)","You can look for items with an exact name by putting double quotes around \ + your request: \"string\"","Look for functions that accept or return \ + slices and \ + arrays by writing \ + square brackets (e.g., -> [u8] or [] -> Option)","Look for items inside another one by searching for a path: vec::Vec",].map(x=>"

"+x+"

").join("");const div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="

Search Tricks

"+infos;const rustdoc_version=document.createElement("span");rustdoc_version.className="bottom";const rustdoc_version_code=document.createElement("code");rustdoc_version_code.innerText="rustdoc "+getVar("rustdoc-version");rustdoc_version.appendChild(rustdoc_version_code);const container=document.createElement("div");if(!isHelpPage){container.className="popover"}container.id="help";container.style.display="none";const side_by_side=document.createElement("div");side_by_side.className="side-by-side";side_by_side.appendChild(div_shortcuts);side_by_side.appendChild(div_infos);container.appendChild(book_info);container.appendChild(side_by_side);container.appendChild(rustdoc_version);if(isHelpPage){const help_section=document.createElement("section");help_section.appendChild(container);document.getElementById("main-content").appendChild(help_section);container.style.display="block"}else{const help_button=getHelpButton();help_button.appendChild(container);container.onblur=helpBlurHandler;help_button.onblur=helpBlurHandler;help_button.children[0].onblur=helpBlurHandler}return container}window.hideAllModals=switchFocus=>{hideSidebar();window.hidePopoverMenus();hideTooltip(switchFocus)};window.hidePopoverMenus=()=>{onEachLazy(document.querySelectorAll(".search-form .popover"),elem=>{elem.style.display="none"})};function getHelpMenu(buildNeeded){let menu=getHelpButton().querySelector(".popover");if(!menu&&buildNeeded){menu=buildHelpMenu()}return menu}function showHelp(){getHelpButton().querySelector("a").focus();const menu=getHelpMenu(true);if(menu.style.display==="none"){window.hideAllModals();menu.style.display=""}}if(isHelpPage){showHelp();document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault()})}else{document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault();const menu=getHelpMenu(true);const shouldShowHelp=menu.style.display==="none";if(shouldShowHelp){showHelp()}else{window.hidePopoverMenus()}})}setMobileTopbar();addSidebarItems();addSidebarCrates();onHashChange(null);window.addEventListener("hashchange",onHashChange);searchState.setup()}());(function(){const SIDEBAR_MIN=100;const SIDEBAR_MAX=500;const RUSTDOC_MOBILE_BREAKPOINT=700;const BODY_MIN=400;const SIDEBAR_VANISH_THRESHOLD=SIDEBAR_MIN/2;const sidebarButton=document.getElementById("sidebar-button");if(sidebarButton){sidebarButton.addEventListener("click",e=>{removeClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","false");if(document.querySelector(".rustdoc.src")){window.rustdocToggleSrcSidebar()}e.preventDefault()})}let currentPointerId=null;let desiredSidebarSize=null;let pendingSidebarResizingFrame=false;const resizer=document.querySelector(".sidebar-resizer");const sidebar=document.querySelector(".sidebar");if(!resizer||!sidebar){return}const isSrcPage=hasClass(document.body,"src");function hideSidebar(){if(isSrcPage){window.rustdocCloseSourceSidebar();updateLocalStorage("src-sidebar-width",null);document.documentElement.style.removeProperty("--src-sidebar-width");sidebar.style.removeProperty("--src-sidebar-width");resizer.style.removeProperty("--src-sidebar-width")}else{addClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","true");updateLocalStorage("desktop-sidebar-width",null);document.documentElement.style.removeProperty("--desktop-sidebar-width");sidebar.style.removeProperty("--desktop-sidebar-width");resizer.style.removeProperty("--desktop-sidebar-width")}}function showSidebar(){if(isSrcPage){window.rustdocShowSourceSidebar()}else{removeClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","false")}}function changeSidebarSize(size){if(isSrcPage){updateLocalStorage("src-sidebar-width",size);sidebar.style.setProperty("--src-sidebar-width",size+"px");resizer.style.setProperty("--src-sidebar-width",size+"px")}else{updateLocalStorage("desktop-sidebar-width",size);sidebar.style.setProperty("--desktop-sidebar-width",size+"px");resizer.style.setProperty("--desktop-sidebar-width",size+"px")}}function isSidebarHidden(){return isSrcPage?!hasClass(document.documentElement,"src-sidebar-expanded"):hasClass(document.documentElement,"hide-sidebar")}function resize(e){if(currentPointerId===null||currentPointerId!==e.pointerId){return}e.preventDefault();const pos=e.clientX-3;if(pos=SIDEBAR_MIN){if(isSidebarHidden()){showSidebar()}const constrainedPos=Math.min(pos,window.innerWidth-BODY_MIN,SIDEBAR_MAX);changeSidebarSize(constrainedPos);desiredSidebarSize=constrainedPos;if(pendingSidebarResizingFrame!==false){clearTimeout(pendingSidebarResizingFrame)}pendingSidebarResizingFrame=setTimeout(()=>{if(currentPointerId===null||pendingSidebarResizingFrame===false){return}pendingSidebarResizingFrame=false;document.documentElement.style.setProperty("--resizing-sidebar-width",desiredSidebarSize+"px",)},100)}}window.addEventListener("resize",()=>{if(window.innerWidth=(window.innerWidth-BODY_MIN)){changeSidebarSize(window.innerWidth-BODY_MIN)}else if(desiredSidebarSize!==null&&desiredSidebarSize>SIDEBAR_MIN){changeSidebarSize(desiredSidebarSize)}});function stopResize(e){if(currentPointerId===null){return}if(e){e.preventDefault()}desiredSidebarSize=sidebar.getBoundingClientRect().width;removeClass(resizer,"active");window.removeEventListener("pointermove",resize,false);window.removeEventListener("pointerup",stopResize,false);removeClass(document.documentElement,"sidebar-resizing");document.documentElement.style.removeProperty("--resizing-sidebar-width");if(resizer.releasePointerCapture){resizer.releasePointerCapture(currentPointerId);currentPointerId=null}}function initResize(e){if(currentPointerId!==null||e.altKey||e.ctrlKey||e.metaKey||e.button!==0){return}if(resizer.setPointerCapture){resizer.setPointerCapture(e.pointerId);if(!resizer.hasPointerCapture(e.pointerId)){resizer.releasePointerCapture(e.pointerId);return}currentPointerId=e.pointerId}window.hideAllModals(false);e.preventDefault();window.addEventListener("pointermove",resize,false);window.addEventListener("pointercancel",stopResize,false);window.addEventListener("pointerup",stopResize,false);addClass(resizer,"active");addClass(document.documentElement,"sidebar-resizing");const pos=e.clientX-sidebar.offsetLeft-3;document.documentElement.style.setProperty("--resizing-sidebar-width",pos+"px");desiredSidebarSize=null}resizer.addEventListener("pointerdown",initResize,false)}());(function(){let reset_button_timeout=null;const but=document.getElementById("copy-path");if(!but){return}but.onclick=()=>{const parent=but.parentElement;const path=[];onEach(parent.childNodes,child=>{if(child.tagName==="A"){path.push(child.textContent)}});const el=document.createElement("textarea");el.value=path.join("::");el.setAttribute("readonly","");el.style.position="absolute";el.style.left="-9999px";document.body.appendChild(el);el.select();document.execCommand("copy");document.body.removeChild(el);but.classList.add("clicked");if(reset_button_timeout!==null){window.clearTimeout(reset_button_timeout)}function reset_button(){reset_button_timeout=null;but.classList.remove("clicked")}reset_button_timeout=window.setTimeout(reset_button,1000)}}()) \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/static.files/rustdoc-c5d6553a23f1e5a6.css b/static/rust/redstone/crypto_secp256k1/static.files/rustdoc-c5d6553a23f1e5a6.css new file mode 100644 index 00000000..9f64990b --- /dev/null +++ b/static/rust/redstone/crypto_secp256k1/static.files/rustdoc-c5d6553a23f1e5a6.css @@ -0,0 +1,46 @@ + :root{--nav-sub-mobile-padding:8px;--search-typename-width:6.75rem;--desktop-sidebar-width:200px;--src-sidebar-width:300px;--desktop-sidebar-z-index:100;--sidebar-elems-left-padding:24px;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular-018c141bf0843ffd.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium-8f9a781e4970d388.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular-46f98efaafac5295.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:italic;font-weight:400;src:local('Source Serif 4 Italic'),url("SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:700;src:local('Source Serif 4 Bold'),url("SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'NanumBarunGothic';src:url("NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2") format("woff2");font-display:swap;unicode-range:U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF;}*{box-sizing:border-box;}body{font:1rem/1.5 "Source Serif 4",NanumBarunGothic,serif;margin:0;position:relative;overflow-wrap:break-word;overflow-wrap:anywhere;font-feature-settings:"kern","liga";background-color:var(--main-background-color);color:var(--main-color);}h1{font-size:1.5rem;}h2{font-size:1.375rem;}h3{font-size:1.25rem;}h1,h2,h3,h4,h5,h6{font-weight:500;}h1,h2,h3,h4{margin:25px 0 15px 0;padding-bottom:6px;}.docblock h3,.docblock h4,h5,h6{margin:15px 0 5px 0;}.docblock>h2:first-child,.docblock>h3:first-child,.docblock>h4:first-child,.docblock>h5:first-child,.docblock>h6:first-child{margin-top:0;}.main-heading h1{margin:0;padding:0;flex-grow:1;overflow-wrap:break-word;overflow-wrap:anywhere;}.main-heading{display:flex;flex-wrap:wrap;padding-bottom:6px;margin-bottom:15px;}.content h2,.top-doc .docblock>h3,.top-doc .docblock>h4{border-bottom:1px solid var(--headings-border-bottom-color);}h1,h2{line-height:1.25;padding-top:3px;padding-bottom:9px;}h3.code-header{font-size:1.125rem;}h4.code-header{font-size:1rem;}.code-header{font-weight:600;margin:0;padding:0;white-space:pre-wrap;}#crate-search,h1,h2,h3,h4,h5,h6,.sidebar,.mobile-topbar,.search-input,.search-results .result-name,.item-name>a,.out-of-band,span.since,a.src,#help-button>a,summary.hideme,.scraped-example-list,ul.all-items{font-family:"Fira Sans",Arial,NanumBarunGothic,sans-serif;}#toggle-all-docs,a.anchor,.section-header a,#src-sidebar a,.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,h1 a,.search-results a,.stab,.result-name i{color:var(--main-color);}span.enum,a.enum,span.struct,a.struct,span.union,a.union,span.primitive,a.primitive,span.type,a.type,span.foreigntype,a.foreigntype{color:var(--type-link-color);}span.trait,a.trait,span.traitalias,a.traitalias{color:var(--trait-link-color);}span.associatedtype,a.associatedtype,span.constant,a.constant,span.static,a.static{color:var(--assoc-item-link-color);}span.fn,a.fn,span.method,a.method,span.tymethod,a.tymethod{color:var(--function-link-color);}span.attr,a.attr,span.derive,a.derive,span.macro,a.macro{color:var(--macro-link-color);}span.mod,a.mod{color:var(--mod-link-color);}span.keyword,a.keyword{color:var(--keyword-link-color);}a{color:var(--link-color);text-decoration:none;}ol,ul{padding-left:24px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.625em;}p,.docblock>.warning{margin:0 0 .75em 0;}p:last-child,.docblock>.warning:last-child{margin:0;}button{padding:1px 6px;cursor:pointer;}button#toggle-all-docs{padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.rustdoc{display:flex;flex-direction:row;flex-wrap:nowrap;}main{position:relative;flex-grow:1;padding:10px 15px 40px 45px;min-width:0;}.src main{padding:15px;}.width-limiter{max-width:960px;margin-right:auto;}details:not(.toggle) summary{margin-bottom:.6em;}code,pre,a.test-arrow,.code-header{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.125em;}.docblock pre code,.docblock-short pre code{padding:0;}pre{padding:14px;line-height:1.5;}pre.item-decl{overflow-x:auto;}.item-decl .type-contents-toggle{contain:initial;}.src .content pre{padding:20px;}.rustdoc.src .example-wrap pre.src-line-numbers{padding:20px 0 20px 4px;}img{max-width:100%;}.logo-container{line-height:0;display:block;}.rust-logo{filter:var(--rust-logo-filter);}.sidebar{font-size:0.875rem;flex:0 0 var(--desktop-sidebar-width);width:var(--desktop-sidebar-width);overflow-y:scroll;overscroll-behavior:contain;position:sticky;height:100vh;top:0;left:0;z-index:var(--desktop-sidebar-z-index);}.rustdoc.src .sidebar{flex-basis:50px;width:50px;border-right:1px solid;overflow-x:hidden;overflow-y:hidden;}.hide-sidebar .sidebar,.hide-sidebar .sidebar-resizer{display:none;}.sidebar-resizer{touch-action:none;width:9px;cursor:col-resize;z-index:calc(var(--desktop-sidebar-z-index) + 1);position:fixed;height:100%;left:calc(var(--desktop-sidebar-width) + 1px);}.rustdoc.src .sidebar-resizer{left:49px;}.src-sidebar-expanded .src .sidebar-resizer{left:var(--src-sidebar-width);}.sidebar-resizing{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;}.sidebar-resizing*{cursor:col-resize !important;}.sidebar-resizing .sidebar{position:fixed;}.sidebar-resizing>body{padding-left:var(--resizing-sidebar-width);}.sidebar-resizer:hover,.sidebar-resizer:active,.sidebar-resizer:focus,.sidebar-resizer.active{width:10px;margin:0;left:var(--desktop-sidebar-width);border-left:solid 1px var(--sidebar-resizer-hover);}.src-sidebar-expanded .rustdoc.src .sidebar-resizer:hover,.src-sidebar-expanded .rustdoc.src .sidebar-resizer:active,.src-sidebar-expanded .rustdoc.src .sidebar-resizer:focus,.src-sidebar-expanded .rustdoc.src .sidebar-resizer.active{left:calc(var(--src-sidebar-width) - 1px);}@media (pointer:coarse){.sidebar-resizer{display:none !important;}}.sidebar-resizer.active{padding:0 140px;width:2px;margin-left:-140px;border-left:none;}.sidebar-resizer.active:before{border-left:solid 2px var(--sidebar-resizer-active);display:block;height:100%;content:"";}.sidebar,.mobile-topbar,.sidebar-menu-toggle,#src-sidebar{background-color:var(--sidebar-background-color);}.src .sidebar>*{visibility:hidden;}.src-sidebar-expanded .src .sidebar{overflow-y:auto;flex-basis:var(--src-sidebar-width);width:var(--src-sidebar-width);}.src-sidebar-expanded .src .sidebar>*{visibility:visible;}#all-types{margin-top:1em;}*{scrollbar-width:initial;scrollbar-color:var(--scrollbar-color);}.sidebar{scrollbar-width:thin;scrollbar-color:var(--scrollbar-color);}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;background-color:var(--scrollbar-track-background-color);}.sidebar::-webkit-scrollbar-track{background-color:var(--scrollbar-track-background-color);}::-webkit-scrollbar-thumb,.sidebar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-background-color);}.hidden{display:none !important;}.logo-container>img{height:48px;width:48px;}ul.block,.block li{padding:0;margin:0;list-style:none;}.sidebar-elems a,.sidebar>h2 a{display:block;padding:0.25rem;margin-right:0.25rem;border-left:solid var(--sidebar-elems-left-padding) transparent;margin-left:calc(-0.25rem - var(--sidebar-elems-left-padding));background-clip:border-box;}.sidebar h2{overflow-wrap:anywhere;padding:0;margin:0.7rem 0;}.sidebar h3{font-size:1.125rem;padding:0;margin:0;}.sidebar-elems,.sidebar>.version,.sidebar>h2{padding-left:var(--sidebar-elems-left-padding);}.sidebar a{color:var(--sidebar-link-color);}.sidebar .current,.sidebar .current a,.sidebar-crate a.logo-container:hover+h2 a,.sidebar a:hover:not(.logo-container){background-color:var(--sidebar-current-link-background-color);}.sidebar-elems .block{margin-bottom:2em;}.sidebar-elems .block li a{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}.sidebar-crate{display:flex;align-items:center;justify-content:center;margin:14px 32px 1rem;row-gap:10px;column-gap:32px;flex-wrap:wrap;}.sidebar-crate h2{flex-grow:1;margin:0 -8px;align-self:start;}.sidebar-crate .logo-container{margin:0 calc(-16px - var(--sidebar-elems-left-padding));padding:0 var(--sidebar-elems-left-padding);text-align:center;}.sidebar-crate .logo-container img{margin-top:-16px;border-top:solid 16px transparent;box-sizing:content-box;position:relative;background-clip:border-box;z-index:1;}.sidebar-crate h2 a{display:block;border-left:solid var(--sidebar-elems-left-padding) transparent;background-clip:border-box;margin:0 calc(-24px + 0.25rem) 0 calc(-0.2rem - var(--sidebar-elems-left-padding));padding:calc((16px - 0.57rem ) / 2 ) 0.25rem;padding-left:0.2rem;}.sidebar-crate h2 .version{display:block;font-weight:normal;font-size:1rem;overflow-wrap:break-word;}.sidebar-crate+.version{margin-top:-1rem;margin-bottom:1rem;}.mobile-topbar{display:none;}.rustdoc .example-wrap{display:flex;position:relative;margin-bottom:10px;}.rustdoc .example-wrap:last-child{margin-bottom:0px;}.rustdoc .example-wrap pre{margin:0;flex-grow:1;}.rustdoc:not(.src) .example-wrap pre{overflow:auto hidden;}.rustdoc .example-wrap pre.example-line-numbers,.rustdoc .example-wrap pre.src-line-numbers{flex-grow:0;min-width:fit-content;overflow:initial;text-align:right;-webkit-user-select:none;user-select:none;padding:14px 8px;color:var(--src-line-numbers-span-color);}.rustdoc .example-wrap pre.src-line-numbers{padding:14px 0;}.src-line-numbers a,.src-line-numbers span{color:var(--src-line-numbers-span-color);padding:0 8px;}.src-line-numbers :target{background-color:transparent;border-right:none;padding:0 8px;}.src-line-numbers .line-highlighted{background-color:var(--src-line-number-highlighted-background-color);}.search-loading{text-align:center;}.docblock-short{overflow-wrap:break-word;overflow-wrap:anywhere;}.docblock :not(pre)>code,.docblock-short code{white-space:pre-wrap;}.top-doc .docblock h2{font-size:1.375rem;}.top-doc .docblock h3{font-size:1.25rem;}.top-doc .docblock h4,.top-doc .docblock h5{font-size:1.125rem;}.top-doc .docblock h6{font-size:1rem;}.docblock h5{font-size:1rem;}.docblock h6{font-size:0.875rem;}.docblock{margin-left:24px;position:relative;}.docblock>:not(.more-examples-toggle):not(.example-wrap){max-width:100%;overflow-x:auto;}.out-of-band{flex-grow:0;font-size:1.125rem;}.docblock code,.docblock-short code,pre,.rustdoc.src .example-wrap{background-color:var(--code-block-background-color);}#main-content{position:relative;}.docblock table{margin:.5em 0;border-collapse:collapse;}.docblock table td,.docblock table th{padding:.5em;border:1px solid var(--border-color);}.docblock table tbody tr:nth-child(2n){background:var(--table-alt-row-background-color);}div.where{white-space:pre-wrap;font-size:0.875rem;}.item-info{display:block;margin-left:24px;}.item-info code{font-size:0.875rem;}#main-content>.item-info{margin-left:0;}nav.sub{flex-grow:1;flex-flow:row nowrap;margin:4px 0 25px 0;display:flex;align-items:center;}.search-form{position:relative;display:flex;height:34px;flex-grow:1;}.src nav.sub{margin:0 0 15px 0;}.section-header{display:block;position:relative;}.section-header:hover>.anchor,.impl:hover>.anchor,.trait-impl:hover>.anchor,.variant:hover>.anchor{display:initial;}.anchor{display:none;position:absolute;left:-0.5em;background:none !important;}.anchor.field{left:-5px;}.section-header>.anchor{left:-15px;padding-right:8px;}h2.section-header>.anchor{padding-right:6px;}a.doc-anchor{color:var(--main-color);display:none;position:absolute;left:-17px;padding-right:5px;padding-left:3px;}*:hover>.doc-anchor{display:block;}.top-doc>.docblock>*:first-child>.doc-anchor{display:none !important;}.main-heading a:hover,.example-wrap .rust a:hover,.all-items a:hover,.docblock a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover:not(.doc-anchor),.docblock-short a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover,.item-info a{text-decoration:underline;}.crate.block li.current a{font-weight:500;}table,.item-table{overflow-wrap:break-word;}.item-table{display:table;padding:0;margin:0;}.item-table>li{display:table-row;}.item-table>li>div{display:table-cell;}.item-table>li>.item-name{padding-right:1.25rem;}.search-results-title{margin-top:0;white-space:nowrap;display:flex;align-items:baseline;}#crate-search-div{position:relative;min-width:5em;}#crate-search{min-width:115px;padding:0 23px 0 4px;max-width:100%;text-overflow:ellipsis;border:1px solid var(--border-color);border-radius:4px;outline:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;background-color:var(--main-background-color);color:inherit;line-height:1.5;font-weight:500;}#crate-search:hover,#crate-search:focus{border-color:var(--crate-search-hover-border);}#crate-search-div::after{pointer-events:none;width:100%;height:100%;position:absolute;top:0;left:0;content:"";background-repeat:no-repeat;background-size:20px;background-position:calc(100% - 2px) 56%;background-image:url('data:image/svg+xml, \ + ');filter:var(--crate-search-div-filter);}#crate-search-div:hover::after,#crate-search-div:focus-within::after{filter:var(--crate-search-div-hover-filter);}#crate-search>option{font-size:1rem;}.search-input{-webkit-appearance:none;outline:none;border:1px solid var(--border-color);border-radius:2px;padding:8px;font-size:1rem;flex-grow:1;background-color:var(--button-background-color);color:var(--search-color);}.search-input:focus{border-color:var(--search-input-focused-border-color);}.search-results{display:none;}.search-results.active{display:block;}.search-results>a{display:flex;margin-left:2px;margin-right:2px;border-bottom:1px solid var(--search-result-border-color);gap:1em;}.search-results>a>div.desc{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex:2;}.search-results a:hover,.search-results a:focus{background-color:var(--search-result-link-focus-background-color);}.search-results .result-name{display:flex;align-items:center;justify-content:start;flex:3;}.search-results .result-name .alias{color:var(--search-results-alias-color);}.search-results .result-name .grey{color:var(--search-results-grey-color);}.search-results .result-name .typename{color:var(--search-results-grey-color);font-size:0.875rem;width:var(--search-typename-width);}.search-results .result-name .path{word-break:break-all;max-width:calc(100% - var(--search-typename-width));display:inline-block;}.search-results .result-name .path>*{display:inline;}.popover{position:absolute;top:100%;right:0;z-index:calc(var(--desktop-sidebar-z-index) + 1);margin-top:7px;border-radius:3px;border:1px solid var(--border-color);background-color:var(--main-background-color);color:var(--main-color);--popover-arrow-offset:11px;}.popover::before{content:'';position:absolute;right:var(--popover-arrow-offset);border:solid var(--border-color);border-width:1px 1px 0 0;background-color:var(--main-background-color);padding:4px;transform:rotate(-45deg);top:-5px;}.setting-line{margin:1.2em 0.6em;}.setting-radio input,.setting-check input{margin-right:0.3em;height:1.2rem;width:1.2rem;border:2px solid var(--settings-input-border-color);outline:none;-webkit-appearance:none;cursor:pointer;}.setting-radio input{border-radius:50%;}.setting-radio span,.setting-check span{padding-bottom:1px;}.setting-radio{margin-top:0.1em;margin-bottom:0.1em;min-width:3.8em;padding:0.3em;display:inline-flex;align-items:center;cursor:pointer;}.setting-radio+.setting-radio{margin-left:0.5em;}.setting-check{margin-right:20px;display:flex;align-items:center;cursor:pointer;}.setting-radio input:checked{box-shadow:inset 0 0 0 3px var(--main-background-color);background-color:var(--settings-input-color);}.setting-check input:checked{background-color:var(--settings-input-color);border-width:1px;content:url('data:image/svg+xml,\ + \ + ');}.setting-radio input:focus,.setting-check input:focus{box-shadow:0 0 1px 1px var(--settings-input-color);}.setting-radio input:checked:focus{box-shadow:inset 0 0 0 3px var(--main-background-color),0 0 2px 2px var(--settings-input-color);}.setting-radio input:hover,.setting-check input:hover{border-color:var(--settings-input-color) !important;}#help.popover{max-width:600px;--popover-arrow-offset:48px;}#help dt{float:left;clear:left;margin-right:0.5rem;}#help span.top,#help span.bottom{text-align:center;display:block;font-size:1.125rem;}#help span.top{margin:10px 0;border-bottom:1px solid var(--border-color);padding-bottom:4px;margin-bottom:6px;}#help span.bottom{clear:both;border-top:1px solid var(--border-color);}.side-by-side>div{width:50%;float:left;padding:0 20px 20px 17px;}.item-info .stab{display:block;padding:3px;margin-bottom:5px;}.item-name .stab{margin-left:0.3125em;}.stab{padding:0 2px;font-size:0.875rem;font-weight:normal;color:var(--main-color);background-color:var(--stab-background-color);width:fit-content;white-space:pre-wrap;border-radius:3px;display:inline;vertical-align:baseline;}.stab.portability>code{background:none;color:var(--stab-code-color);}.stab .emoji,.item-info .stab::before{font-size:1.25rem;}.stab .emoji{margin-right:0.3rem;}.item-info .stab::before{content:"\0";width:0;display:inline-block;color:transparent;}.emoji{text-shadow:1px 0 0 black,-1px 0 0 black,0 1px 0 black,0 -1px 0 black;}.since{font-weight:normal;font-size:initial;}.rightside{padding-left:12px;float:right;}.rightside:not(a),.out-of-band{color:var(--right-side-color);}pre.rust{tab-size:4;-moz-tab-size:4;}pre.rust .kw{color:var(--code-highlight-kw-color);}pre.rust .kw-2{color:var(--code-highlight-kw-2-color);}pre.rust .lifetime{color:var(--code-highlight-lifetime-color);}pre.rust .prelude-ty{color:var(--code-highlight-prelude-color);}pre.rust .prelude-val{color:var(--code-highlight-prelude-val-color);}pre.rust .string{color:var(--code-highlight-string-color);}pre.rust .number{color:var(--code-highlight-number-color);}pre.rust .bool-val{color:var(--code-highlight-literal-color);}pre.rust .self{color:var(--code-highlight-self-color);}pre.rust .attr{color:var(--code-highlight-attribute-color);}pre.rust .macro,pre.rust .macro-nonterminal{color:var(--code-highlight-macro-color);}pre.rust .question-mark{font-weight:bold;color:var(--code-highlight-question-mark-color);}pre.rust .comment{color:var(--code-highlight-comment-color);}pre.rust .doccomment{color:var(--code-highlight-doc-comment-color);}.rustdoc.src .example-wrap pre.rust a{background:var(--codeblock-link-background);}.example-wrap.compile_fail,.example-wrap.should_panic{border-left:2px solid var(--codeblock-error-color);}.ignore.example-wrap{border-left:2px solid var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover,.example-wrap.should_panic:hover{border-left:2px solid var(--codeblock-error-hover-color);}.example-wrap.ignore:hover{border-left:2px solid var(--codeblock-ignore-hover-color);}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip{color:var(--codeblock-error-color);}.example-wrap.ignore .tooltip{color:var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover .tooltip,.example-wrap.should_panic:hover .tooltip{color:var(--codeblock-error-hover-color);}.example-wrap.ignore:hover .tooltip{color:var(--codeblock-ignore-hover-color);}.example-wrap .tooltip{position:absolute;display:block;left:-25px;top:5px;margin:0;line-height:1;}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip,.example-wrap.ignore .tooltip{font-weight:bold;font-size:1.25rem;}.content .docblock .warning{border-left:2px solid var(--warning-border-color);padding:14px;position:relative;overflow-x:visible !important;}.content .docblock .warning::before{color:var(--warning-border-color);content:"ⓘ";position:absolute;left:-25px;top:5px;font-weight:bold;font-size:1.25rem;}.top-doc>.docblock>.warning:first-child::before{top:20px;}a.test-arrow{visibility:hidden;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:1.375rem;top:5px;right:5px;z-index:1;color:var(--test-arrow-color);background-color:var(--test-arrow-background-color);}a.test-arrow:hover{color:var(--test-arrow-hover-color);background-color:var(--test-arrow-hover-background-color);}.example-wrap:hover .test-arrow{visibility:visible;}.code-attribute{font-weight:300;color:var(--code-attribute-color);}.item-spacer{width:100%;height:12px;display:block;}.out-of-band>span.since{font-size:1.25rem;}.sub-variant h4{font-size:1rem;font-weight:400;margin-top:0;margin-bottom:0;}.sub-variant{margin-left:24px;margin-bottom:40px;}.sub-variant>.sub-variant-field{margin-left:24px;}:target{padding-right:3px;background-color:var(--target-background-color);border-right:3px solid var(--target-border-color);}.code-header a.tooltip{color:inherit;margin-right:15px;position:relative;}.code-header a.tooltip:hover{color:var(--link-color);}a.tooltip:hover::after{position:absolute;top:calc(100% - 10px);left:-15px;right:-15px;height:20px;content:"\00a0";}.fade-out{opacity:0;transition:opacity 0.45s cubic-bezier(0,0,0.1,1.0);}.popover.tooltip .content{margin:0.25em 0.5em;}.popover.tooltip .content pre,.popover.tooltip .content code{background:transparent;margin:0;padding:0;font-size:1.25rem;white-space:pre-wrap;}.popover.tooltip .content>h3:first-child{margin:0 0 5px 0;}.search-failed{text-align:center;margin-top:20px;display:none;}.search-failed.active{display:block;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#search-tabs{display:flex;flex-direction:row;gap:1px;margin-bottom:4px;}#search-tabs button{text-align:center;font-size:1.125rem;border:0;border-top:2px solid;flex:1;line-height:1.5;color:inherit;}#search-tabs button:not(.selected){background-color:var(--search-tab-button-not-selected-background);border-top-color:var(--search-tab-button-not-selected-border-top-color);}#search-tabs button:hover,#search-tabs button.selected{background-color:var(--search-tab-button-selected-background);border-top-color:var(--search-tab-button-selected-border-top-color);}#search-tabs .count{font-size:1rem;font-variant-numeric:tabular-nums;color:var(--search-tab-title-count-color);}#search .error code{border-radius:3px;background-color:var(--search-error-code-background-color);}.search-corrections{font-weight:normal;}#src-sidebar{width:100%;overflow:auto;}#src-sidebar div.files>a:hover,details.dir-entry summary:hover,#src-sidebar div.files>a:focus,details.dir-entry summary:focus{background-color:var(--src-sidebar-background-hover);}#src-sidebar div.files>a.selected{background-color:var(--src-sidebar-background-selected);}.src-sidebar-title{position:sticky;top:0;display:flex;padding:8px 8px 0 48px;margin-bottom:7px;background:var(--sidebar-background-color);border-bottom:1px solid var(--border-color);}#settings-menu,#help-button{margin-left:4px;display:flex;}#sidebar-button{display:none;line-height:0;}.hide-sidebar #sidebar-button,.src #sidebar-button{display:flex;margin-right:4px;position:fixed;left:6px;height:34px;width:34px;background-color:var(--main-background-color);z-index:1;}.src #sidebar-button{left:8px;z-index:calc(var(--desktop-sidebar-z-index) + 1);}.hide-sidebar .src #sidebar-button{position:static;}#settings-menu>a,#help-button>a,#sidebar-button>a{display:flex;align-items:center;justify-content:center;background-color:var(--button-background-color);border:1px solid var(--border-color);border-radius:2px;color:var(--settings-button-color);font-size:20px;width:33px;}#settings-menu>a:hover,#settings-menu>a:focus,#help-button>a:hover,#help-button>a:focus,#sidebar-button>a:hover,#sidebar-button>a:focus{border-color:var(--settings-button-border-focus);}#settings-menu>a{line-height:0;font-size:0;}#settings-menu>a:before{content:url('data:image/svg+xml,\ + ');width:22px;height:22px;filter:var(--settings-menu-filter);}#sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');width:22px;height:22px;}#copy-path{color:var(--copy-path-button-color);background:var(--main-background-color);height:34px;width:33px;margin-left:10px;padding:0;padding-left:2px;border:0;font-size:0;}#copy-path::before{filter:var(--copy-path-img-filter);content:url('data:image/svg+xml,\ +\ +\ +');width:19px;height:18px;}#copy-path:hover::before{filter:var(--copy-path-img-hover-filter);}#copy-path.clicked::before{content:url('data:image/svg+xml,\ + \ + ');}@keyframes rotating{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}#settings-menu.rotate>a img{animation:rotating 2s linear infinite;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px var(--border-color);border-radius:3px;color:var(--kbd-color);background-color:var(--kbd-background);box-shadow:inset 0 -1px 0 var(--kbd-box-shadow-color);}ul.all-items>li{list-style:none;}details.dir-entry{padding-left:4px;}details.dir-entry>summary{margin:0 0 0 -4px;padding:0 0 0 4px;cursor:pointer;}details.dir-entry div.folders,details.dir-entry div.files{padding-left:23px;}details.dir-entry a{display:block;}details.toggle{contain:layout;position:relative;}details.toggle>summary.hideme{cursor:pointer;font-size:1rem;}details.toggle>summary{list-style:none;outline:none;}details.toggle>summary::-webkit-details-marker,details.toggle>summary::marker{display:none;}details.toggle>summary.hideme>span{margin-left:9px;}details.toggle>summary::before{background:url('data:image/svg+xml,') no-repeat top left;content:"";cursor:pointer;width:16px;height:16px;display:inline-block;vertical-align:middle;opacity:.5;filter:var(--toggle-filter);}details.toggle>summary.hideme>span,.more-examples-toggle summary,.more-examples-toggle .hide-more{color:var(--toggles-color);}details.toggle>summary::after{content:"Expand";overflow:hidden;width:0;height:0;position:absolute;}details.toggle>summary.hideme::after{content:"";}details.toggle>summary:focus::before,details.toggle>summary:hover::before{opacity:1;}details.toggle>summary:focus-visible::before{outline:1px dotted #000;outline-offset:1px;}details.non-exhaustive{margin-bottom:8px;}details.toggle>summary.hideme::before{position:relative;}details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;top:4px;}.impl-items>details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;}details.toggle[open] >summary.hideme{position:absolute;}details.toggle[open] >summary.hideme>span{display:none;}details.toggle[open] >summary::before{background:url('data:image/svg+xml,') no-repeat top left;}details.toggle[open] >summary::after{content:"Collapse";}.docblock summary>*{display:inline-block;}.docblock>.example-wrap:first-child .tooltip{margin-top:16px;}.src #sidebar-button>a:before,.sidebar-menu-toggle:before{content:url('data:image/svg+xml,\ + ');opacity:0.75;}.sidebar-menu-toggle:hover:before,.sidebar-menu-toggle:active:before,.sidebar-menu-toggle:focus:before{opacity:1;}.src #sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');opacity:0.75;}@media (max-width:850px){#search-tabs .count{display:block;}}@media (max-width:700px){*[id]{scroll-margin-top:45px;}.rustdoc{display:block;}main{padding-left:15px;padding-top:0px;}.main-heading{flex-direction:column;}.out-of-band{text-align:left;margin-left:initial;padding:initial;}.out-of-band .since::before{content:"Since ";}.sidebar .logo-container,.sidebar .location,.sidebar-resizer{display:none;}.sidebar{position:fixed;top:45px;left:-1000px;z-index:11;height:calc(100vh - 45px);width:200px;}.src main,.rustdoc.src .sidebar{top:0;padding:0;height:100vh;border:0;}.src .search-form{margin-left:40px;}.hide-sidebar .search-form{margin-left:32px;}.hide-sidebar .src .search-form{margin-left:0;}.sidebar.shown,.src-sidebar-expanded .src .sidebar,.rustdoc:not(.src) .sidebar:focus-within{left:0;}.mobile-topbar h2{padding-bottom:0;margin:auto 0.5em auto auto;overflow:hidden;font-size:24px;white-space:nowrap;text-overflow:ellipsis;}.mobile-topbar .logo-container>img{max-width:35px;max-height:35px;margin:5px 0 5px 20px;}.mobile-topbar{display:flex;flex-direction:row;position:sticky;z-index:10;font-size:2rem;height:45px;width:100%;left:0;top:0;}.hide-sidebar .mobile-topbar{display:none;}.sidebar-menu-toggle{width:45px;border:none;line-height:0;}.hide-sidebar .sidebar-menu-toggle{display:none;}.sidebar-elems{margin-top:1em;}.anchor{display:none !important;}#main-content>details.toggle>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}#copy-path,#help-button{display:none;}#sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');width:22px;height:22px;}.sidebar-menu-toggle:before{filter:var(--mobile-sidebar-menu-filter);}.sidebar-menu-toggle:hover{background:var(--main-background-color);}.item-table,.item-row,.item-table>li,.item-table>li>div,.search-results>a,.search-results>a>div{display:block;}.search-results>a{padding:5px 0px;}.search-results>a>div.desc,.item-table>li>div.desc{padding-left:2em;}.search-results .result-name{display:block;}.search-results .result-name .typename{width:initial;margin-right:0;}.search-results .result-name .typename,.search-results .result-name .path{display:inline;}.src-sidebar-expanded .src .sidebar{position:fixed;max-width:100vw;width:100vw;}.src .src-sidebar-title{padding-top:0;}details.toggle:not(.top-doc)>summary{margin-left:10px;}.impl-items>details.toggle>summary:not(.hideme)::before,#main-content>details.toggle:not(.top-doc)>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}.impl-items>.item-info{margin-left:34px;}.src nav.sub{margin:0;padding:var(--nav-sub-mobile-padding);}}@media (min-width:701px){.scraped-example-title{position:absolute;z-index:10;background:var(--main-background-color);bottom:8px;right:5px;padding:2px 4px;box-shadow:0 0 4px var(--main-background-color);}.item-table>li>.item-name{width:33%;}.item-table>li>div{padding-bottom:5px;word-break:break-all;}}@media print{nav.sidebar,nav.sub,.out-of-band,a.src,#copy-path,details.toggle[open] >summary::before,details.toggle>summary::before,details.toggle.top-doc>summary{display:none;}.docblock{margin-left:0;}main{padding:10px;}}@media (max-width:464px){.docblock{margin-left:12px;}.docblock code{overflow-wrap:break-word;overflow-wrap:anywhere;}nav.sub{flex-direction:column;}.search-form{align-self:stretch;}}.variant,.implementors-toggle>summary,.impl,#implementors-list>.docblock,.impl-items>section,.impl-items>.toggle>summary,.methods>section,.methods>.toggle>summary{margin-bottom:0.75em;}.variants>.docblock,.implementors-toggle>.docblock,.impl-items>.toggle[open]:not(:last-child),.methods>.toggle[open]:not(:last-child),.implementors-toggle[open]:not(:last-child){margin-bottom:2em;}#trait-implementations-list .impl-items>.toggle:not(:last-child),#synthetic-implementations-list .impl-items>.toggle:not(:last-child),#blanket-implementations-list .impl-items>.toggle:not(:last-child){margin-bottom:1em;}.scraped-example-list .scrape-help{margin-left:10px;padding:0 4px;font-weight:normal;font-size:12px;position:relative;bottom:1px;border:1px solid var(--scrape-example-help-border-color);border-radius:50px;color:var(--scrape-example-help-color);}.scraped-example-list .scrape-help:hover{border-color:var(--scrape-example-help-hover-border-color);color:var(--scrape-example-help-hover-color);}.scraped-example{position:relative;}.scraped-example .code-wrapper{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;}.scraped-example:not(.expanded) .code-wrapper{max-height:calc(1.5em * 5 + 10px);}.scraped-example:not(.expanded) .code-wrapper pre{overflow-y:hidden;padding-bottom:0;max-height:calc(1.5em * 5 + 10px);}.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper,.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper pre{max-height:calc(1.5em * 10 + 10px);}.scraped-example .code-wrapper .next,.scraped-example .code-wrapper .prev,.scraped-example .code-wrapper .expand{color:var(--main-color);position:absolute;top:0.25em;z-index:1;padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.scraped-example .code-wrapper .prev{right:2.25em;}.scraped-example .code-wrapper .next{right:1.25em;}.scraped-example .code-wrapper .expand{right:0.25em;}.scraped-example:not(.expanded) .code-wrapper::before,.scraped-example:not(.expanded) .code-wrapper::after{content:" ";width:100%;height:5px;position:absolute;z-index:1;}.scraped-example:not(.expanded) .code-wrapper::before{top:0;background:linear-gradient(to bottom,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example:not(.expanded) .code-wrapper::after{bottom:0;background:linear-gradient(to top,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example .code-wrapper .example-wrap{width:100%;overflow-y:hidden;margin-bottom:0;}.scraped-example:not(.expanded) .code-wrapper .example-wrap{overflow-x:hidden;}.scraped-example .example-wrap .rust span.highlight{background:var(--scrape-example-code-line-highlight);}.scraped-example .example-wrap .rust span.highlight.focus{background:var(--scrape-example-code-line-highlight-focus);}.more-examples-toggle{max-width:calc(100% + 25px);margin-top:10px;margin-left:-25px;}.more-examples-toggle .hide-more{margin-left:25px;cursor:pointer;}.more-scraped-examples{margin-left:25px;position:relative;}.toggle-line{position:absolute;top:5px;bottom:0;right:calc(100% + 10px);padding:0 4px;cursor:pointer;}.toggle-line-inner{min-width:2px;height:100%;background:var(--scrape-example-toggle-line-background);}.toggle-line:hover .toggle-line-inner{background:var(--scrape-example-toggle-line-hover-background);}.more-scraped-examples .scraped-example,.example-links{margin-top:20px;}.more-scraped-examples .scraped-example:first-child{margin-top:5px;}.example-links ul{margin-bottom:0;}:root[data-theme="light"],:root:not([data-theme]){--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#f5f5f5;--sidebar-background-color-hover:#e0e0e0;--code-block-background-color:#f5f5f5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--mobile-sidebar-menu-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#fff;--settings-menu-filter:none;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--test-arrow-color:#f5f5f5;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#f5f5f5;--test-arrow-hover-background-color:rgb(78,139,202);--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#f5f5f5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);--sidebar-resizer-hover:hsl(207,90%,66%);--sidebar-resizer-active:hsl(207,90%,54%);}:root[data-theme="dark"]{--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--mobile-sidebar-menu-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--settings-menu-filter:none;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--test-arrow-color:#dedede;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#dedede;--test-arrow-hover-background-color:#4e8bca;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2a2a2a;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);--sidebar-resizer-hover:hsl(207,30%,54%);--sidebar-resizer-active:hsl(207,90%,54%);}:root[data-theme="ayu"]{--main-background-color:#0f1419;--main-color:#c5c5c5;--settings-input-color:#ffb454;--settings-input-border-color:#999;--settings-button-color:#fff;--settings-button-border-focus:#e0e0e0;--sidebar-background-color:#14191f;--sidebar-background-color-hover:rgba(70,70,70,0.33);--code-block-background-color:#191f26;--scrollbar-track-background-color:transparent;--scrollbar-thumb-background-color:#5c6773;--scrollbar-color:#5c6773 #24292f;--headings-border-bottom-color:#5c6773;--border-color:#5c6773;--button-background-color:#141920;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--mobile-sidebar-menu-filter:invert(100%);--search-input-focused-border-color:#5c6773;--copy-path-button-color:#fff;--copy-path-img-filter:invert(70%);--copy-path-img-hover-filter:invert(100%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ffa0a5;--trait-link-color:#39afd7;--assoc-item-link-color:#39afd7;--function-link-color:#fdd687;--macro-link-color:#a37acc;--keyword-link-color:#39afd7;--mod-link-color:#39afd7;--link-color:#39afd7;--sidebar-link-color:#53b1db;--sidebar-current-link-background-color:transparent;--search-result-link-focus-background-color:#3c3c3c;--search-result-border-color:#aaa3;--search-color:#fff;--search-error-code-background-color:#4f4c4c;--search-results-alias-color:#c5c5c5;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:none;--search-tab-button-not-selected-background:transparent !important;--search-tab-button-selected-border-top-color:none;--search-tab-button-selected-background:#141920 !important;--settings-menu-filter:invert(100%);--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ff7733;--code-highlight-kw-2-color:#ff7733;--code-highlight-lifetime-color:#ff7733;--code-highlight-prelude-color:#69f2df;--code-highlight-prelude-val-color:#ff7733;--code-highlight-number-color:#b8cc52;--code-highlight-string-color:#b8cc52;--code-highlight-literal-color:#ff7733;--code-highlight-attribute-color:#e6e1cf;--code-highlight-self-color:#36a3d9;--code-highlight-macro-color:#a37acc;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#788797;--code-highlight-doc-comment-color:#a1ac88;--src-line-numbers-span-color:#5c6773;--src-line-number-highlighted-background-color:rgba(255,236,164,0.06);--test-arrow-color:#788797;--test-arrow-background-color:rgba(57,175,215,0.09);--test-arrow-hover-color:#c5c5c5;--test-arrow-hover-background-color:rgba(57,175,215,0.368);--target-background-color:rgba(255,236,164,0.06);--target-border-color:rgba(255,180,76,0.85);--kbd-color:#c5c5c5;--kbd-background:#314559;--kbd-box-shadow-color:#5c6773;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(41%) sepia(12%) saturate(487%) hue-rotate(171deg) brightness(94%) contrast(94%);--crate-search-div-hover-filter:invert(98%) sepia(12%) saturate(81%) hue-rotate(343deg) brightness(113%) contrast(76%);--crate-search-hover-border:#e0e0e0;--src-sidebar-background-selected:#14191f;--src-sidebar-background-hover:#14191f;--table-alt-row-background-color:#191f26;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(15,20,25,1);--scrape-example-code-wrapper-background-end:rgba(15,20,25,0);--sidebar-resizer-hover:hsl(34,50%,33%);--sidebar-resizer-active:hsl(34,100%,66%);}:root[data-theme="ayu"] h1,:root[data-theme="ayu"] h2,:root[data-theme="ayu"] h3,:root[data-theme="ayu"] h4,:where(:root[data-theme="ayu"]) h1 a,:root[data-theme="ayu"] .sidebar h2 a,:root[data-theme="ayu"] .sidebar h3 a{color:#fff;}:root[data-theme="ayu"] .docblock code{color:#ffb454;}:root[data-theme="ayu"] .docblock a>code{color:#39AFD7 !important;}:root[data-theme="ayu"] .code-header,:root[data-theme="ayu"] .docblock pre>code,:root[data-theme="ayu"] pre,:root[data-theme="ayu"] pre>code,:root[data-theme="ayu"] .item-info code,:root[data-theme="ayu"] .rustdoc.source .example-wrap{color:#e6e1cf;}:root[data-theme="ayu"] .sidebar .current,:root[data-theme="ayu"] .sidebar .current a,:root[data-theme="ayu"] .sidebar a:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:hover,:root[data-theme="ayu"] details.dir-entry summary:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:focus,:root[data-theme="ayu"] details.dir-entry summary:focus,:root[data-theme="ayu"] #src-sidebar div.files>a.selected{color:#ffb44c;}:root[data-theme="ayu"] .sidebar-elems .location{color:#ff7733;}:root[data-theme="ayu"] .src-line-numbers .line-highlighted{color:#708090;padding-right:7px;border-right:1px solid #ffb44c;}:root[data-theme="ayu"] .search-results a:hover,:root[data-theme="ayu"] .search-results a:focus{color:#fff !important;background-color:#3c3c3c;}:root[data-theme="ayu"] .search-results a{color:#0096cf;}:root[data-theme="ayu"] .search-results a div.desc{color:#c5c5c5;}:root[data-theme="ayu"] .result-name .primitive>i,:root[data-theme="ayu"] .result-name .keyword>i{color:#788797;}:root[data-theme="ayu"] #search-tabs>button.selected{border-bottom:1px solid #ffb44c !important;border-top:none;}:root[data-theme="ayu"] #search-tabs>button:not(.selected){border:none;background-color:transparent !important;}:root[data-theme="ayu"] #search-tabs>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}:root[data-theme="ayu"] #settings-menu>a img,:root[data-theme="ayu"] #sidebar-button>a:before{filter:invert(100);} \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/static.files/search-d234aafac6c221dd.js b/static/rust/redstone/crypto_secp256k1/static.files/search-d234aafac6c221dd.js new file mode 100644 index 00000000..3f587f65 --- /dev/null +++ b/static/rust/redstone/crypto_secp256k1/static.files/search-d234aafac6c221dd.js @@ -0,0 +1,5 @@ +"use strict";if(!Array.prototype.toSpliced){Array.prototype.toSpliced=function(){const me=this.slice();Array.prototype.splice.apply(me,arguments);return me}}(function(){const itemTypes=["keyword","primitive","mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","associatedtype","constant","associatedconstant","union","foreigntype","existential","attr","derive","traitalias","generic",];const longItemTypes=["keyword","primitive type","module","extern crate","re-export","struct","enum","function","type alias","static","trait","","trait method","method","struct field","enum variant","macro","assoc type","constant","assoc const","union","foreign type","existential type","attribute macro","derive macro","trait alias",];const TY_GENERIC=itemTypes.indexOf("generic");const TY_IMPORT=itemTypes.indexOf("import");const ROOT_PATH=typeof window!=="undefined"?window.rootPath:"../";const UNBOXING_LIMIT=5;const REGEX_IDENT=/\p{ID_Start}\p{ID_Continue}*|_\p{ID_Continue}+/uy;const REGEX_INVALID_TYPE_FILTER=/[^a-z]/ui;function printTab(nb){let iter=0;let foundCurrentTab=false;let foundCurrentResultSet=false;onEachLazy(document.getElementById("search-tabs").childNodes,elem=>{if(nb===iter){addClass(elem,"selected");foundCurrentTab=true}else{removeClass(elem,"selected")}iter+=1});const isTypeSearch=(nb>0||iter===1);iter=0;onEachLazy(document.getElementById("results").childNodes,elem=>{if(nb===iter){addClass(elem,"active");foundCurrentResultSet=true}else{removeClass(elem,"active")}iter+=1});if(foundCurrentTab&&foundCurrentResultSet){searchState.currentTab=nb;const correctionsElem=document.getElementsByClassName("search-corrections");if(isTypeSearch){removeClass(correctionsElem[0],"hidden")}else{addClass(correctionsElem[0],"hidden")}}else if(nb!==0){printTab(0)}}const editDistanceState={current:[],prev:[],prevPrev:[],calculate:function calculate(a,b,limit){if(a.lengthlimit){return limit+1}while(b.length>0&&b[0]===a[0]){a=a.substring(1);b=b.substring(1)}while(b.length>0&&b[b.length-1]===a[a.length-1]){a=a.substring(0,a.length-1);b=b.substring(0,b.length-1)}if(b.length===0){return minDist}const aLength=a.length;const bLength=b.length;for(let i=0;i<=bLength;++i){this.current[i]=0;this.prev[i]=i;this.prevPrev[i]=Number.MAX_VALUE}for(let i=1;i<=aLength;++i){this.current[0]=i;const aIdx=i-1;for(let j=1;j<=bLength;++j){const bIdx=j-1;const substitutionCost=a[aIdx]===b[bIdx]?0:1;this.current[j]=Math.min(this.prev[j]+1,this.current[j-1]+1,this.prev[j-1]+substitutionCost,);if((i>1)&&(j>1)&&(a[aIdx]===b[bIdx-1])&&(a[aIdx-1]===b[bIdx])){this.current[j]=Math.min(this.current[j],this.prevPrev[j-2]+1,)}}const prevPrevTmp=this.prevPrev;this.prevPrev=this.prev;this.prev=this.current;this.current=prevPrevTmp}const distance=this.prev[bLength];return distance<=limit?distance:(limit+1)},};function editDistance(a,b,limit){return editDistanceState.calculate(a,b,limit)}function initSearch(rawSearchIndex){const MAX_RESULTS=200;const NO_TYPE_FILTER=-1;let searchIndex;let searchIndexDeprecated;let searchIndexEmptyDesc;let functionTypeFingerprint;let currentResults;const typeNameIdMap=new Map();const ALIASES=new Map();const typeNameIdOfArray=buildTypeMapIndex("array");const typeNameIdOfSlice=buildTypeMapIndex("slice");const typeNameIdOfArrayOrSlice=buildTypeMapIndex("[]");const typeNameIdOfTuple=buildTypeMapIndex("tuple");const typeNameIdOfUnit=buildTypeMapIndex("unit");const typeNameIdOfTupleOrUnit=buildTypeMapIndex("()");const typeNameIdOfFn=buildTypeMapIndex("fn");const typeNameIdOfFnMut=buildTypeMapIndex("fnmut");const typeNameIdOfFnOnce=buildTypeMapIndex("fnonce");const typeNameIdOfHof=buildTypeMapIndex("->");function buildTypeMapIndex(name,isAssocType){if(name===""||name===null){return null}if(typeNameIdMap.has(name)){const obj=typeNameIdMap.get(name);obj.assocOnly=isAssocType&&obj.assocOnly;return obj.id}else{const id=typeNameIdMap.size;typeNameIdMap.set(name,{id,assocOnly:isAssocType});return id}}function isSpecialStartCharacter(c){return"<\"".indexOf(c)!==-1}function isEndCharacter(c){return"=,>-])".indexOf(c)!==-1}function itemTypeFromName(typename){const index=itemTypes.findIndex(i=>i===typename);if(index<0){throw["Unknown type filter ",typename]}return index}function getStringElem(query,parserState,isInGenerics){if(isInGenerics){throw["Unexpected ","\""," in generics"]}else if(query.literalSearch){throw["Cannot have more than one literal search element"]}else if(parserState.totalElems-parserState.genericsElems>0){throw["Cannot use literal search when there is more than one element"]}parserState.pos+=1;const start=parserState.pos;const end=getIdentEndPosition(parserState);if(parserState.pos>=parserState.length){throw["Unclosed ","\""]}else if(parserState.userQuery[end]!=="\""){throw["Unexpected ",parserState.userQuery[end]," in a string element"]}else if(start===end){throw["Cannot have empty string element"]}parserState.pos+=1;query.literalSearch=true}function isPathStart(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="::"}function isReturnArrow(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="->"}function consumeIdent(parserState){REGEX_IDENT.lastIndex=parserState.pos;const match=parserState.userQuery.match(REGEX_IDENT);if(match){parserState.pos+=match[0].length;return true}return false}function isSeparatorCharacter(c){return c===","||c==="="}function isPathSeparator(c){return c===":"||c===" "}function prevIs(parserState,lookingFor){let pos=parserState.pos;while(pos>0){const c=parserState.userQuery[pos-1];if(c===lookingFor){return true}else if(c!==" "){break}pos-=1}return false}function isLastElemGeneric(elems,parserState){return(elems.length>0&&elems[elems.length-1].generics.length>0)||prevIs(parserState,">")}function skipWhitespace(parserState){while(parserState.pos0){throw["Cannot have more than one element if you use quotes"]}const typeFilter=parserState.typeFilter;parserState.typeFilter=null;if(name==="!"){if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive never type ","!"," and ",typeFilter," both specified",]}if(generics.length!==0){throw["Never type ","!"," does not accept generic parameters",]}const bindingName=parserState.isInBinding;parserState.isInBinding=null;return makePrimitiveElement("never",{bindingName})}const quadcolon=/::\s*::/.exec(path);if(path.startsWith("::")){throw["Paths cannot start with ","::"]}else if(path.endsWith("::")){throw["Paths cannot end with ","::"]}else if(quadcolon!==null){throw["Unexpected ",quadcolon[0]]}const pathSegments=path.split(/(?:::\s*)|(?:\s+(?:::\s*)?)/);if(pathSegments.length===0||(pathSegments.length===1&&pathSegments[0]==="")){if(generics.length>0||prevIs(parserState,">")){throw["Found generics without a path"]}else{throw["Unexpected ",parserState.userQuery[parserState.pos]]}}for(const[i,pathSegment]of pathSegments.entries()){if(pathSegment==="!"){if(i!==0){throw["Never type ","!"," is not associated item"]}pathSegments[i]="never"}}parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1}const bindingName=parserState.isInBinding;parserState.isInBinding=null;const bindings=new Map();const pathLast=pathSegments[pathSegments.length-1];return{name:name.trim(),id:null,fullPath:pathSegments,pathWithoutLast:pathSegments.slice(0,pathSegments.length-1),pathLast,normalizedPathLast:pathLast.replace(/_/g,""),generics:generics.filter(gen=>{if(gen.bindingName!==null){if(gen.name!==null){gen.bindingName.generics.unshift(gen)}bindings.set(gen.bindingName.name,gen.bindingName.generics);return false}return true}),bindings,typeFilter,bindingName,}}function getIdentEndPosition(parserState){let afterIdent=consumeIdent(parserState);let end=parserState.pos;let macroExclamation=-1;while(parserState.pos0){throw["Unexpected ",c," after ",parserState.userQuery[parserState.pos-1]," (not a valid identifier)"]}else{throw["Unexpected ",c," (not a valid identifier)"]}parserState.pos+=1;afterIdent=consumeIdent(parserState);end=parserState.pos}if(macroExclamation!==-1){if(parserState.typeFilter===null){parserState.typeFilter="macro"}else if(parserState.typeFilter!=="macro"){throw["Invalid search type: macro ","!"," and ",parserState.typeFilter," both specified",]}end=macroExclamation}return end}function getFilteredNextElem(query,parserState,elems,isInGenerics){const start=parserState.pos;if(parserState.userQuery[parserState.pos]===":"&&!isPathStart(parserState)){throw["Expected type filter before ",":"]}getNextElem(query,parserState,elems,isInGenerics);if(parserState.userQuery[parserState.pos]===":"&&!isPathStart(parserState)){if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}if(elems.length===0){throw["Expected type filter before ",":"]}else if(query.literalSearch){throw["Cannot use quotes on type filter"]}const typeFilterElem=elems.pop();checkExtraTypeFilterCharacters(start,parserState);parserState.typeFilter=typeFilterElem.name;parserState.pos+=1;parserState.totalElems-=1;query.literalSearch=false;getNextElem(query,parserState,elems,isInGenerics)}}function getNextElem(query,parserState,elems,isInGenerics){const generics=[];skipWhitespace(parserState);let start=parserState.pos;let end;if("[(".indexOf(parserState.userQuery[parserState.pos])!==-1){let endChar=")";let name="()";let friendlyName="tuple";if(parserState.userQuery[parserState.pos]==="["){endChar="]";name="[]";friendlyName="slice"}parserState.pos+=1;const{foundSeparator}=getItemsBefore(query,parserState,generics,endChar);const typeFilter=parserState.typeFilter;const bindingName=parserState.isInBinding;parserState.typeFilter=null;parserState.isInBinding=null;for(const gen of generics){if(gen.bindingName!==null){throw["Type parameter ","=",` cannot be within ${friendlyName} `,name]}}if(name==="()"&&!foundSeparator&&generics.length===1&&typeFilter===null){elems.push(generics[0])}else if(name==="()"&&generics.length===1&&generics[0].name==="->"){generics[0].typeFilter=typeFilter;elems.push(generics[0])}else{if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive ",name," and ",typeFilter," both specified",]}parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1}elems.push(makePrimitiveElement(name,{bindingName,generics}))}}else if(parserState.userQuery[parserState.pos]==="&"){if(parserState.typeFilter!==null&&parserState.typeFilter!=="primitive"){throw["Invalid search type: primitive ","&"," and ",parserState.typeFilter," both specified",]}parserState.typeFilter=null;parserState.pos+=1;let c=parserState.userQuery[parserState.pos];while(c===" "&&parserState.pos=end){throw["Found generics without a path"]}parserState.pos+=1;getItemsBefore(query,parserState,generics,">")}else if(parserState.pos=end){throw["Found generics without a path"]}if(parserState.isInBinding){throw["Unexpected ","("," after ","="]}parserState.pos+=1;const typeFilter=parserState.typeFilter;parserState.typeFilter=null;getItemsBefore(query,parserState,generics,")");skipWhitespace(parserState);if(isReturnArrow(parserState)){parserState.pos+=2;skipWhitespace(parserState);getFilteredNextElem(query,parserState,generics,isInGenerics);generics[generics.length-1].bindingName=makePrimitiveElement("output")}else{generics.push(makePrimitiveElement(null,{bindingName:makePrimitiveElement("output"),typeFilter:null,}))}parserState.typeFilter=typeFilter}if(isStringElem){skipWhitespace(parserState)}if(start>=end&&generics.length===0){return}if(parserState.userQuery[parserState.pos]==="="){if(parserState.isInBinding){throw["Cannot write ","="," twice in a binding"]}if(!isInGenerics){throw["Type parameter ","="," must be within generics list"]}const name=parserState.userQuery.slice(start,end).trim();if(name==="!"){throw["Type parameter ","="," key cannot be ","!"," never type"]}if(name.includes("!")){throw["Type parameter ","="," key cannot be ","!"," macro"]}if(name.includes("::")){throw["Type parameter ","="," key cannot contain ","::"," path"]}if(name.includes(":")){throw["Type parameter ","="," key cannot contain ",":"," type"]}parserState.isInBinding={name,generics}}else{elems.push(createQueryElement(query,parserState,parserState.userQuery.slice(start,end),generics,isInGenerics,),)}}}function getItemsBefore(query,parserState,elems,endChar){let foundStopChar=true;let foundSeparator=false;const oldTypeFilter=parserState.typeFilter;parserState.typeFilter=null;const oldIsInBinding=parserState.isInBinding;parserState.isInBinding=null;let hofParameters=null;let extra="";if(endChar===">"){extra="<"}else if(endChar==="]"){extra="["}else if(endChar===")"){extra="("}else if(endChar===""){extra="->"}else{extra=endChar}while(parserState.pos"," after ","="]}hofParameters=[...elems];elems.length=0;parserState.pos+=2;foundStopChar=true;foundSeparator=false;continue}else if(c===" "){parserState.pos+=1;continue}else if(isSeparatorCharacter(c)){parserState.pos+=1;foundStopChar=true;foundSeparator=true;continue}else if(c===":"&&isPathStart(parserState)){throw["Unexpected ","::",": paths cannot start with ","::"]}else if(isEndCharacter(c)){throw["Unexpected ",c," after ",extra]}if(!foundStopChar){let extra=[];if(isLastElemGeneric(query.elems,parserState)){extra=[" after ",">"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(endChar!==""){throw["Expected ",",",", ","=",", or ",endChar,...extra,", found ",c,]}throw["Expected ",","," or ","=",...extra,", found ",c,]}const posBefore=parserState.pos;getFilteredNextElem(query,parserState,elems,endChar!=="");if(endChar!==""&&parserState.pos>=parserState.length){throw["Unclosed ",extra]}if(posBefore===parserState.pos){parserState.pos+=1}foundStopChar=false}if(parserState.pos>=parserState.length&&endChar!==""){throw["Unclosed ",extra]}parserState.pos+=1;if(hofParameters){foundSeparator=false;if([...elems,...hofParameters].some(x=>x.bindingName)||parserState.isInBinding){throw["Unexpected ","="," within ","->"]}const hofElem=makePrimitiveElement("->",{generics:hofParameters,bindings:new Map([["output",[...elems]]]),typeFilter:null,});elems.length=0;elems[0]=hofElem}parserState.typeFilter=oldTypeFilter;parserState.isInBinding=oldIsInBinding;return{foundSeparator}}function checkExtraTypeFilterCharacters(start,parserState){const query=parserState.userQuery.slice(start,parserState.pos).trim();const match=query.match(REGEX_INVALID_TYPE_FILTER);if(match){throw["Unexpected ",match[0]," in type filter (before ",":",")",]}}function parseInput(query,parserState){let foundStopChar=true;while(parserState.pos"){if(isReturnArrow(parserState)){break}throw["Unexpected ",c," (did you mean ","->","?)"]}else if(parserState.pos>0){throw["Unexpected ",c," after ",parserState.userQuery[parserState.pos-1]]}throw["Unexpected ",c]}else if(c===" "){skipWhitespace(parserState);continue}if(!foundStopChar){let extra="";if(isLastElemGeneric(query.elems,parserState)){extra=[" after ",">"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(parserState.typeFilter!==null){throw["Expected ",","," or ","->",...extra,", found ",c,]}throw["Expected ",",",", ",":"," or ","->",...extra,", found ",c,]}const before=query.elems.length;getFilteredNextElem(query,parserState,query.elems,false);if(query.elems.length===before){parserState.pos+=1}foundStopChar=false}if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}while(parserState.pos"]}break}else{parserState.pos+=1}}}function newParsedQuery(userQuery){return{original:userQuery,userQuery:userQuery.toLowerCase(),elems:[],returned:[],foundElems:0,totalElems:0,literalSearch:false,error:null,correction:null,proposeCorrectionFrom:null,proposeCorrectionTo:null,typeFingerprint:new Uint32Array(4),}}function buildUrl(search,filterCrates){let extra="?search="+encodeURIComponent(search);if(filterCrates!==null){extra+="&filter-crate="+encodeURIComponent(filterCrates)}return getNakedUrl()+extra+window.location.hash}function getFilterCrates(){const elem=document.getElementById("crate-search");if(elem&&elem.value!=="all crates"&&rawSearchIndex.has(elem.value)){return elem.value}return null}function parseQuery(userQuery){function convertTypeFilterOnElem(elem){if(elem.typeFilter!==null){let typeFilter=elem.typeFilter;if(typeFilter==="const"){typeFilter="constant"}elem.typeFilter=itemTypeFromName(typeFilter)}else{elem.typeFilter=NO_TYPE_FILTER}for(const elem2 of elem.generics){convertTypeFilterOnElem(elem2)}for(const constraints of elem.bindings.values()){for(const constraint of constraints){convertTypeFilterOnElem(constraint)}}}userQuery=userQuery.trim().replace(/\r|\n|\t/g," ");const parserState={length:userQuery.length,pos:0,totalElems:0,genericsElems:0,typeFilter:null,isInBinding:null,userQuery:userQuery.toLowerCase(),};let query=newParsedQuery(userQuery);try{parseInput(query,parserState);for(const elem of query.elems){convertTypeFilterOnElem(elem)}for(const elem of query.returned){convertTypeFilterOnElem(elem)}}catch(err){query=newParsedQuery(userQuery);query.error=err;return query}if(!query.literalSearch){query.literalSearch=parserState.totalElems>1}query.foundElems=query.elems.length+query.returned.length;query.totalElems=parserState.totalElems;return query}function createQueryResults(results_in_args,results_returned,results_others,parsedQuery){return{"in_args":results_in_args,"returned":results_returned,"others":results_others,"query":parsedQuery,}}async function execQuery(parsedQuery,filterCrates,currentCrate){const results_others=new Map(),results_in_args=new Map(),results_returned=new Map();function transformResults(results){const duplicates=new Set();const out=[];for(const result of results){if(result.id!==-1){const obj=searchIndex[result.id];obj.dist=result.dist;const res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=res[2]+"|"+obj.ty;if(duplicates.has(obj.fullPath)){continue}if(obj.ty===TY_IMPORT&&duplicates.has(res[2])){continue}if(duplicates.has(res[2]+"|"+TY_IMPORT)){continue}duplicates.add(obj.fullPath);duplicates.add(res[2]);obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}return out}async function sortResults(results,isType,preferredCrate){const userQuery=parsedQuery.userQuery;const result_list=[];for(const result of results.values()){result.item=searchIndex[result.id];result.word=searchIndex[result.id].word;result_list.push(result)}result_list.sort((aaa,bbb)=>{let a,b;a=(aaa.word!==userQuery);b=(bbb.word!==userQuery);if(a!==b){return a-b}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.path_dist;b=bbb.path_dist;if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}a=(aaa.dist);b=(bbb.dist);if(a!==b){return a-b}a=searchIndexDeprecated.get(aaa.item.crate).contains(aaa.item.bitIndex);b=searchIndexDeprecated.get(bbb.item.crate).contains(bbb.item.bitIndex);if(a!==b){return a-b}a=(aaa.item.crate!==preferredCrate);b=(bbb.item.crate!==preferredCrate);if(a!==b){return a-b}a=aaa.word.length;b=bbb.word.length;if(a!==b){return a-b}a=aaa.word;b=bbb.word;if(a!==b){return(a>b?+1:-1)}a=searchIndexEmptyDesc.get(aaa.item.crate).contains(aaa.item.bitIndex);b=searchIndexEmptyDesc.get(bbb.item.crate).contains(bbb.item.bitIndex);if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});return transformResults(result_list)}function unifyFunctionTypes(fnTypesIn,queryElems,whereClause,mgensIn,solutionCb,unboxingDepth,){if(unboxingDepth>=UNBOXING_LIMIT){return false}const mgens=mgensIn===null?null:new Map(mgensIn);if(queryElems.length===0){return!solutionCb||solutionCb(mgens)}if(!fnTypesIn||fnTypesIn.length===0){return false}const ql=queryElems.length;const fl=fnTypesIn.length;if(ql===1&&queryElems[0].generics.length===0&&queryElems[0].bindings.size===0){const queryElem=queryElems[0];for(const fnType of fnTypesIn){if(!unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgens)){continue}if(fnType.id<0&&queryElem.id<0){if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==queryElem.id){continue}const mgensScratch=new Map(mgens);mgensScratch.set(fnType.id,queryElem.id);if(!solutionCb||solutionCb(mgensScratch)){return true}}else if(!solutionCb||solutionCb(mgens?new Map(mgens):null)){return true}}for(const fnType of fnTypesIn){if(!unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth+1,)){continue}if(fnType.id<0){if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==0){continue}const mgensScratch=new Map(mgens);mgensScratch.set(fnType.id,0);if(unifyFunctionTypes(whereClause[(-fnType.id)-1],queryElems,whereClause,mgensScratch,solutionCb,unboxingDepth+1,)){return true}}else if(unifyFunctionTypes([...fnType.generics,...Array.from(fnType.bindings.values()).flat()],queryElems,whereClause,mgens?new Map(mgens):null,solutionCb,unboxingDepth+1,)){return true}}return false}const fnTypes=fnTypesIn.slice();const flast=fl-1;const qlast=ql-1;const queryElem=queryElems[qlast];let queryElemsTmp=null;for(let i=flast;i>=0;i-=1){const fnType=fnTypes[i];if(!unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgens)){continue}let mgensScratch;if(fnType.id<0){mgensScratch=new Map(mgens);if(mgensScratch.has(fnType.id)&&mgensScratch.get(fnType.id)!==queryElem.id){continue}mgensScratch.set(fnType.id,queryElem.id)}else{mgensScratch=mgens}fnTypes[i]=fnTypes[flast];fnTypes.length=flast;if(!queryElemsTmp){queryElemsTmp=queryElems.slice(0,qlast)}const passesUnification=unifyFunctionTypes(fnTypes,queryElemsTmp,whereClause,mgensScratch,mgensScratch=>{if(fnType.generics.length===0&&queryElem.generics.length===0&&fnType.bindings.size===0&&queryElem.bindings.size===0){return!solutionCb||solutionCb(mgensScratch)}const solution=unifyFunctionTypeCheckBindings(fnType,queryElem,whereClause,mgensScratch,unboxingDepth,);if(!solution){return false}const simplifiedGenerics=solution.simplifiedGenerics;for(const simplifiedMgens of solution.mgens){const passesUnification=unifyFunctionTypes(simplifiedGenerics,queryElem.generics,whereClause,simplifiedMgens,solutionCb,unboxingDepth,);if(passesUnification){return true}}return false},unboxingDepth,);if(passesUnification){return true}fnTypes[flast]=fnTypes[i];fnTypes[i]=fnType;fnTypes.length=fl}for(let i=flast;i>=0;i-=1){const fnType=fnTypes[i];if(!unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth+1,)){continue}let mgensScratch;if(fnType.id<0){mgensScratch=new Map(mgens);if(mgensScratch.has(fnType.id)&&mgensScratch.get(fnType.id)!==0){continue}mgensScratch.set(fnType.id,0)}else{mgensScratch=mgens}const generics=fnType.id<0?whereClause[(-fnType.id)-1]:fnType.generics;const bindings=fnType.bindings?Array.from(fnType.bindings.values()).flat():[];const passesUnification=unifyFunctionTypes(fnTypes.toSpliced(i,1,...generics,...bindings),queryElems,whereClause,mgensScratch,solutionCb,unboxingDepth+1,);if(passesUnification){return true}}return false}function unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgensIn){if(!typePassesFilter(queryElem.typeFilter,fnType.ty)){return false}if(fnType.id<0&&queryElem.id<0){if(mgensIn){if(mgensIn.has(fnType.id)&&mgensIn.get(fnType.id)!==queryElem.id){return false}for(const[fid,qid]of mgensIn.entries()){if(fnType.id!==fid&&queryElem.id===qid){return false}if(fnType.id===fid&&queryElem.id!==qid){return false}}}return true}else{if(queryElem.id===typeNameIdOfArrayOrSlice&&(fnType.id===typeNameIdOfSlice||fnType.id===typeNameIdOfArray)){}else if(queryElem.id===typeNameIdOfTupleOrUnit&&(fnType.id===typeNameIdOfTuple||fnType.id===typeNameIdOfUnit)){}else if(queryElem.id===typeNameIdOfHof&&(fnType.id===typeNameIdOfFn||fnType.id===typeNameIdOfFnMut||fnType.id===typeNameIdOfFnOnce)){}else if(fnType.id!==queryElem.id||queryElem.id===null){return false}if((fnType.generics.length+fnType.bindings.size)===0&&queryElem.generics.length!==0){return false}if(fnType.bindings.size0){const fnTypePath=fnType.path!==undefined&&fnType.path!==null?fnType.path.split("::"):[];if(queryElemPathLength>fnTypePath.length){return false}let i=0;for(const path of fnTypePath){if(path===queryElem.pathWithoutLast[i]){i+=1;if(i>=queryElemPathLength){break}}}if(i0){let mgensSolutionSet=[mgensIn];for(const[name,constraints]of queryElem.bindings.entries()){if(mgensSolutionSet.length===0){return false}if(!fnType.bindings.has(name)){return false}const fnTypeBindings=fnType.bindings.get(name);mgensSolutionSet=mgensSolutionSet.flatMap(mgens=>{const newSolutions=[];unifyFunctionTypes(fnTypeBindings,constraints,whereClause,mgens,newMgens=>{newSolutions.push(newMgens);return false},unboxingDepth,);return newSolutions})}if(mgensSolutionSet.length===0){return false}const binds=Array.from(fnType.bindings.entries()).flatMap(entry=>{const[name,constraints]=entry;if(queryElem.bindings.has(name)){return[]}else{return constraints}});if(simplifiedGenerics.length>0){simplifiedGenerics=[...simplifiedGenerics,...binds]}else{simplifiedGenerics=binds}return{simplifiedGenerics,mgens:mgensSolutionSet}}return{simplifiedGenerics,mgens:[mgensIn]}}function unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth,){if(unboxingDepth>=UNBOXING_LIMIT){return false}if(fnType.id<0&&queryElem.id>=0){if(!whereClause){return false}if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==0){return false}const mgensTmp=new Map(mgens);mgensTmp.set(fnType.id,null);return checkIfInList(whereClause[(-fnType.id)-1],queryElem,whereClause,mgensTmp,unboxingDepth,)}else if(fnType.generics.length>0||fnType.bindings.size>0){const simplifiedGenerics=[...fnType.generics,...Array.from(fnType.bindings.values()).flat(),];return checkIfInList(simplifiedGenerics,queryElem,whereClause,mgens,unboxingDepth,)}return false}function checkIfInList(list,elem,whereClause,mgens,unboxingDepth){for(const entry of list){if(checkType(entry,elem,whereClause,mgens,unboxingDepth)){return true}}return false}function checkType(row,elem,whereClause,mgens,unboxingDepth){if(unboxingDepth>=UNBOXING_LIMIT){return false}if(row.bindings.size===0&&elem.bindings.size===0){if(elem.id<0&&mgens===null){return row.id<0||checkIfInList(row.generics,elem,whereClause,mgens,unboxingDepth+1,)}if(row.id>0&&elem.id>0&&elem.pathWithoutLast.length===0&&typePassesFilter(elem.typeFilter,row.ty)&&elem.generics.length===0&&elem.id!==typeNameIdOfArrayOrSlice&&elem.id!==typeNameIdOfTupleOrUnit&&elem.id!==typeNameIdOfHof){return row.id===elem.id||checkIfInList(row.generics,elem,whereClause,mgens,unboxingDepth,)}}return unifyFunctionTypes([row],[elem],whereClause,mgens,null,unboxingDepth)}function checkPath(contains,ty){if(contains.length===0){return 0}const maxPathEditDistance=Math.floor(contains.reduce((acc,next)=>acc+next.length,0)/3,);let ret_dist=maxPathEditDistance+1;const path=ty.path.split("::");if(ty.parent&&ty.parent.name){path.push(ty.parent.name.toLowerCase())}const length=path.length;const clength=contains.length;pathiter:for(let i=length-clength;i>=0;i-=1){let dist_total=0;for(let x=0;xmaxPathEditDistance){continue pathiter}dist_total+=dist}}ret_dist=Math.min(ret_dist,Math.round(dist_total/clength))}return ret_dist>maxPathEditDistance?null:ret_dist}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER||filter===type)return true;const name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,descShard:item.descShard,descIndex:item.descIndex,exactPath:item.exactPath,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,bitIndex:item.bitIndex,implDisambiguator:item.implDisambiguator,}}async function handleAliases(ret,query,filterCrates,currentCrate){const lowerQuery=query.toLowerCase();const aliases=[];const crateAliases=[];if(filterCrates!==null){if(ALIASES.has(filterCrates)&&ALIASES.get(filterCrates).has(lowerQuery)){const query_aliases=ALIASES.get(filterCrates).get(lowerQuery);for(const alias of query_aliases){aliases.push(createAliasFromItem(searchIndex[alias]))}}}else{for(const[crate,crateAliasesIndex]of ALIASES){if(crateAliasesIndex.has(lowerQuery)){const pushTo=crate===currentCrate?crateAliases:aliases;const query_aliases=crateAliasesIndex.get(lowerQuery);for(const alias of query_aliases){pushTo.push(createAliasFromItem(searchIndex[alias]))}}}}const sortFunc=(aaa,bbb)=>{if(aaa.path{return searchIndexEmptyDesc.get(alias.crate).contains(alias.bitIndex)?"":searchState.loadDesc(alias)};const[crateDescs,descs]=await Promise.all([Promise.all(crateAliases.map(fetchDesc)),Promise.all(aliases.map(fetchDesc)),]);const pushFunc=alias=>{alias.alias=query;const res=buildHrefAndPath(alias);alias.displayPath=pathSplitter(res[0]);alias.fullPath=alias.displayPath+alias.name;alias.href=res[1];ret.others.unshift(alias);if(ret.others.length>MAX_RESULTS){ret.others.pop()}};aliases.forEach((alias,i)=>{alias.desc=descs[i]});aliases.forEach(pushFunc);crateAliases.forEach((alias,i)=>{alias.desc=crateDescs[i]});crateAliases.forEach(pushFunc)}function addIntoResults(results,fullId,id,index,dist,path_dist,maxEditDistance){if(dist<=maxEditDistance||index!==-1){if(results.has(fullId)){const result=results.get(fullId);if(result.dontValidate||result.dist<=dist){return}}results.set(fullId,{id:id,index:index,dontValidate:parsedQuery.literalSearch,dist:dist,path_dist:path_dist,})}}function handleSingleArg(row,pos,elem,results_others,results_in_args,results_returned,maxEditDistance,){if(!row||(filterCrates!==null&&row.crate!==filterCrates)){return}let path_dist=0;const fullId=row.id;const tfpDist=compareTypeFingerprints(fullId,parsedQuery.typeFingerprint,);if(tfpDist!==null){const in_args=row.type&&row.type.inputs&&checkIfInList(row.type.inputs,elem,row.type.where_clause,null,0);const returned=row.type&&row.type.output&&checkIfInList(row.type.output,elem,row.type.where_clause,null,0);if(in_args){results_in_args.max_dist=Math.max(results_in_args.max_dist||0,tfpDist);const maxDist=results_in_args.sizenormalizedIndex&&normalizedIndex!==-1)){index=normalizedIndex}if(elem.fullPath.length>1){path_dist=checkPath(elem.pathWithoutLast,row);if(path_dist===null){return}}if(parsedQuery.literalSearch){if(row.word===elem.pathLast){addIntoResults(results_others,fullId,pos,index,0,path_dist)}return}const dist=editDistance(row.normalizedName,elem.normalizedPathLast,maxEditDistance);if(index===-1&&dist>maxEditDistance){return}addIntoResults(results_others,fullId,pos,index,dist,path_dist,maxEditDistance)}function handleArgs(row,pos,results){if(!row||(filterCrates!==null&&row.crate!==filterCrates)||!row.type){return}const tfpDist=compareTypeFingerprints(row.id,parsedQuery.typeFingerprint,);if(tfpDist===null){return}if(results.size>=MAX_RESULTS&&tfpDist>results.max_dist){return}if(!unifyFunctionTypes(row.type.inputs,parsedQuery.elems,row.type.where_clause,null,mgens=>{return unifyFunctionTypes(row.type.output,parsedQuery.returned,row.type.where_clause,mgens,null,0,)},0,)){return}results.max_dist=Math.max(results.max_dist||0,tfpDist);addIntoResults(results,row.id,pos,0,tfpDist,0,Number.MAX_VALUE)}function innerRunQuery(){const queryLen=parsedQuery.elems.reduce((acc,next)=>acc+next.pathLast.length,0)+parsedQuery.returned.reduce((acc,next)=>acc+next.pathLast.length,0);const maxEditDistance=Math.floor(queryLen/3);const genericSymbols=new Map();function convertNameToId(elem,isAssocType){const loweredName=elem.pathLast.toLowerCase();if(typeNameIdMap.has(loweredName)&&(isAssocType||!typeNameIdMap.get(loweredName).assocOnly)){elem.id=typeNameIdMap.get(loweredName).id}else if(!parsedQuery.literalSearch){let match=null;let matchDist=maxEditDistance+1;let matchName="";for(const[name,{id,assocOnly}]of typeNameIdMap){const dist=Math.min(editDistance(name,loweredName,maxEditDistance),editDistance(name,elem.normalizedPathLast,maxEditDistance),);if(dist<=matchDist&&dist<=maxEditDistance&&(isAssocType||!assocOnly)){if(dist===matchDist&&matchName>name){continue}match=id;matchDist=dist;matchName=name}}if(match!==null){parsedQuery.correction=matchName}elem.id=match}if((elem.id===null&&parsedQuery.totalElems>1&&elem.typeFilter===-1&&elem.generics.length===0&&elem.bindings.size===0)||elem.typeFilter===TY_GENERIC){if(genericSymbols.has(elem.name)){elem.id=genericSymbols.get(elem.name)}else{elem.id=-(genericSymbols.size+1);genericSymbols.set(elem.name,elem.id)}if(elem.typeFilter===-1&&elem.name.length>=3){const maxPartDistance=Math.floor(elem.name.length/3);let matchDist=maxPartDistance+1;let matchName="";for(const name of typeNameIdMap.keys()){const dist=editDistance(name,elem.name,maxPartDistance);if(dist<=matchDist&&dist<=maxPartDistance){if(dist===matchDist&&matchName>name){continue}matchDist=dist;matchName=name}}if(matchName!==""){parsedQuery.proposeCorrectionFrom=elem.name;parsedQuery.proposeCorrectionTo=matchName}}elem.typeFilter=TY_GENERIC}if(elem.generics.length>0&&elem.typeFilter===TY_GENERIC){parsedQuery.error=["Generic type parameter ",elem.name," does not accept generic parameters",]}for(const elem2 of elem.generics){convertNameToId(elem2)}elem.bindings=new Map(Array.from(elem.bindings.entries()).map(entry=>{const[name,constraints]=entry;if(!typeNameIdMap.has(name)){parsedQuery.error=["Type parameter ",name," does not exist",];return[null,[]]}for(const elem2 of constraints){convertNameToId(elem2)}return[typeNameIdMap.get(name).id,constraints]}),)}const fps=new Set();for(const elem of parsedQuery.elems){convertNameToId(elem);buildFunctionTypeFingerprint(elem,parsedQuery.typeFingerprint,fps)}for(const elem of parsedQuery.returned){convertNameToId(elem);buildFunctionTypeFingerprint(elem,parsedQuery.typeFingerprint,fps)}if(parsedQuery.foundElems===1&&parsedQuery.returned.length===0){if(parsedQuery.elems.length===1){const elem=parsedQuery.elems[0];for(let i=0,nSearchIndex=searchIndex.length;i0){const sortQ=(a,b)=>{const ag=a.generics.length===0&&a.bindings.size===0;const bg=b.generics.length===0&&b.bindings.size===0;if(ag!==bg){return ag-bg}const ai=a.id>0;const bi=b.id>0;return ai-bi};parsedQuery.elems.sort(sortQ);parsedQuery.returned.sort(sortQ);for(let i=0,nSearchIndex=searchIndex.length;i{const descs=await Promise.all(list.map(result=>{return searchIndexEmptyDesc.get(result.crate).contains(result.bitIndex)?"":searchState.loadDesc(result)}));for(const[i,result]of list.entries()){result.desc=descs[i]}}));if(parsedQuery.error!==null&&ret.others.length!==0){ret.query.error=null}return ret}function nextTab(direction){const next=(searchState.currentTab+direction+3)%searchState.focusedByTab.length;searchState.focusedByTab[searchState.currentTab]=document.activeElement;printTab(next);focusSearchResult()}function focusSearchResult(){const target=searchState.focusedByTab[searchState.currentTab]||document.querySelectorAll(".search-results.active a").item(0)||document.querySelectorAll("#search-tabs button").item(searchState.currentTab);searchState.focusedByTab[searchState.currentTab]=null;if(target){target.focus()}}function buildHrefAndPath(item){let displayPath;let href;const type=itemTypes[item.ty];const name=item.name;let path=item.path;let exactPath=item.exactPath;if(type==="mod"){displayPath=path+"::";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="import"){displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/index.html#reexport."+name}else if(type==="primitive"||type==="keyword"){displayPath="";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=ROOT_PATH+name+"/index.html"}else if(item.parent!==undefined){const myparent=item.parent;let anchor=type+"."+name;const parentType=itemTypes[myparent.ty];let pageType=parentType;let pageName=myparent.name;exactPath=`${myparent.exactPath}::${myparent.name}`;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){const enumNameIdx=item.path.lastIndexOf("::");const enumName=item.path.substr(enumNameIdx+2);path=item.path.substr(0,enumNameIdx);displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}if(item.implDisambiguator!==null){anchor=item.implDisambiguator+"/"+anchor}href=ROOT_PATH+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html#"+anchor}else{displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href,`${exactPath}::${name}`]}function pathSplitter(path){const tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}async function addTab(array,query,display){const extraClass=display?" active":"";const output=document.createElement("div");if(array.length>0){output.className="search-results "+extraClass;for(const item of array){const name=item.name;const type=itemTypes[item.ty];const longType=longItemTypes[item.ty];const typeName=longType.length!==0?`${longType}`:"?";const link=document.createElement("a");link.className="result-"+type;link.href=item.href;const resultName=document.createElement("div");resultName.className="result-name";resultName.insertAdjacentHTML("beforeend",`${typeName}`);link.appendChild(resultName);let alias=" ";if(item.is_alias){alias=`
\ +${item.alias} - see \ +
`}resultName.insertAdjacentHTML("beforeend",`
${alias}\ +${item.displayPath}${name}\ +
`);const description=document.createElement("div");description.className="desc";description.insertAdjacentHTML("beforeend",item.desc);link.appendChild(description);output.appendChild(link)}}else if(query.error===null){output.className="search-failed"+extraClass;output.innerHTML="No results :(
"+"Try on DuckDuckGo?

"+"Or try looking in one of these:"}return[output,array.length]}function makeTabHeader(tabNb,text,nbElems){const fmtNbElems=nbElems<10?`\u{2007}(${nbElems})\u{2007}\u{2007}`:nbElems<100?`\u{2007}(${nbElems})\u{2007}`:`\u{2007}(${nbElems})`;if(searchState.currentTab===tabNb){return""}return""}async function showResults(results,go_to_first,filterCrates){const search=searchState.outputElement();if(go_to_first||(results.others.length===1&&getSettingValue("go-to-only-result")==="true")){window.onunload=()=>{};searchState.removeQueryParameters();const elem=document.createElement("a");elem.href=results.others[0].href;removeClass(elem,"active");document.body.appendChild(elem);elem.click();return}if(results.query===undefined){results.query=parseQuery(searchState.input.value)}currentResults=results.query.userQuery;const[ret_others,ret_in_args,ret_returned]=await Promise.all([addTab(results.others,results.query,true),addTab(results.in_args,results.query,false),addTab(results.returned,results.query,false),]);let currentTab=searchState.currentTab;if((currentTab===0&&ret_others[1]===0)||(currentTab===1&&ret_in_args[1]===0)||(currentTab===2&&ret_returned[1]===0)){if(ret_others[1]!==0){currentTab=0}else if(ret_in_args[1]!==0){currentTab=1}else if(ret_returned[1]!==0){currentTab=2}}let crates="";if(rawSearchIndex.size>1){crates=" in 
"}let output=`

Results${crates}

`;if(results.query.error!==null){const error=results.query.error;error.forEach((value,index)=>{value=value.split("<").join("<").split(">").join(">");if(index%2!==0){error[index]=`${value.replaceAll(" ", " ")}`}else{error[index]=value}});output+=`

Query parser error: "${error.join("")}".

`;output+="
"+makeTabHeader(0,"In Names",ret_others[1])+"
";currentTab=0}else if(results.query.foundElems<=1&&results.query.returned.length===0){output+="
"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
"}else{const signatureTabTitle=results.query.elems.length===0?"In Function Return Types":results.query.returned.length===0?"In Function Parameters":"In Function Signatures";output+="
"+makeTabHeader(0,signatureTabTitle,ret_others[1])+"
";currentTab=0}if(results.query.correction!==null){const orig=results.query.returned.length>0?results.query.returned[0].name:results.query.elems[0].name;output+="

"+`Type "${orig}" not found. `+"Showing results for closest type name "+`"${results.query.correction}" instead.

`}if(results.query.proposeCorrectionFrom!==null){const orig=results.query.proposeCorrectionFrom;const targ=results.query.proposeCorrectionTo;output+="

"+`Type "${orig}" not found and used as generic parameter. `+`Consider searching for "${targ}" instead.

`}const resultsElem=document.createElement("div");resultsElem.id="results";resultsElem.appendChild(ret_others[0]);resultsElem.appendChild(ret_in_args[0]);resultsElem.appendChild(ret_returned[0]);search.innerHTML=output;const crateSearch=document.getElementById("crate-search");if(crateSearch){crateSearch.addEventListener("input",updateCrate)}search.appendChild(resultsElem);searchState.showResults(search);const elems=document.getElementById("search-tabs").childNodes;searchState.focusedByTab=[];let i=0;for(const elem of elems){const j=i;elem.onclick=()=>printTab(j);searchState.focusedByTab.push(null);i+=1}printTab(currentTab)}function updateSearchHistory(url){if(!browserSupportsHistoryApi()){return}const params=searchState.getQueryStringParams();if(!history.state&&!params.search){history.pushState(null,"",url)}else{history.replaceState(null,"",url)}}async function search(forced){const query=parseQuery(searchState.input.value.trim());let filterCrates=getFilterCrates();if(!forced&&query.userQuery===currentResults){if(query.userQuery.length>0){putBackSearch()}return}searchState.setLoadingSearch();const params=searchState.getQueryStringParams();if(filterCrates===null&¶ms["filter-crate"]!==undefined){filterCrates=params["filter-crate"]}searchState.title="Results for "+query.original+" - Rust";updateSearchHistory(buildUrl(query.original,filterCrates));await showResults(await execQuery(query,filterCrates,window.currentCrate),params.go_to_first,filterCrates)}function buildItemSearchTypeAll(types,lowercasePaths){return types.length>0?types.map(type=>buildItemSearchType(type,lowercasePaths)):EMPTY_GENERICS_ARRAY}const EMPTY_BINDINGS_MAP=new Map();const EMPTY_GENERICS_ARRAY=[];let TYPES_POOL=new Map();function buildItemSearchType(type,lowercasePaths,isAssocType){const PATH_INDEX_DATA=0;const GENERICS_DATA=1;const BINDINGS_DATA=2;let pathIndex,generics,bindings;if(typeof type==="number"){pathIndex=type;generics=EMPTY_GENERICS_ARRAY;bindings=EMPTY_BINDINGS_MAP}else{pathIndex=type[PATH_INDEX_DATA];generics=buildItemSearchTypeAll(type[GENERICS_DATA],lowercasePaths,);if(type.length>BINDINGS_DATA&&type[BINDINGS_DATA].length>0){bindings=new Map(type[BINDINGS_DATA].map(binding=>{const[assocType,constraints]=binding;return[buildItemSearchType(assocType,lowercasePaths,true).id,buildItemSearchTypeAll(constraints,lowercasePaths),]}))}else{bindings=EMPTY_BINDINGS_MAP}}let result;if(pathIndex<0){result={id:pathIndex,ty:TY_GENERIC,path:null,exactPath:null,generics,bindings,}}else if(pathIndex===0){result={id:null,ty:null,path:null,exactPath:null,generics,bindings,}}else{const item=lowercasePaths[pathIndex-1];result={id:buildTypeMapIndex(item.name,isAssocType),ty:item.ty,path:item.path,exactPath:item.exactPath,generics,bindings,}}const cr=TYPES_POOL.get(result.id);if(cr){if(cr.generics.length===result.generics.length&&cr.generics!==result.generics&&cr.generics.every((x,i)=>result.generics[i]===x)){result.generics=cr.generics}if(cr.bindings.size===result.bindings.size&&cr.bindings!==result.bindings){let ok=true;for(const[k,v]of cr.bindings.entries()){const v2=result.bindings.get(v);if(!v2){ok=false;break}if(v!==v2&&v.length===v2.length&&v.every((x,i)=>v2[i]===x)){result.bindings.set(k,v)}else if(v!==v2){ok=false;break}}if(ok){result.bindings=cr.bindings}}if(cr.ty===result.ty&&cr.path===result.path&&cr.bindings===result.bindings&&cr.generics===result.generics&&cr.ty===result.ty){return cr}}TYPES_POOL.set(result.id,result);return result}function buildFunctionSearchTypeCallback(lowercasePaths){return functionSearchType=>{if(functionSearchType===0){return null}const INPUTS_DATA=0;const OUTPUT_DATA=1;let inputs,output;if(typeof functionSearchType[INPUTS_DATA]==="number"){inputs=[buildItemSearchType(functionSearchType[INPUTS_DATA],lowercasePaths)]}else{inputs=buildItemSearchTypeAll(functionSearchType[INPUTS_DATA],lowercasePaths,)}if(functionSearchType.length>1){if(typeof functionSearchType[OUTPUT_DATA]==="number"){output=[buildItemSearchType(functionSearchType[OUTPUT_DATA],lowercasePaths)]}else{output=buildItemSearchTypeAll(functionSearchType[OUTPUT_DATA],lowercasePaths,)}}else{output=[]}const where_clause=[];const l=functionSearchType.length;for(let i=2;i{k=(~~k+0x7ed55d16)+(k<<12);k=(k ^ 0xc761c23c)^(k>>>19);k=(~~k+0x165667b1)+(k<<5);k=(~~k+0xd3a2646c)^(k<<9);k=(~~k+0xfd7046c5)+(k<<3);return(k ^ 0xb55a4f09)^(k>>>16)};const hashint2=k=>{k=~k+(k<<15);k ^=k>>>12;k+=k<<2;k ^=k>>>4;k=Math.imul(k,2057);return k ^(k>>16)};if(input!==null){const h0a=hashint1(input);const h0b=hashint2(input);const h1a=~~(h0a+Math.imul(h0b,2));const h1b=~~(h0a+Math.imul(h0b,3));const h2a=~~(h0a+Math.imul(h0b,4));const h2b=~~(h0a+Math.imul(h0b,5));output[0]|=(1<<(h0a%32))|(1<<(h1b%32));output[1]|=(1<<(h1a%32))|(1<<(h2b%32));output[2]|=(1<<(h2a%32))|(1<<(h0b%32));fps.add(input)}for(const g of type.generics){buildFunctionTypeFingerprint(g,output,fps)}const fb={id:null,ty:0,generics:EMPTY_GENERICS_ARRAY,bindings:EMPTY_BINDINGS_MAP,};for(const[k,v]of type.bindings.entries()){fb.id=k;fb.generics=v;buildFunctionTypeFingerprint(fb,output,fps)}output[3]=fps.size}function compareTypeFingerprints(fullId,queryFingerprint){const fh0=functionTypeFingerprint[fullId*4];const fh1=functionTypeFingerprint[(fullId*4)+1];const fh2=functionTypeFingerprint[(fullId*4)+2];const[qh0,qh1,qh2]=queryFingerprint;const[in0,in1,in2]=[fh0&qh0,fh1&qh1,fh2&qh2];if((in0 ^ qh0)||(in1 ^ qh1)||(in2 ^ qh2)){return null}return functionTypeFingerprint[(fullId*4)+3]}class VlqHexDecoder{constructor(string,cons){this.string=string;this.cons=cons;this.offset=0;this.backrefQueue=[]}decodeList(){let c=this.string.charCodeAt(this.offset);const ret=[];while(c!==125){ret.push(this.decode());c=this.string.charCodeAt(this.offset)}this.offset+=1;return ret}decode(){let n=0;let c=this.string.charCodeAt(this.offset);if(c===123){this.offset+=1;return this.decodeList()}while(c<96){n=(n<<4)|(c&0xF);this.offset+=1;c=this.string.charCodeAt(this.offset)}n=(n<<4)|(c&0xF);const[sign,value]=[n&1,n>>1];this.offset+=1;return sign?-value:value}next(){const c=this.string.charCodeAt(this.offset);if(c>=48&&c<64){this.offset+=1;return this.backrefQueue[c-48]}if(c===96){this.offset+=1;return this.cons(0)}const result=this.cons(this.decode());this.backrefQueue.unshift(result);if(this.backrefQueue.length>16){this.backrefQueue.pop()}return result}}class RoaringBitmap{constructor(str){const strdecoded=atob(str);const u8array=new Uint8Array(strdecoded.length);for(let j=0;j=4){offsets=[];for(let j=0;j>3]&(1<<(j&0x7))){const runcount=(u8array[i]|(u8array[i+1]<<8));i+=2;this.containers.push(new RoaringBitmapRun(runcount,u8array.slice(i,i+(runcount*4)),));i+=runcount*4}else if(this.cardinalities[j]>=4096){this.containers.push(new RoaringBitmapBits(u8array.slice(i,i+8192)));i+=8192}else{const end=this.cardinalities[j]*2;this.containers.push(new RoaringBitmapArray(this.cardinalities[j],u8array.slice(i,i+end),));i+=end}}}contains(keyvalue){const key=keyvalue>>16;const value=keyvalue&0xFFFF;for(let i=0;i=start&&value<=(start+lenm1)){return true}}return false}}class RoaringBitmapArray{constructor(cardinality,array){this.cardinality=cardinality;this.array=array}contains(value){const l=this.cardinality*2;for(let i=0;i>3]&(1<<(value&7)))}}function buildIndex(rawSearchIndex){searchIndex=[];searchIndexDeprecated=new Map();searchIndexEmptyDesc=new Map();let currentIndex=0;let id=0;for(const crate of rawSearchIndex.values()){id+=crate.t.length+1}functionTypeFingerprint=new Uint32Array((id+1)*4);id=0;for(const[crate,crateCorpus]of rawSearchIndex){const itemDescShardDecoder=new VlqHexDecoder(crateCorpus.D,noop=>noop);let descShard={crate,shard:0,start:0,len:itemDescShardDecoder.next(),promise:null,resolve:null,};const descShardList=[descShard];searchIndexDeprecated.set(crate,new RoaringBitmap(crateCorpus.c));searchIndexEmptyDesc.set(crate,new RoaringBitmap(crateCorpus.e));let descIndex=0;const crateRow={crate,ty:3,name:crate,path:"",descShard,descIndex,exactPath:"",desc:crateCorpus.doc,parent:undefined,type:null,id,word:crate,normalizedName:crate.indexOf("_")===-1?crate:crate.replace(/_/g,""),bitIndex:0,implDisambiguator:null,};id+=1;searchIndex.push(crateRow);currentIndex+=1;if(!searchIndexEmptyDesc.get(crate).contains(0)){descIndex+=1}const itemTypes=crateCorpus.t;const itemNames=crateCorpus.n;const itemPaths=new Map(crateCorpus.q);const itemReexports=new Map(crateCorpus.r);const itemParentIdxs=crateCorpus.i;const implDisambiguator=new Map(crateCorpus.b);const paths=crateCorpus.p;const aliases=crateCorpus.a;const lowercasePaths=[];const itemFunctionDecoder=new VlqHexDecoder(crateCorpus.f,buildFunctionSearchTypeCallback(lowercasePaths),);let len=paths.length;let lastPath=itemPaths.get(0);for(let i=0;i2){path=itemPaths.has(elem[2])?itemPaths.get(elem[2]):lastPath;lastPath=path}const exactPath=elem.length>3?itemPaths.get(elem[3]):path;lowercasePaths.push({ty,name:name.toLowerCase(),path,exactPath});paths[i]={ty,name,path,exactPath}}lastPath="";len=itemTypes.length;for(let i=0;i=descShard.len&&!searchIndexEmptyDesc.get(crate).contains(bitIndex)){descShard={crate,shard:descShard.shard+1,start:descShard.start+descShard.len,len:itemDescShardDecoder.next(),promise:null,resolve:null,};descIndex=0;descShardList.push(descShard)}let word="";if(typeof itemNames[i]==="string"){word=itemNames[i].toLowerCase()}const path=itemPaths.has(i)?itemPaths.get(i):lastPath;const type=itemFunctionDecoder.next();if(type!==null){if(type){const fp=functionTypeFingerprint.subarray(id*4,(id+1)*4);const fps=new Set();for(const t of type.inputs){buildFunctionTypeFingerprint(t,fp,fps)}for(const t of type.output){buildFunctionTypeFingerprint(t,fp,fps)}for(const w of type.where_clause){for(const t of w){buildFunctionTypeFingerprint(t,fp,fps)}}}}const row={crate,ty:itemTypes.charCodeAt(i)-65,name:itemNames[i],path,descShard,descIndex,exactPath:itemReexports.has(i)?itemPaths.get(itemReexports.get(i)):path,parent:itemParentIdxs[i]>0?paths[itemParentIdxs[i]-1]:undefined,type,id,word,normalizedName:word.indexOf("_")===-1?word:word.replace(/_/g,""),bitIndex,implDisambiguator:implDisambiguator.has(i)?implDisambiguator.get(i):null,};id+=1;searchIndex.push(row);lastPath=row.path;if(!searchIndexEmptyDesc.get(crate).contains(bitIndex)){descIndex+=1}}if(aliases){const currentCrateAliases=new Map();ALIASES.set(crate,currentCrateAliases);for(const alias_name in aliases){if(!Object.prototype.hasOwnProperty.call(aliases,alias_name)){continue}let currentNameAliases;if(currentCrateAliases.has(alias_name)){currentNameAliases=currentCrateAliases.get(alias_name)}else{currentNameAliases=[];currentCrateAliases.set(alias_name,currentNameAliases)}for(const local_alias of aliases[alias_name]){currentNameAliases.push(local_alias+currentIndex)}}}currentIndex+=itemTypes.length;searchState.descShards.set(crate,descShardList)}TYPES_POOL=new Map()}function onSearchSubmit(e){e.preventDefault();searchState.clearInputTimeout();search()}function putBackSearch(){const search_input=searchState.input;if(!searchState.input){return}if(search_input.value!==""&&!searchState.isDisplayed()){searchState.showResults();if(browserSupportsHistoryApi()){history.replaceState(null,"",buildUrl(search_input.value,getFilterCrates()))}document.title=searchState.title}}function registerSearchEvents(){const params=searchState.getQueryStringParams();if(searchState.input.value===""){searchState.input.value=params.search||""}const searchAfter500ms=()=>{searchState.clearInputTimeout();if(searchState.input.value.length===0){searchState.hideResults()}else{searchState.timeout=setTimeout(search,500)}};searchState.input.onkeyup=searchAfter500ms;searchState.input.oninput=searchAfter500ms;document.getElementsByClassName("search-form")[0].onsubmit=onSearchSubmit;searchState.input.onchange=e=>{if(e.target!==document.activeElement){return}searchState.clearInputTimeout();setTimeout(search,0)};searchState.input.onpaste=searchState.input.onchange;searchState.outputElement().addEventListener("keydown",e=>{if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey){return}if(e.which===38){const previous=document.activeElement.previousElementSibling;if(previous){previous.focus()}else{searchState.focus()}e.preventDefault()}else if(e.which===40){const next=document.activeElement.nextElementSibling;if(next){next.focus()}const rect=document.activeElement.getBoundingClientRect();if(window.innerHeight-rect.bottom{if(e.which===40){focusSearchResult();e.preventDefault()}});searchState.input.addEventListener("focus",()=>{putBackSearch()});searchState.input.addEventListener("blur",()=>{searchState.input.placeholder=searchState.input.origPlaceholder});if(browserSupportsHistoryApi()){const previousTitle=document.title;window.addEventListener("popstate",e=>{const params=searchState.getQueryStringParams();document.title=previousTitle;currentResults=null;if(params.search&¶ms.search.length>0){searchState.input.value=params.search;e.preventDefault();search()}else{searchState.input.value="";searchState.hideResults()}})}window.onpageshow=()=>{const qSearch=searchState.getQueryStringParams().search;if(searchState.input.value===""&&qSearch){searchState.input.value=qSearch}search()}}function updateCrate(ev){if(ev.target.value==="all crates"){const query=searchState.input.value.trim();updateSearchHistory(buildUrl(query,null))}currentResults=null;search(true)}buildIndex(rawSearchIndex);if(typeof window!=="undefined"){registerSearchEvents();if(window.searchState.getQueryStringParams().search){search()}}if(typeof exports!=="undefined"){exports.initSearch=initSearch;exports.execQuery=execQuery;exports.parseQuery=parseQuery}}if(typeof window!=="undefined"){window.initSearch=initSearch;if(window.searchIndex!==undefined){initSearch(window.searchIndex)}}else{initSearch(new Map())}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/trait.impl/core/clone/trait.Clone.js b/static/rust/redstone/crypto_secp256k1/trait.impl/core/clone/trait.Clone.js index 270a1587..f3493485 100644 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/core/clone/trait.Clone.js +++ b/static/rust/redstone/crypto_secp256k1/trait.impl/core/clone/trait.Clone.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl Clone for Error"],["impl Clone for DataPackage"],["impl Clone for DataPoint"],["impl Clone for Payload"]] +"redstone":[["impl Clone for Error"],["impl Clone for DataPackage"],["impl Clone for DataPoint"],["impl Clone for Payload"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/trait.impl/core/cmp/trait.Eq.js b/static/rust/redstone/crypto_secp256k1/trait.impl/core/cmp/trait.Eq.js index a573550b..65c9074b 100644 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/core/cmp/trait.Eq.js +++ b/static/rust/redstone/crypto_secp256k1/trait.impl/core/cmp/trait.Eq.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl Eq for ProcessorResult"],["impl Eq for DataPackage"],["impl Eq for DataPoint"]] +"redstone":[["impl Eq for ProcessorResult"],["impl Eq for DataPackage"],["impl Eq for DataPoint"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/trait.impl/core/cmp/trait.PartialEq.js b/static/rust/redstone/crypto_secp256k1/trait.impl/core/cmp/trait.PartialEq.js index 695eda8f..694c39aa 100644 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/core/cmp/trait.PartialEq.js +++ b/static/rust/redstone/crypto_secp256k1/trait.impl/core/cmp/trait.PartialEq.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl PartialEq for ProcessorResult"],["impl PartialEq for DataPackage"],["impl PartialEq for DataPoint"]] +"redstone":[["impl PartialEq for ProcessorResult"],["impl PartialEq for DataPackage"],["impl PartialEq for DataPoint"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/trait.impl/core/convert/trait.From.js b/static/rust/redstone/crypto_secp256k1/trait.impl/core/convert/trait.From.js index 92afa7bb..1ca779a8 100644 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/core/convert/trait.From.js +++ b/static/rust/redstone/crypto_secp256k1/trait.impl/core/convert/trait.From.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl From<ProcessorResult> for (u64, Vec<U256>)"]] +"redstone":[["impl From<ProcessorResult> for (u64, Vec<U256>)"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/trait.impl/core/fmt/trait.Debug.js b/static/rust/redstone/crypto_secp256k1/trait.impl/core/fmt/trait.Debug.js index f544c767..00b02dec 100644 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/core/fmt/trait.Debug.js +++ b/static/rust/redstone/crypto_secp256k1/trait.impl/core/fmt/trait.Debug.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl Debug for Error"],["impl Debug for Config"],["impl Debug for ProcessorResult"],["impl Debug for DataPackage"],["impl Debug for DataPoint"],["impl Debug for Payload"]] +"redstone":[["impl Debug for Error"],["impl Debug for Config"],["impl Debug for ProcessorResult"],["impl Debug for DataPackage"],["impl Debug for DataPoint"],["impl Debug for Payload"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/trait.impl/core/fmt/trait.Display.js b/static/rust/redstone/crypto_secp256k1/trait.impl/core/fmt/trait.Display.js index 899cd7d8..99ad5f7c 100644 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/core/fmt/trait.Display.js +++ b/static/rust/redstone/crypto_secp256k1/trait.impl/core/fmt/trait.Display.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl Display for Error"]] +"redstone":[["impl Display for Error"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/trait.impl/core/marker/trait.Freeze.js b/static/rust/redstone/crypto_secp256k1/trait.impl/core/marker/trait.Freeze.js index 9ef439fb..b171c620 100644 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/core/marker/trait.Freeze.js +++ b/static/rust/redstone/crypto_secp256k1/trait.impl/core/marker/trait.Freeze.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl Freeze for Error",1,["redstone::network::error::Error"]],["impl Freeze for Config",1,["redstone::core::config::Config"]],["impl Freeze for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Freeze for Std",1,["redstone::network::pure::Std"]],["impl Freeze for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Freeze for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Freeze for Payload",1,["redstone::protocol::payload::Payload"]]] +"redstone":[["impl Freeze for Error",1,["redstone::network::error::Error"]],["impl Freeze for Config",1,["redstone::core::config::Config"]],["impl Freeze for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Freeze for Std",1,["redstone::network::pure::Std"]],["impl Freeze for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Freeze for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Freeze for Payload",1,["redstone::protocol::payload::Payload"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/trait.impl/core/marker/trait.Send.js b/static/rust/redstone/crypto_secp256k1/trait.impl/core/marker/trait.Send.js index 5c6a47bd..b46e7c30 100644 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/core/marker/trait.Send.js +++ b/static/rust/redstone/crypto_secp256k1/trait.impl/core/marker/trait.Send.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl !Send for Error",1,["redstone::network::error::Error"]],["impl Send for Config",1,["redstone::core::config::Config"]],["impl Send for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Send for Std",1,["redstone::network::pure::Std"]],["impl Send for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Send for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Send for Payload",1,["redstone::protocol::payload::Payload"]]] +"redstone":[["impl !Send for Error",1,["redstone::network::error::Error"]],["impl Send for Config",1,["redstone::core::config::Config"]],["impl Send for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Send for Std",1,["redstone::network::pure::Std"]],["impl Send for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Send for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Send for Payload",1,["redstone::protocol::payload::Payload"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/trait.impl/core/marker/trait.StructuralPartialEq.js b/static/rust/redstone/crypto_secp256k1/trait.impl/core/marker/trait.StructuralPartialEq.js index 19408b71..e4ec763f 100644 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/core/marker/trait.StructuralPartialEq.js +++ b/static/rust/redstone/crypto_secp256k1/trait.impl/core/marker/trait.StructuralPartialEq.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl StructuralPartialEq for ProcessorResult"],["impl StructuralPartialEq for DataPackage"],["impl StructuralPartialEq for DataPoint"]] +"redstone":[["impl StructuralPartialEq for ProcessorResult"],["impl StructuralPartialEq for DataPackage"],["impl StructuralPartialEq for DataPoint"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/trait.impl/core/marker/trait.Sync.js b/static/rust/redstone/crypto_secp256k1/trait.impl/core/marker/trait.Sync.js index 38836f03..f954a405 100644 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/core/marker/trait.Sync.js +++ b/static/rust/redstone/crypto_secp256k1/trait.impl/core/marker/trait.Sync.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl !Sync for Error",1,["redstone::network::error::Error"]],["impl Sync for Config",1,["redstone::core::config::Config"]],["impl Sync for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Sync for Std",1,["redstone::network::pure::Std"]],["impl Sync for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Sync for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Sync for Payload",1,["redstone::protocol::payload::Payload"]]] +"redstone":[["impl !Sync for Error",1,["redstone::network::error::Error"]],["impl Sync for Config",1,["redstone::core::config::Config"]],["impl Sync for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Sync for Std",1,["redstone::network::pure::Std"]],["impl Sync for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Sync for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Sync for Payload",1,["redstone::protocol::payload::Payload"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/trait.impl/core/marker/trait.Unpin.js b/static/rust/redstone/crypto_secp256k1/trait.impl/core/marker/trait.Unpin.js index 05a367f3..bcba46c1 100644 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/core/marker/trait.Unpin.js +++ b/static/rust/redstone/crypto_secp256k1/trait.impl/core/marker/trait.Unpin.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl Unpin for Error",1,["redstone::network::error::Error"]],["impl Unpin for Config",1,["redstone::core::config::Config"]],["impl Unpin for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Unpin for Std",1,["redstone::network::pure::Std"]],["impl Unpin for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Unpin for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Unpin for Payload",1,["redstone::protocol::payload::Payload"]]] +"redstone":[["impl Unpin for Error",1,["redstone::network::error::Error"]],["impl Unpin for Config",1,["redstone::core::config::Config"]],["impl Unpin for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl Unpin for Std",1,["redstone::network::pure::Std"]],["impl Unpin for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl Unpin for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl Unpin for Payload",1,["redstone::protocol::payload::Payload"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js b/static/rust/redstone/crypto_secp256k1/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js index 5dbcd460..22ad876f 100644 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js +++ b/static/rust/redstone/crypto_secp256k1/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl !RefUnwindSafe for Error",1,["redstone::network::error::Error"]],["impl RefUnwindSafe for Config",1,["redstone::core::config::Config"]],["impl RefUnwindSafe for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl RefUnwindSafe for Std",1,["redstone::network::pure::Std"]],["impl RefUnwindSafe for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl RefUnwindSafe for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl RefUnwindSafe for Payload",1,["redstone::protocol::payload::Payload"]]] +"redstone":[["impl !RefUnwindSafe for Error",1,["redstone::network::error::Error"]],["impl RefUnwindSafe for Config",1,["redstone::core::config::Config"]],["impl RefUnwindSafe for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl RefUnwindSafe for Std",1,["redstone::network::pure::Std"]],["impl RefUnwindSafe for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl RefUnwindSafe for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl RefUnwindSafe for Payload",1,["redstone::protocol::payload::Payload"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js b/static/rust/redstone/crypto_secp256k1/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js index 850af1de..b9ce6a8c 100644 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js +++ b/static/rust/redstone/crypto_secp256k1/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"redstone":[["impl !UnwindSafe for Error",1,["redstone::network::error::Error"]],["impl UnwindSafe for Config",1,["redstone::core::config::Config"]],["impl UnwindSafe for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl UnwindSafe for Std",1,["redstone::network::pure::Std"]],["impl UnwindSafe for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl UnwindSafe for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl UnwindSafe for Payload",1,["redstone::protocol::payload::Payload"]]] +"redstone":[["impl !UnwindSafe for Error",1,["redstone::network::error::Error"]],["impl UnwindSafe for Config",1,["redstone::core::config::Config"]],["impl UnwindSafe for ProcessorResult",1,["redstone::core::processor_result::ProcessorResult"]],["impl UnwindSafe for Std",1,["redstone::network::pure::Std"]],["impl UnwindSafe for DataPackage",1,["redstone::protocol::data_package::DataPackage"]],["impl UnwindSafe for DataPoint",1,["redstone::protocol::data_point::DataPoint"]],["impl UnwindSafe for Payload",1,["redstone::protocol::payload::Payload"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/type.impl/alloc/vec/struct.Vec.js b/static/rust/redstone/crypto_secp256k1/type.impl/alloc/vec/struct.Vec.js index 02ba4b44..f62dde52 100644 --- a/static/rust/redstone/crypto_secp256k1/type.impl/alloc/vec/struct.Vec.js +++ b/static/rust/redstone/crypto_secp256k1/type.impl/alloc/vec/struct.Vec.js @@ -1,3 +1,3 @@ (function() {var type_impls = { -"redstone":[["
1.5.0 · source§

impl<T, A> AsMut<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn as_mut(&mut self) -> &mut [T]

Converts this type into a mutable reference of the (usually inferred) input type.
","AsMut<[T]>","redstone::core::aggregator::Matrix"],["
1.5.0 · source§

impl<T, A> AsMut<Vec<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn as_mut(&mut self) -> &mut Vec<T, A>

Converts this type into a mutable reference of the (usually inferred) input type.
","AsMut>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> AsRef<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn as_ref(&self) -> &[T]

Converts this type into a shared reference of the (usually inferred) input type.
","AsRef<[T]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> AsRef<Vec<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn as_ref(&self) -> &Vec<T, A>

Converts this type into a shared reference of the (usually inferred) input type.
","AsRef>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Borrow<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn borrow(&self) -> &[T]

Immutably borrows from an owned value. Read more
","Borrow<[T]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> BorrowMut<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn borrow_mut(&mut self) -> &mut [T]

Mutably borrows from an owned value. Read more
","BorrowMut<[T]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Clone for Vec<T, A>
where\n T: Clone,\n A: Allocator + Clone,

source§

fn clone_from(&mut self, source: &Vec<T, A>)

Overwrites the contents of self with a clone of the contents of source.

\n

This method is preferred over simply assigning source.clone() to self,\nas it avoids reallocation if possible. Additionally, if the element type\nT overrides clone_from(), this will reuse the resources of self’s\nelements as well.

\n
§Examples
\n
let x = vec![5, 6, 7];\nlet mut y = vec![8, 9, 10];\nlet yp: *const i32 = y.as_ptr();\n\ny.clone_from(&x);\n\n// The value is the same\nassert_eq!(x, y);\n\n// And no reallocation occurred\nassert_eq!(yp, y.as_ptr());
\n
source§

fn clone(&self) -> Vec<T, A>

Returns a copy of the value. Read more
","Clone","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Debug for Vec<T, A>
where\n T: Debug,\n A: Allocator,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T> Default for Vec<T>

source§

fn default() -> Vec<T>

Creates an empty Vec<T>.

\n

The vector will not allocate until elements are pushed onto it.

\n
","Default","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Deref for Vec<T, A>
where\n A: Allocator,

§

type Target = [T]

The resulting type after dereferencing.
source§

fn deref(&self) -> &[T]

Dereferences the value.
","Deref","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> DerefMut for Vec<T, A>
where\n A: Allocator,

source§

fn deref_mut(&mut self) -> &mut [T]

Mutably dereferences the value.
","DerefMut","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Drop for Vec<T, A>
where\n A: Allocator,

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
","Drop","redstone::core::aggregator::Matrix"],["
1.2.0 · source§

impl<'a, T, A> Extend<&'a T> for Vec<T, A>
where\n T: Copy + 'a,\n A: Allocator,

Extend implementation that copies elements out of references before pushing them onto the Vec.

\n

This implementation is specialized for slice iterators, where it uses copy_from_slice to\nappend the entire slice at once.

\n
source§

fn extend<I>(&mut self, iter: I)
where\n I: IntoIterator<Item = &'a T>,

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, _: &'a T)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
","Extend<&'a T>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Extend<T> for Vec<T, A>
where\n A: Allocator,

source§

fn extend<I>(&mut self, iter: I)
where\n I: IntoIterator<Item = T>,

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: T)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
","Extend","redstone::core::aggregator::Matrix"],["
source§

impl Flattened<<Std as NetworkSpecific>::BytesRepr> for Vec<Bytes>

","Flattened<::BytesRepr>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T> From<&[T]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &[T]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&[1, 2, 3][..]), vec![1, 2, 3]);
\n
","From<&[T]>","redstone::core::aggregator::Matrix"],["
1.74.0 · source§

impl<T, const N: usize> From<&[T; N]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &[T; N]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&[1, 2, 3]), vec![1, 2, 3]);
\n
","From<&[T; N]>","redstone::core::aggregator::Matrix"],["
1.19.0 · source§

impl<T> From<&mut [T]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &mut [T]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&mut [1, 2, 3][..]), vec![1, 2, 3]);
\n
","From<&mut [T]>","redstone::core::aggregator::Matrix"],["
1.74.0 · source§

impl<T, const N: usize> From<&mut [T; N]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &mut [T; N]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&mut [1, 2, 3]), vec![1, 2, 3]);
\n
","From<&mut [T; N]>","redstone::core::aggregator::Matrix"],["
1.44.0 · source§

impl<T, const N: usize> From<[T; N]> for Vec<T>

source§

fn from(s: [T; N]) -> Vec<T>

Allocate a Vec<T> and move s’s items into it.

\n
§Examples
\n
assert_eq!(Vec::from([1, 2, 3]), vec![1, 2, 3]);
\n
","From<[T; N]>","redstone::core::aggregator::Matrix"],["
1.5.0 · source§

impl<T, A> From<BinaryHeap<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn from(heap: BinaryHeap<T, A>) -> Vec<T, A>

Converts a BinaryHeap<T> into a Vec<T>.

\n

This conversion requires no data movement or allocation, and has\nconstant time complexity.

\n
","From>","redstone::core::aggregator::Matrix"],["
1.18.0 · source§

impl<T, A> From<Box<[T], A>> for Vec<T, A>
where\n A: Allocator,

source§

fn from(s: Box<[T], A>) -> Vec<T, A>

Convert a boxed slice into a vector by transferring ownership of\nthe existing heap allocation.

\n
§Examples
\n
let b: Box<[i32]> = vec![1, 2, 3].into_boxed_slice();\nassert_eq!(Vec::from(b), vec![1, 2, 3]);
\n
","From>","redstone::core::aggregator::Matrix"],["
1.14.0 · source§

impl<'a, T> From<Cow<'a, [T]>> for Vec<T>
where\n [T]: ToOwned<Owned = Vec<T>>,

source§

fn from(s: Cow<'a, [T]>) -> Vec<T>

Convert a clone-on-write slice into a vector.

\n

If s already owns a Vec<T>, it will be returned directly.\nIf s is borrowing a slice, a new Vec<T> will be allocated and\nfilled by cloning s’s items into it.

\n
§Examples
\n
let o: Cow<'_, [i32]> = Cow::Owned(vec![1, 2, 3]);\nlet b: Cow<'_, [i32]> = Cow::Borrowed(&[1, 2, 3]);\nassert_eq!(Vec::from(o), Vec::from(b));
\n
","From>","redstone::core::aggregator::Matrix"],["
1.10.0 · source§

impl<T, A> From<VecDeque<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn from(other: VecDeque<T, A>) -> Vec<T, A>

Turn a VecDeque<T> into a Vec<T>.

\n

This never needs to re-allocate, but does need to do O(n) data movement if\nthe circular buffer doesn’t happen to be at the beginning of the allocation.

\n
§Examples
\n
use std::collections::VecDeque;\n\n// This one is *O*(1).\nlet deque: VecDeque<_> = (1..5).collect();\nlet ptr = deque.as_slices().0.as_ptr();\nlet vec = Vec::from(deque);\nassert_eq!(vec, [1, 2, 3, 4]);\nassert_eq!(vec.as_ptr(), ptr);\n\n// This one needs data rearranging.\nlet mut deque: VecDeque<_> = (1..5).collect();\ndeque.push_front(9);\ndeque.push_front(8);\nlet ptr = deque.as_slices().1.as_ptr();\nlet vec = Vec::from(deque);\nassert_eq!(vec, [8, 9, 1, 2, 3, 4]);\nassert_eq!(vec.as_ptr(), ptr);
\n
","From>","redstone::core::aggregator::Matrix"],["
source§

impl FromBytesRepr<Vec<u8>> for U256

source§

fn from_bytes_repr(bytes: Vec<u8>) -> Self

","FromBytesRepr>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T> FromIterator<T> for Vec<T>

Collects an iterator into a Vec, commonly called via Iterator::collect()

\n

§Allocation behavior

\n

In general Vec does not guarantee any particular growth or allocation strategy.\nThat also applies to this trait impl.

\n

Note: This section covers implementation details and is therefore exempt from\nstability guarantees.

\n

Vec may use any or none of the following strategies,\ndepending on the supplied iterator:

\n
    \n
  • preallocate based on Iterator::size_hint()\n
      \n
    • and panic if the number of items is outside the provided lower/upper bounds
    • \n
    \n
  • \n
  • use an amortized growth strategy similar to pushing one item at a time
  • \n
  • perform the iteration in-place on the original allocation backing the iterator
  • \n
\n

The last case warrants some attention. It is an optimization that in many cases reduces peak memory\nconsumption and improves cache locality. But when big, short-lived allocations are created,\nonly a small fraction of their items get collected, no further use is made of the spare capacity\nand the resulting Vec is moved into a longer-lived structure, then this can lead to the large\nallocations having their lifetimes unnecessarily extended which can result in increased memory\nfootprint.

\n

In cases where this is an issue, the excess capacity can be discarded with Vec::shrink_to(),\nVec::shrink_to_fit() or by collecting into Box<[T]> instead, which additionally reduces\nthe size of the long-lived struct.

\n\n
static LONG_LIVED: Mutex<Vec<Vec<u16>>> = Mutex::new(Vec::new());\n\nfor i in 0..10 {\n    let big_temporary: Vec<u16> = (0..1024).collect();\n    // discard most items\n    let mut result: Vec<_> = big_temporary.into_iter().filter(|i| i % 100 == 0).collect();\n    // without this a lot of unused capacity might be moved into the global\n    result.shrink_to_fit();\n    LONG_LIVED.lock().unwrap().push(result);\n}
\n
source§

fn from_iter<I>(iter: I) -> Vec<T>
where\n I: IntoIterator<Item = T>,

Creates a value from an iterator. Read more
","FromIterator","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Hash for Vec<T, A>
where\n T: Hash,\n A: Allocator,

The hash of a vector is the same as that of the corresponding slice,\nas required by the core::borrow::Borrow implementation.

\n\n
use std::hash::BuildHasher;\n\nlet b = std::hash::RandomState::new();\nlet v: Vec<u8> = vec![0xa8, 0x3c, 0x09];\nlet s: &[u8] = &[0xa8, 0x3c, 0x09];\nassert_eq!(b.hash_one(v), b.hash_one(s));
\n
source§

fn hash<H>(&self, state: &mut H)
where\n H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, I, A> Index<I> for Vec<T, A>
where\n I: SliceIndex<[T]>,\n A: Allocator,

§

type Output = <I as SliceIndex<[T]>>::Output

The returned type after indexing.
source§

fn index(&self, index: I) -> &<Vec<T, A> as Index<I>>::Output

Performs the indexing (container[index]) operation. Read more
","Index","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, I, A> IndexMut<I> for Vec<T, A>
where\n I: SliceIndex<[T]>,\n A: Allocator,

source§

fn index_mut(&mut self, index: I) -> &mut <Vec<T, A> as Index<I>>::Output

Performs the mutable indexing (container[index]) operation. Read more
","IndexMut","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> IntoIterator for Vec<T, A>
where\n A: Allocator,

source§

fn into_iter(self) -> <Vec<T, A> as IntoIterator>::IntoIter

Creates a consuming iterator, that is, one that moves each value out of\nthe vector (from start to end). The vector cannot be used after calling\nthis.

\n
§Examples
\n
let v = vec![\"a\".to_string(), \"b\".to_string()];\nlet mut v_iter = v.into_iter();\n\nlet first_element: Option<String> = v_iter.next();\n\nassert_eq!(first_element, Some(\"a\".to_string()));\nassert_eq!(v_iter.next(), Some(\"b\".to_string()));\nassert_eq!(v_iter.next(), None);
\n
§

type Item = T

The type of the elements being iterated over.
§

type IntoIter = IntoIter<T, A>

Which kind of iterator are we turning this into?
","IntoIterator","redstone::core::aggregator::Matrix"],["
source§

impl<T> Median for Vec<T>
where\n T: Copy + Ord + Avg,

§

type Item = T

source§

fn median(self) -> Self::Item

","Median","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Ord for Vec<T, A>
where\n T: Ord,\n A: Allocator,

Implements ordering of vectors, lexicographically.

\n
source§

fn cmp(&self, other: &Vec<T, A>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
","Ord","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A> PartialEq<&[U]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &&[U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&[U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&[U]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A, const N: usize> PartialEq<&[U; N]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &&[U; N]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&[U; N]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&[U; N]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A> PartialEq<&mut [U]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &&mut [U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&mut [U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&mut [U]>","redstone::core::aggregator::Matrix"],["
1.48.0 · source§

impl<T, U, A> PartialEq<[U]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &[U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &[U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<[U]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A, const N: usize> PartialEq<[U; N]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &[U; N]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &[U; N]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<[U; N]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A1, A2> PartialEq<Vec<U, A2>> for Vec<T, A1>
where\n A1: Allocator,\n A2: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &Vec<U, A2>) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &Vec<U, A2>) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A1, A2> PartialOrd<Vec<T, A2>> for Vec<T, A1>
where\n T: PartialOrd,\n A1: Allocator,\n A2: Allocator,

Implements comparison of vectors, lexicographically.

\n
source§

fn partial_cmp(&self, other: &Vec<T, A2>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <=\noperator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >=\noperator. Read more
","PartialOrd>","redstone::core::aggregator::Matrix"],["
source§

impl<T> Vec<T>

1.0.0 (const: 1.39.0) · source

pub const fn new() -> Vec<T>

Constructs a new, empty Vec<T>.

\n

The vector will not allocate until elements are pushed onto it.

\n
§Examples
\n
let mut vec: Vec<i32> = Vec::new();
\n
1.0.0 · source

pub fn with_capacity(capacity: usize) -> Vec<T>

Constructs a new, empty Vec<T> with at least the specified capacity.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n

It is important to note that although the returned vector has the\nminimum capacity specified, the vector will have a zero length. For\nan explanation of the difference between length and capacity, see\nCapacity and reallocation.

\n

If it is important to know the exact allocated capacity of a Vec,\nalways use the capacity method after construction.

\n

For Vec<T> where T is a zero-sized type, there will be no allocation\nand the capacity will always be usize::MAX.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = Vec::with_capacity(10);\n\n// The vector contains no items, even though it has capacity for more\nassert_eq!(vec.len(), 0);\nassert!(vec.capacity() >= 10);\n\n// These are all done without reallocating...\nfor i in 0..10 {\n    vec.push(i);\n}\nassert_eq!(vec.len(), 10);\nassert!(vec.capacity() >= 10);\n\n// ...but this may make the vector reallocate\nvec.push(11);\nassert_eq!(vec.len(), 11);\nassert!(vec.capacity() >= 11);\n\n// A vector of a zero-sized type will always over-allocate, since no\n// allocation is necessary\nlet vec_units = Vec::<()>::with_capacity(10);\nassert_eq!(vec_units.capacity(), usize::MAX);
\n
source

pub fn try_with_capacity(capacity: usize) -> Result<Vec<T>, TryReserveError>

🔬This is a nightly-only experimental API. (try_with_capacity)

Constructs a new, empty Vec<T> with at least the specified capacity.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n
§Errors
\n

Returns an error if the capacity exceeds isize::MAX bytes,\nor if the allocator reports allocation failure.

\n
1.0.0 · source

pub unsafe fn from_raw_parts(\n ptr: *mut T,\n length: usize,\n capacity: usize,\n) -> Vec<T>

Creates a Vec<T> directly from a pointer, a length, and a capacity.

\n
§Safety
\n

This is highly unsafe, due to the number of invariants that aren’t\nchecked:

\n
    \n
  • ptr must have been allocated using the global allocator, such as via\nthe alloc::alloc function.
  • \n
  • T needs to have the same alignment as what ptr was allocated with.\n(T having a less strict alignment is not sufficient, the alignment really\nneeds to be equal to satisfy the dealloc requirement that memory must be\nallocated and deallocated with the same layout.)
  • \n
  • The size of T times the capacity (ie. the allocated size in bytes) needs\nto be the same size as the pointer was allocated with. (Because similar to\nalignment, dealloc must be called with the same layout size.)
  • \n
  • length needs to be less than or equal to capacity.
  • \n
  • The first length values must be properly initialized values of type T.
  • \n
  • capacity needs to be the capacity that the pointer was allocated with.
  • \n
  • The allocated size in bytes must be no larger than isize::MAX.\nSee the safety documentation of pointer::offset.
  • \n
\n

These requirements are always upheld by any ptr that has been allocated\nvia Vec<T>. Other allocation sources are allowed if the invariants are\nupheld.

\n

Violating these may cause problems like corrupting the allocator’s\ninternal data structures. For example it is normally not safe\nto build a Vec<u8> from a pointer to a C char array with length\nsize_t, doing so is only safe if the array was initially allocated by\na Vec or String.\nIt’s also not safe to build one from a Vec<u16> and its length, because\nthe allocator cares about the alignment, and these two types have different\nalignments. The buffer was allocated with alignment 2 (for u16), but after\nturning it into a Vec<u8> it’ll be deallocated with alignment 1. To avoid\nthese issues, it is often preferable to do casting/transmuting using\nslice::from_raw_parts instead.

\n

The ownership of ptr is effectively transferred to the\nVec<T> which may then deallocate, reallocate or change the\ncontents of memory pointed to by the pointer at will. Ensure\nthat nothing else uses the pointer after calling this\nfunction.

\n
§Examples
\n
use std::ptr;\nuse std::mem;\n\nlet v = vec![1, 2, 3];\n\n// Prevent running `v`'s destructor so we are in complete control\n// of the allocation.\nlet mut v = mem::ManuallyDrop::new(v);\n\n// Pull out the various important pieces of information about `v`\nlet p = v.as_mut_ptr();\nlet len = v.len();\nlet cap = v.capacity();\n\nunsafe {\n    // Overwrite memory with 4, 5, 6\n    for i in 0..len {\n        ptr::write(p.add(i), 4 + i);\n    }\n\n    // Put everything back together into a Vec\n    let rebuilt = Vec::from_raw_parts(p, len, cap);\n    assert_eq!(rebuilt, [4, 5, 6]);\n}
\n

Using memory that was allocated elsewhere:

\n\n
use std::alloc::{alloc, Layout};\n\nfn main() {\n    let layout = Layout::array::<u32>(16).expect(\"overflow cannot happen\");\n\n    let vec = unsafe {\n        let mem = alloc(layout).cast::<u32>();\n        if mem.is_null() {\n            return;\n        }\n\n        mem.write(1_000_000);\n\n        Vec::from_raw_parts(mem, 1, 16)\n    };\n\n    assert_eq!(vec, &[1_000_000]);\n    assert_eq!(vec.capacity(), 16);\n}
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n T: Clone,\n A: Allocator,

1.5.0 · source

pub fn resize(&mut self, new_len: usize, value: T)

Resizes the Vec in-place so that len is equal to new_len.

\n

If new_len is greater than len, the Vec is extended by the\ndifference, with each additional slot filled with value.\nIf new_len is less than len, the Vec is simply truncated.

\n

This method requires T to implement Clone,\nin order to be able to clone the passed value.\nIf you need more flexibility (or want to rely on Default instead of\nClone), use Vec::resize_with.\nIf you only need to resize to a smaller size, use Vec::truncate.

\n
§Examples
\n
let mut vec = vec![\"hello\"];\nvec.resize(3, \"world\");\nassert_eq!(vec, [\"hello\", \"world\", \"world\"]);\n\nlet mut vec = vec![1, 2, 3, 4];\nvec.resize(2, 0);\nassert_eq!(vec, [1, 2]);
\n
1.6.0 · source

pub fn extend_from_slice(&mut self, other: &[T])

Clones and appends all elements in a slice to the Vec.

\n

Iterates over the slice other, clones each element, and then appends\nit to this Vec. The other slice is traversed in-order.

\n

Note that this function is same as extend except that it is\nspecialized to work with slices instead. If and when Rust gets\nspecialization this function will likely be deprecated (but still\navailable).

\n
§Examples
\n
let mut vec = vec![1];\nvec.extend_from_slice(&[2, 3, 4]);\nassert_eq!(vec, [1, 2, 3, 4]);
\n
1.53.0 · source

pub fn extend_from_within<R>(&mut self, src: R)
where\n R: RangeBounds<usize>,

Copies elements from src range to the end of the vector.

\n
§Panics
\n

Panics if the starting point is greater than the end point or if\nthe end point is greater than the length of the vector.

\n
§Examples
\n
let mut vec = vec![0, 1, 2, 3, 4];\n\nvec.extend_from_within(2..);\nassert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4]);\n\nvec.extend_from_within(..2);\nassert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4, 0, 1]);\n\nvec.extend_from_within(4..8);\nassert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4, 0, 1, 4, 2, 3, 4]);
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n T: PartialEq,\n A: Allocator,

1.0.0 · source

pub fn dedup(&mut self)

Removes consecutive repeated elements in the vector according to the\nPartialEq trait implementation.

\n

If the vector is sorted, this removes all duplicates.

\n
§Examples
\n
let mut vec = vec![1, 2, 2, 3, 2];\n\nvec.dedup();\n\nassert_eq!(vec, [1, 2, 3, 2]);
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n A: Allocator,

1.21.0 · source

pub fn splice<R, I>(\n &mut self,\n range: R,\n replace_with: I,\n) -> Splice<'_, <I as IntoIterator>::IntoIter, A>
where\n R: RangeBounds<usize>,\n I: IntoIterator<Item = T>,

Creates a splicing iterator that replaces the specified range in the vector\nwith the given replace_with iterator and yields the removed items.\nreplace_with does not need to be the same length as range.

\n

range is removed even if the iterator is not consumed until the end.

\n

It is unspecified how many elements are removed from the vector\nif the Splice value is leaked.

\n

The input iterator replace_with is only consumed when the Splice value is dropped.

\n

This is optimal if:

\n
    \n
  • The tail (elements in the vector after range) is empty,
  • \n
  • or replace_with yields fewer or equal elements than range’s length
  • \n
  • or the lower bound of its size_hint() is exact.
  • \n
\n

Otherwise, a temporary vector is allocated and the tail is moved twice.

\n
§Panics
\n

Panics if the starting point is greater than the end point or if\nthe end point is greater than the length of the vector.

\n
§Examples
\n
let mut v = vec![1, 2, 3, 4];\nlet new = [7, 8, 9];\nlet u: Vec<_> = v.splice(1..3, new).collect();\nassert_eq!(v, &[1, 7, 8, 9, 4]);\nassert_eq!(u, &[2, 3]);
\n
source

pub fn extract_if<F>(&mut self, filter: F) -> ExtractIf<'_, T, F, A>
where\n F: FnMut(&mut T) -> bool,

🔬This is a nightly-only experimental API. (extract_if)

Creates an iterator which uses a closure to determine if an element should be removed.

\n

If the closure returns true, then the element is removed and yielded.\nIf the closure returns false, the element will remain in the vector and will not be yielded\nby the iterator.

\n

If the returned ExtractIf is not exhausted, e.g. because it is dropped without iterating\nor the iteration short-circuits, then the remaining elements will be retained.\nUse retain with a negated predicate if you do not need the returned iterator.

\n

Using this method is equivalent to the following code:

\n\n
let mut i = 0;\nwhile i < vec.len() {\n    if some_predicate(&mut vec[i]) {\n        let val = vec.remove(i);\n        // your code here\n    } else {\n        i += 1;\n    }\n}\n
\n

But extract_if is easier to use. extract_if is also more efficient,\nbecause it can backshift the elements of the array in bulk.

\n

Note that extract_if also lets you mutate every element in the filter closure,\nregardless of whether you choose to keep or remove it.

\n
§Examples
\n

Splitting an array into evens and odds, reusing the original allocation:

\n\n
#![feature(extract_if)]\nlet mut numbers = vec![1, 2, 3, 4, 5, 6, 8, 9, 11, 13, 14, 15];\n\nlet evens = numbers.extract_if(|x| *x % 2 == 0).collect::<Vec<_>>();\nlet odds = numbers;\n\nassert_eq!(evens, vec![2, 4, 6, 8, 14]);\nassert_eq!(odds, vec![1, 3, 5, 9, 11, 13, 15]);
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n A: Allocator,

source

pub const fn new_in(alloc: A) -> Vec<T, A>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new, empty Vec<T, A>.

\n

The vector will not allocate until elements are pushed onto it.

\n
§Examples
\n
#![feature(allocator_api)]\n\nuse std::alloc::System;\n\nlet mut vec: Vec<i32, _> = Vec::new_in(System);
\n
source

pub fn with_capacity_in(capacity: usize, alloc: A) -> Vec<T, A>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new, empty Vec<T, A> with at least the specified capacity\nwith the provided allocator.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n

It is important to note that although the returned vector has the\nminimum capacity specified, the vector will have a zero length. For\nan explanation of the difference between length and capacity, see\nCapacity and reallocation.

\n

If it is important to know the exact allocated capacity of a Vec,\nalways use the capacity method after construction.

\n

For Vec<T, A> where T is a zero-sized type, there will be no allocation\nand the capacity will always be usize::MAX.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
#![feature(allocator_api)]\n\nuse std::alloc::System;\n\nlet mut vec = Vec::with_capacity_in(10, System);\n\n// The vector contains no items, even though it has capacity for more\nassert_eq!(vec.len(), 0);\nassert!(vec.capacity() >= 10);\n\n// These are all done without reallocating...\nfor i in 0..10 {\n    vec.push(i);\n}\nassert_eq!(vec.len(), 10);\nassert!(vec.capacity() >= 10);\n\n// ...but this may make the vector reallocate\nvec.push(11);\nassert_eq!(vec.len(), 11);\nassert!(vec.capacity() >= 11);\n\n// A vector of a zero-sized type will always over-allocate, since no\n// allocation is necessary\nlet vec_units = Vec::<(), System>::with_capacity_in(10, System);\nassert_eq!(vec_units.capacity(), usize::MAX);
\n
source

pub fn try_with_capacity_in(\n capacity: usize,\n alloc: A,\n) -> Result<Vec<T, A>, TryReserveError>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new, empty Vec<T, A> with at least the specified capacity\nwith the provided allocator.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n
§Errors
\n

Returns an error if the capacity exceeds isize::MAX bytes,\nor if the allocator reports allocation failure.

\n
source

pub unsafe fn from_raw_parts_in(\n ptr: *mut T,\n length: usize,\n capacity: usize,\n alloc: A,\n) -> Vec<T, A>

🔬This is a nightly-only experimental API. (allocator_api)

Creates a Vec<T, A> directly from a pointer, a length, a capacity,\nand an allocator.

\n
§Safety
\n

This is highly unsafe, due to the number of invariants that aren’t\nchecked:

\n
    \n
  • ptr must be currently allocated via the given allocator alloc.
  • \n
  • T needs to have the same alignment as what ptr was allocated with.\n(T having a less strict alignment is not sufficient, the alignment really\nneeds to be equal to satisfy the dealloc requirement that memory must be\nallocated and deallocated with the same layout.)
  • \n
  • The size of T times the capacity (ie. the allocated size in bytes) needs\nto be the same size as the pointer was allocated with. (Because similar to\nalignment, dealloc must be called with the same layout size.)
  • \n
  • length needs to be less than or equal to capacity.
  • \n
  • The first length values must be properly initialized values of type T.
  • \n
  • capacity needs to fit the layout size that the pointer was allocated with.
  • \n
  • The allocated size in bytes must be no larger than isize::MAX.\nSee the safety documentation of pointer::offset.
  • \n
\n

These requirements are always upheld by any ptr that has been allocated\nvia Vec<T, A>. Other allocation sources are allowed if the invariants are\nupheld.

\n

Violating these may cause problems like corrupting the allocator’s\ninternal data structures. For example it is not safe\nto build a Vec<u8> from a pointer to a C char array with length size_t.\nIt’s also not safe to build one from a Vec<u16> and its length, because\nthe allocator cares about the alignment, and these two types have different\nalignments. The buffer was allocated with alignment 2 (for u16), but after\nturning it into a Vec<u8> it’ll be deallocated with alignment 1.

\n

The ownership of ptr is effectively transferred to the\nVec<T> which may then deallocate, reallocate or change the\ncontents of memory pointed to by the pointer at will. Ensure\nthat nothing else uses the pointer after calling this\nfunction.

\n
§Examples
\n
#![feature(allocator_api)]\n\nuse std::alloc::System;\n\nuse std::ptr;\nuse std::mem;\n\nlet mut v = Vec::with_capacity_in(3, System);\nv.push(1);\nv.push(2);\nv.push(3);\n\n// Prevent running `v`'s destructor so we are in complete control\n// of the allocation.\nlet mut v = mem::ManuallyDrop::new(v);\n\n// Pull out the various important pieces of information about `v`\nlet p = v.as_mut_ptr();\nlet len = v.len();\nlet cap = v.capacity();\nlet alloc = v.allocator();\n\nunsafe {\n    // Overwrite memory with 4, 5, 6\n    for i in 0..len {\n        ptr::write(p.add(i), 4 + i);\n    }\n\n    // Put everything back together into a Vec\n    let rebuilt = Vec::from_raw_parts_in(p, len, cap, alloc.clone());\n    assert_eq!(rebuilt, [4, 5, 6]);\n}
\n

Using memory that was allocated elsewhere:

\n\n
#![feature(allocator_api)]\n\nuse std::alloc::{AllocError, Allocator, Global, Layout};\n\nfn main() {\n    let layout = Layout::array::<u32>(16).expect(\"overflow cannot happen\");\n\n    let vec = unsafe {\n        let mem = match Global.allocate(layout) {\n            Ok(mem) => mem.cast::<u32>().as_ptr(),\n            Err(AllocError) => return,\n        };\n\n        mem.write(1_000_000);\n\n        Vec::from_raw_parts_in(mem, 1, 16, Global)\n    };\n\n    assert_eq!(vec, &[1_000_000]);\n    assert_eq!(vec.capacity(), 16);\n}
\n
source

pub fn into_raw_parts(self) -> (*mut T, usize, usize)

🔬This is a nightly-only experimental API. (vec_into_raw_parts)

Decomposes a Vec<T> into its raw components: (pointer, length, capacity).

\n

Returns the raw pointer to the underlying data, the length of\nthe vector (in elements), and the allocated capacity of the\ndata (in elements). These are the same arguments in the same\norder as the arguments to from_raw_parts.

\n

After calling this function, the caller is responsible for the\nmemory previously managed by the Vec. The only way to do\nthis is to convert the raw pointer, length, and capacity back\ninto a Vec with the from_raw_parts function, allowing\nthe destructor to perform the cleanup.

\n
§Examples
\n
#![feature(vec_into_raw_parts)]\nlet v: Vec<i32> = vec![-1, 0, 1];\n\nlet (ptr, len, cap) = v.into_raw_parts();\n\nlet rebuilt = unsafe {\n    // We can now make changes to the components, such as\n    // transmuting the raw pointer to a compatible type.\n    let ptr = ptr as *mut u32;\n\n    Vec::from_raw_parts(ptr, len, cap)\n};\nassert_eq!(rebuilt, [4294967295, 0, 1]);
\n
source

pub fn into_raw_parts_with_alloc(self) -> (*mut T, usize, usize, A)

🔬This is a nightly-only experimental API. (allocator_api)

Decomposes a Vec<T> into its raw components: (pointer, length, capacity, allocator).

\n

Returns the raw pointer to the underlying data, the length of the vector (in elements),\nthe allocated capacity of the data (in elements), and the allocator. These are the same\narguments in the same order as the arguments to from_raw_parts_in.

\n

After calling this function, the caller is responsible for the\nmemory previously managed by the Vec. The only way to do\nthis is to convert the raw pointer, length, and capacity back\ninto a Vec with the from_raw_parts_in function, allowing\nthe destructor to perform the cleanup.

\n
§Examples
\n
#![feature(allocator_api, vec_into_raw_parts)]\n\nuse std::alloc::System;\n\nlet mut v: Vec<i32, System> = Vec::new_in(System);\nv.push(-1);\nv.push(0);\nv.push(1);\n\nlet (ptr, len, cap, alloc) = v.into_raw_parts_with_alloc();\n\nlet rebuilt = unsafe {\n    // We can now make changes to the components, such as\n    // transmuting the raw pointer to a compatible type.\n    let ptr = ptr as *mut u32;\n\n    Vec::from_raw_parts_in(ptr, len, cap, alloc)\n};\nassert_eq!(rebuilt, [4294967295, 0, 1]);
\n
1.0.0 · source

pub fn capacity(&self) -> usize

Returns the total number of elements the vector can hold without\nreallocating.

\n
§Examples
\n
let mut vec: Vec<i32> = Vec::with_capacity(10);\nvec.push(42);\nassert!(vec.capacity() >= 10);
\n
1.0.0 · source

pub fn reserve(&mut self, additional: usize)

Reserves capacity for at least additional more elements to be inserted\nin the given Vec<T>. The collection may reserve more space to\nspeculatively avoid frequent reallocations. After calling reserve,\ncapacity will be greater than or equal to self.len() + additional.\nDoes nothing if capacity is already sufficient.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1];\nvec.reserve(10);\nassert!(vec.capacity() >= 11);
\n
1.0.0 · source

pub fn reserve_exact(&mut self, additional: usize)

Reserves the minimum capacity for at least additional more elements to\nbe inserted in the given Vec<T>. Unlike reserve, this will not\ndeliberately over-allocate to speculatively avoid frequent allocations.\nAfter calling reserve_exact, capacity will be greater than or equal to\nself.len() + additional. Does nothing if the capacity is already\nsufficient.

\n

Note that the allocator may give the collection more space than it\nrequests. Therefore, capacity can not be relied upon to be precisely\nminimal. Prefer reserve if future insertions are expected.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1];\nvec.reserve_exact(10);\nassert!(vec.capacity() >= 11);
\n
1.57.0 · source

pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>

Tries to reserve capacity for at least additional more elements to be inserted\nin the given Vec<T>. The collection may reserve more space to speculatively avoid\nfrequent reallocations. After calling try_reserve, capacity will be\ngreater than or equal to self.len() + additional if it returns\nOk(()). Does nothing if capacity is already sufficient. This method\npreserves the contents even if an error occurs.

\n
§Errors
\n

If the capacity overflows, or the allocator reports a failure, then an error\nis returned.

\n
§Examples
\n
use std::collections::TryReserveError;\n\nfn process_data(data: &[u32]) -> Result<Vec<u32>, TryReserveError> {\n    let mut output = Vec::new();\n\n    // Pre-reserve the memory, exiting if we can't\n    output.try_reserve(data.len())?;\n\n    // Now we know this can't OOM in the middle of our complex work\n    output.extend(data.iter().map(|&val| {\n        val * 2 + 5 // very complicated\n    }));\n\n    Ok(output)\n}
\n
1.57.0 · source

pub fn try_reserve_exact(\n &mut self,\n additional: usize,\n) -> Result<(), TryReserveError>

Tries to reserve the minimum capacity for at least additional\nelements to be inserted in the given Vec<T>. Unlike try_reserve,\nthis will not deliberately over-allocate to speculatively avoid frequent\nallocations. After calling try_reserve_exact, capacity will be greater\nthan or equal to self.len() + additional if it returns Ok(()).\nDoes nothing if the capacity is already sufficient.

\n

Note that the allocator may give the collection more space than it\nrequests. Therefore, capacity can not be relied upon to be precisely\nminimal. Prefer try_reserve if future insertions are expected.

\n
§Errors
\n

If the capacity overflows, or the allocator reports a failure, then an error\nis returned.

\n
§Examples
\n
use std::collections::TryReserveError;\n\nfn process_data(data: &[u32]) -> Result<Vec<u32>, TryReserveError> {\n    let mut output = Vec::new();\n\n    // Pre-reserve the memory, exiting if we can't\n    output.try_reserve_exact(data.len())?;\n\n    // Now we know this can't OOM in the middle of our complex work\n    output.extend(data.iter().map(|&val| {\n        val * 2 + 5 // very complicated\n    }));\n\n    Ok(output)\n}
\n
1.0.0 · source

pub fn shrink_to_fit(&mut self)

Shrinks the capacity of the vector as much as possible.

\n

The behavior of this method depends on the allocator, which may either shrink the vector\nin-place or reallocate. The resulting vector might still have some excess capacity, just as\nis the case for with_capacity. See Allocator::shrink for more details.

\n
§Examples
\n
let mut vec = Vec::with_capacity(10);\nvec.extend([1, 2, 3]);\nassert!(vec.capacity() >= 10);\nvec.shrink_to_fit();\nassert!(vec.capacity() >= 3);
\n
1.56.0 · source

pub fn shrink_to(&mut self, min_capacity: usize)

Shrinks the capacity of the vector with a lower bound.

\n

The capacity will remain at least as large as both the length\nand the supplied value.

\n

If the current capacity is less than the lower limit, this is a no-op.

\n
§Examples
\n
let mut vec = Vec::with_capacity(10);\nvec.extend([1, 2, 3]);\nassert!(vec.capacity() >= 10);\nvec.shrink_to(4);\nassert!(vec.capacity() >= 4);\nvec.shrink_to(0);\nassert!(vec.capacity() >= 3);
\n
1.0.0 · source

pub fn into_boxed_slice(self) -> Box<[T], A>

Converts the vector into Box<[T]>.

\n

Before doing the conversion, this method discards excess capacity like shrink_to_fit.

\n
§Examples
\n
let v = vec![1, 2, 3];\n\nlet slice = v.into_boxed_slice();
\n

Any excess capacity is removed:

\n\n
let mut vec = Vec::with_capacity(10);\nvec.extend([1, 2, 3]);\n\nassert!(vec.capacity() >= 10);\nlet slice = vec.into_boxed_slice();\nassert_eq!(slice.into_vec().capacity(), 3);
\n
1.0.0 · source

pub fn truncate(&mut self, len: usize)

Shortens the vector, keeping the first len elements and dropping\nthe rest.

\n

If len is greater or equal to the vector’s current length, this has\nno effect.

\n

The drain method can emulate truncate, but causes the excess\nelements to be returned instead of dropped.

\n

Note that this method has no effect on the allocated capacity\nof the vector.

\n
§Examples
\n

Truncating a five element vector to two elements:

\n\n
let mut vec = vec![1, 2, 3, 4, 5];\nvec.truncate(2);\nassert_eq!(vec, [1, 2]);
\n

No truncation occurs when len is greater than the vector’s current\nlength:

\n\n
let mut vec = vec![1, 2, 3];\nvec.truncate(8);\nassert_eq!(vec, [1, 2, 3]);
\n

Truncating when len == 0 is equivalent to calling the clear\nmethod.

\n\n
let mut vec = vec![1, 2, 3];\nvec.truncate(0);\nassert_eq!(vec, []);
\n
1.7.0 · source

pub fn as_slice(&self) -> &[T]

Extracts a slice containing the entire vector.

\n

Equivalent to &s[..].

\n
§Examples
\n
use std::io::{self, Write};\nlet buffer = vec![1, 2, 3, 5, 8];\nio::sink().write(buffer.as_slice()).unwrap();
\n
1.7.0 · source

pub fn as_mut_slice(&mut self) -> &mut [T]

Extracts a mutable slice of the entire vector.

\n

Equivalent to &mut s[..].

\n
§Examples
\n
use std::io::{self, Read};\nlet mut buffer = vec![0; 3];\nio::repeat(0b101).read_exact(buffer.as_mut_slice()).unwrap();
\n
1.37.0 · source

pub fn as_ptr(&self) -> *const T

Returns a raw pointer to the vector’s buffer, or a dangling raw pointer\nvalid for zero sized reads if the vector didn’t allocate.

\n

The caller must ensure that the vector outlives the pointer this\nfunction returns, or else it will end up pointing to garbage.\nModifying the vector may cause its buffer to be reallocated,\nwhich would also make any pointers to it invalid.

\n

The caller must also ensure that the memory the pointer (non-transitively) points to\nis never written to (except inside an UnsafeCell) using this pointer or any pointer\nderived from it. If you need to mutate the contents of the slice, use as_mut_ptr.

\n

This method guarantees that for the purpose of the aliasing model, this method\ndoes not materialize a reference to the underlying slice, and thus the returned pointer\nwill remain valid when mixed with other calls to as_ptr and as_mut_ptr.\nNote that calling other methods that materialize mutable references to the slice,\nor mutable references to specific elements you are planning on accessing through this pointer,\nas well as writing to those elements, may still invalidate this pointer.\nSee the second example below for how this guarantee can be used.

\n
§Examples
\n
let x = vec![1, 2, 4];\nlet x_ptr = x.as_ptr();\n\nunsafe {\n    for i in 0..x.len() {\n        assert_eq!(*x_ptr.add(i), 1 << i);\n    }\n}
\n

Due to the aliasing guarantee, the following code is legal:

\n\n
unsafe {\n    let mut v = vec![0, 1, 2];\n    let ptr1 = v.as_ptr();\n    let _ = ptr1.read();\n    let ptr2 = v.as_mut_ptr().offset(2);\n    ptr2.write(2);\n    // Notably, the write to `ptr2` did *not* invalidate `ptr1`\n    // because it mutated a different element:\n    let _ = ptr1.read();\n}
\n
1.37.0 · source

pub fn as_mut_ptr(&mut self) -> *mut T

Returns an unsafe mutable pointer to the vector’s buffer, or a dangling\nraw pointer valid for zero sized reads if the vector didn’t allocate.

\n

The caller must ensure that the vector outlives the pointer this\nfunction returns, or else it will end up pointing to garbage.\nModifying the vector may cause its buffer to be reallocated,\nwhich would also make any pointers to it invalid.

\n

This method guarantees that for the purpose of the aliasing model, this method\ndoes not materialize a reference to the underlying slice, and thus the returned pointer\nwill remain valid when mixed with other calls to as_ptr and as_mut_ptr.\nNote that calling other methods that materialize references to the slice,\nor references to specific elements you are planning on accessing through this pointer,\nmay still invalidate this pointer.\nSee the second example below for how this guarantee can be used.

\n
§Examples
\n
// Allocate vector big enough for 4 elements.\nlet size = 4;\nlet mut x: Vec<i32> = Vec::with_capacity(size);\nlet x_ptr = x.as_mut_ptr();\n\n// Initialize elements via raw pointer writes, then set length.\nunsafe {\n    for i in 0..size {\n        *x_ptr.add(i) = i as i32;\n    }\n    x.set_len(size);\n}\nassert_eq!(&*x, &[0, 1, 2, 3]);
\n

Due to the aliasing guarantee, the following code is legal:

\n\n
unsafe {\n    let mut v = vec![0];\n    let ptr1 = v.as_mut_ptr();\n    ptr1.write(1);\n    let ptr2 = v.as_mut_ptr();\n    ptr2.write(2);\n    // Notably, the write to `ptr2` did *not* invalidate `ptr1`:\n    ptr1.write(3);\n}
\n
source

pub fn allocator(&self) -> &A

🔬This is a nightly-only experimental API. (allocator_api)

Returns a reference to the underlying allocator.

\n
1.0.0 · source

pub unsafe fn set_len(&mut self, new_len: usize)

Forces the length of the vector to new_len.

\n

This is a low-level operation that maintains none of the normal\ninvariants of the type. Normally changing the length of a vector\nis done using one of the safe operations instead, such as\ntruncate, resize, extend, or clear.

\n
§Safety
\n
    \n
  • new_len must be less than or equal to capacity().
  • \n
  • The elements at old_len..new_len must be initialized.
  • \n
\n
§Examples
\n

This method can be useful for situations in which the vector\nis serving as a buffer for other code, particularly over FFI:

\n\n
pub fn get_dictionary(&self) -> Option<Vec<u8>> {\n    // Per the FFI method's docs, \"32768 bytes is always enough\".\n    let mut dict = Vec::with_capacity(32_768);\n    let mut dict_length = 0;\n    // SAFETY: When `deflateGetDictionary` returns `Z_OK`, it holds that:\n    // 1. `dict_length` elements were initialized.\n    // 2. `dict_length` <= the capacity (32_768)\n    // which makes `set_len` safe to call.\n    unsafe {\n        // Make the FFI call...\n        let r = deflateGetDictionary(self.strm, dict.as_mut_ptr(), &mut dict_length);\n        if r == Z_OK {\n            // ...and update the length to what was initialized.\n            dict.set_len(dict_length);\n            Some(dict)\n        } else {\n            None\n        }\n    }\n}
\n

While the following example is sound, there is a memory leak since\nthe inner vectors were not freed prior to the set_len call:

\n\n
let mut vec = vec![vec![1, 0, 0],\n                   vec![0, 1, 0],\n                   vec![0, 0, 1]];\n// SAFETY:\n// 1. `old_len..0` is empty so no elements need to be initialized.\n// 2. `0 <= capacity` always holds whatever `capacity` is.\nunsafe {\n    vec.set_len(0);\n}
\n

Normally, here, one would use clear instead to correctly drop\nthe contents and thus not leak memory.

\n
1.0.0 · source

pub fn swap_remove(&mut self, index: usize) -> T

Removes an element from the vector and returns it.

\n

The removed element is replaced by the last element of the vector.

\n

This does not preserve ordering of the remaining elements, but is O(1).\nIf you need to preserve the element order, use remove instead.

\n
§Panics
\n

Panics if index is out of bounds.

\n
§Examples
\n
let mut v = vec![\"foo\", \"bar\", \"baz\", \"qux\"];\n\nassert_eq!(v.swap_remove(1), \"bar\");\nassert_eq!(v, [\"foo\", \"qux\", \"baz\"]);\n\nassert_eq!(v.swap_remove(0), \"foo\");\nassert_eq!(v, [\"baz\", \"qux\"]);
\n
1.0.0 · source

pub fn insert(&mut self, index: usize, element: T)

Inserts an element at position index within the vector, shifting all\nelements after it to the right.

\n
§Panics
\n

Panics if index > len.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nvec.insert(1, 4);\nassert_eq!(vec, [1, 4, 2, 3]);\nvec.insert(4, 5);\nassert_eq!(vec, [1, 4, 2, 3, 5]);
\n
§Time complexity
\n

Takes O(Vec::len) time. All items after the insertion index must be\nshifted to the right. In the worst case, all elements are shifted when\nthe insertion index is 0.

\n
1.0.0 · source

pub fn remove(&mut self, index: usize) -> T

Removes and returns the element at position index within the vector,\nshifting all elements after it to the left.

\n

Note: Because this shifts over the remaining elements, it has a\nworst-case performance of O(n). If you don’t need the order of elements\nto be preserved, use swap_remove instead. If you’d like to remove\nelements from the beginning of the Vec, consider using\nVecDeque::pop_front instead.

\n
§Panics
\n

Panics if index is out of bounds.

\n
§Examples
\n
let mut v = vec![1, 2, 3];\nassert_eq!(v.remove(1), 2);\nassert_eq!(v, [1, 3]);
\n
1.0.0 · source

pub fn retain<F>(&mut self, f: F)
where\n F: FnMut(&T) -> bool,

Retains only the elements specified by the predicate.

\n

In other words, remove all elements e for which f(&e) returns false.\nThis method operates in place, visiting each element exactly once in the\noriginal order, and preserves the order of the retained elements.

\n
§Examples
\n
let mut vec = vec![1, 2, 3, 4];\nvec.retain(|&x| x % 2 == 0);\nassert_eq!(vec, [2, 4]);
\n

Because the elements are visited exactly once in the original order,\nexternal state may be used to decide which elements to keep.

\n\n
let mut vec = vec![1, 2, 3, 4, 5];\nlet keep = [false, true, true, false, true];\nlet mut iter = keep.iter();\nvec.retain(|_| *iter.next().unwrap());\nassert_eq!(vec, [2, 3, 5]);
\n
1.61.0 · source

pub fn retain_mut<F>(&mut self, f: F)
where\n F: FnMut(&mut T) -> bool,

Retains only the elements specified by the predicate, passing a mutable reference to it.

\n

In other words, remove all elements e such that f(&mut e) returns false.\nThis method operates in place, visiting each element exactly once in the\noriginal order, and preserves the order of the retained elements.

\n
§Examples
\n
let mut vec = vec![1, 2, 3, 4];\nvec.retain_mut(|x| if *x <= 3 {\n    *x += 1;\n    true\n} else {\n    false\n});\nassert_eq!(vec, [2, 3, 4]);
\n
1.16.0 · source

pub fn dedup_by_key<F, K>(&mut self, key: F)
where\n F: FnMut(&mut T) -> K,\n K: PartialEq,

Removes all but the first of consecutive elements in the vector that resolve to the same\nkey.

\n

If the vector is sorted, this removes all duplicates.

\n
§Examples
\n
let mut vec = vec![10, 20, 21, 30, 20];\n\nvec.dedup_by_key(|i| *i / 10);\n\nassert_eq!(vec, [10, 20, 30, 20]);
\n
1.16.0 · source

pub fn dedup_by<F>(&mut self, same_bucket: F)
where\n F: FnMut(&mut T, &mut T) -> bool,

Removes all but the first of consecutive elements in the vector satisfying a given equality\nrelation.

\n

The same_bucket function is passed references to two elements from the vector and\nmust determine if the elements compare equal. The elements are passed in opposite order\nfrom their order in the slice, so if same_bucket(a, b) returns true, a is removed.

\n

If the vector is sorted, this removes all duplicates.

\n
§Examples
\n
let mut vec = vec![\"foo\", \"bar\", \"Bar\", \"baz\", \"bar\"];\n\nvec.dedup_by(|a, b| a.eq_ignore_ascii_case(b));\n\nassert_eq!(vec, [\"foo\", \"bar\", \"baz\", \"bar\"]);
\n
1.0.0 · source

pub fn push(&mut self, value: T)

Appends an element to the back of a collection.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1, 2];\nvec.push(3);\nassert_eq!(vec, [1, 2, 3]);
\n
§Time complexity
\n

Takes amortized O(1) time. If the vector’s length would exceed its\ncapacity after the push, O(capacity) time is taken to copy the\nvector’s elements to a larger allocation. This expensive operation is\noffset by the capacity O(1) insertions it allows.

\n
source

pub fn push_within_capacity(&mut self, value: T) -> Result<(), T>

🔬This is a nightly-only experimental API. (vec_push_within_capacity)

Appends an element if there is sufficient spare capacity, otherwise an error is returned\nwith the element.

\n

Unlike push this method will not reallocate when there’s insufficient capacity.\nThe caller should use reserve or try_reserve to ensure that there is enough capacity.

\n
§Examples
\n

A manual, panic-free alternative to FromIterator:

\n\n
#![feature(vec_push_within_capacity)]\n\nuse std::collections::TryReserveError;\nfn from_iter_fallible<T>(iter: impl Iterator<Item=T>) -> Result<Vec<T>, TryReserveError> {\n    let mut vec = Vec::new();\n    for value in iter {\n        if let Err(value) = vec.push_within_capacity(value) {\n            vec.try_reserve(1)?;\n            // this cannot fail, the previous line either returned or added at least 1 free slot\n            let _ = vec.push_within_capacity(value);\n        }\n    }\n    Ok(vec)\n}\nassert_eq!(from_iter_fallible(0..100), Ok(Vec::from_iter(0..100)));
\n
§Time complexity
\n

Takes O(1) time.

\n
1.0.0 · source

pub fn pop(&mut self) -> Option<T>

Removes the last element from a vector and returns it, or None if it\nis empty.

\n

If you’d like to pop the first element, consider using\nVecDeque::pop_front instead.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nassert_eq!(vec.pop(), Some(3));\nassert_eq!(vec, [1, 2]);
\n
§Time complexity
\n

Takes O(1) time.

\n
source

pub fn pop_if<F>(&mut self, f: F) -> Option<T>
where\n F: FnOnce(&mut T) -> bool,

🔬This is a nightly-only experimental API. (vec_pop_if)

Removes and returns the last element in a vector if the predicate\nreturns true, or None if the predicate returns false or the vector\nis empty.

\n
§Examples
\n
#![feature(vec_pop_if)]\n\nlet mut vec = vec![1, 2, 3, 4];\nlet pred = |x: &mut i32| *x % 2 == 0;\n\nassert_eq!(vec.pop_if(pred), Some(4));\nassert_eq!(vec, [1, 2, 3]);\nassert_eq!(vec.pop_if(pred), None);
\n
1.4.0 · source

pub fn append(&mut self, other: &mut Vec<T, A>)

Moves all the elements of other into self, leaving other empty.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nlet mut vec2 = vec![4, 5, 6];\nvec.append(&mut vec2);\nassert_eq!(vec, [1, 2, 3, 4, 5, 6]);\nassert_eq!(vec2, []);
\n
1.6.0 · source

pub fn drain<R>(&mut self, range: R) -> Drain<'_, T, A>
where\n R: RangeBounds<usize>,

Removes the specified range from the vector in bulk, returning all\nremoved elements as an iterator. If the iterator is dropped before\nbeing fully consumed, it drops the remaining removed elements.

\n

The returned iterator keeps a mutable borrow on the vector to optimize\nits implementation.

\n
§Panics
\n

Panics if the starting point is greater than the end point or if\nthe end point is greater than the length of the vector.

\n
§Leaking
\n

If the returned iterator goes out of scope without being dropped (due to\nmem::forget, for example), the vector may have lost and leaked\nelements arbitrarily, including elements outside the range.

\n
§Examples
\n
let mut v = vec![1, 2, 3];\nlet u: Vec<_> = v.drain(1..).collect();\nassert_eq!(v, &[1]);\nassert_eq!(u, &[2, 3]);\n\n// A full range clears the vector, like `clear()` does\nv.drain(..);\nassert_eq!(v, &[]);
\n
1.0.0 · source

pub fn clear(&mut self)

Clears the vector, removing all values.

\n

Note that this method has no effect on the allocated capacity\nof the vector.

\n
§Examples
\n
let mut v = vec![1, 2, 3];\n\nv.clear();\n\nassert!(v.is_empty());
\n
1.0.0 · source

pub fn len(&self) -> usize

Returns the number of elements in the vector, also referred to\nas its ‘length’.

\n
§Examples
\n
let a = vec![1, 2, 3];\nassert_eq!(a.len(), 3);
\n
1.0.0 · source

pub fn is_empty(&self) -> bool

Returns true if the vector contains no elements.

\n
§Examples
\n
let mut v = Vec::new();\nassert!(v.is_empty());\n\nv.push(1);\nassert!(!v.is_empty());
\n
1.4.0 · source

pub fn split_off(&mut self, at: usize) -> Vec<T, A>
where\n A: Clone,

Splits the collection into two at the given index.

\n

Returns a newly allocated vector containing the elements in the range\n[at, len). After the call, the original vector will be left containing\nthe elements [0, at) with its previous capacity unchanged.

\n
    \n
  • If you want to take ownership of the entire contents and capacity of\nthe vector, see mem::take or mem::replace.
  • \n
  • If you don’t need the returned vector at all, see Vec::truncate.
  • \n
  • If you want to take ownership of an arbitrary subslice, or you don’t\nnecessarily want to store the removed items in a vector, see Vec::drain.
  • \n
\n
§Panics
\n

Panics if at > len.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nlet vec2 = vec.split_off(1);\nassert_eq!(vec, [1]);\nassert_eq!(vec2, [2, 3]);
\n
1.33.0 · source

pub fn resize_with<F>(&mut self, new_len: usize, f: F)
where\n F: FnMut() -> T,

Resizes the Vec in-place so that len is equal to new_len.

\n

If new_len is greater than len, the Vec is extended by the\ndifference, with each additional slot filled with the result of\ncalling the closure f. The return values from f will end up\nin the Vec in the order they have been generated.

\n

If new_len is less than len, the Vec is simply truncated.

\n

This method uses a closure to create new values on every push. If\nyou’d rather Clone a given value, use Vec::resize. If you\nwant to use the Default trait to generate values, you can\npass Default::default as the second argument.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nvec.resize_with(5, Default::default);\nassert_eq!(vec, [1, 2, 3, 0, 0]);\n\nlet mut vec = vec![];\nlet mut p = 1;\nvec.resize_with(4, || { p *= 2; p });\nassert_eq!(vec, [2, 4, 8, 16]);
\n
1.47.0 · source

pub fn leak<'a>(self) -> &'a mut [T]
where\n A: 'a,

Consumes and leaks the Vec, returning a mutable reference to the contents,\n&'a mut [T]. Note that the type T must outlive the chosen lifetime\n'a. If the type has only static references, or none at all, then this\nmay be chosen to be 'static.

\n

As of Rust 1.57, this method does not reallocate or shrink the Vec,\nso the leaked allocation may include unused capacity that is not part\nof the returned slice.

\n

This function is mainly useful for data that lives for the remainder of\nthe program’s life. Dropping the returned reference will cause a memory\nleak.

\n
§Examples
\n

Simple usage:

\n\n
let x = vec![1, 2, 3];\nlet static_ref: &'static mut [usize] = x.leak();\nstatic_ref[0] += 1;\nassert_eq!(static_ref, &[2, 2, 3]);
\n
1.60.0 · source

pub fn spare_capacity_mut(&mut self) -> &mut [MaybeUninit<T>]

Returns the remaining spare capacity of the vector as a slice of\nMaybeUninit<T>.

\n

The returned slice can be used to fill the vector with data (e.g. by\nreading from a file) before marking the data as initialized using the\nset_len method.

\n
§Examples
\n
// Allocate vector big enough for 10 elements.\nlet mut v = Vec::with_capacity(10);\n\n// Fill in the first 3 elements.\nlet uninit = v.spare_capacity_mut();\nuninit[0].write(0);\nuninit[1].write(1);\nuninit[2].write(2);\n\n// Mark the first 3 elements of the vector as being initialized.\nunsafe {\n    v.set_len(3);\n}\n\nassert_eq!(&v, &[0, 1, 2]);
\n
source

pub fn split_at_spare_mut(&mut self) -> (&mut [T], &mut [MaybeUninit<T>])

🔬This is a nightly-only experimental API. (vec_split_at_spare)

Returns vector content as a slice of T, along with the remaining spare\ncapacity of the vector as a slice of MaybeUninit<T>.

\n

The returned spare capacity slice can be used to fill the vector with data\n(e.g. by reading from a file) before marking the data as initialized using\nthe set_len method.

\n

Note that this is a low-level API, which should be used with care for\noptimization purposes. If you need to append data to a Vec\nyou can use push, extend, extend_from_slice,\nextend_from_within, insert, append, resize or\nresize_with, depending on your exact needs.

\n
§Examples
\n
#![feature(vec_split_at_spare)]\n\nlet mut v = vec![1, 1, 2];\n\n// Reserve additional space big enough for 10 elements.\nv.reserve(10);\n\nlet (init, uninit) = v.split_at_spare_mut();\nlet sum = init.iter().copied().sum::<u32>();\n\n// Fill in the next 4 elements.\nuninit[0].write(sum);\nuninit[1].write(sum * 2);\nuninit[2].write(sum * 3);\nuninit[3].write(sum * 4);\n\n// Mark the 4 elements of the vector as being initialized.\nunsafe {\n    let len = v.len();\n    v.set_len(len + 4);\n}\n\nassert_eq!(&v, &[1, 1, 2, 4, 8, 12, 16]);
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> DerefPure for Vec<T, A>
where\n A: Allocator,

","DerefPure","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Eq for Vec<T, A>
where\n T: Eq,\n A: Allocator,

","Eq","redstone::core::aggregator::Matrix"]] +"redstone":[["
1.5.0 · source§

impl<T, A> AsMut<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn as_mut(&mut self) -> &mut [T]

Converts this type into a mutable reference of the (usually inferred) input type.
","AsMut<[T]>","redstone::core::aggregator::Matrix"],["
1.5.0 · source§

impl<T, A> AsMut<Vec<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn as_mut(&mut self) -> &mut Vec<T, A>

Converts this type into a mutable reference of the (usually inferred) input type.
","AsMut>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> AsRef<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn as_ref(&self) -> &[T]

Converts this type into a shared reference of the (usually inferred) input type.
","AsRef<[T]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> AsRef<Vec<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn as_ref(&self) -> &Vec<T, A>

Converts this type into a shared reference of the (usually inferred) input type.
","AsRef>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Borrow<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn borrow(&self) -> &[T]

Immutably borrows from an owned value. Read more
","Borrow<[T]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> BorrowMut<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn borrow_mut(&mut self) -> &mut [T]

Mutably borrows from an owned value. Read more
","BorrowMut<[T]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Clone for Vec<T, A>
where\n T: Clone,\n A: Allocator + Clone,

source§

fn clone_from(&mut self, source: &Vec<T, A>)

Overwrites the contents of self with a clone of the contents of source.

\n

This method is preferred over simply assigning source.clone() to self,\nas it avoids reallocation if possible. Additionally, if the element type\nT overrides clone_from(), this will reuse the resources of self’s\nelements as well.

\n
§Examples
\n
let x = vec![5, 6, 7];\nlet mut y = vec![8, 9, 10];\nlet yp: *const i32 = y.as_ptr();\n\ny.clone_from(&x);\n\n// The value is the same\nassert_eq!(x, y);\n\n// And no reallocation occurred\nassert_eq!(yp, y.as_ptr());
\n
source§

fn clone(&self) -> Vec<T, A>

Returns a copy of the value. Read more
","Clone","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Debug for Vec<T, A>
where\n T: Debug,\n A: Allocator,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T> Default for Vec<T>

source§

fn default() -> Vec<T>

Creates an empty Vec<T>.

\n

The vector will not allocate until elements are pushed onto it.

\n
","Default","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Deref for Vec<T, A>
where\n A: Allocator,

§

type Target = [T]

The resulting type after dereferencing.
source§

fn deref(&self) -> &[T]

Dereferences the value.
","Deref","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> DerefMut for Vec<T, A>
where\n A: Allocator,

source§

fn deref_mut(&mut self) -> &mut [T]

Mutably dereferences the value.
","DerefMut","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Drop for Vec<T, A>
where\n A: Allocator,

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
","Drop","redstone::core::aggregator::Matrix"],["
1.2.0 · source§

impl<'a, T, A> Extend<&'a T> for Vec<T, A>
where\n T: Copy + 'a,\n A: Allocator,

Extend implementation that copies elements out of references before pushing them onto the Vec.

\n

This implementation is specialized for slice iterators, where it uses copy_from_slice to\nappend the entire slice at once.

\n
source§

fn extend<I>(&mut self, iter: I)
where\n I: IntoIterator<Item = &'a T>,

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, _: &'a T)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
","Extend<&'a T>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Extend<T> for Vec<T, A>
where\n A: Allocator,

source§

fn extend<I>(&mut self, iter: I)
where\n I: IntoIterator<Item = T>,

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: T)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
","Extend","redstone::core::aggregator::Matrix"],["
source§

impl Flattened<<Std as NetworkSpecific>::BytesRepr> for Vec<Bytes>

","Flattened<::BytesRepr>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T> From<&[T]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &[T]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&[1, 2, 3][..]), vec![1, 2, 3]);
\n
","From<&[T]>","redstone::core::aggregator::Matrix"],["
1.74.0 · source§

impl<T, const N: usize> From<&[T; N]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &[T; N]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&[1, 2, 3]), vec![1, 2, 3]);
\n
","From<&[T; N]>","redstone::core::aggregator::Matrix"],["
1.19.0 · source§

impl<T> From<&mut [T]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &mut [T]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&mut [1, 2, 3][..]), vec![1, 2, 3]);
\n
","From<&mut [T]>","redstone::core::aggregator::Matrix"],["
1.74.0 · source§

impl<T, const N: usize> From<&mut [T; N]> for Vec<T>
where\n T: Clone,

source§

fn from(s: &mut [T; N]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
§Examples
\n
assert_eq!(Vec::from(&mut [1, 2, 3]), vec![1, 2, 3]);
\n
","From<&mut [T; N]>","redstone::core::aggregator::Matrix"],["
1.44.0 · source§

impl<T, const N: usize> From<[T; N]> for Vec<T>

source§

fn from(s: [T; N]) -> Vec<T>

Allocate a Vec<T> and move s’s items into it.

\n
§Examples
\n
assert_eq!(Vec::from([1, 2, 3]), vec![1, 2, 3]);
\n
","From<[T; N]>","redstone::core::aggregator::Matrix"],["
1.5.0 · source§

impl<T, A> From<BinaryHeap<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn from(heap: BinaryHeap<T, A>) -> Vec<T, A>

Converts a BinaryHeap<T> into a Vec<T>.

\n

This conversion requires no data movement or allocation, and has\nconstant time complexity.

\n
","From>","redstone::core::aggregator::Matrix"],["
1.18.0 · source§

impl<T, A> From<Box<[T], A>> for Vec<T, A>
where\n A: Allocator,

source§

fn from(s: Box<[T], A>) -> Vec<T, A>

Convert a boxed slice into a vector by transferring ownership of\nthe existing heap allocation.

\n
§Examples
\n
let b: Box<[i32]> = vec![1, 2, 3].into_boxed_slice();\nassert_eq!(Vec::from(b), vec![1, 2, 3]);
\n
","From>","redstone::core::aggregator::Matrix"],["
1.14.0 · source§

impl<'a, T> From<Cow<'a, [T]>> for Vec<T>
where\n [T]: ToOwned<Owned = Vec<T>>,

source§

fn from(s: Cow<'a, [T]>) -> Vec<T>

Convert a clone-on-write slice into a vector.

\n

If s already owns a Vec<T>, it will be returned directly.\nIf s is borrowing a slice, a new Vec<T> will be allocated and\nfilled by cloning s’s items into it.

\n
§Examples
\n
let o: Cow<'_, [i32]> = Cow::Owned(vec![1, 2, 3]);\nlet b: Cow<'_, [i32]> = Cow::Borrowed(&[1, 2, 3]);\nassert_eq!(Vec::from(o), Vec::from(b));
\n
","From>","redstone::core::aggregator::Matrix"],["
1.10.0 · source§

impl<T, A> From<VecDeque<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn from(other: VecDeque<T, A>) -> Vec<T, A>

Turn a VecDeque<T> into a Vec<T>.

\n

This never needs to re-allocate, but does need to do O(n) data movement if\nthe circular buffer doesn’t happen to be at the beginning of the allocation.

\n
§Examples
\n
use std::collections::VecDeque;\n\n// This one is *O*(1).\nlet deque: VecDeque<_> = (1..5).collect();\nlet ptr = deque.as_slices().0.as_ptr();\nlet vec = Vec::from(deque);\nassert_eq!(vec, [1, 2, 3, 4]);\nassert_eq!(vec.as_ptr(), ptr);\n\n// This one needs data rearranging.\nlet mut deque: VecDeque<_> = (1..5).collect();\ndeque.push_front(9);\ndeque.push_front(8);\nlet ptr = deque.as_slices().1.as_ptr();\nlet vec = Vec::from(deque);\nassert_eq!(vec, [8, 9, 1, 2, 3, 4]);\nassert_eq!(vec.as_ptr(), ptr);
\n
","From>","redstone::core::aggregator::Matrix"],["
source§

impl FromBytesRepr<Vec<u8>> for U256

source§

fn from_bytes_repr(bytes: Vec<u8>) -> Self

","FromBytesRepr>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T> FromIterator<T> for Vec<T>

Collects an iterator into a Vec, commonly called via Iterator::collect()

\n

§Allocation behavior

\n

In general Vec does not guarantee any particular growth or allocation strategy.\nThat also applies to this trait impl.

\n

Note: This section covers implementation details and is therefore exempt from\nstability guarantees.

\n

Vec may use any or none of the following strategies,\ndepending on the supplied iterator:

\n
    \n
  • preallocate based on Iterator::size_hint()\n
      \n
    • and panic if the number of items is outside the provided lower/upper bounds
    • \n
    \n
  • \n
  • use an amortized growth strategy similar to pushing one item at a time
  • \n
  • perform the iteration in-place on the original allocation backing the iterator
  • \n
\n

The last case warrants some attention. It is an optimization that in many cases reduces peak memory\nconsumption and improves cache locality. But when big, short-lived allocations are created,\nonly a small fraction of their items get collected, no further use is made of the spare capacity\nand the resulting Vec is moved into a longer-lived structure, then this can lead to the large\nallocations having their lifetimes unnecessarily extended which can result in increased memory\nfootprint.

\n

In cases where this is an issue, the excess capacity can be discarded with Vec::shrink_to(),\nVec::shrink_to_fit() or by collecting into Box<[T]> instead, which additionally reduces\nthe size of the long-lived struct.

\n\n
static LONG_LIVED: Mutex<Vec<Vec<u16>>> = Mutex::new(Vec::new());\n\nfor i in 0..10 {\n    let big_temporary: Vec<u16> = (0..1024).collect();\n    // discard most items\n    let mut result: Vec<_> = big_temporary.into_iter().filter(|i| i % 100 == 0).collect();\n    // without this a lot of unused capacity might be moved into the global\n    result.shrink_to_fit();\n    LONG_LIVED.lock().unwrap().push(result);\n}
\n
source§

fn from_iter<I>(iter: I) -> Vec<T>
where\n I: IntoIterator<Item = T>,

Creates a value from an iterator. Read more
","FromIterator","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Hash for Vec<T, A>
where\n T: Hash,\n A: Allocator,

The hash of a vector is the same as that of the corresponding slice,\nas required by the core::borrow::Borrow implementation.

\n\n
use std::hash::BuildHasher;\n\nlet b = std::hash::RandomState::new();\nlet v: Vec<u8> = vec![0xa8, 0x3c, 0x09];\nlet s: &[u8] = &[0xa8, 0x3c, 0x09];\nassert_eq!(b.hash_one(v), b.hash_one(s));
\n
source§

fn hash<H>(&self, state: &mut H)
where\n H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, I, A> Index<I> for Vec<T, A>
where\n I: SliceIndex<[T]>,\n A: Allocator,

§

type Output = <I as SliceIndex<[T]>>::Output

The returned type after indexing.
source§

fn index(&self, index: I) -> &<Vec<T, A> as Index<I>>::Output

Performs the indexing (container[index]) operation. Read more
","Index","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, I, A> IndexMut<I> for Vec<T, A>
where\n I: SliceIndex<[T]>,\n A: Allocator,

source§

fn index_mut(&mut self, index: I) -> &mut <Vec<T, A> as Index<I>>::Output

Performs the mutable indexing (container[index]) operation. Read more
","IndexMut","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> IntoIterator for Vec<T, A>
where\n A: Allocator,

source§

fn into_iter(self) -> <Vec<T, A> as IntoIterator>::IntoIter

Creates a consuming iterator, that is, one that moves each value out of\nthe vector (from start to end). The vector cannot be used after calling\nthis.

\n
§Examples
\n
let v = vec![\"a\".to_string(), \"b\".to_string()];\nlet mut v_iter = v.into_iter();\n\nlet first_element: Option<String> = v_iter.next();\n\nassert_eq!(first_element, Some(\"a\".to_string()));\nassert_eq!(v_iter.next(), Some(\"b\".to_string()));\nassert_eq!(v_iter.next(), None);
\n
§

type Item = T

The type of the elements being iterated over.
§

type IntoIter = IntoIter<T, A>

Which kind of iterator are we turning this into?
","IntoIterator","redstone::core::aggregator::Matrix"],["
source§

impl<T> Median for Vec<T>
where\n T: Copy + Ord + Avg,

§

type Item = T

source§

fn median(self) -> Self::Item

","Median","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Ord for Vec<T, A>
where\n T: Ord,\n A: Allocator,

Implements ordering of vectors, lexicographically.

\n
source§

fn cmp(&self, other: &Vec<T, A>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
","Ord","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A> PartialEq<&[U]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &&[U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&[U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&[U]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A, const N: usize> PartialEq<&[U; N]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &&[U; N]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&[U; N]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&[U; N]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A> PartialEq<&mut [U]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &&mut [U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&mut [U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&mut [U]>","redstone::core::aggregator::Matrix"],["
1.48.0 · source§

impl<T, U, A> PartialEq<[U]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &[U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &[U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<[U]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A, const N: usize> PartialEq<[U; N]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &[U; N]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &[U; N]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<[U; N]>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, U, A1, A2> PartialEq<Vec<U, A2>> for Vec<T, A1>
where\n A1: Allocator,\n A2: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &Vec<U, A2>) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &Vec<U, A2>) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq>","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A1, A2> PartialOrd<Vec<T, A2>> for Vec<T, A1>
where\n T: PartialOrd,\n A1: Allocator,\n A2: Allocator,

Implements comparison of vectors, lexicographically.

\n
source§

fn partial_cmp(&self, other: &Vec<T, A2>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <=\noperator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >=\noperator. Read more
","PartialOrd>","redstone::core::aggregator::Matrix"],["
source§

impl<T> Vec<T>

1.0.0 (const: 1.39.0) · source

pub const fn new() -> Vec<T>

Constructs a new, empty Vec<T>.

\n

The vector will not allocate until elements are pushed onto it.

\n
§Examples
\n
let mut vec: Vec<i32> = Vec::new();
\n
1.0.0 · source

pub fn with_capacity(capacity: usize) -> Vec<T>

Constructs a new, empty Vec<T> with at least the specified capacity.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n

It is important to note that although the returned vector has the\nminimum capacity specified, the vector will have a zero length. For\nan explanation of the difference between length and capacity, see\nCapacity and reallocation.

\n

If it is important to know the exact allocated capacity of a Vec,\nalways use the capacity method after construction.

\n

For Vec<T> where T is a zero-sized type, there will be no allocation\nand the capacity will always be usize::MAX.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = Vec::with_capacity(10);\n\n// The vector contains no items, even though it has capacity for more\nassert_eq!(vec.len(), 0);\nassert!(vec.capacity() >= 10);\n\n// These are all done without reallocating...\nfor i in 0..10 {\n    vec.push(i);\n}\nassert_eq!(vec.len(), 10);\nassert!(vec.capacity() >= 10);\n\n// ...but this may make the vector reallocate\nvec.push(11);\nassert_eq!(vec.len(), 11);\nassert!(vec.capacity() >= 11);\n\n// A vector of a zero-sized type will always over-allocate, since no\n// allocation is necessary\nlet vec_units = Vec::<()>::with_capacity(10);\nassert_eq!(vec_units.capacity(), usize::MAX);
\n
source

pub fn try_with_capacity(capacity: usize) -> Result<Vec<T>, TryReserveError>

🔬This is a nightly-only experimental API. (try_with_capacity)

Constructs a new, empty Vec<T> with at least the specified capacity.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n
§Errors
\n

Returns an error if the capacity exceeds isize::MAX bytes,\nor if the allocator reports allocation failure.

\n
1.0.0 · source

pub unsafe fn from_raw_parts(\n ptr: *mut T,\n length: usize,\n capacity: usize,\n) -> Vec<T>

Creates a Vec<T> directly from a pointer, a length, and a capacity.

\n
§Safety
\n

This is highly unsafe, due to the number of invariants that aren’t\nchecked:

\n
    \n
  • ptr must have been allocated using the global allocator, such as via\nthe alloc::alloc function.
  • \n
  • T needs to have the same alignment as what ptr was allocated with.\n(T having a less strict alignment is not sufficient, the alignment really\nneeds to be equal to satisfy the dealloc requirement that memory must be\nallocated and deallocated with the same layout.)
  • \n
  • The size of T times the capacity (ie. the allocated size in bytes) needs\nto be the same size as the pointer was allocated with. (Because similar to\nalignment, dealloc must be called with the same layout size.)
  • \n
  • length needs to be less than or equal to capacity.
  • \n
  • The first length values must be properly initialized values of type T.
  • \n
  • capacity needs to be the capacity that the pointer was allocated with.
  • \n
  • The allocated size in bytes must be no larger than isize::MAX.\nSee the safety documentation of pointer::offset.
  • \n
\n

These requirements are always upheld by any ptr that has been allocated\nvia Vec<T>. Other allocation sources are allowed if the invariants are\nupheld.

\n

Violating these may cause problems like corrupting the allocator’s\ninternal data structures. For example it is normally not safe\nto build a Vec<u8> from a pointer to a C char array with length\nsize_t, doing so is only safe if the array was initially allocated by\na Vec or String.\nIt’s also not safe to build one from a Vec<u16> and its length, because\nthe allocator cares about the alignment, and these two types have different\nalignments. The buffer was allocated with alignment 2 (for u16), but after\nturning it into a Vec<u8> it’ll be deallocated with alignment 1. To avoid\nthese issues, it is often preferable to do casting/transmuting using\nslice::from_raw_parts instead.

\n

The ownership of ptr is effectively transferred to the\nVec<T> which may then deallocate, reallocate or change the\ncontents of memory pointed to by the pointer at will. Ensure\nthat nothing else uses the pointer after calling this\nfunction.

\n
§Examples
\n
use std::ptr;\nuse std::mem;\n\nlet v = vec![1, 2, 3];\n\n// Prevent running `v`'s destructor so we are in complete control\n// of the allocation.\nlet mut v = mem::ManuallyDrop::new(v);\n\n// Pull out the various important pieces of information about `v`\nlet p = v.as_mut_ptr();\nlet len = v.len();\nlet cap = v.capacity();\n\nunsafe {\n    // Overwrite memory with 4, 5, 6\n    for i in 0..len {\n        ptr::write(p.add(i), 4 + i);\n    }\n\n    // Put everything back together into a Vec\n    let rebuilt = Vec::from_raw_parts(p, len, cap);\n    assert_eq!(rebuilt, [4, 5, 6]);\n}
\n

Using memory that was allocated elsewhere:

\n\n
use std::alloc::{alloc, Layout};\n\nfn main() {\n    let layout = Layout::array::<u32>(16).expect(\"overflow cannot happen\");\n\n    let vec = unsafe {\n        let mem = alloc(layout).cast::<u32>();\n        if mem.is_null() {\n            return;\n        }\n\n        mem.write(1_000_000);\n\n        Vec::from_raw_parts(mem, 1, 16)\n    };\n\n    assert_eq!(vec, &[1_000_000]);\n    assert_eq!(vec.capacity(), 16);\n}
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n T: Clone,\n A: Allocator,

1.5.0 · source

pub fn resize(&mut self, new_len: usize, value: T)

Resizes the Vec in-place so that len is equal to new_len.

\n

If new_len is greater than len, the Vec is extended by the\ndifference, with each additional slot filled with value.\nIf new_len is less than len, the Vec is simply truncated.

\n

This method requires T to implement Clone,\nin order to be able to clone the passed value.\nIf you need more flexibility (or want to rely on Default instead of\nClone), use Vec::resize_with.\nIf you only need to resize to a smaller size, use Vec::truncate.

\n
§Examples
\n
let mut vec = vec![\"hello\"];\nvec.resize(3, \"world\");\nassert_eq!(vec, [\"hello\", \"world\", \"world\"]);\n\nlet mut vec = vec![1, 2, 3, 4];\nvec.resize(2, 0);\nassert_eq!(vec, [1, 2]);
\n
1.6.0 · source

pub fn extend_from_slice(&mut self, other: &[T])

Clones and appends all elements in a slice to the Vec.

\n

Iterates over the slice other, clones each element, and then appends\nit to this Vec. The other slice is traversed in-order.

\n

Note that this function is same as extend except that it is\nspecialized to work with slices instead. If and when Rust gets\nspecialization this function will likely be deprecated (but still\navailable).

\n
§Examples
\n
let mut vec = vec![1];\nvec.extend_from_slice(&[2, 3, 4]);\nassert_eq!(vec, [1, 2, 3, 4]);
\n
1.53.0 · source

pub fn extend_from_within<R>(&mut self, src: R)
where\n R: RangeBounds<usize>,

Copies elements from src range to the end of the vector.

\n
§Panics
\n

Panics if the starting point is greater than the end point or if\nthe end point is greater than the length of the vector.

\n
§Examples
\n
let mut vec = vec![0, 1, 2, 3, 4];\n\nvec.extend_from_within(2..);\nassert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4]);\n\nvec.extend_from_within(..2);\nassert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4, 0, 1]);\n\nvec.extend_from_within(4..8);\nassert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4, 0, 1, 4, 2, 3, 4]);
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n T: PartialEq,\n A: Allocator,

1.0.0 · source

pub fn dedup(&mut self)

Removes consecutive repeated elements in the vector according to the\nPartialEq trait implementation.

\n

If the vector is sorted, this removes all duplicates.

\n
§Examples
\n
let mut vec = vec![1, 2, 2, 3, 2];\n\nvec.dedup();\n\nassert_eq!(vec, [1, 2, 3, 2]);
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n A: Allocator,

1.21.0 · source

pub fn splice<R, I>(\n &mut self,\n range: R,\n replace_with: I,\n) -> Splice<'_, <I as IntoIterator>::IntoIter, A>
where\n R: RangeBounds<usize>,\n I: IntoIterator<Item = T>,

Creates a splicing iterator that replaces the specified range in the vector\nwith the given replace_with iterator and yields the removed items.\nreplace_with does not need to be the same length as range.

\n

range is removed even if the iterator is not consumed until the end.

\n

It is unspecified how many elements are removed from the vector\nif the Splice value is leaked.

\n

The input iterator replace_with is only consumed when the Splice value is dropped.

\n

This is optimal if:

\n
    \n
  • The tail (elements in the vector after range) is empty,
  • \n
  • or replace_with yields fewer or equal elements than range’s length
  • \n
  • or the lower bound of its size_hint() is exact.
  • \n
\n

Otherwise, a temporary vector is allocated and the tail is moved twice.

\n
§Panics
\n

Panics if the starting point is greater than the end point or if\nthe end point is greater than the length of the vector.

\n
§Examples
\n
let mut v = vec![1, 2, 3, 4];\nlet new = [7, 8, 9];\nlet u: Vec<_> = v.splice(1..3, new).collect();\nassert_eq!(v, &[1, 7, 8, 9, 4]);\nassert_eq!(u, &[2, 3]);
\n
source

pub fn extract_if<F>(&mut self, filter: F) -> ExtractIf<'_, T, F, A>
where\n F: FnMut(&mut T) -> bool,

🔬This is a nightly-only experimental API. (extract_if)

Creates an iterator which uses a closure to determine if an element should be removed.

\n

If the closure returns true, then the element is removed and yielded.\nIf the closure returns false, the element will remain in the vector and will not be yielded\nby the iterator.

\n

If the returned ExtractIf is not exhausted, e.g. because it is dropped without iterating\nor the iteration short-circuits, then the remaining elements will be retained.\nUse retain with a negated predicate if you do not need the returned iterator.

\n

Using this method is equivalent to the following code:

\n\n
let mut i = 0;\nwhile i < vec.len() {\n    if some_predicate(&mut vec[i]) {\n        let val = vec.remove(i);\n        // your code here\n    } else {\n        i += 1;\n    }\n}\n
\n

But extract_if is easier to use. extract_if is also more efficient,\nbecause it can backshift the elements of the array in bulk.

\n

Note that extract_if also lets you mutate every element in the filter closure,\nregardless of whether you choose to keep or remove it.

\n
§Examples
\n

Splitting an array into evens and odds, reusing the original allocation:

\n\n
#![feature(extract_if)]\nlet mut numbers = vec![1, 2, 3, 4, 5, 6, 8, 9, 11, 13, 14, 15];\n\nlet evens = numbers.extract_if(|x| *x % 2 == 0).collect::<Vec<_>>();\nlet odds = numbers;\n\nassert_eq!(evens, vec![2, 4, 6, 8, 14]);\nassert_eq!(odds, vec![1, 3, 5, 9, 11, 13, 15]);
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> Vec<T, A>
where\n A: Allocator,

source

pub const fn new_in(alloc: A) -> Vec<T, A>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new, empty Vec<T, A>.

\n

The vector will not allocate until elements are pushed onto it.

\n
§Examples
\n
#![feature(allocator_api)]\n\nuse std::alloc::System;\n\nlet mut vec: Vec<i32, _> = Vec::new_in(System);
\n
source

pub fn with_capacity_in(capacity: usize, alloc: A) -> Vec<T, A>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new, empty Vec<T, A> with at least the specified capacity\nwith the provided allocator.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n

It is important to note that although the returned vector has the\nminimum capacity specified, the vector will have a zero length. For\nan explanation of the difference between length and capacity, see\nCapacity and reallocation.

\n

If it is important to know the exact allocated capacity of a Vec,\nalways use the capacity method after construction.

\n

For Vec<T, A> where T is a zero-sized type, there will be no allocation\nand the capacity will always be usize::MAX.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
#![feature(allocator_api)]\n\nuse std::alloc::System;\n\nlet mut vec = Vec::with_capacity_in(10, System);\n\n// The vector contains no items, even though it has capacity for more\nassert_eq!(vec.len(), 0);\nassert!(vec.capacity() >= 10);\n\n// These are all done without reallocating...\nfor i in 0..10 {\n    vec.push(i);\n}\nassert_eq!(vec.len(), 10);\nassert!(vec.capacity() >= 10);\n\n// ...but this may make the vector reallocate\nvec.push(11);\nassert_eq!(vec.len(), 11);\nassert!(vec.capacity() >= 11);\n\n// A vector of a zero-sized type will always over-allocate, since no\n// allocation is necessary\nlet vec_units = Vec::<(), System>::with_capacity_in(10, System);\nassert_eq!(vec_units.capacity(), usize::MAX);
\n
source

pub fn try_with_capacity_in(\n capacity: usize,\n alloc: A,\n) -> Result<Vec<T, A>, TryReserveError>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new, empty Vec<T, A> with at least the specified capacity\nwith the provided allocator.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n
§Errors
\n

Returns an error if the capacity exceeds isize::MAX bytes,\nor if the allocator reports allocation failure.

\n
source

pub unsafe fn from_raw_parts_in(\n ptr: *mut T,\n length: usize,\n capacity: usize,\n alloc: A,\n) -> Vec<T, A>

🔬This is a nightly-only experimental API. (allocator_api)

Creates a Vec<T, A> directly from a pointer, a length, a capacity,\nand an allocator.

\n
§Safety
\n

This is highly unsafe, due to the number of invariants that aren’t\nchecked:

\n
    \n
  • ptr must be currently allocated via the given allocator alloc.
  • \n
  • T needs to have the same alignment as what ptr was allocated with.\n(T having a less strict alignment is not sufficient, the alignment really\nneeds to be equal to satisfy the dealloc requirement that memory must be\nallocated and deallocated with the same layout.)
  • \n
  • The size of T times the capacity (ie. the allocated size in bytes) needs\nto be the same size as the pointer was allocated with. (Because similar to\nalignment, dealloc must be called with the same layout size.)
  • \n
  • length needs to be less than or equal to capacity.
  • \n
  • The first length values must be properly initialized values of type T.
  • \n
  • capacity needs to fit the layout size that the pointer was allocated with.
  • \n
  • The allocated size in bytes must be no larger than isize::MAX.\nSee the safety documentation of pointer::offset.
  • \n
\n

These requirements are always upheld by any ptr that has been allocated\nvia Vec<T, A>. Other allocation sources are allowed if the invariants are\nupheld.

\n

Violating these may cause problems like corrupting the allocator’s\ninternal data structures. For example it is not safe\nto build a Vec<u8> from a pointer to a C char array with length size_t.\nIt’s also not safe to build one from a Vec<u16> and its length, because\nthe allocator cares about the alignment, and these two types have different\nalignments. The buffer was allocated with alignment 2 (for u16), but after\nturning it into a Vec<u8> it’ll be deallocated with alignment 1.

\n

The ownership of ptr is effectively transferred to the\nVec<T> which may then deallocate, reallocate or change the\ncontents of memory pointed to by the pointer at will. Ensure\nthat nothing else uses the pointer after calling this\nfunction.

\n
§Examples
\n
#![feature(allocator_api)]\n\nuse std::alloc::System;\n\nuse std::ptr;\nuse std::mem;\n\nlet mut v = Vec::with_capacity_in(3, System);\nv.push(1);\nv.push(2);\nv.push(3);\n\n// Prevent running `v`'s destructor so we are in complete control\n// of the allocation.\nlet mut v = mem::ManuallyDrop::new(v);\n\n// Pull out the various important pieces of information about `v`\nlet p = v.as_mut_ptr();\nlet len = v.len();\nlet cap = v.capacity();\nlet alloc = v.allocator();\n\nunsafe {\n    // Overwrite memory with 4, 5, 6\n    for i in 0..len {\n        ptr::write(p.add(i), 4 + i);\n    }\n\n    // Put everything back together into a Vec\n    let rebuilt = Vec::from_raw_parts_in(p, len, cap, alloc.clone());\n    assert_eq!(rebuilt, [4, 5, 6]);\n}
\n

Using memory that was allocated elsewhere:

\n\n
#![feature(allocator_api)]\n\nuse std::alloc::{AllocError, Allocator, Global, Layout};\n\nfn main() {\n    let layout = Layout::array::<u32>(16).expect(\"overflow cannot happen\");\n\n    let vec = unsafe {\n        let mem = match Global.allocate(layout) {\n            Ok(mem) => mem.cast::<u32>().as_ptr(),\n            Err(AllocError) => return,\n        };\n\n        mem.write(1_000_000);\n\n        Vec::from_raw_parts_in(mem, 1, 16, Global)\n    };\n\n    assert_eq!(vec, &[1_000_000]);\n    assert_eq!(vec.capacity(), 16);\n}
\n
source

pub fn into_raw_parts(self) -> (*mut T, usize, usize)

🔬This is a nightly-only experimental API. (vec_into_raw_parts)

Decomposes a Vec<T> into its raw components: (pointer, length, capacity).

\n

Returns the raw pointer to the underlying data, the length of\nthe vector (in elements), and the allocated capacity of the\ndata (in elements). These are the same arguments in the same\norder as the arguments to from_raw_parts.

\n

After calling this function, the caller is responsible for the\nmemory previously managed by the Vec. The only way to do\nthis is to convert the raw pointer, length, and capacity back\ninto a Vec with the from_raw_parts function, allowing\nthe destructor to perform the cleanup.

\n
§Examples
\n
#![feature(vec_into_raw_parts)]\nlet v: Vec<i32> = vec![-1, 0, 1];\n\nlet (ptr, len, cap) = v.into_raw_parts();\n\nlet rebuilt = unsafe {\n    // We can now make changes to the components, such as\n    // transmuting the raw pointer to a compatible type.\n    let ptr = ptr as *mut u32;\n\n    Vec::from_raw_parts(ptr, len, cap)\n};\nassert_eq!(rebuilt, [4294967295, 0, 1]);
\n
source

pub fn into_raw_parts_with_alloc(self) -> (*mut T, usize, usize, A)

🔬This is a nightly-only experimental API. (allocator_api)

Decomposes a Vec<T> into its raw components: (pointer, length, capacity, allocator).

\n

Returns the raw pointer to the underlying data, the length of the vector (in elements),\nthe allocated capacity of the data (in elements), and the allocator. These are the same\narguments in the same order as the arguments to from_raw_parts_in.

\n

After calling this function, the caller is responsible for the\nmemory previously managed by the Vec. The only way to do\nthis is to convert the raw pointer, length, and capacity back\ninto a Vec with the from_raw_parts_in function, allowing\nthe destructor to perform the cleanup.

\n
§Examples
\n
#![feature(allocator_api, vec_into_raw_parts)]\n\nuse std::alloc::System;\n\nlet mut v: Vec<i32, System> = Vec::new_in(System);\nv.push(-1);\nv.push(0);\nv.push(1);\n\nlet (ptr, len, cap, alloc) = v.into_raw_parts_with_alloc();\n\nlet rebuilt = unsafe {\n    // We can now make changes to the components, such as\n    // transmuting the raw pointer to a compatible type.\n    let ptr = ptr as *mut u32;\n\n    Vec::from_raw_parts_in(ptr, len, cap, alloc)\n};\nassert_eq!(rebuilt, [4294967295, 0, 1]);
\n
1.0.0 · source

pub fn capacity(&self) -> usize

Returns the total number of elements the vector can hold without\nreallocating.

\n
§Examples
\n
let mut vec: Vec<i32> = Vec::with_capacity(10);\nvec.push(42);\nassert!(vec.capacity() >= 10);
\n
1.0.0 · source

pub fn reserve(&mut self, additional: usize)

Reserves capacity for at least additional more elements to be inserted\nin the given Vec<T>. The collection may reserve more space to\nspeculatively avoid frequent reallocations. After calling reserve,\ncapacity will be greater than or equal to self.len() + additional.\nDoes nothing if capacity is already sufficient.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1];\nvec.reserve(10);\nassert!(vec.capacity() >= 11);
\n
1.0.0 · source

pub fn reserve_exact(&mut self, additional: usize)

Reserves the minimum capacity for at least additional more elements to\nbe inserted in the given Vec<T>. Unlike reserve, this will not\ndeliberately over-allocate to speculatively avoid frequent allocations.\nAfter calling reserve_exact, capacity will be greater than or equal to\nself.len() + additional. Does nothing if the capacity is already\nsufficient.

\n

Note that the allocator may give the collection more space than it\nrequests. Therefore, capacity can not be relied upon to be precisely\nminimal. Prefer reserve if future insertions are expected.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1];\nvec.reserve_exact(10);\nassert!(vec.capacity() >= 11);
\n
1.57.0 · source

pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>

Tries to reserve capacity for at least additional more elements to be inserted\nin the given Vec<T>. The collection may reserve more space to speculatively avoid\nfrequent reallocations. After calling try_reserve, capacity will be\ngreater than or equal to self.len() + additional if it returns\nOk(()). Does nothing if capacity is already sufficient. This method\npreserves the contents even if an error occurs.

\n
§Errors
\n

If the capacity overflows, or the allocator reports a failure, then an error\nis returned.

\n
§Examples
\n
use std::collections::TryReserveError;\n\nfn process_data(data: &[u32]) -> Result<Vec<u32>, TryReserveError> {\n    let mut output = Vec::new();\n\n    // Pre-reserve the memory, exiting if we can't\n    output.try_reserve(data.len())?;\n\n    // Now we know this can't OOM in the middle of our complex work\n    output.extend(data.iter().map(|&val| {\n        val * 2 + 5 // very complicated\n    }));\n\n    Ok(output)\n}
\n
1.57.0 · source

pub fn try_reserve_exact(\n &mut self,\n additional: usize,\n) -> Result<(), TryReserveError>

Tries to reserve the minimum capacity for at least additional\nelements to be inserted in the given Vec<T>. Unlike try_reserve,\nthis will not deliberately over-allocate to speculatively avoid frequent\nallocations. After calling try_reserve_exact, capacity will be greater\nthan or equal to self.len() + additional if it returns Ok(()).\nDoes nothing if the capacity is already sufficient.

\n

Note that the allocator may give the collection more space than it\nrequests. Therefore, capacity can not be relied upon to be precisely\nminimal. Prefer try_reserve if future insertions are expected.

\n
§Errors
\n

If the capacity overflows, or the allocator reports a failure, then an error\nis returned.

\n
§Examples
\n
use std::collections::TryReserveError;\n\nfn process_data(data: &[u32]) -> Result<Vec<u32>, TryReserveError> {\n    let mut output = Vec::new();\n\n    // Pre-reserve the memory, exiting if we can't\n    output.try_reserve_exact(data.len())?;\n\n    // Now we know this can't OOM in the middle of our complex work\n    output.extend(data.iter().map(|&val| {\n        val * 2 + 5 // very complicated\n    }));\n\n    Ok(output)\n}
\n
1.0.0 · source

pub fn shrink_to_fit(&mut self)

Shrinks the capacity of the vector as much as possible.

\n

The behavior of this method depends on the allocator, which may either shrink the vector\nin-place or reallocate. The resulting vector might still have some excess capacity, just as\nis the case for with_capacity. See Allocator::shrink for more details.

\n
§Examples
\n
let mut vec = Vec::with_capacity(10);\nvec.extend([1, 2, 3]);\nassert!(vec.capacity() >= 10);\nvec.shrink_to_fit();\nassert!(vec.capacity() >= 3);
\n
1.56.0 · source

pub fn shrink_to(&mut self, min_capacity: usize)

Shrinks the capacity of the vector with a lower bound.

\n

The capacity will remain at least as large as both the length\nand the supplied value.

\n

If the current capacity is less than the lower limit, this is a no-op.

\n
§Examples
\n
let mut vec = Vec::with_capacity(10);\nvec.extend([1, 2, 3]);\nassert!(vec.capacity() >= 10);\nvec.shrink_to(4);\nassert!(vec.capacity() >= 4);\nvec.shrink_to(0);\nassert!(vec.capacity() >= 3);
\n
1.0.0 · source

pub fn into_boxed_slice(self) -> Box<[T], A>

Converts the vector into Box<[T]>.

\n

Before doing the conversion, this method discards excess capacity like shrink_to_fit.

\n
§Examples
\n
let v = vec![1, 2, 3];\n\nlet slice = v.into_boxed_slice();
\n

Any excess capacity is removed:

\n\n
let mut vec = Vec::with_capacity(10);\nvec.extend([1, 2, 3]);\n\nassert!(vec.capacity() >= 10);\nlet slice = vec.into_boxed_slice();\nassert_eq!(slice.into_vec().capacity(), 3);
\n
1.0.0 · source

pub fn truncate(&mut self, len: usize)

Shortens the vector, keeping the first len elements and dropping\nthe rest.

\n

If len is greater or equal to the vector’s current length, this has\nno effect.

\n

The drain method can emulate truncate, but causes the excess\nelements to be returned instead of dropped.

\n

Note that this method has no effect on the allocated capacity\nof the vector.

\n
§Examples
\n

Truncating a five element vector to two elements:

\n\n
let mut vec = vec![1, 2, 3, 4, 5];\nvec.truncate(2);\nassert_eq!(vec, [1, 2]);
\n

No truncation occurs when len is greater than the vector’s current\nlength:

\n\n
let mut vec = vec![1, 2, 3];\nvec.truncate(8);\nassert_eq!(vec, [1, 2, 3]);
\n

Truncating when len == 0 is equivalent to calling the clear\nmethod.

\n\n
let mut vec = vec![1, 2, 3];\nvec.truncate(0);\nassert_eq!(vec, []);
\n
1.7.0 · source

pub fn as_slice(&self) -> &[T]

Extracts a slice containing the entire vector.

\n

Equivalent to &s[..].

\n
§Examples
\n
use std::io::{self, Write};\nlet buffer = vec![1, 2, 3, 5, 8];\nio::sink().write(buffer.as_slice()).unwrap();
\n
1.7.0 · source

pub fn as_mut_slice(&mut self) -> &mut [T]

Extracts a mutable slice of the entire vector.

\n

Equivalent to &mut s[..].

\n
§Examples
\n
use std::io::{self, Read};\nlet mut buffer = vec![0; 3];\nio::repeat(0b101).read_exact(buffer.as_mut_slice()).unwrap();
\n
1.37.0 · source

pub fn as_ptr(&self) -> *const T

Returns a raw pointer to the vector’s buffer, or a dangling raw pointer\nvalid for zero sized reads if the vector didn’t allocate.

\n

The caller must ensure that the vector outlives the pointer this\nfunction returns, or else it will end up pointing to garbage.\nModifying the vector may cause its buffer to be reallocated,\nwhich would also make any pointers to it invalid.

\n

The caller must also ensure that the memory the pointer (non-transitively) points to\nis never written to (except inside an UnsafeCell) using this pointer or any pointer\nderived from it. If you need to mutate the contents of the slice, use as_mut_ptr.

\n

This method guarantees that for the purpose of the aliasing model, this method\ndoes not materialize a reference to the underlying slice, and thus the returned pointer\nwill remain valid when mixed with other calls to as_ptr and as_mut_ptr.\nNote that calling other methods that materialize mutable references to the slice,\nor mutable references to specific elements you are planning on accessing through this pointer,\nas well as writing to those elements, may still invalidate this pointer.\nSee the second example below for how this guarantee can be used.

\n
§Examples
\n
let x = vec![1, 2, 4];\nlet x_ptr = x.as_ptr();\n\nunsafe {\n    for i in 0..x.len() {\n        assert_eq!(*x_ptr.add(i), 1 << i);\n    }\n}
\n

Due to the aliasing guarantee, the following code is legal:

\n\n
unsafe {\n    let mut v = vec![0, 1, 2];\n    let ptr1 = v.as_ptr();\n    let _ = ptr1.read();\n    let ptr2 = v.as_mut_ptr().offset(2);\n    ptr2.write(2);\n    // Notably, the write to `ptr2` did *not* invalidate `ptr1`\n    // because it mutated a different element:\n    let _ = ptr1.read();\n}
\n
1.37.0 · source

pub fn as_mut_ptr(&mut self) -> *mut T

Returns an unsafe mutable pointer to the vector’s buffer, or a dangling\nraw pointer valid for zero sized reads if the vector didn’t allocate.

\n

The caller must ensure that the vector outlives the pointer this\nfunction returns, or else it will end up pointing to garbage.\nModifying the vector may cause its buffer to be reallocated,\nwhich would also make any pointers to it invalid.

\n

This method guarantees that for the purpose of the aliasing model, this method\ndoes not materialize a reference to the underlying slice, and thus the returned pointer\nwill remain valid when mixed with other calls to as_ptr and as_mut_ptr.\nNote that calling other methods that materialize references to the slice,\nor references to specific elements you are planning on accessing through this pointer,\nmay still invalidate this pointer.\nSee the second example below for how this guarantee can be used.

\n
§Examples
\n
// Allocate vector big enough for 4 elements.\nlet size = 4;\nlet mut x: Vec<i32> = Vec::with_capacity(size);\nlet x_ptr = x.as_mut_ptr();\n\n// Initialize elements via raw pointer writes, then set length.\nunsafe {\n    for i in 0..size {\n        *x_ptr.add(i) = i as i32;\n    }\n    x.set_len(size);\n}\nassert_eq!(&*x, &[0, 1, 2, 3]);
\n

Due to the aliasing guarantee, the following code is legal:

\n\n
unsafe {\n    let mut v = vec![0];\n    let ptr1 = v.as_mut_ptr();\n    ptr1.write(1);\n    let ptr2 = v.as_mut_ptr();\n    ptr2.write(2);\n    // Notably, the write to `ptr2` did *not* invalidate `ptr1`:\n    ptr1.write(3);\n}
\n
source

pub fn allocator(&self) -> &A

🔬This is a nightly-only experimental API. (allocator_api)

Returns a reference to the underlying allocator.

\n
1.0.0 · source

pub unsafe fn set_len(&mut self, new_len: usize)

Forces the length of the vector to new_len.

\n

This is a low-level operation that maintains none of the normal\ninvariants of the type. Normally changing the length of a vector\nis done using one of the safe operations instead, such as\ntruncate, resize, extend, or clear.

\n
§Safety
\n
    \n
  • new_len must be less than or equal to capacity().
  • \n
  • The elements at old_len..new_len must be initialized.
  • \n
\n
§Examples
\n

This method can be useful for situations in which the vector\nis serving as a buffer for other code, particularly over FFI:

\n\n
pub fn get_dictionary(&self) -> Option<Vec<u8>> {\n    // Per the FFI method's docs, \"32768 bytes is always enough\".\n    let mut dict = Vec::with_capacity(32_768);\n    let mut dict_length = 0;\n    // SAFETY: When `deflateGetDictionary` returns `Z_OK`, it holds that:\n    // 1. `dict_length` elements were initialized.\n    // 2. `dict_length` <= the capacity (32_768)\n    // which makes `set_len` safe to call.\n    unsafe {\n        // Make the FFI call...\n        let r = deflateGetDictionary(self.strm, dict.as_mut_ptr(), &mut dict_length);\n        if r == Z_OK {\n            // ...and update the length to what was initialized.\n            dict.set_len(dict_length);\n            Some(dict)\n        } else {\n            None\n        }\n    }\n}
\n

While the following example is sound, there is a memory leak since\nthe inner vectors were not freed prior to the set_len call:

\n\n
let mut vec = vec![vec![1, 0, 0],\n                   vec![0, 1, 0],\n                   vec![0, 0, 1]];\n// SAFETY:\n// 1. `old_len..0` is empty so no elements need to be initialized.\n// 2. `0 <= capacity` always holds whatever `capacity` is.\nunsafe {\n    vec.set_len(0);\n}
\n

Normally, here, one would use clear instead to correctly drop\nthe contents and thus not leak memory.

\n
1.0.0 · source

pub fn swap_remove(&mut self, index: usize) -> T

Removes an element from the vector and returns it.

\n

The removed element is replaced by the last element of the vector.

\n

This does not preserve ordering of the remaining elements, but is O(1).\nIf you need to preserve the element order, use remove instead.

\n
§Panics
\n

Panics if index is out of bounds.

\n
§Examples
\n
let mut v = vec![\"foo\", \"bar\", \"baz\", \"qux\"];\n\nassert_eq!(v.swap_remove(1), \"bar\");\nassert_eq!(v, [\"foo\", \"qux\", \"baz\"]);\n\nassert_eq!(v.swap_remove(0), \"foo\");\nassert_eq!(v, [\"baz\", \"qux\"]);
\n
1.0.0 · source

pub fn insert(&mut self, index: usize, element: T)

Inserts an element at position index within the vector, shifting all\nelements after it to the right.

\n
§Panics
\n

Panics if index > len.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nvec.insert(1, 4);\nassert_eq!(vec, [1, 4, 2, 3]);\nvec.insert(4, 5);\nassert_eq!(vec, [1, 4, 2, 3, 5]);
\n
§Time complexity
\n

Takes O(Vec::len) time. All items after the insertion index must be\nshifted to the right. In the worst case, all elements are shifted when\nthe insertion index is 0.

\n
1.0.0 · source

pub fn remove(&mut self, index: usize) -> T

Removes and returns the element at position index within the vector,\nshifting all elements after it to the left.

\n

Note: Because this shifts over the remaining elements, it has a\nworst-case performance of O(n). If you don’t need the order of elements\nto be preserved, use swap_remove instead. If you’d like to remove\nelements from the beginning of the Vec, consider using\nVecDeque::pop_front instead.

\n
§Panics
\n

Panics if index is out of bounds.

\n
§Examples
\n
let mut v = vec![1, 2, 3];\nassert_eq!(v.remove(1), 2);\nassert_eq!(v, [1, 3]);
\n
1.0.0 · source

pub fn retain<F>(&mut self, f: F)
where\n F: FnMut(&T) -> bool,

Retains only the elements specified by the predicate.

\n

In other words, remove all elements e for which f(&e) returns false.\nThis method operates in place, visiting each element exactly once in the\noriginal order, and preserves the order of the retained elements.

\n
§Examples
\n
let mut vec = vec![1, 2, 3, 4];\nvec.retain(|&x| x % 2 == 0);\nassert_eq!(vec, [2, 4]);
\n

Because the elements are visited exactly once in the original order,\nexternal state may be used to decide which elements to keep.

\n\n
let mut vec = vec![1, 2, 3, 4, 5];\nlet keep = [false, true, true, false, true];\nlet mut iter = keep.iter();\nvec.retain(|_| *iter.next().unwrap());\nassert_eq!(vec, [2, 3, 5]);
\n
1.61.0 · source

pub fn retain_mut<F>(&mut self, f: F)
where\n F: FnMut(&mut T) -> bool,

Retains only the elements specified by the predicate, passing a mutable reference to it.

\n

In other words, remove all elements e such that f(&mut e) returns false.\nThis method operates in place, visiting each element exactly once in the\noriginal order, and preserves the order of the retained elements.

\n
§Examples
\n
let mut vec = vec![1, 2, 3, 4];\nvec.retain_mut(|x| if *x <= 3 {\n    *x += 1;\n    true\n} else {\n    false\n});\nassert_eq!(vec, [2, 3, 4]);
\n
1.16.0 · source

pub fn dedup_by_key<F, K>(&mut self, key: F)
where\n F: FnMut(&mut T) -> K,\n K: PartialEq,

Removes all but the first of consecutive elements in the vector that resolve to the same\nkey.

\n

If the vector is sorted, this removes all duplicates.

\n
§Examples
\n
let mut vec = vec![10, 20, 21, 30, 20];\n\nvec.dedup_by_key(|i| *i / 10);\n\nassert_eq!(vec, [10, 20, 30, 20]);
\n
1.16.0 · source

pub fn dedup_by<F>(&mut self, same_bucket: F)
where\n F: FnMut(&mut T, &mut T) -> bool,

Removes all but the first of consecutive elements in the vector satisfying a given equality\nrelation.

\n

The same_bucket function is passed references to two elements from the vector and\nmust determine if the elements compare equal. The elements are passed in opposite order\nfrom their order in the slice, so if same_bucket(a, b) returns true, a is removed.

\n

If the vector is sorted, this removes all duplicates.

\n
§Examples
\n
let mut vec = vec![\"foo\", \"bar\", \"Bar\", \"baz\", \"bar\"];\n\nvec.dedup_by(|a, b| a.eq_ignore_ascii_case(b));\n\nassert_eq!(vec, [\"foo\", \"bar\", \"baz\", \"bar\"]);
\n
1.0.0 · source

pub fn push(&mut self, value: T)

Appends an element to the back of a collection.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1, 2];\nvec.push(3);\nassert_eq!(vec, [1, 2, 3]);
\n
§Time complexity
\n

Takes amortized O(1) time. If the vector’s length would exceed its\ncapacity after the push, O(capacity) time is taken to copy the\nvector’s elements to a larger allocation. This expensive operation is\noffset by the capacity O(1) insertions it allows.

\n
source

pub fn push_within_capacity(&mut self, value: T) -> Result<(), T>

🔬This is a nightly-only experimental API. (vec_push_within_capacity)

Appends an element if there is sufficient spare capacity, otherwise an error is returned\nwith the element.

\n

Unlike push this method will not reallocate when there’s insufficient capacity.\nThe caller should use reserve or try_reserve to ensure that there is enough capacity.

\n
§Examples
\n

A manual, panic-free alternative to FromIterator:

\n\n
#![feature(vec_push_within_capacity)]\n\nuse std::collections::TryReserveError;\nfn from_iter_fallible<T>(iter: impl Iterator<Item=T>) -> Result<Vec<T>, TryReserveError> {\n    let mut vec = Vec::new();\n    for value in iter {\n        if let Err(value) = vec.push_within_capacity(value) {\n            vec.try_reserve(1)?;\n            // this cannot fail, the previous line either returned or added at least 1 free slot\n            let _ = vec.push_within_capacity(value);\n        }\n    }\n    Ok(vec)\n}\nassert_eq!(from_iter_fallible(0..100), Ok(Vec::from_iter(0..100)));
\n
§Time complexity
\n

Takes O(1) time.

\n
1.0.0 · source

pub fn pop(&mut self) -> Option<T>

Removes the last element from a vector and returns it, or None if it\nis empty.

\n

If you’d like to pop the first element, consider using\nVecDeque::pop_front instead.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nassert_eq!(vec.pop(), Some(3));\nassert_eq!(vec, [1, 2]);
\n
§Time complexity
\n

Takes O(1) time.

\n
source

pub fn pop_if<F>(&mut self, f: F) -> Option<T>
where\n F: FnOnce(&mut T) -> bool,

🔬This is a nightly-only experimental API. (vec_pop_if)

Removes and returns the last element in a vector if the predicate\nreturns true, or None if the predicate returns false or the vector\nis empty.

\n
§Examples
\n
#![feature(vec_pop_if)]\n\nlet mut vec = vec![1, 2, 3, 4];\nlet pred = |x: &mut i32| *x % 2 == 0;\n\nassert_eq!(vec.pop_if(pred), Some(4));\nassert_eq!(vec, [1, 2, 3]);\nassert_eq!(vec.pop_if(pred), None);
\n
1.4.0 · source

pub fn append(&mut self, other: &mut Vec<T, A>)

Moves all the elements of other into self, leaving other empty.

\n
§Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nlet mut vec2 = vec![4, 5, 6];\nvec.append(&mut vec2);\nassert_eq!(vec, [1, 2, 3, 4, 5, 6]);\nassert_eq!(vec2, []);
\n
1.6.0 · source

pub fn drain<R>(&mut self, range: R) -> Drain<'_, T, A>
where\n R: RangeBounds<usize>,

Removes the specified range from the vector in bulk, returning all\nremoved elements as an iterator. If the iterator is dropped before\nbeing fully consumed, it drops the remaining removed elements.

\n

The returned iterator keeps a mutable borrow on the vector to optimize\nits implementation.

\n
§Panics
\n

Panics if the starting point is greater than the end point or if\nthe end point is greater than the length of the vector.

\n
§Leaking
\n

If the returned iterator goes out of scope without being dropped (due to\nmem::forget, for example), the vector may have lost and leaked\nelements arbitrarily, including elements outside the range.

\n
§Examples
\n
let mut v = vec![1, 2, 3];\nlet u: Vec<_> = v.drain(1..).collect();\nassert_eq!(v, &[1]);\nassert_eq!(u, &[2, 3]);\n\n// A full range clears the vector, like `clear()` does\nv.drain(..);\nassert_eq!(v, &[]);
\n
1.0.0 · source

pub fn clear(&mut self)

Clears the vector, removing all values.

\n

Note that this method has no effect on the allocated capacity\nof the vector.

\n
§Examples
\n
let mut v = vec![1, 2, 3];\n\nv.clear();\n\nassert!(v.is_empty());
\n
1.0.0 · source

pub fn len(&self) -> usize

Returns the number of elements in the vector, also referred to\nas its ‘length’.

\n
§Examples
\n
let a = vec![1, 2, 3];\nassert_eq!(a.len(), 3);
\n
1.0.0 · source

pub fn is_empty(&self) -> bool

Returns true if the vector contains no elements.

\n
§Examples
\n
let mut v = Vec::new();\nassert!(v.is_empty());\n\nv.push(1);\nassert!(!v.is_empty());
\n
1.4.0 · source

pub fn split_off(&mut self, at: usize) -> Vec<T, A>
where\n A: Clone,

Splits the collection into two at the given index.

\n

Returns a newly allocated vector containing the elements in the range\n[at, len). After the call, the original vector will be left containing\nthe elements [0, at) with its previous capacity unchanged.

\n
    \n
  • If you want to take ownership of the entire contents and capacity of\nthe vector, see mem::take or mem::replace.
  • \n
  • If you don’t need the returned vector at all, see Vec::truncate.
  • \n
  • If you want to take ownership of an arbitrary subslice, or you don’t\nnecessarily want to store the removed items in a vector, see Vec::drain.
  • \n
\n
§Panics
\n

Panics if at > len.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nlet vec2 = vec.split_off(1);\nassert_eq!(vec, [1]);\nassert_eq!(vec2, [2, 3]);
\n
1.33.0 · source

pub fn resize_with<F>(&mut self, new_len: usize, f: F)
where\n F: FnMut() -> T,

Resizes the Vec in-place so that len is equal to new_len.

\n

If new_len is greater than len, the Vec is extended by the\ndifference, with each additional slot filled with the result of\ncalling the closure f. The return values from f will end up\nin the Vec in the order they have been generated.

\n

If new_len is less than len, the Vec is simply truncated.

\n

This method uses a closure to create new values on every push. If\nyou’d rather Clone a given value, use Vec::resize. If you\nwant to use the Default trait to generate values, you can\npass Default::default as the second argument.

\n
§Examples
\n
let mut vec = vec![1, 2, 3];\nvec.resize_with(5, Default::default);\nassert_eq!(vec, [1, 2, 3, 0, 0]);\n\nlet mut vec = vec![];\nlet mut p = 1;\nvec.resize_with(4, || { p *= 2; p });\nassert_eq!(vec, [2, 4, 8, 16]);
\n
1.47.0 · source

pub fn leak<'a>(self) -> &'a mut [T]
where\n A: 'a,

Consumes and leaks the Vec, returning a mutable reference to the contents,\n&'a mut [T]. Note that the type T must outlive the chosen lifetime\n'a. If the type has only static references, or none at all, then this\nmay be chosen to be 'static.

\n

As of Rust 1.57, this method does not reallocate or shrink the Vec,\nso the leaked allocation may include unused capacity that is not part\nof the returned slice.

\n

This function is mainly useful for data that lives for the remainder of\nthe program’s life. Dropping the returned reference will cause a memory\nleak.

\n
§Examples
\n

Simple usage:

\n\n
let x = vec![1, 2, 3];\nlet static_ref: &'static mut [usize] = x.leak();\nstatic_ref[0] += 1;\nassert_eq!(static_ref, &[2, 2, 3]);
\n
1.60.0 · source

pub fn spare_capacity_mut(&mut self) -> &mut [MaybeUninit<T>]

Returns the remaining spare capacity of the vector as a slice of\nMaybeUninit<T>.

\n

The returned slice can be used to fill the vector with data (e.g. by\nreading from a file) before marking the data as initialized using the\nset_len method.

\n
§Examples
\n
// Allocate vector big enough for 10 elements.\nlet mut v = Vec::with_capacity(10);\n\n// Fill in the first 3 elements.\nlet uninit = v.spare_capacity_mut();\nuninit[0].write(0);\nuninit[1].write(1);\nuninit[2].write(2);\n\n// Mark the first 3 elements of the vector as being initialized.\nunsafe {\n    v.set_len(3);\n}\n\nassert_eq!(&v, &[0, 1, 2]);
\n
source

pub fn split_at_spare_mut(&mut self) -> (&mut [T], &mut [MaybeUninit<T>])

🔬This is a nightly-only experimental API. (vec_split_at_spare)

Returns vector content as a slice of T, along with the remaining spare\ncapacity of the vector as a slice of MaybeUninit<T>.

\n

The returned spare capacity slice can be used to fill the vector with data\n(e.g. by reading from a file) before marking the data as initialized using\nthe set_len method.

\n

Note that this is a low-level API, which should be used with care for\noptimization purposes. If you need to append data to a Vec\nyou can use push, extend, extend_from_slice,\nextend_from_within, insert, append, resize or\nresize_with, depending on your exact needs.

\n
§Examples
\n
#![feature(vec_split_at_spare)]\n\nlet mut v = vec![1, 1, 2];\n\n// Reserve additional space big enough for 10 elements.\nv.reserve(10);\n\nlet (init, uninit) = v.split_at_spare_mut();\nlet sum = init.iter().copied().sum::<u32>();\n\n// Fill in the next 4 elements.\nuninit[0].write(sum);\nuninit[1].write(sum * 2);\nuninit[2].write(sum * 3);\nuninit[3].write(sum * 4);\n\n// Mark the 4 elements of the vector as being initialized.\nunsafe {\n    let len = v.len();\n    v.set_len(len + 4);\n}\n\nassert_eq!(&v, &[1, 1, 2, 4, 8, 12, 16]);
\n
",0,"redstone::core::aggregator::Matrix"],["
source§

impl<T, A> DerefPure for Vec<T, A>
where\n A: Allocator,

","DerefPure","redstone::core::aggregator::Matrix"],["
1.0.0 · source§

impl<T, A> Eq for Vec<T, A>
where\n T: Eq,\n A: Allocator,

","Eq","redstone::core::aggregator::Matrix"]] };if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/type.impl/redstone/network/pure/struct.Std.js b/static/rust/redstone/crypto_secp256k1/type.impl/redstone/network/pure/struct.Std.js index b85e8d1d..3ccc18b4 100644 --- a/static/rust/redstone/crypto_secp256k1/type.impl/redstone/network/pure/struct.Std.js +++ b/static/rust/redstone/crypto_secp256k1/type.impl/redstone/network/pure/struct.Std.js @@ -1,3 +1,3 @@ (function() {var type_impls = { -"redstone":[["
source§

impl NetworkSpecific for Std

§

type BytesRepr = Vec<u8>

§

type ValueRepr = U256

§

type _Self = Std

source§

const VALUE_SIZE: usize = 32usize

source§

fn print(text: String)

source§

fn revert(error: Error) -> !

","NetworkSpecific","redstone::network::_Network"]] +"redstone":[["
source§

impl NetworkSpecific for Std

§

type BytesRepr = Vec<u8>

§

type ValueRepr = U256

§

type _Self = Std

source§

const VALUE_SIZE: usize = 32usize

source§

fn print(text: String)

source§

fn revert(error: Error) -> !

","NetworkSpecific","redstone::network::_Network"]] };if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/type.impl/std/primitive.array.js b/static/rust/redstone/crypto_secp256k1/type.impl/std/primitive.array.js new file mode 100644 index 00000000..53f96772 --- /dev/null +++ b/static/rust/redstone/crypto_secp256k1/type.impl/std/primitive.array.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"redstone":[] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file