diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/.lock b/static/rust/redstone/crypto_secp256k1,network_casper/.lock deleted file mode 100755 index e69de29b..00000000 diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/crates.js b/static/rust/redstone/crypto_secp256k1,network_casper/crates.js deleted file mode 100644 index 6d4f9bdc..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/crates.js +++ /dev/null @@ -1 +0,0 @@ -window.ALL_CRATES = ["redstone"]; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/.lock b/static/rust/redstone/crypto_secp256k1,network_casper/doc/.lock deleted file mode 100755 index e69de29b..00000000 diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/crates.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/crates.js deleted file mode 100644 index 6d4f9bdc..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/crates.js +++ /dev/null @@ -1 +0,0 @@ -window.ALL_CRATES = ["redstone"]; \ 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 deleted file mode 100644 index f173d86a..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/help.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index d76b13f5..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/all.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 0792edbc..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/aggregator/fn.aggregate_matrix.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 15726f8e..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/aggregator/fn.aggregate_values.html +++ /dev/null @@ -1,25 +0,0 @@ -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.

-

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 -an average of the values, selecting the median, or applying a custom algorithm defined within the -aggregate_matrix function.

-

The primary purpose of this function is to consolidate data from multiple sources into a coherent -and singular value set that adheres to the criteria specified in the Config.

-

§Arguments

-
    -
  • config - A Config instance containing settings and parameters used to guide the aggregation process.
  • -
  • data_packages - A vector of DataPackage instances, each representing a set of values and associated -metadata collected from various sources or signers.
  • -
-

§Returns

-

Returns a Vec<U256>, which is a vector of aggregated values resulting from applying the aggregation -logic to the input data packages as per the specified configuration. Each U256 value in the vector -represents an aggregated result derived from the corresponding data packages.

-

§Note

-

This function is internal to the crate (pub(crate)) and not exposed as part of the public API. It is -designed to be used by other components within the same crate that require value aggregation functionality.

-
\ No newline at end of file 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 deleted file mode 100644 index f3dc8819..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/aggregator/fn.make_value_signer_matrix.html +++ /dev/null @@ -1,4 +0,0 @@ -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 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 deleted file mode 100644 index 7aa39374..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/aggregator/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/aggregator/sidebar-items.js deleted file mode 100644 index c13147cd..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/aggregator/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["aggregate_matrix","aggregate_values","make_value_signer_matrix"],"type":["Matrix"]}; \ 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 deleted file mode 100644 index 61c3f974..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/aggregator/type.Matrix.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 32a77abc..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/config/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/config/sidebar-items.js deleted file mode 100644 index 4cadad77..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/config/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"struct":["Config"]}; \ 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 deleted file mode 100644 index 5f859175..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/config/struct.Config.html +++ /dev/null @@ -1,38 +0,0 @@ -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.

-

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.

-

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.

-

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.

-

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( - &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 - 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 deleted file mode 100644 index e427a2e8..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/index.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index d15046f1..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/processor/fn.make_processor_result.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index b1ad0b84..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/processor/fn.process_payload.html +++ /dev/null @@ -1,7 +0,0 @@ -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.
  • -
  • payload_bytes - Network-specific byte-list of the payload to be processed.
  • -
-
\ No newline at end of file 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 deleted file mode 100644 index ccd25006..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/processor/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/processor/sidebar-items.js deleted file mode 100644 index e25cd4d1..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/processor/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["make_processor_result","process_payload"]}; \ 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 deleted file mode 100644 index 52eaf103..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/processor_result/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/processor_result/sidebar-items.js deleted file mode 100644 index 04eabb0b..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/processor_result/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"struct":["ProcessorResult"]}; \ 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 deleted file mode 100644 index 788c8b93..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/processor_result/struct.ProcessorResult.html +++ /dev/null @@ -1,29 +0,0 @@ -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.

-

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.

-

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).

-

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_casper/doc/redstone/core/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/sidebar-items.js deleted file mode 100644 index ce8d7edb..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["aggregator","config","processor","processor_result","validator"]}; \ 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 deleted file mode 100644 index 141d82cd..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/validator/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/validator/sidebar-items.js deleted file mode 100644 index a9b53ab7..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/validator/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["Validator"]}; \ 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 deleted file mode 100644 index ffbec709..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/core/validator/trait.Validator.html +++ /dev/null @@ -1,70 +0,0 @@ -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 validate_signer_count_threshold(
-        &self,
-        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.

-

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.

-
§Arguments
-
    -
  • feed_id: U256 - The unique identifier of the data feed.
  • -
-
§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.

-

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.

-
§Arguments
-
    -
  • signer: &[u8] - A byte slice representing the signer’s identifier.
  • -
-
§Returns
-
    -
  • Option<usize> - The index of the signer if found, or None if not found.
  • -
-
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.

-

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.

-
§Arguments
-
    -
  • index: usize - The index of the data value being validated.
  • -
  • values: &[Option<U256>] - A slice of optional U256 values associated with the data.
  • -
-
§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.

-

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.

-
§Arguments
-
    -
  • index: usize - The index of the data value whose timestamp is being validated.
  • -
  • timestamp: u64 - The timestamp to be validated.
  • -
-
§Returns
-
    -
  • u64 - The validated timestamp.
  • -
-

Implementors§

\ No newline at end of file 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 deleted file mode 100644 index 541ea6ec..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/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_casper/doc/redstone/crypto/keccak256/fn.keccak256.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/keccak256/fn.keccak256.html deleted file mode 100644 index 2665643a..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/keccak256/fn.keccak256.html +++ /dev/null @@ -1 +0,0 @@ -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 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 deleted file mode 100644 index 96fe770a..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/keccak256/index.html +++ /dev/null @@ -1 +0,0 @@ -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/keccak256/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/keccak256/sidebar-items.js deleted file mode 100644 index 1a5fc982..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/keccak256/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["keccak256"]}; \ 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 deleted file mode 100644 index ba2beac0..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/recover/crypto256/fn.recover_public_key.html +++ /dev/null @@ -1,5 +0,0 @@ -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 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 deleted file mode 100644 index b5563f5f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/recover/crypto256/index.html +++ /dev/null @@ -1 +0,0 @@ -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/crypto256/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/recover/crypto256/sidebar-items.js deleted file mode 100644 index 57bd2c11..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/recover/crypto256/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["recover_public_key"]}; \ 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 deleted file mode 100644 index aba3bde0..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/recover/fn.recover_address.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index e7703e69..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/recover/index.html +++ /dev/null @@ -1 +0,0 @@ -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/recover/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/recover/sidebar-items.js deleted file mode 100644 index 40087146..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/crypto/recover/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["recover_address"],"mod":["crypto256"]}; \ 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 deleted file mode 100644 index 521fe7cb..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/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_casper/doc/redstone/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/index.html deleted file mode 100644 index ab2ae7f0..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/index.html +++ /dev/null @@ -1,6 +0,0 @@ -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.

-

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 deleted file mode 100644 index 90775bac..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/macro.print_and_panic!.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to macro.print_and_panic.html...

- - - \ 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 deleted file mode 100644 index b308eb68..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/macro.print_and_panic.html +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 2d4772f3..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/macro.print_debug!.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to macro.print_debug.html...

- - - \ 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 deleted file mode 100644 index 3cb863d6..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/macro.print_debug.html +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 9f63a8ad..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/as_str/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/as_str/sidebar-items.js deleted file mode 100644 index 01f900d2..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/as_str/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["AsAsciiStr","AsHexStr"]}; \ 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 deleted file mode 100644 index 8fa29f1c..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/as_str/trait.AsAsciiStr.html +++ /dev/null @@ -1,4 +0,0 @@ -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 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 deleted file mode 100644 index 8c78b5e1..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/as_str/trait.AsHexStr.html +++ /dev/null @@ -1,4 +0,0 @@ -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 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 deleted file mode 100644 index 13078112..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/assert/fn.assert_or_revert.html +++ /dev/null @@ -1,7 +0,0 @@ -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 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 deleted file mode 100644 index 385fc71e..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/assert/fn.assert_or_revert_bool_with.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 680c61a9..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/assert/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/assert/sidebar-items.js deleted file mode 100644 index bd99c6f7..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/assert/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["assert_or_revert","assert_or_revert_bool_with"],"trait":["Assert","Unwrap"]}; \ 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 deleted file mode 100644 index e068a406..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/assert/trait.Assert.html +++ /dev/null @@ -1,6 +0,0 @@ -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 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 deleted file mode 100644 index db1ea7bc..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/assert/trait.Unwrap.html +++ /dev/null @@ -1,9 +0,0 @@ -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 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 deleted file mode 100644 index 6501c970..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/casper/error/index.html +++ /dev/null @@ -1 +0,0 @@ -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/error/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/casper/error/sidebar-items.js deleted file mode 100644 index 5244ce01..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/casper/error/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {}; \ 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 deleted file mode 100644 index 5cefed58..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/casper/from_bytes_repr/index.html +++ /dev/null @@ -1 +0,0 @@ -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/from_bytes_repr/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/casper/from_bytes_repr/sidebar-items.js deleted file mode 100644 index 5244ce01..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/casper/from_bytes_repr/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {}; \ 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 deleted file mode 100644 index f585fe38..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/casper/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/casper/sidebar-items.js deleted file mode 100644 index b4952c01..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/casper/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["error","from_bytes_repr"],"struct":["Casper"]}; \ 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 deleted file mode 100644 index a52d09e8..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/casper/struct.Casper.html +++ /dev/null @@ -1,12 +0,0 @@ -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 - 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 deleted file mode 100644 index b0d0096c..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/error/enum.Error.html +++ /dev/null @@ -1,65 +0,0 @@ -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),
-}
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.

-

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.

-

Used when operations on U256 numbers exceed their maximum value, potentially leading -to incorrect calculations or state.

-
§

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.

-

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.

-

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.

-

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.

-

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.

-

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.

-

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.

-

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.

-

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).

-

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 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 deleted file mode 100644 index e083b3b4..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/error/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/error/sidebar-items.js deleted file mode 100644 index 41603cd6..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/error/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"enum":["Error"],"trait":["ContractErrorContent"]}; \ 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 deleted file mode 100644 index 577c3a6f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/error/trait.ContractErrorContent.html +++ /dev/null @@ -1,5 +0,0 @@ -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 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 deleted file mode 100644 index e62982d8..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/flattened/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/flattened/sidebar-items.js deleted file mode 100644 index 25ac6e97..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/flattened/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["Flattened"]}; \ 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 deleted file mode 100644 index 5cfae35f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/flattened/trait.Flattened.html +++ /dev/null @@ -1,4 +0,0 @@ -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 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 deleted file mode 100644 index 037b0f7e..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/from_bytes_repr/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/from_bytes_repr/sidebar-items.js deleted file mode 100644 index 9d06c298..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/from_bytes_repr/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["FromBytesRepr","Sanitized"]}; \ 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 deleted file mode 100644 index 6c56e1ee..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/from_bytes_repr/trait.FromBytesRepr.html +++ /dev/null @@ -1,4 +0,0 @@ -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 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 deleted file mode 100644 index 79baf865..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/from_bytes_repr/trait.Sanitized.html +++ /dev/null @@ -1,4 +0,0 @@ -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 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 deleted file mode 100644 index 2e9c47bf..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/index.html +++ /dev/null @@ -1 +0,0 @@ -redstone::network - Rust

Module redstone::network

source ·

Modules§

Type Aliases§

\ 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 deleted file mode 100644 index ac53c72e..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/print_debug/index.html +++ /dev/null @@ -1 +0,0 @@ -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/print_debug/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/print_debug/sidebar-items.js deleted file mode 100644 index 5244ce01..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/print_debug/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/sidebar-items.js deleted file mode 100644 index 1fb98b05..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["as_str","assert","casper","error","flattened","from_bytes_repr","print_debug","specific"],"type":["_Network"]}; \ 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 deleted file mode 100644 index 2e47400c..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/constant.VALUE_SIZE.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 414a9953..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/fn.print.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 2e9edf89..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/fn.revert.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 1378d9dc..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/sidebar-items.js deleted file mode 100644 index 49355aaa..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"constant":["VALUE_SIZE"],"fn":["print","revert"],"trait":["NetworkSpecific"],"type":["Bytes","Network","U256"]}; \ 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 deleted file mode 100644 index 48323dfa..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/trait.NetworkSpecific.html +++ /dev/null @@ -1,11 +0,0 @@ -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;
-
-    // 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 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 deleted file mode 100644 index 04a40a5a..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/type.Bytes.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 40e404c9..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/type.Network.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 4b103256..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/specific/type.U256.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index bf814c95..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/network/type._Network.html +++ /dev/null @@ -1 +0,0 @@ -_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 deleted file mode 100644 index 72b04b86..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.DATA_FEED_ID_BS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index fed432b2..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.DATA_PACKAGES_COUNT_BS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index f25ed2f5..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.DATA_POINTS_COUNT_BS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 95f9c3d5..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.DATA_POINT_VALUE_BYTE_SIZE_BS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 160a69a6..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.MAX_TIMESTAMP_AHEAD_MS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 47c72d3b..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.MAX_TIMESTAMP_DELAY_MS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 07258216..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.REDSTONE_MARKER.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 21ea69ca..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.REDSTONE_MARKER_BS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 2a3a5b7f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.SIGNATURE_BS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 1635207a..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.TIMESTAMP_BS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index a7ccdc60..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/constant.UNSIGNED_METADATA_BYTE_SIZE_BS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 0268cb89..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/index.html +++ /dev/null @@ -1 +0,0 @@ -redstone::protocol::constants - Rust

Module redstone::protocol::constants

source ·

Constants§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/sidebar-items.js deleted file mode 100644 index 7fd4daab..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/constants/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"constant":["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"]}; \ 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 deleted file mode 100644 index f1456016..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_package/fn.trim_data_package.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 393e9998..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_package/fn.trim_data_packages.html +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 4f7ef4c4..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_package/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_package/sidebar-items.js deleted file mode 100644 index 4b17209f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_package/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["trim_data_package","trim_data_packages"],"struct":["DataPackage"]}; \ 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 deleted file mode 100644 index b77c9d35..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_package/struct.DataPackage.html +++ /dev/null @@ -1,22 +0,0 @@ -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).

-

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 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 deleted file mode 100644 index 10a3aa68..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_point/fn.trim_data_point.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 4bc76a0f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_point/fn.trim_data_points.html +++ /dev/null @@ -1,5 +0,0 @@ -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 deleted file mode 100644 index 6ab1baf0..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_point/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_point/sidebar-items.js deleted file mode 100644 index 2a5fa8f1..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_point/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["trim_data_point","trim_data_points"],"struct":["DataPoint"]}; \ 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 deleted file mode 100644 index 4cee4899..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/data_point/struct.DataPoint.html +++ /dev/null @@ -1,21 +0,0 @@ -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).

-

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 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 deleted file mode 100644 index d221f7b2..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/index.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index fb7c7144..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/marker/fn.trim_redstone_marker.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 9844daf7..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/marker/index.html +++ /dev/null @@ -1 +0,0 @@ -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/marker/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/marker/sidebar-items.js deleted file mode 100644 index 2d2958a1..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/marker/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["trim_redstone_marker"]}; \ 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 deleted file mode 100644 index b3e6350e..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/payload/fn.trim_metadata.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 9eae9fdd..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/payload/fn.trim_payload.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 7bedf304..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/payload/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/payload/sidebar-items.js deleted file mode 100644 index 0d79d818..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/payload/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["trim_metadata","trim_payload"],"struct":["Payload"]}; \ 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 deleted file mode 100644 index 9234341b..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/payload/struct.Payload.html +++ /dev/null @@ -1,18 +0,0 @@ -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).

-

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 diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/sidebar-items.js deleted file mode 100644 index 94e7fdb5..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/protocol/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["constants","data_package","data_point","marker","payload"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/sidebar-items.js deleted file mode 100644 index f230d898..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"macro":["print_and_panic","print_debug"],"mod":["core","crypto","network","protocol","utils"]}; \ 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 deleted file mode 100644 index a153fc5f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/filter/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/filter/sidebar-items.js deleted file mode 100644 index 9cc2f1a1..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/filter/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["FilterSome"]}; \ 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 deleted file mode 100644 index 69bc1f28..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/filter/trait.FilterSome.html +++ /dev/null @@ -1,4 +0,0 @@ -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 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 deleted file mode 100644 index ef51ef17..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/index.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index ebb4b4a4..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/median/fn.maybe_pick_median.html +++ /dev/null @@ -1,2 +0,0 @@ -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 deleted file mode 100644 index 9a4952c3..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/median/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/median/sidebar-items.js deleted file mode 100644 index 092646ab..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/median/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["maybe_pick_median"],"trait":["Averageable","Avg","Median"]}; \ 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 deleted file mode 100644 index 87e04bd4..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/median/trait.Averageable.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 200d300b..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/median/trait.Avg.html +++ /dev/null @@ -1,5 +0,0 @@ -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 - 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 deleted file mode 100644 index 60047574..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/median/trait.Median.html +++ /dev/null @@ -1,7 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/sidebar-items.js deleted file mode 100644 index 2f4d851f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["filter","median","trim","trim_zeros"]}; \ 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 deleted file mode 100644 index e7e6608a..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/trim/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/trim/sidebar-items.js deleted file mode 100644 index 076b36c3..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/trim/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["Trim"]}; \ 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 deleted file mode 100644 index 9939a0b8..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/trim/trait.Trim.html +++ /dev/null @@ -1,5 +0,0 @@ -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 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 deleted file mode 100644 index 2a2fd9e0..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/trim_zeros/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/trim_zeros/sidebar-items.js deleted file mode 100644 index eebab388..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/trim_zeros/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["TrimZeros"]}; \ 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 deleted file mode 100644 index f1299ca4..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/redstone/utils/trim_zeros/trait.TrimZeros.html +++ /dev/null @@ -1,4 +0,0 @@ -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 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 deleted file mode 100644 index d080deeb..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/search-index.js +++ /dev/null @@ -1,5 +0,0 @@ -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"}]\ -]')); -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/search.desc/redstone/redstone-desc-0-.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/search.desc/redstone/redstone-desc-0-.js deleted file mode 100644 index a06ca5b3..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/search.desc/redstone/redstone-desc-0-.js +++ /dev/null @@ -1 +0,0 @@ -searchState.loadedDescShard("redstone", 0, "RedStone\nAggregates values from a collection of data packages …\nConfiguration for a RedStone payload processor.\nThe current block time in timestamp format, used for …\nIdentifiers for the data feeds from which values are …\nReturns the argument unchanged.\nCalls U::from(self).\nThe minimum number of signers required validating the data.\nList of identifiers for signers authorized to sign the …\nThe main processor of the RedStone payload.\nRepresents the result of processing the RedStone payload.\nReturns the argument unchanged.\nCalls U::from(self).\nThe minimum timestamp encountered during processing.\nA collection of values processed during the operation.\nA trait defining validation operations for data feeds and …\nRetrieves the index of a given data feed.\nRetrieves the index of a given signer.\nValidates the signer count threshold for a given index …\nValidates the timestamp for a given index.\nReturns the argument unchanged.\nCalls U::from(self).\nUsed when an expected non-empty array or vector is found …\nRepresents errors that need to clone ContractErrorContent, …\nRepresents errors that arise from the contract itself.\nRepresents errors related to cryptographic operations.\nErrors that can be encountered in the …\nIndicates that the number of signers does not meet the …\nUsed when there is leftover data in a payload that should …\nIndicates an overflow error with U256 numbers.\nSignifies that an unsupported size was encountered.\nIndicates that a timestamp is further in the future than …\nUsed when a timestamp is older than allowed by the …\nIndicates that the marker bytes for RedStone are incorrect.\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).") \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/settings.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/settings.html deleted file mode 100644 index 9631dcb2..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/settings.html +++ /dev/null @@ -1 +0,0 @@ -Settings

Rustdoc settings

Back
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src-files.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src-files.js deleted file mode 100644 index 174b3837..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src-files.js +++ /dev/null @@ -1,4 +0,0 @@ -var srcIndex = new Map(JSON.parse('[\ -["redstone",["",[["core",[],["aggregator.rs","config.rs","mod.rs","processor.rs","processor_result.rs","validator.rs"]],["crypto",[],["keccak256.rs","mod.rs","recover.rs"]],["network",[["casper",[],["error.rs","from_bytes_repr.rs","mod.rs"]]],["as_str.rs","assert.rs","error.rs","flattened.rs","from_bytes_repr.rs","mod.rs","print_debug.rs","specific.rs"]],["protocol",[],["constants.rs","data_package.rs","data_point.rs","marker.rs","mod.rs","payload.rs"]],["utils",[],["filter.rs","median.rs","mod.rs","trim.rs","trim_zeros.rs"]]],["lib.rs"]]]\ -]')); -createSrcSidebar(); 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 deleted file mode 100644 index e839b506..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/core/aggregator.rs.html +++ /dev/null @@ -1,583 +0,0 @@ -aggregator.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-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
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-287
-288
-289
-290
-291
-
use crate::{
-    core::{config::Config, validator::Validator},
-    network::specific::U256,
-    print_debug,
-    protocol::data_package::DataPackage,
-    utils::median::Median,
-};
-
-type Matrix = Vec<Vec<Option<U256>>>;
-
-/// 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
-/// an average of the values, selecting the median, or applying a custom algorithm defined within the
-/// `aggregate_matrix` function.
-///
-/// The primary purpose of this function is to consolidate data from multiple sources into a coherent
-/// and singular value set that adheres to the criteria specified in the `Config`.
-///
-/// # Arguments
-///
-/// * `config` - A `Config` instance containing settings and parameters used to guide the aggregation process.
-/// * `data_packages` - A vector of `DataPackage` instances, each representing a set of values and associated
-///   metadata collected from various sources or signers.
-///
-/// # Returns
-///
-/// Returns a `Vec<U256>`, which is a vector of aggregated values resulting from applying the aggregation
-/// logic to the input data packages as per the specified configuration. Each `U256` value in the vector
-/// represents an aggregated result derived from the corresponding data packages.
-///
-/// # Note
-///
-/// This function is internal to the crate (`pub(crate)`) and not exposed as part of the public API. It is
-/// designed to be used by other components within the same crate that require value aggregation functionality.
-pub(crate) fn aggregate_values(config: Config, data_packages: Vec<DataPackage>) -> Vec<U256> {
-    aggregate_matrix(make_value_signer_matrix(&config, data_packages), config)
-}
-
-fn aggregate_matrix(matrix: Matrix, config: Config) -> Vec<U256> {
-    matrix
-        .iter()
-        .enumerate()
-        .map(|(index, values)| {
-            config
-                .validate_signer_count_threshold(index, values)
-                .median()
-        })
-        .collect()
-}
-
-fn make_value_signer_matrix(config: &Config, data_packages: Vec<DataPackage>) -> Matrix {
-    let mut matrix = vec![vec![None; config.signers.len()]; config.feed_ids.len()];
-
-    data_packages.iter().for_each(|data_package| {
-        if let Some(signer_index) = config.signer_index(&data_package.signer_address) {
-            data_package.data_points.iter().for_each(|data_point| {
-                if let Some(feed_index) = config.feed_index(data_point.feed_id) {
-                    matrix[feed_index][signer_index] = data_point.value.into()
-                }
-            })
-        }
-    });
-
-    print_debug!("{:?}", matrix);
-
-    matrix
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod aggregate_matrix_tests {
-    use crate::{
-        core::{aggregator::aggregate_matrix, config::Config},
-        helpers::iter_into::{IterInto, IterIntoOpt, OptIterIntoOpt},
-    };
-
-    #[test]
-    fn test_aggregate_matrix() {
-        let matrix = vec![
-            vec![11u8, 13].iter_into_opt(),
-            vec![21u8, 23].iter_into_opt(),
-        ];
-
-        for signer_count_threshold in 0..Config::test().signers.len() + 1 {
-            let mut config = Config::test();
-            config.signer_count_threshold = signer_count_threshold as u8;
-
-            let result = aggregate_matrix(matrix.clone(), config);
-
-            assert_eq!(result, vec![12u8, 22].iter_into());
-        }
-    }
-
-    #[test]
-    fn test_aggregate_matrix_smaller_threshold_missing_one_value() {
-        let mut config = Config::test();
-        config.signer_count_threshold = 1;
-
-        let matrix = vec![
-            vec![11u8, 13].iter_into_opt(),
-            vec![21u8.into(), None].opt_iter_into_opt(),
-        ];
-
-        let result = aggregate_matrix(matrix, config);
-
-        assert_eq!(result, vec![12u8, 21].iter_into());
-    }
-
-    #[should_panic(expected = "Array is empty")]
-    #[test]
-    fn test_aggregate_matrix_smaller_threshold_missing_whole_feed() {
-        let mut config = Config::test();
-        config.signer_count_threshold = 0;
-
-        let matrix = vec![vec![11u8, 13].iter_into_opt(), vec![None; 2]];
-
-        aggregate_matrix(matrix, config);
-    }
-
-    #[should_panic(expected = "Insufficient signer count 1 for #0 (ETH)")]
-    #[test]
-    fn test_aggregate_matrix_missing_one_value() {
-        let matrix = vec![
-            vec![21u8.into(), None].opt_iter_into_opt(),
-            vec![11u8, 12].iter_into_opt(),
-        ];
-
-        aggregate_matrix(matrix, Config::test());
-    }
-
-    #[should_panic(expected = "Insufficient signer count 0 for #1 (BTC)")]
-    #[test]
-    fn test_aggregate_matrix_missing_whole_feed() {
-        let matrix = vec![vec![11u8, 13].iter_into_opt(), vec![None; 2]];
-
-        aggregate_matrix(matrix, Config::test());
-    }
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod make_value_signer_matrix {
-    use crate::{
-        core::{
-            aggregator::{make_value_signer_matrix, Matrix},
-            config::Config,
-            test_helpers::{AVAX, BTC, ETH, TEST_SIGNER_ADDRESS_1, TEST_SIGNER_ADDRESS_2},
-        },
-        helpers::iter_into::IterInto,
-        network::specific::U256,
-        protocol::data_package::DataPackage,
-    };
-
-    #[test]
-    fn test_make_value_signer_matrix_empty() {
-        let config = Config::test();
-
-        test_make_value_signer_matrix_of(
-            vec![],
-            vec![vec![None; config.signers.len()]; config.feed_ids.len()],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_exact() {
-        let data_packages = vec![
-            DataPackage::test(ETH, 11, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(ETH, 12, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(BTC, 22, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(BTC, 21, TEST_SIGNER_ADDRESS_1, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![11, 12].iter_into(), vec![21, 22].iter_into()],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_greater() {
-        let data_packages = vec![
-            DataPackage::test(ETH, 11, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(ETH, 12, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(BTC, 22, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(BTC, 21, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(AVAX, 31, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(AVAX, 32, TEST_SIGNER_ADDRESS_2, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![11, 12].iter_into(), vec![21, 22].iter_into()],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_smaller() {
-        let data_packages = vec![
-            DataPackage::test(ETH, 11, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(ETH, 12, TEST_SIGNER_ADDRESS_2, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![11, 12].iter_into(), vec![None; 2]],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_diagonal() {
-        let data_packages = vec![
-            DataPackage::test(BTC, 22, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(ETH, 11, TEST_SIGNER_ADDRESS_1, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![11.into(), None], vec![None, 22.into()]],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_repetitions() {
-        let data_packages = vec![
-            DataPackage::test(BTC, 21, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(BTC, 22, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(BTC, 202, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(ETH, 11, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(ETH, 101, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(ETH, 12, TEST_SIGNER_ADDRESS_2, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![101, 12].iter_into(), vec![21, 202].iter_into()],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_all_wrong() {
-        let config = Config::test();
-
-        let data_packages = vec![
-            DataPackage::test(AVAX, 32, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(AVAX, 31, TEST_SIGNER_ADDRESS_1, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![None; config.signers.len()]; config.feed_ids.len()],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_mix() {
-        let data_packages = vec![
-            DataPackage::test(ETH, 11, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(ETH, 12, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(AVAX, 32, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(AVAX, 31, TEST_SIGNER_ADDRESS_1, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![11, 12].iter_into(), vec![None; 2]],
-        );
-    }
-
-    fn test_make_value_signer_matrix_of(
-        data_packages: Vec<DataPackage>,
-        expected_values: Vec<Vec<Option<u128>>>,
-    ) {
-        let config = &Config::test();
-        let result = make_value_signer_matrix(config, data_packages);
-
-        let expected_matrix: Matrix = expected_values
-            .iter()
-            .map(|row| {
-                (row.iter()
-                    .map(|&value| value.map(U256::from))
-                    .collect::<Vec<_>>())
-                .iter_into() as Vec<Option<U256>>
-            })
-            .collect();
-
-        assert_eq!(result, expected_matrix)
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 0b9ca7f7..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/core/config.rs.html +++ /dev/null @@ -1,63 +0,0 @@ -config.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
-
use crate::network::specific::{Bytes, U256};
-
-/// 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.
-#[derive(Debug)]
-pub struct Config {
-    /// 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.
-    pub signer_count_threshold: u8,
-
-    /// 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.
-    pub signers: Vec<Bytes>,
-
-    /// Identifiers for the data feeds from which values are aggregated.
-    ///
-    /// Each data feed id is represented by the network-specific `U256` type.
-    pub feed_ids: Vec<U256>,
-
-    /// 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.
-    pub block_timestamp: u64,
-}
-
\ No newline at end of file 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 deleted file mode 100644 index f278fb16..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/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_casper/doc/src/redstone/core/processor.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/core/processor.rs.html deleted file mode 100644 index 2e92e10d..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/core/processor.rs.html +++ /dev/null @@ -1,203 +0,0 @@ -processor.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-
use crate::{
-    core::{
-        aggregator::aggregate_values, config::Config, processor_result::ProcessorResult,
-        validator::Validator,
-    },
-    network::specific::Bytes,
-    print_debug,
-    protocol::payload::Payload,
-};
-
-/// The main processor of the RedStone payload.
-///
-///
-/// # Arguments
-///
-/// * `config` - Configuration of the payload processing.
-/// * `payload_bytes` - Network-specific byte-list of the payload to be processed.
-pub fn process_payload(config: Config, payload_bytes: Bytes) -> ProcessorResult {
-    #[allow(clippy::useless_conversion)]
-    let mut bytes: Vec<u8> = payload_bytes.into();
-    let payload = Payload::make(&mut bytes);
-    print_debug!("{:?}", payload);
-
-    make_processor_result(config, payload)
-}
-
-fn make_processor_result(config: Config, payload: Payload) -> ProcessorResult {
-    let min_timestamp = payload
-        .data_packages
-        .iter()
-        .enumerate()
-        .map(|(index, dp)| config.validate_timestamp(index, dp.timestamp))
-        .min()
-        .unwrap();
-
-    let values = aggregate_values(config, payload.data_packages);
-
-    print_debug!("{} {:?}", min_timestamp, values);
-
-    ProcessorResult {
-        values,
-        min_timestamp,
-    }
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        core::{
-            config::Config,
-            processor::make_processor_result,
-            processor_result::ProcessorResult,
-            test_helpers::{
-                BTC, ETH, TEST_BLOCK_TIMESTAMP, TEST_SIGNER_ADDRESS_1, TEST_SIGNER_ADDRESS_2,
-            },
-        },
-        helpers::iter_into::IterInto,
-        protocol::{data_package::DataPackage, payload::Payload},
-    };
-
-    #[test]
-    fn test_make_processor_result() {
-        let data_packages = vec![
-            DataPackage::test(
-                ETH,
-                11,
-                TEST_SIGNER_ADDRESS_1,
-                (TEST_BLOCK_TIMESTAMP + 5).into(),
-            ),
-            DataPackage::test(
-                ETH,
-                13,
-                TEST_SIGNER_ADDRESS_2,
-                (TEST_BLOCK_TIMESTAMP + 3).into(),
-            ),
-            DataPackage::test(
-                BTC,
-                32,
-                TEST_SIGNER_ADDRESS_2,
-                (TEST_BLOCK_TIMESTAMP - 2).into(),
-            ),
-            DataPackage::test(
-                BTC,
-                31,
-                TEST_SIGNER_ADDRESS_1,
-                (TEST_BLOCK_TIMESTAMP + 400).into(),
-            ),
-        ];
-
-        let result = make_processor_result(Config::test(), Payload { data_packages });
-
-        assert_eq!(
-            result,
-            ProcessorResult {
-                min_timestamp: TEST_BLOCK_TIMESTAMP - 2,
-                values: vec![12u8, 31].iter_into()
-            }
-        );
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index ecdffb37..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/core/processor_result.rs.html +++ /dev/null @@ -1,53 +0,0 @@ -processor_result.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
-
use crate::network::specific::U256;
-
-/// 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`.
-#[derive(Debug, Eq, PartialEq)]
-pub struct ProcessorResult {
-    /// 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.
-    pub min_timestamp: u64,
-
-    /// 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`.
-    pub values: Vec<U256>,
-}
-
-impl From<ProcessorResult> for (u64, Vec<U256>) {
-    fn from(result: ProcessorResult) -> Self {
-        (result.min_timestamp, result.values)
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 1fed8ca0..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/core/validator.rs.html +++ /dev/null @@ -1,573 +0,0 @@ -validator.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-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
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-
use crate::{
-    core::config::Config,
-    network::{
-        assert::Assert,
-        error::Error::{InsufficientSignerCount, TimestampTooFuture, TimestampTooOld},
-        specific::U256,
-    },
-    protocol::constants::{MAX_TIMESTAMP_AHEAD_MS, MAX_TIMESTAMP_DELAY_MS},
-    utils::filter::FilterSome,
-};
-
-/// 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.
-pub(crate) trait Validator {
-    /// 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.
-    ///
-    /// # Arguments
-    ///
-    /// * `feed_id`: `U256` - The unique identifier of the data feed.
-    ///
-    /// # Returns
-    ///
-    /// * `Option<usize>` - The index of the feed if it exists, or `None` if it does not.
-    fn feed_index(&self, feed_id: U256) -> 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.
-    ///
-    /// # Arguments
-    ///
-    /// * `signer`: `&[u8]` - A byte slice representing the signer's identifier.
-    ///
-    /// # Returns
-    ///
-    /// * `Option<usize>` - The index of the signer if found, or `None` if not found.
-    fn signer_index(&self, signer: &[u8]) -> Option<usize>;
-
-    /// 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.
-    ///
-    /// # Arguments
-    ///
-    /// * `index`: `usize` - The index of the data value being validated.
-    /// * `values`: `&[Option<U256>]` - A slice of optional `U256` values associated with the data.
-    ///
-    /// # Returns
-    ///
-    /// * `Vec<U256>` - A vector of `U256` values that meet the validation criteria.
-    fn validate_signer_count_threshold(&self, index: usize, values: &[Option<U256>]) -> Vec<U256>;
-
-    /// 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.
-    ///
-    /// # Arguments
-    ///
-    /// * `index`: `usize` - The index of the data value whose timestamp is being validated.
-    /// * `timestamp`: `u64` - The timestamp to be validated.
-    ///
-    /// # Returns
-    ///
-    /// * `u64` - The validated timestamp.
-    fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64;
-}
-
-impl Validator for Config {
-    #[inline]
-    fn feed_index(&self, feed_id: U256) -> Option<usize> {
-        self.feed_ids.iter().position(|&elt| elt == feed_id)
-    }
-
-    #[inline]
-    fn signer_index(&self, signer: &[u8]) -> Option<usize> {
-        self.signers
-            .iter()
-            .position(|elt| elt.to_ascii_lowercase() == signer.to_ascii_lowercase())
-    }
-
-    #[inline]
-    fn validate_signer_count_threshold(&self, index: usize, values: &[Option<U256>]) -> Vec<U256> {
-        values.filter_some().assert_or_revert(
-            |x| (*x).len() >= self.signer_count_threshold.into(),
-            #[allow(clippy::useless_conversion)]
-            |val| InsufficientSignerCount(index, val.len(), self.feed_ids[index]),
-        )
-    }
-
-    #[inline]
-    fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64 {
-        timestamp.assert_or_revert(
-            |&x| x + MAX_TIMESTAMP_DELAY_MS >= self.block_timestamp,
-            |timestamp| TimestampTooOld(index, *timestamp),
-        );
-
-        timestamp.assert_or_revert(
-            |&x| x <= self.block_timestamp + MAX_TIMESTAMP_AHEAD_MS,
-            |timestamp| TimestampTooFuture(index, *timestamp),
-        )
-    }
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        core::{
-            config::Config,
-            test_helpers::{
-                AVAX, BTC, ETH, TEST_BLOCK_TIMESTAMP, TEST_SIGNER_ADDRESS_1, TEST_SIGNER_ADDRESS_2,
-            },
-            validator::Validator,
-        },
-        helpers::{
-            hex::{hex_to_bytes, make_feed_id},
-            iter_into::{IterInto, IterIntoOpt, OptIterIntoOpt},
-        },
-        network::specific::U256,
-        protocol::constants::{MAX_TIMESTAMP_AHEAD_MS, MAX_TIMESTAMP_DELAY_MS},
-    };
-    use itertools::Itertools;
-
-    #[test]
-    fn test_feed_index() {
-        let config = Config::test();
-
-        let eth_index = config.feed_index(make_feed_id(ETH));
-        assert_eq!(eth_index, 0.into());
-
-        let eth_index = config.feed_index(make_feed_id("778680")); //eth
-        assert_eq!(eth_index, None);
-
-        let btc_index = config.feed_index(make_feed_id(BTC));
-        assert_eq!(btc_index, 1.into());
-
-        let avax_index = config.feed_index(make_feed_id(AVAX));
-        assert_eq!(avax_index, None);
-    }
-
-    #[test]
-    fn test_signer_index() {
-        let config = Config::test();
-        let index = config.signer_index(&hex_to_bytes(TEST_SIGNER_ADDRESS_1.into()));
-        assert_eq!(index, 0.into());
-
-        let index = config.signer_index(&hex_to_bytes(TEST_SIGNER_ADDRESS_1.to_uppercase()));
-        assert_eq!(index, 0.into());
-
-        let index = config.signer_index(&hex_to_bytes(TEST_SIGNER_ADDRESS_2.into()));
-        assert_eq!(index, 1.into());
-
-        let index = config.signer_index(&hex_to_bytes(TEST_SIGNER_ADDRESS_2.replace('0', "1")));
-        assert_eq!(index, None);
-    }
-
-    #[test]
-    fn test_validate_timestamp() {
-        let config = Config::test();
-
-        config.validate_timestamp(0, TEST_BLOCK_TIMESTAMP);
-        config.validate_timestamp(1, TEST_BLOCK_TIMESTAMP + 60000);
-        config.validate_timestamp(2, TEST_BLOCK_TIMESTAMP + MAX_TIMESTAMP_AHEAD_MS);
-        config.validate_timestamp(3, TEST_BLOCK_TIMESTAMP - MAX_TIMESTAMP_DELAY_MS);
-        config.validate_timestamp(4, TEST_BLOCK_TIMESTAMP - 60000);
-    }
-
-    #[should_panic(expected = "Timestamp 2000000180001 is too future for #0")]
-    #[test]
-    fn test_validate_timestamp_too_future() {
-        Config::test().validate_timestamp(0, TEST_BLOCK_TIMESTAMP + MAX_TIMESTAMP_AHEAD_MS + 1);
-    }
-
-    #[should_panic(expected = "Timestamp 1999999099999 is too old for #1")]
-    #[test]
-    fn test_validate_timestamp_too_old() {
-        Config::test().validate_timestamp(1, TEST_BLOCK_TIMESTAMP - MAX_TIMESTAMP_DELAY_MS - 1);
-    }
-
-    #[should_panic(expected = "Timestamp 0 is too old for #2")]
-    #[test]
-    fn test_validate_timestamp_zero() {
-        Config::test().validate_timestamp(2, 0);
-    }
-
-    #[should_panic(expected = "Timestamp 4000000000000 is too future for #3")]
-    #[test]
-    fn test_validate_timestamp_big() {
-        Config::test().validate_timestamp(3, TEST_BLOCK_TIMESTAMP + TEST_BLOCK_TIMESTAMP);
-    }
-
-    #[should_panic(expected = "Timestamp 2000000000000 is too future for #4")]
-    #[test]
-    fn test_validate_timestamp_no_block_timestamp() {
-        let mut config = Config::test();
-
-        config.block_timestamp = 0;
-        config.validate_timestamp(4, TEST_BLOCK_TIMESTAMP);
-    }
-
-    #[should_panic(expected = "Insufficient signer count 0 for #0 (ETH)")]
-    #[test]
-    fn test_validate_signer_count_threshold_empty_list() {
-        Config::test().validate_signer_count_threshold(0, vec![].as_slice());
-    }
-
-    #[should_panic(expected = "Insufficient signer count 1 for #1 (BTC)")]
-    #[test]
-    fn test_validate_signer_count_threshold_shorter_list() {
-        Config::test().validate_signer_count_threshold(1, vec![1u8].iter_into_opt().as_slice());
-    }
-
-    #[should_panic(expected = "Insufficient signer count 1 for #1 (BTC)")]
-    #[test]
-    fn test_validate_signer_count_threshold_list_with_nones() {
-        Config::test().validate_signer_count_threshold(
-            1,
-            vec![None, 1u8.into(), None].opt_iter_into_opt().as_slice(),
-        );
-    }
-
-    #[test]
-    fn test_validate_signer_count_threshold_with_exact_size() {
-        validate_with_all_permutations(vec![1u8, 2].iter_into_opt(), vec![1u8, 2].iter_into());
-    }
-
-    #[test]
-    fn test_validate_signer_count_threshold_with_exact_signer_count() {
-        validate_with_all_permutations(
-            vec![None, 1u8.into(), None, 2.into()].opt_iter_into_opt(),
-            vec![1u8, 2].iter_into(),
-        );
-    }
-
-    #[test]
-    fn test_validate_signer_count_threshold_with_larger_size() {
-        validate_with_all_permutations(
-            vec![
-                1u8.into(),
-                None,
-                None,
-                2.into(),
-                3.into(),
-                None,
-                4.into(),
-                None,
-            ]
-            .opt_iter_into_opt(),
-            vec![1u8, 2, 3, 4].iter_into(),
-        );
-    }
-
-    fn validate_with_all_permutations(numbers: Vec<Option<U256>>, expected_value: Vec<U256>) {
-        let perms: Vec<Vec<_>> = numbers.iter().permutations(numbers.len()).collect();
-        let mut config = Config::test();
-
-        let result = config.validate_signer_count_threshold(0, &numbers);
-        assert_eq!(result, expected_value);
-
-        for threshold in 0..expected_value.len() + 1 {
-            config.signer_count_threshold = threshold as u8;
-
-            for (index, perm) in perms.iter().enumerate() {
-                let p: Vec<_> = perm.iter().map(|&&v| v).collect();
-
-                let result =
-                    config.validate_signer_count_threshold(index % config.feed_ids.len(), &p);
-                assert_eq!(result.len(), expected_value.len());
-            }
-        }
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 7e62e207..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/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_casper/doc/src/redstone/crypto/mod.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/crypto/mod.rs.html deleted file mode 100644 index fa282223..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/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_casper/doc/src/redstone/crypto/recover.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/crypto/recover.rs.html deleted file mode 100644 index f03e84b0..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/crypto/recover.rs.html +++ /dev/null @@ -1,267 +0,0 @@ -recover.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-
use crate::crypto::{keccak256, recover::crypto256::recover_public_key};
-
-pub fn recover_address(message: Vec<u8>, signature: Vec<u8>) -> Vec<u8> {
-    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],
-        recovery_byte - (if recovery_byte >= 27 { 27 } else { 0 }),
-    );
-    let key_hash = keccak256::keccak256(&key[1..]); // skip first uncompressed-key byte
-
-    key_hash[12..].into() // last 20 bytes
-}
-
-#[cfg(feature = "crypto_secp256k1")]
-pub(crate) mod crypto256 {
-    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],
-        recovery_byte: u8,
-    ) -> Box<[u8]> {
-        let msg = Message::from_digest_slice(message_hash.as_ref())
-            .unwrap_or_revert(|_| Error::CryptographicError(message_hash.len()));
-
-        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)
-                .unwrap_or_revert(|_| Error::CryptographicError(signature_bytes.len()));
-
-        let public_key = Secp256k1Curve::new().recover_ecdsa(&msg, &sig);
-
-        public_key.unwrap().serialize_uncompressed().into()
-    }
-}
-
-#[cfg(feature = "crypto_k256")]
-pub(crate) mod crypto256 {
-    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],
-        recovery_byte: u8,
-    ) -> Box<[u8]> {
-        let recovery_id = RecoveryId::from_byte(recovery_byte)
-            .unwrap_or_revert(|_| Error::CryptographicError(recovery_byte.into()));
-
-        let signature = Signature::try_from(signature_bytes)
-            .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());
-
-        recovered_key.unwrap()
-    }
-}
-
-#[cfg(all(not(feature = "crypto_k256"), not(feature = "crypto_secp256k1")))]
-pub(crate) mod crypto256 {
-    pub(crate) fn recover_public_key(
-        _message_hash: Box<[u8]>,
-        _signature_bytes: &[u8],
-        _recovery_byte: u8,
-    ) -> Box<[u8]> {
-        panic!("Not implemented!")
-    }
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        crypto::recover::{crypto256::recover_public_key, recover_address},
-        helpers::hex::hex_to_bytes,
-    };
-
-    const MESSAGE: &str = "415641580000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d394303d018d79bf0ba000000020000001";
-    const MESSAGE_HASH: &str = "f0805644755393876d0e917e553f0c206f8bc68b7ebfe73a79d2a9e7f5a4cea6";
-    const SIG_V27: &str = "475195641dae43318e194c3d9e5fc308773d6fdf5e197e02644dfd9ca3d19e3e2bd7d8656428f7f02e658a16b8f83722169c57126cc50bec8fad188b1bac6d19";
-    const SIG_V28: &str = "c88242d22d88252c845b946c9957dbf3c7d59a3b69ecba2898198869f9f146ff268c3e47a11dbb05cc5198aadd659881817a59ee37e088d3253f4695927428c1";
-    const PUBLIC_KEY_V27: &str =
-        "04f5f035588502146774d0ccfd62ee5bf1d7f1dbb96aae33a79765c636b8ec75a36f5121931b5cc37215a7d4280c5700ca92daaaf93c32b06ca9f98b1f4ece624e";
-    const PUBLIC_KEY_V28: &str =
-        "04626f2ad2cfb0b41a24276d78de8959bcf45fc5e80804416e660aab2089d15e98206526e639ee19d17c8f9ae0ce3a6ff1a8ea4ab773d0fb4214e08aad7ba978c8";
-    const ADDRESS_V27: &str = "2c59617248994D12816EE1Fa77CE0a64eEB456BF";
-    const ADDRESS_V28: &str = "12470f7aBA85c8b81D63137DD5925D6EE114952b";
-
-    #[test]
-    fn test_recover_public_key_v27() {
-        let public_key = recover_public_key(u8_box(MESSAGE_HASH), &u8_box(SIG_V27), 0);
-
-        assert_eq!(u8_box(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);
-
-        assert_eq!(u8_box(PUBLIC_KEY_V28), public_key);
-    }
-
-    #[test]
-    fn test_recover_address_1b() {
-        let address = recover_address(
-            hex_to_bytes(MESSAGE.into()),
-            hex_to_bytes(SIG_V27.to_owned() + "1b"),
-        );
-
-        assert_eq!(hex_to_bytes(ADDRESS_V27.into()), address);
-    }
-
-    #[test]
-    fn test_recover_address_1c() {
-        let address = recover_address(
-            hex_to_bytes(MESSAGE.into()),
-            hex_to_bytes(SIG_V28.to_owned() + "1c"),
-        );
-
-        assert_eq!(hex_to_bytes(ADDRESS_V28.into()), address);
-    }
-
-    fn u8_box(str: &str) -> Box<[u8]> {
-        hex_to_bytes(str.into()).as_slice().into()
-    }
-}
-
\ 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 deleted file mode 100644 index 8b3ee7a1..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/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 contains a pure Rust implementation and also an extension for some 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_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 deleted file mode 100644 index f0b58bfb..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/as_str.rs.html +++ /dev/null @@ -1,235 +0,0 @@ -as_str.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-
extern crate alloc;
-
-use crate::network::specific::U256;
-use alloc::{format, string::String};
-
-pub trait AsHexStr {
-    fn as_hex_str(&self) -> String;
-}
-
-impl AsHexStr for &[u8] {
-    #[allow(clippy::format_collect)]
-    fn as_hex_str(&self) -> String {
-        self.iter().map(|byte| format!("{:02x}", byte)).collect()
-    }
-}
-
-#[cfg(feature = "network_casper")]
-impl AsHexStr for casper_types::bytesrepr::Bytes {
-    fn as_hex_str(&self) -> String {
-        self.as_slice().as_hex_str()
-    }
-}
-
-#[cfg(not(feature = "network_radix"))]
-impl AsHexStr for U256 {
-    fn as_hex_str(&self) -> String {
-        format!("{:X}", self)
-    }
-}
-
-#[cfg(feature = "network_radix")]
-impl AsHexStr for U256 {
-    fn as_hex_str(&self) -> String {
-        let digits = self.to_digits();
-        let mut result = String::new();
-        for &part in &digits {
-            if result.is_empty() || part != 0u64 {
-                result.push_str(&format!("{:02X}", part));
-            }
-        }
-        result
-    }
-}
-
-impl AsHexStr for Vec<u8> {
-    fn as_hex_str(&self) -> String {
-        self.as_slice().as_hex_str()
-    }
-}
-
-impl AsHexStr for Box<[u8]> {
-    fn as_hex_str(&self) -> String {
-        self.as_ref().as_hex_str()
-    }
-}
-
-pub trait AsAsciiStr {
-    fn as_ascii_str(&self) -> String;
-}
-
-impl AsAsciiStr for &[u8] {
-    fn as_ascii_str(&self) -> String {
-        self.iter().map(|&code| code as char).collect()
-    }
-}
-
-impl AsAsciiStr for Vec<u8> {
-    fn as_ascii_str(&self) -> String {
-        self.as_slice().as_ascii_str()
-    }
-}
-
-#[cfg(feature = "network_casper")]
-impl AsAsciiStr for casper_types::bytesrepr::Bytes {
-    fn as_ascii_str(&self) -> String {
-        self.as_slice().as_ascii_str()
-    }
-}
-
-impl AsAsciiStr for U256 {
-    fn as_ascii_str(&self) -> String {
-        let hex_string = self.as_hex_str();
-        let bytes = (0..hex_string.len())
-            .step_by(2)
-            .map(|i| u8::from_str_radix(&hex_string[i..i + 2], 16))
-            .collect::<Result<Vec<u8>, _>>()
-            .unwrap();
-
-        bytes.as_ascii_str()
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use crate::network::{
-        as_str::{AsAsciiStr, AsHexStr},
-        specific::U256,
-    };
-
-    const ETH: u32 = 4543560u32;
-
-    #[test]
-    fn test_as_hex_str() {
-        let u256 = U256::from(ETH);
-        let result = u256.as_hex_str();
-
-        assert_eq!(result, "455448");
-    }
-
-    #[test]
-    fn test_as_ascii_str() {
-        let u256 = U256::from(ETH);
-        let result = u256.as_ascii_str();
-
-        assert_eq!(result, "ETH");
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index cfd43818..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/assert.rs.html +++ /dev/null @@ -1,273 +0,0 @@ -assert.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-
use crate::{
-    network::{error::Error, specific::revert},
-    print_debug,
-};
-use std::fmt::Debug;
-
-pub trait Assert<F> {
-    fn assert_or_revert<E: Fn(&Self) -> Error>(self, check: F, error: E) -> Self;
-}
-
-impl<T, F> Assert<F> for T
-where
-    T: Debug,
-    F: Fn(&Self) -> bool,
-{
-    fn assert_or_revert<E: FnOnce(&Self) -> Error>(self, check: F, error: E) -> Self {
-        assert_or_revert(self, check, error)
-    }
-}
-
-#[inline]
-fn assert_or_revert<F, T, E: FnOnce(&T) -> Error>(arg: T, check: F, error: E) -> T
-where
-    F: Fn(&T) -> bool,
-    T: Debug,
-{
-    assert_or_revert_bool_with(check(&arg), || error(&arg));
-
-    arg
-}
-
-#[inline]
-fn assert_or_revert_bool_with<E: FnOnce() -> Error>(check: bool, error: E) {
-    if check {
-        return;
-    }
-
-    let error = error();
-    print_debug!("REVERT({}) - {}!", &error.code(), error);
-    revert(error);
-}
-
-pub trait Unwrap<R> {
-    type ErrorArg;
-
-    fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> R;
-}
-
-impl<T> Unwrap<T> for Option<T>
-where
-    T: Debug,
-{
-    type ErrorArg = ();
-
-    fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> T {
-        assert_or_revert(self, |arg| arg.is_some(), |_| error(&())).unwrap()
-    }
-}
-
-impl<T, Err> Unwrap<T> for Result<T, Err>
-where
-    T: Debug,
-    Err: Debug,
-{
-    type ErrorArg = Err;
-
-    fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> T {
-        assert_or_revert(
-            self,
-            |arg| arg.is_ok(),
-            |e| error(e.as_ref().err().unwrap()),
-        )
-        .unwrap()
-    }
-}
-
-#[cfg(test)]
-mod assert_or_revert_tests {
-    use crate::network::{
-        assert::{assert_or_revert_bool_with, Assert},
-        error::Error,
-    };
-
-    #[test]
-    fn test_assert_or_revert_bool_with_true() {
-        assert_or_revert_bool_with(true, || Error::ArrayIsEmpty);
-    }
-
-    #[should_panic(expected = "Array is empty")]
-    #[test]
-    fn test_assert_or_revert_bool_with_false() {
-        assert_or_revert_bool_with(false, || Error::ArrayIsEmpty);
-    }
-
-    #[test]
-    fn test_assert_or_revert_correct() {
-        5.assert_or_revert(|&x| x == 5, |&size| Error::SizeNotSupported(size));
-    }
-
-    #[should_panic(expected = "Size not supported: 5")]
-    #[test]
-    fn test_assert_or_revert_wrong() {
-        5.assert_or_revert(|&x| x < 5, |&size| Error::SizeNotSupported(size));
-    }
-}
-
-#[cfg(test)]
-mod unwrap_or_revert_tests {
-    use crate::network::{assert::Unwrap, error::Error};
-
-    #[test]
-    fn test_unwrap_or_revert_some() {
-        let result = Some(543).unwrap_or_revert(|_| Error::CryptographicError(333));
-
-        assert_eq!(result, 543);
-    }
-
-    #[should_panic(expected = "Cryptographic Error: 333")]
-    #[test]
-    fn test_unwrap_or_revert_none() {
-        (Option::<u64>::None).unwrap_or_revert(|_| Error::CryptographicError(333));
-    }
-
-    #[test]
-    fn test_unwrap_or_revert_ok() {
-        let result = Ok(256).unwrap_or_revert(|_: &Error| Error::CryptographicError(333));
-
-        assert_eq!(result, 256);
-    }
-
-    #[should_panic(expected = "Cryptographic Error: 567")]
-    #[test]
-    fn test_unwrap_or_revert_err() {
-        Result::<&[u8], Error>::Err(Error::CryptographicError(567)).unwrap_or_revert(|e| e.clone());
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 53deca0d..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/casper/error.rs.html +++ /dev/null @@ -1,17 +0,0 @@ -error.rs - source
1
-2
-3
-4
-5
-6
-7
-8
-
use crate::network::error::Error;
-use casper_types::ApiError;
-
-impl From<Error> for ApiError {
-    fn from(error: Error) -> Self {
-        ApiError::User(error.code())
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 7d4c10ab..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/casper/from_bytes_repr.rs.html +++ /dev/null @@ -1,21 +0,0 @@ -from_bytes_repr.rs - source
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-
use crate::network::{
-    from_bytes_repr::{FromBytesRepr, Sanitized},
-    specific::U256,
-};
-
-impl FromBytesRepr<Vec<u8>> for U256 {
-    fn from_bytes_repr(bytes: Vec<u8>) -> Self {
-        bytes.sanitized().as_slice().into()
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 8df66718..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/casper/mod.rs.html +++ /dev/null @@ -1,77 +0,0 @@ -mod.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
-
use crate::network::{error::Error, specific::NetworkSpecific};
-
-mod error;
-mod from_bytes_repr;
-
-pub struct Casper;
-
-impl NetworkSpecific for Casper {
-    type BytesRepr = casper_types::bytesrepr::Bytes;
-    type ValueRepr = casper_types::U256;
-    type _Self = Self;
-
-    const VALUE_SIZE: usize = 32;
-
-    fn print(_text: String) {
-        #[cfg(all(not(test), feature = "print_debug"))]
-        {
-            casper_contract::contract_api::runtime::print(&_text);
-        }
-
-        #[cfg(test)]
-        {
-            println!("{}", _text);
-        }
-    }
-
-    fn revert(error: Error) -> ! {
-        #[cfg(not(test))]
-        {
-            casper_contract::contract_api::runtime::revert(error)
-        }
-
-        #[cfg(test)]
-        {
-            panic!("{}", error)
-        }
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 4c0588a6..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/error.rs.html +++ /dev/null @@ -1,351 +0,0 @@ -error.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-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
-175
-
use crate::network::{
-    as_str::{AsAsciiStr, AsHexStr},
-    specific::U256,
-};
-use std::fmt::{Debug, Display, Formatter};
-
-pub trait ContractErrorContent: Debug {
-    fn code(&self) -> u8;
-    fn message(&self) -> String;
-}
-
-/// 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.
-#[derive(Debug)]
-pub enum Error {
-    /// 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.
-    ContractError(Box<dyn ContractErrorContent>),
-
-    /// Indicates an overflow error with `U256` numbers.
-    ///
-    /// Used when operations on `U256` numbers exceed their maximum value, potentially leading
-    /// to incorrect calculations or state.
-    NumberOverflow(U256),
-
-    /// 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.
-    ArrayIsEmpty,
-
-    /// 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.
-    CryptographicError(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.
-    SizeNotSupported(usize),
-
-    /// 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.
-    WrongRedStoneMarker(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.
-    NonEmptyPayloadRemainder(Vec<u8>),
-
-    /// 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.
-    InsufficientSignerCount(usize, usize, U256),
-
-    /// 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.
-    TimestampTooOld(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.
-    TimestampTooFuture(usize, u64),
-
-    /// 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.
-    ClonedContractError(u8, String),
-}
-
-impl Error {
-    pub fn contract_error<T: ContractErrorContent + 'static>(value: T) -> Error {
-        Error::ContractError(Box::new(value))
-    }
-
-    pub(crate) fn code(&self) -> u16 {
-        match self {
-            Error::ContractError(boxed) => boxed.code() as u16,
-            Error::NumberOverflow(_) => 509,
-            Error::ArrayIsEmpty => 510,
-            Error::WrongRedStoneMarker(_) => 511,
-            Error::NonEmptyPayloadRemainder(_) => 512,
-            Error::InsufficientSignerCount(data_package_index, value, _) => {
-                (2000 + data_package_index * 10 + value) as u16
-            }
-            Error::SizeNotSupported(size) => 600 + *size as u16,
-            Error::CryptographicError(size) => 700 + *size as u16,
-            Error::TimestampTooOld(data_package_index, _) => 1000 + *data_package_index as u16,
-            Error::TimestampTooFuture(data_package_index, _) => 1050 + *data_package_index as u16,
-            Error::ClonedContractError(code, _) => *code as u16,
-        }
-    }
-}
-
-impl Display for Error {
-    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
-        match self {
-            Error::ContractError(boxed) => write!(f, "Contract error: {}", boxed.message()),
-            Error::NumberOverflow(number) => write!(f, "Number overflow: {}", number),
-            Error::ArrayIsEmpty => write!(f, "Array is empty"),
-            Error::CryptographicError(size) => write!(f, "Cryptographic Error: {}", size),
-            Error::SizeNotSupported(size) => write!(f, "Size not supported: {}", size),
-            Error::WrongRedStoneMarker(bytes) => {
-                write!(f, "Wrong RedStone marker: {}", bytes.as_hex_str())
-            }
-            Error::NonEmptyPayloadRemainder(bytes) => {
-                write!(f, "Non empty payload remainder: {}", bytes.as_hex_str())
-            }
-            Error::InsufficientSignerCount(data_package_index, value, feed_id) => write!(
-                f,
-                "Insufficient signer count {} for #{} ({})",
-                value,
-                data_package_index,
-                feed_id.as_ascii_str()
-            ),
-            Error::TimestampTooOld(data_package_index, value) => {
-                write!(
-                    f,
-                    "Timestamp {} is too old for #{}",
-                    value, data_package_index
-                )
-            }
-            Error::TimestampTooFuture(data_package_index, value) => write!(
-                f,
-                "Timestamp {} is too future for #{}",
-                value, data_package_index
-            ),
-            Error::ClonedContractError(_, message) => {
-                write!(f, "(Cloned) Contract error: {}", message)
-            }
-        }
-    }
-}
-
-impl Clone for Error {
-    fn clone(&self) -> Self {
-        match self {
-            Error::ContractError(content) => {
-                Error::ClonedContractError(content.code(), content.message())
-            }
-            Error::NumberOverflow(value) => Error::NumberOverflow(*value),
-            Error::ArrayIsEmpty => Error::ArrayIsEmpty,
-            Error::CryptographicError(size) => Error::CryptographicError(*size),
-            Error::SizeNotSupported(size) => Error::SizeNotSupported(*size),
-            Error::WrongRedStoneMarker(bytes) => Error::WrongRedStoneMarker(bytes.clone()),
-            Error::NonEmptyPayloadRemainder(bytes) => {
-                Error::NonEmptyPayloadRemainder(bytes.clone())
-            }
-            Error::InsufficientSignerCount(count, needed, bytes) => {
-                Error::InsufficientSignerCount(*count, *needed, *bytes)
-            }
-            Error::TimestampTooOld(index, timestamp) => Error::TimestampTooOld(*index, *timestamp),
-            Error::TimestampTooFuture(index, timestamp) => {
-                Error::TimestampTooFuture(*index, *timestamp)
-            }
-            Error::ClonedContractError(code, message) => {
-                Error::ClonedContractError(*code, message.as_str().into())
-            }
-        }
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index f8226f69..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/flattened.rs.html +++ /dev/null @@ -1,71 +0,0 @@ -flattened.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
-
use crate::network::specific::Bytes;
-
-pub trait Flattened<T> {
-    fn flattened(&self) -> T;
-}
-
-impl Flattened<Bytes> for Vec<Bytes> {
-    fn flattened(&self) -> Bytes {
-        #[allow(clippy::useless_conversion)]
-        self.iter().flatten().copied().collect::<Vec<_>>().into()
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use crate::network::{flattened::Flattened, specific::Bytes};
-
-    #[test]
-    fn test_bytes_flattened() {
-        #[allow(clippy::useless_conversion)]
-        let bytes: Vec<Bytes> = vec![
-            vec![1u8, 2, 3].into(),
-            vec![4u8].into(),
-            vec![].into(),
-            vec![5, 6, 7].into(),
-        ];
-
-        let result: Bytes = bytes.flattened();
-
-        #[allow(clippy::useless_conversion)]
-        let expected_result: Bytes = vec![1u8, 2, 3, 4, 5, 6, 7].into();
-
-        assert_eq!(result, expected_result);
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 0c7663c5..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/from_bytes_repr.rs.html +++ /dev/null @@ -1,257 +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
-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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-
use crate::network::specific::VALUE_SIZE;
-
-pub trait FromBytesRepr<T> {
-    fn from_bytes_repr(bytes: T) -> Self;
-}
-
-pub trait Sanitized {
-    fn sanitized(self) -> Self;
-}
-
-impl Sanitized for Vec<u8> {
-    fn sanitized(self) -> Self {
-        if self.len() <= VALUE_SIZE {
-            return self;
-        }
-
-        let index = self.len().max(VALUE_SIZE) - VALUE_SIZE;
-        let remainder = &self[0..index];
-
-        if remainder != vec![0; index] {
-            panic!("Number to big: {:?} digits", self.len())
-        }
-
-        self[index..].into()
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use crate::network::{
-        from_bytes_repr::FromBytesRepr,
-        specific::{U256, VALUE_SIZE},
-    };
-
-    #[cfg(feature = "network_radix")]
-    use crate::network::radix::u256_ext::U256Ext;
-
-    #[test]
-    fn test_from_bytes_repr_single() {
-        let vec = vec![1];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(1u32));
-    }
-
-    #[test]
-    fn test_from_bytes_repr_double() {
-        let vec = vec![1, 2];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(258u32));
-    }
-
-    #[test]
-    fn test_from_bytes_repr_simple() {
-        let vec = vec![1, 2, 3];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(66051u32));
-    }
-
-    #[test]
-    fn test_from_bytes_repr_bigger() {
-        let vec = vec![101, 202, 255];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(6671103u32));
-    }
-
-    #[test]
-    fn test_from_bytes_repr_empty() {
-        let result = U256::from_bytes_repr(Vec::new());
-
-        assert_eq!(result, U256::from(0u8));
-    }
-
-    #[test]
-    fn test_from_bytes_repr_trailing_zeroes() {
-        let vec = vec![1, 2, 3, 0];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(16909056u32));
-    }
-
-    #[test]
-    fn test_from_bytes_repr_leading_zeroes() {
-        let vec = vec![0, 1, 2, 3];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(66051u32));
-    }
-
-    #[allow(clippy::legacy_numeric_constants)]
-    #[test]
-    fn test_from_bytes_repr_max() {
-        let vec = vec![255; VALUE_SIZE];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::max_value());
-    }
-
-    #[test]
-    fn test_from_bytes_repr_min() {
-        let vec = vec![0; VALUE_SIZE];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(0u8));
-    }
-
-    #[should_panic(expected = "Number to big")]
-    #[test]
-    fn test_from_bytes_repr_too_long() {
-        let x = VALUE_SIZE as u8 + 1;
-        let vec = (1..=x).collect();
-
-        U256::from_bytes_repr(vec);
-    }
-
-    #[allow(clippy::legacy_numeric_constants)]
-    #[test]
-    fn test_from_bytes_repr_too_long_but_zeroes() {
-        let mut vec = vec![255; VALUE_SIZE + 1];
-        vec[0] = 0;
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::max_value());
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index f79fb758..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/mod.rs.html +++ /dev/null @@ -1,51 +0,0 @@ -mod.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
-
pub mod as_str;
-pub mod assert;
-pub mod error;
-pub mod from_bytes_repr;
-pub mod print_debug;
-pub mod specific;
-
-#[cfg(feature = "network_casper")]
-pub mod casper;
-
-#[cfg(feature = "network_casper")]
-pub type _Network = casper::Casper;
-
-#[cfg(feature = "network_radix")]
-pub mod radix;
-
-#[cfg(feature = "network_radix")]
-pub type _Network = radix::Radix;
-
-pub mod flattened;
-#[cfg(all(not(feature = "network_casper"), not(feature = "network_radix")))]
-mod pure;
-
-#[cfg(all(not(feature = "network_casper"), not(feature = "network_radix")))]
-pub type _Network = pure::Std;
-
\ No newline at end of file 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 deleted file mode 100644 index 1fca4faf..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/print_debug.rs.html +++ /dev/null @@ -1,47 +0,0 @@ -print_debug.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
-
extern crate alloc;
-
-#[macro_export]
-macro_rules! print_debug {
-    ($fmt:expr) => {
-        $crate::network::specific::print(format!($fmt))
-    };
-    ($fmt:expr, $($args:tt)*) => {
-        $crate::network::specific::print(format!($fmt, $($args)*))
-    };
-}
-
-#[macro_export]
-macro_rules! print_and_panic {
-    ($fmt:expr) => {{
-        $crate::print_debug!($fmt);
-        panic!($fmt)
-    }};
-    ($fmt:expr, $($args:tt)*) => {{
-        $crate::print_debug!($fmt, $($args)*);
-        panic!($fmt, $($args)*)
-    }};
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/pure/from_bytes_repr.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/pure/from_bytes_repr.rs.html deleted file mode 100644 index dfb1ae60..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/pure/from_bytes_repr.rs.html +++ /dev/null @@ -1,21 +0,0 @@ -from_bytes_repr.rs - source
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-
use crate::network::{
-    from_bytes_repr::{FromBytesRepr, Sanitized},
-    specific::U256,
-};
-
-impl FromBytesRepr<Vec<u8>> for U256 {
-    fn from_bytes_repr(bytes: Vec<u8>) -> Self {
-        Self::from_big_endian(bytes.sanitized().as_slice())
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/pure/mod.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/pure/mod.rs.html deleted file mode 100644 index 36cc7a10..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/pure/mod.rs.html +++ /dev/null @@ -1,47 +0,0 @@ -mod.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
-
use crate::network::{error::Error, specific::NetworkSpecific};
-use primitive_types::U256;
-use std::eprintln;
-
-mod from_bytes_repr;
-
-pub struct Std;
-
-impl NetworkSpecific for Std {
-    type BytesRepr = Vec<u8>;
-    type ValueRepr = U256;
-    type _Self = Std;
-
-    const VALUE_SIZE: usize = 32;
-
-    fn print(text: String) {
-        eprintln!("{}", text)
-    }
-
-    fn revert(error: Error) -> ! {
-        panic!("{}", error)
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/radix/from_bytes_repr.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/radix/from_bytes_repr.rs.html deleted file mode 100644 index cae6ae57..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/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_casper/doc/src/redstone/network/radix/mod.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/radix/mod.rs.html deleted file mode 100644 index 63716f28..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/radix/mod.rs.html +++ /dev/null @@ -1,77 +0,0 @@ -mod.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
-
use crate::network::{error::Error, specific::NetworkSpecific};
-
-mod from_bytes_repr;
-pub mod u256_ext;
-
-pub struct Radix;
-
-impl NetworkSpecific for Radix {
-    type BytesRepr = Vec<u8>;
-    type ValueRepr = radix_common::math::bnum_integer::U256;
-    type _Self = Self;
-
-    const VALUE_SIZE: usize = 32;
-
-    fn print(_text: String) {
-        #[cfg(all(not(test), feature = "print_debug"))]
-        {
-            scrypto::prelude::info!("{}", _text);
-        }
-
-        #[cfg(test)]
-        {
-            println!("{}", _text);
-        }
-    }
-
-    fn revert(error: Error) -> ! {
-        #[cfg(not(test))]
-        {
-            scrypto::prelude::Runtime::panic(error.to_string())
-        }
-
-        #[cfg(test)]
-        {
-            panic!("{}", error)
-        }
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/radix/u256_ext.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/radix/u256_ext.rs.html deleted file mode 100644 index f834b2d9..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/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_casper/doc/src/redstone/network/specific.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/specific.rs.html deleted file mode 100644 index 8d698709..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/network/specific.rs.html +++ /dev/null @@ -1,51 +0,0 @@ -specific.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
-
use crate::network::{_Network, error::Error, from_bytes_repr::FromBytesRepr};
-
-pub trait NetworkSpecific {
-    type BytesRepr: From<Vec<u8>> + Into<Vec<u8>>;
-    type ValueRepr: FromBytesRepr<Vec<u8>>;
-    type _Self;
-
-    const VALUE_SIZE: usize;
-
-    fn print(_text: String);
-    fn revert(error: Error) -> !;
-}
-
-pub(crate) type Network = <_Network as NetworkSpecific>::_Self;
-pub type Bytes = <_Network as NetworkSpecific>::BytesRepr;
-pub type U256 = <_Network as NetworkSpecific>::ValueRepr;
-pub const VALUE_SIZE: usize = <_Network as NetworkSpecific>::VALUE_SIZE;
-
-pub fn print(_text: String) {
-    Network::print(_text)
-}
-
-pub fn revert(error: Error) -> ! {
-    Network::revert(error)
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 3e2f4fd5..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/protocol/constants.rs.html +++ /dev/null @@ -1,23 +0,0 @@ -constants.rs - source
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-
pub(crate) const UNSIGNED_METADATA_BYTE_SIZE_BS: usize = 3;
-pub(crate) const DATA_PACKAGES_COUNT_BS: usize = 2;
-pub(crate) const DATA_POINTS_COUNT_BS: usize = 3;
-pub(crate) const SIGNATURE_BS: usize = 65;
-pub(crate) const DATA_POINT_VALUE_BYTE_SIZE_BS: usize = 4;
-pub(crate) const DATA_FEED_ID_BS: usize = 32;
-pub(crate) const TIMESTAMP_BS: usize = 6;
-pub(crate) const MAX_TIMESTAMP_DELAY_MS: u64 = 15 * 60 * 1000; // 15 minutes in milliseconds
-pub(crate) const MAX_TIMESTAMP_AHEAD_MS: u64 = 3 * 60 * 1000; // 3 minutes in milliseconds
-pub(crate) const REDSTONE_MARKER_BS: usize = 9;
-pub(crate) const REDSTONE_MARKER: [u8; 9] = [0, 0, 2, 237, 87, 1, 30, 0, 0]; // 0x000002ed57011e0000
-
\ No newline at end of file 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 deleted file mode 100644 index a1d603e6..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/protocol/data_package.rs.html +++ /dev/null @@ -1,431 +0,0 @@ -data_package.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-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
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-
use crate::{
-    crypto::recover::recover_address,
-    network::as_str::AsHexStr,
-    protocol::{
-        constants::{
-            DATA_FEED_ID_BS, DATA_POINTS_COUNT_BS, DATA_POINT_VALUE_BYTE_SIZE_BS, SIGNATURE_BS,
-            TIMESTAMP_BS,
-        },
-        data_point::{trim_data_points, DataPoint},
-    },
-    utils::trim::Trim,
-};
-use std::fmt::{Debug, Formatter};
-
-#[derive(Clone, PartialEq, Eq)]
-pub(crate) struct DataPackage {
-    pub(crate) signer_address: Vec<u8>,
-    pub(crate) timestamp: u64,
-    pub(crate) data_points: Vec<DataPoint>,
-}
-
-pub(crate) fn trim_data_packages(payload: &mut Vec<u8>, count: usize) -> Vec<DataPackage> {
-    let mut data_packages = Vec::new();
-
-    for _ in 0..count {
-        let data_package = trim_data_package(payload);
-        data_packages.push(data_package);
-    }
-
-    data_packages
-}
-
-fn trim_data_package(payload: &mut Vec<u8>) -> DataPackage {
-    let signature = payload.trim_end(SIGNATURE_BS);
-    let mut tmp = payload.clone();
-
-    let data_point_count = payload.trim_end(DATA_POINTS_COUNT_BS);
-    let value_size = payload.trim_end(DATA_POINT_VALUE_BYTE_SIZE_BS);
-    let timestamp = payload.trim_end(TIMESTAMP_BS);
-    let size = data_point_count * (value_size + DATA_FEED_ID_BS)
-        + DATA_POINT_VALUE_BYTE_SIZE_BS
-        + TIMESTAMP_BS
-        + DATA_POINTS_COUNT_BS;
-
-    let signable_bytes = tmp.trim_end(size);
-    let signer_address = recover_address(signable_bytes, signature);
-
-    let data_points = trim_data_points(payload, data_point_count, value_size);
-
-    DataPackage {
-        data_points,
-        timestamp,
-        signer_address,
-    }
-}
-
-impl Debug for DataPackage {
-    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
-        write!(
-            f,
-            "DataPackage {{\n   signer_address: 0x{}, timestamp: {},\n   data_points: {:?}\n}}",
-            self.signer_address.as_hex_str(),
-            self.timestamp,
-            self.data_points
-        )
-    }
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        helpers::hex::hex_to_bytes,
-        network::{from_bytes_repr::FromBytesRepr, specific::U256},
-        protocol::{
-            constants::{
-                DATA_FEED_ID_BS, DATA_POINTS_COUNT_BS, DATA_POINT_VALUE_BYTE_SIZE_BS, SIGNATURE_BS,
-                TIMESTAMP_BS,
-            },
-            data_package::{trim_data_package, trim_data_packages, DataPackage},
-            data_point::DataPoint,
-        },
-    };
-
-    const DATA_PACKAGE_BYTES_1: &str = "4554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000360cafc94e018d79bf0ba00000002000000151afa8c5c3caf6004b42c0fb17723e524f993b9ecbad3b9bce5ec74930fa436a3660e8edef10e96ee5f222de7ef5787c02ca467c0ec18daa2907b43ac20c63c11c";
-    const DATA_PACKAGE_BYTES_2: &str = "4554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000360cdd851e018d79bf0ba000000020000001473fd9dc72e6814a7de719b403cf4c9eba08934a643fd0666c433b806b31e69904f2226ffd3c8ef75861b11b5e32a1fda4b1458e0da4605a772dfba2a812f3ee1b";
-
-    const SIGNER_ADDRESS_1: &str = "1ea62d73edf8ac05dfcea1a34b9796e937a29eff";
-    const SIGNER_ADDRESS_2: &str = "109b4a318a4f5ddcbca6349b45f881b4137deafb";
-
-    const VALUE_1: u128 = 232141080910;
-    const VALUE_2: u128 = 232144078110;
-
-    const DATA_PACKAGE_SIZE: usize = 32
-        + DATA_FEED_ID_BS
-        + DATA_POINT_VALUE_BYTE_SIZE_BS
-        + TIMESTAMP_BS
-        + SIGNATURE_BS
-        + DATA_POINTS_COUNT_BS;
-
-    #[test]
-    fn test_trim_data_packages() {
-        test_trim_data_packages_of(2, "");
-        test_trim_data_packages_of(0, "");
-        test_trim_data_packages_of(1, "");
-    }
-
-    #[test]
-    fn test_trim_data_packages_with_prefix() {
-        let prefix = "da4687f1914a1c";
-
-        test_trim_data_packages_of(2, prefix);
-    }
-
-    #[test]
-    fn test_trim_data_packages_single() {
-        let mut bytes = hex_to_bytes(DATA_PACKAGE_BYTES_1.into());
-        let data_packages = trim_data_packages(&mut bytes, 1);
-        assert_eq!(data_packages.len(), 1);
-        assert_eq!(bytes, Vec::<u8>::new());
-
-        verify_data_package(data_packages[0].clone(), VALUE_1, SIGNER_ADDRESS_1);
-    }
-
-    fn test_trim_data_packages_of(count: usize, prefix: &str) {
-        let input: Vec<u8> =
-            hex_to_bytes((prefix.to_owned() + DATA_PACKAGE_BYTES_1) + DATA_PACKAGE_BYTES_2);
-        let mut bytes = input.clone();
-        let data_packages = trim_data_packages(&mut bytes, count);
-
-        assert_eq!(data_packages.len(), count);
-        assert_eq!(
-            bytes.as_slice(),
-            &input[..input.len() - count * DATA_PACKAGE_SIZE]
-        );
-
-        let values = &[VALUE_2, VALUE_1];
-        let signers = &[SIGNER_ADDRESS_2, SIGNER_ADDRESS_1];
-
-        for i in 0..count {
-            verify_data_package(data_packages[i].clone(), values[i], signers[i]);
-        }
-    }
-
-    #[should_panic(expected = "index out of bounds")]
-    #[test]
-    fn test_trim_data_packages_bigger_number() {
-        test_trim_data_packages_of(3, "");
-    }
-
-    #[test]
-    fn test_trim_data_package() {
-        test_trim_data_package_of(DATA_PACKAGE_BYTES_1, VALUE_1, SIGNER_ADDRESS_1);
-        test_trim_data_package_of(DATA_PACKAGE_BYTES_2, VALUE_2, SIGNER_ADDRESS_2);
-    }
-
-    #[test]
-    fn test_trim_data_package_with_prefix() {
-        test_trim_data_package_of(
-            &("da4687f1914a1c".to_owned() + DATA_PACKAGE_BYTES_1),
-            VALUE_1,
-            SIGNER_ADDRESS_1,
-        );
-        test_trim_data_package_of(
-            &("da4687f1914a1c".to_owned() + DATA_PACKAGE_BYTES_2),
-            VALUE_2,
-            SIGNER_ADDRESS_2,
-        );
-    }
-
-    #[should_panic]
-    #[test]
-    fn test_trim_data_package_signature_only() {
-        test_trim_data_package_of(
-            &DATA_PACKAGE_BYTES_1[(DATA_PACKAGE_BYTES_1.len() - 2 * SIGNATURE_BS)..],
-            0,
-            "",
-        );
-    }
-
-    #[should_panic]
-    #[test]
-    fn test_trim_data_package_shorter() {
-        test_trim_data_package_of(
-            &DATA_PACKAGE_BYTES_1
-                [(DATA_PACKAGE_BYTES_1.len() - 2 * (SIGNATURE_BS + DATA_POINTS_COUNT_BS))..],
-            0,
-            "",
-        );
-    }
-
-    fn test_trim_data_package_of(bytes_str: &str, expected_value: u128, signer_address: &str) {
-        let mut bytes: Vec<u8> = hex_to_bytes(bytes_str.into());
-        let result = trim_data_package(&mut bytes);
-        assert_eq!(
-            bytes,
-            hex_to_bytes(bytes_str[..bytes_str.len() - 2 * (DATA_PACKAGE_SIZE)].into())
-        );
-
-        verify_data_package(result, expected_value, signer_address);
-    }
-
-    fn verify_data_package(result: DataPackage, expected_value: u128, signer_address: &str) {
-        let data_package = DataPackage {
-            data_points: vec![DataPoint {
-                feed_id: U256::from_bytes_repr(hex_to_bytes(DATA_PACKAGE_BYTES_1[..6].into())),
-                value: U256::from(expected_value),
-            }],
-            timestamp: 1707144580000,
-            signer_address: hex_to_bytes(signer_address.into()),
-        };
-
-        assert_eq!(result, data_package);
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index e643085a..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/protocol/data_point.rs.html +++ /dev/null @@ -1,315 +0,0 @@ -data_point.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-
use crate::{
-    network::{
-        as_str::{AsAsciiStr, AsHexStr},
-        assert::Assert,
-        error::Error,
-        from_bytes_repr::FromBytesRepr,
-        specific::U256,
-    },
-    protocol::constants::DATA_FEED_ID_BS,
-    utils::{trim::Trim, trim_zeros::TrimZeros},
-};
-use std::fmt::{Debug, Formatter};
-
-#[derive(Clone, PartialEq, Eq)]
-pub(crate) struct DataPoint {
-    pub(crate) feed_id: U256,
-    pub(crate) value: U256,
-}
-
-pub(crate) fn trim_data_points(
-    payload: &mut Vec<u8>,
-    count: usize,
-    value_size: usize,
-) -> Vec<DataPoint> {
-    count.assert_or_revert(|&count| count == 1, |&count| Error::SizeNotSupported(count));
-
-    let mut data_points = Vec::new();
-
-    for _ in 0..count {
-        let data_point = trim_data_point(payload, value_size);
-        data_points.push(data_point);
-    }
-
-    data_points
-}
-
-fn trim_data_point(payload: &mut Vec<u8>, value_size: usize) -> DataPoint {
-    let value = payload.trim_end(value_size);
-    let feed_id: Vec<u8> = payload.trim_end(DATA_FEED_ID_BS);
-
-    DataPoint {
-        value,
-        feed_id: U256::from_bytes_repr(feed_id.trim_zeros()),
-    }
-}
-
-impl Debug for DataPoint {
-    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
-        write!(
-            f,
-            "DataPoint {{\n      feed_id: {:?} (0x{}), value: {}\n   }}",
-            self.feed_id.as_ascii_str(),
-            self.feed_id.as_hex_str(),
-            self.value,
-        )
-    }
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        helpers::hex::hex_to_bytes,
-        network::{
-            from_bytes_repr::FromBytesRepr,
-            specific::{U256, VALUE_SIZE},
-        },
-        protocol::{
-            constants::DATA_FEED_ID_BS,
-            data_point::{trim_data_point, trim_data_points, DataPoint},
-        },
-    };
-    use std::ops::Shr;
-
-    const DATA_POINT_BYTES_TAIL: &str = "4554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000360cafc94e";
-    const VALUE: u128 = 232141080910;
-
-    #[test]
-    fn test_trim_data_points() {
-        let mut bytes = hex_to_bytes(DATA_POINT_BYTES_TAIL.into());
-        let result = trim_data_points(&mut bytes, 1, 32);
-
-        assert_eq!(result.len(), 1);
-
-        verify_rest_and_result(
-            DATA_POINT_BYTES_TAIL,
-            32,
-            VALUE.into(),
-            bytes,
-            result[0].clone(),
-        )
-    }
-
-    #[should_panic(expected = "Size not supported: 0")]
-    #[test]
-    fn test_trim_zero_data_points() {
-        trim_data_points(&mut hex_to_bytes(DATA_POINT_BYTES_TAIL.into()), 0, 32);
-    }
-
-    #[should_panic(expected = "Size not supported: 2")]
-    #[test]
-    fn test_trim_two_data_points() {
-        trim_data_points(&mut hex_to_bytes(DATA_POINT_BYTES_TAIL.into()), 2, 32);
-    }
-
-    #[test]
-    fn test_trim_data_point() {
-        test_trim_data_point_of(DATA_POINT_BYTES_TAIL, 32, VALUE.into());
-    }
-
-    #[test]
-    fn test_trim_data_point_with_prefix() {
-        test_trim_data_point_of(
-            &("a2a812f3ee1b".to_owned() + DATA_POINT_BYTES_TAIL),
-            32,
-            VALUE.into(),
-        );
-    }
-
-    #[test]
-    fn test_trim_data_point_other_lengths() {
-        for i in 1..VALUE_SIZE {
-            test_trim_data_point_of(
-                &DATA_POINT_BYTES_TAIL[..DATA_POINT_BYTES_TAIL.len() - 2 * i],
-                32 - i,
-                U256::from(VALUE).shr(8 * i as u32),
-            );
-        }
-    }
-
-    fn test_trim_data_point_of(value: &str, size: usize, expected_value: U256) {
-        let mut bytes = hex_to_bytes(value.into());
-        let result = trim_data_point(&mut bytes, size);
-
-        verify_rest_and_result(value, size, expected_value, bytes, result);
-    }
-
-    fn verify_rest_and_result(
-        value: &str,
-        size: usize,
-        expected_value: U256,
-        rest: Vec<u8>,
-        result: DataPoint,
-    ) {
-        assert_eq!(
-            rest,
-            hex_to_bytes(value[..value.len() - 2 * (size + DATA_FEED_ID_BS)].into())
-        );
-
-        let data_point = DataPoint {
-            value: expected_value,
-            feed_id: U256::from_bytes_repr(hex_to_bytes(DATA_POINT_BYTES_TAIL[..6].to_string())),
-        };
-
-        assert_eq!(result, data_point);
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 15b31817..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/protocol/marker.rs.html +++ /dev/null @@ -1,133 +0,0 @@ -marker.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-
use crate::{
-    network::{assert::Assert, error::Error},
-    protocol::constants::{REDSTONE_MARKER, REDSTONE_MARKER_BS},
-    utils::trim::Trim,
-};
-
-pub fn trim_redstone_marker(payload: &mut Vec<u8>) {
-    let marker: Vec<u8> = payload.trim_end(REDSTONE_MARKER_BS);
-
-    marker.as_slice().assert_or_revert(
-        |&marker| marker == REDSTONE_MARKER,
-        |&val| Error::WrongRedStoneMarker(val.into()),
-    );
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        helpers::hex::hex_to_bytes,
-        protocol::{constants::REDSTONE_MARKER_BS, marker::trim_redstone_marker},
-    };
-
-    const PAYLOAD_TAIL: &str = "1c000f000000000002ed57011e0000";
-
-    #[test]
-    fn test_trim_redstone_marker() {
-        let mut bytes = hex_to_bytes(PAYLOAD_TAIL.into());
-        trim_redstone_marker(&mut bytes);
-
-        assert_eq!(
-            bytes,
-            hex_to_bytes(PAYLOAD_TAIL[..PAYLOAD_TAIL.len() - 2 * REDSTONE_MARKER_BS].into())
-        );
-    }
-
-    #[should_panic(expected = "Wrong RedStone marker: 000002ed57022e0000")]
-    #[test]
-    fn test_trim_redstone_marker_wrong() {
-        trim_redstone_marker(&mut hex_to_bytes(PAYLOAD_TAIL.replace('1', "2")));
-    }
-
-    #[should_panic(expected = "Wrong RedStone marker: 00000002ed57011e00")]
-    #[test]
-    fn test_trim_redstone_marker_wrong_ending() {
-        trim_redstone_marker(&mut hex_to_bytes(
-            PAYLOAD_TAIL[..PAYLOAD_TAIL.len() - 2].into(),
-        ));
-    }
-
-    #[should_panic(expected = "Wrong RedStone marker: 100002ed57011e0000")]
-    #[test]
-    fn test_trim_redstone_marker_wrong_beginning() {
-        trim_redstone_marker(&mut hex_to_bytes(
-            PAYLOAD_TAIL.replace("0000000", "1111111"),
-        ));
-    }
-
-    #[should_panic(expected = "Wrong RedStone marker: 0002ed57011e0000")]
-    #[test]
-    fn test_trim_redstone_marker_too_short() {
-        trim_redstone_marker(&mut hex_to_bytes(
-            PAYLOAD_TAIL[PAYLOAD_TAIL.len() - 2 * (REDSTONE_MARKER_BS - 1)..].into(),
-        ));
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index fbd60f5b..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/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_casper/doc/src/redstone/protocol/payload.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/protocol/payload.rs.html deleted file mode 100644 index 1cd14131..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/protocol/payload.rs.html +++ /dev/null @@ -1,209 +0,0 @@ -payload.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-
use crate::{
-    network::{assert::Assert, error::Error},
-    protocol::{
-        constants::{DATA_PACKAGES_COUNT_BS, UNSIGNED_METADATA_BYTE_SIZE_BS},
-        data_package::{trim_data_packages, DataPackage},
-        marker,
-    },
-    utils::trim::Trim,
-};
-
-#[derive(Clone, Debug)]
-pub(crate) struct Payload {
-    pub(crate) data_packages: Vec<DataPackage>,
-}
-
-impl Payload {
-    pub(crate) fn make(payload_bytes: &mut Vec<u8>) -> Payload {
-        marker::trim_redstone_marker(payload_bytes);
-        let payload = trim_payload(payload_bytes);
-
-        payload_bytes.assert_or_revert(
-            |bytes| bytes.is_empty(),
-            |bytes| Error::NonEmptyPayloadRemainder(bytes.as_slice().into()),
-        );
-
-        payload
-    }
-}
-
-fn trim_payload(payload: &mut Vec<u8>) -> Payload {
-    let data_package_count = trim_metadata(payload);
-    let data_packages = trim_data_packages(payload, data_package_count);
-
-    Payload { data_packages }
-}
-
-fn trim_metadata(payload: &mut Vec<u8>) -> usize {
-    let unsigned_metadata_size = payload.trim_end(UNSIGNED_METADATA_BYTE_SIZE_BS);
-    let _: Vec<u8> = payload.trim_end(unsigned_metadata_size);
-
-    payload.trim_end(DATA_PACKAGES_COUNT_BS)
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        helpers::hex::{hex_to_bytes, read_payload_bytes, read_payload_hex},
-        protocol::{
-            constants::REDSTONE_MARKER_BS,
-            payload::{trim_metadata, trim_payload, Payload},
-        },
-    };
-
-    const PAYLOAD_METADATA_BYTES: &str = "000f000000";
-    const PAYLOAD_METADATA_WITH_UNSIGNED_BYTE: &str = "000f55000001";
-    const PAYLOAD_METADATA_WITH_UNSIGNED_BYTES: &str = "000f11223344556677889900aabbccddeeff000010";
-
-    #[test]
-    fn test_trim_metadata() {
-        let prefix = "9e0294371c";
-
-        for &bytes_str in &[
-            PAYLOAD_METADATA_BYTES,
-            PAYLOAD_METADATA_WITH_UNSIGNED_BYTE,
-            PAYLOAD_METADATA_WITH_UNSIGNED_BYTES,
-        ] {
-            let mut bytes = hex_to_bytes(prefix.to_owned() + bytes_str);
-            let result = trim_metadata(&mut bytes);
-
-            assert_eq!(bytes, hex_to_bytes(prefix.into()));
-            assert_eq!(result, 15);
-        }
-    }
-
-    #[test]
-    fn test_trim_payload() {
-        let payload_hex = read_payload_bytes("./sample-data/payload.hex");
-
-        let mut bytes = payload_hex[..payload_hex.len() - REDSTONE_MARKER_BS].into();
-        let payload = trim_payload(&mut bytes);
-
-        assert_eq!(bytes, Vec::<u8>::new());
-        assert_eq!(payload.data_packages.len(), 15);
-    }
-
-    #[test]
-    fn test_make_payload() {
-        let mut payload_hex = read_payload_bytes("./sample-data/payload.hex");
-        let payload = Payload::make(&mut payload_hex);
-
-        assert_eq!(payload.data_packages.len(), 15);
-    }
-
-    #[should_panic(expected = "Non empty payload remainder: 12")]
-    #[test]
-    fn test_make_payload_with_prefix() {
-        let payload_hex = read_payload_hex("./sample-data/payload.hex");
-        let mut bytes = hex_to_bytes("12".to_owned() + &payload_hex);
-        let payload = Payload::make(&mut bytes);
-
-        assert_eq!(payload.data_packages.len(), 15);
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index f28b29ef..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/utils/filter.rs.html +++ /dev/null @@ -1,43 +0,0 @@ -filter.rs - source
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-
pub(crate) trait FilterSome<Output> {
-    fn filter_some(&self) -> Output;
-}
-
-impl<T: Copy> FilterSome<Vec<T>> for [Option<T>] {
-    fn filter_some(&self) -> Vec<T> {
-        self.iter().filter_map(|&opt| opt).collect()
-    }
-}
-
-#[cfg(test)]
-mod filter_some_tests {
-    use crate::utils::filter::FilterSome;
-
-    #[test]
-    fn test_filter_some() {
-        let values = [None, Some(23u64), None, Some(12), Some(12), None, Some(23)];
-
-        assert_eq!(values.filter_some(), vec![23, 12, 12, 23])
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index c329ff3b..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/utils/median.rs.html +++ /dev/null @@ -1,375 +0,0 @@ -median.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-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
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-
use crate::network::{assert::Assert, error::Error::ArrayIsEmpty, specific::U256};
-use std::ops::{Add, Rem, Shr};
-
-pub(crate) trait Median {
-    type Item;
-
-    fn median(self) -> Self::Item;
-}
-
-trait Avg {
-    fn avg(self, other: Self) -> Self;
-}
-
-trait Averageable:
-    Add<Output = Self> + Shr<Output = Self> + From<u8> + Rem<Output = Self> + Copy
-{
-}
-
-impl Averageable for i32 {}
-
-#[cfg(feature = "network_radix")]
-impl Avg for U256 {
-    fn avg(self, other: Self) -> Self {
-        let one = 1u32;
-        let two = U256::from(2u8);
-
-        self.shr(one) + other.shr(one) + (self % two + other % two).shr(one)
-    }
-}
-
-#[cfg(not(feature = "network_radix"))]
-impl Averageable for U256 {}
-
-impl<T> Avg for T
-where
-    T: Averageable,
-{
-    fn avg(self, other: Self) -> Self {
-        let one = T::from(1);
-        let two = T::from(2);
-
-        self.shr(one) + other.shr(one) + (self % two + other % two).shr(one)
-    }
-}
-
-impl<T> Median for Vec<T>
-where
-    T: Copy + Ord + Avg,
-{
-    type Item = T;
-
-    fn median(self) -> Self::Item {
-        let len = self.len();
-
-        match len.assert_or_revert(|x| *x > 0, |_| ArrayIsEmpty) {
-            1 => self[0],
-            2 => self[0].avg(self[1]),
-            3 => maybe_pick_median(self[0], self[1], self[2]).unwrap_or_else(|| {
-                maybe_pick_median(self[1], self[0], self[2])
-                    .unwrap_or_else(|| maybe_pick_median(self[1], self[2], self[0]).unwrap())
-            }),
-            _ => {
-                let mut values = self;
-                values.sort();
-
-                let mid = len / 2;
-
-                if len % 2 == 0 {
-                    values[mid - 1].avg(values[mid])
-                } else {
-                    values[mid]
-                }
-            }
-        }
-    }
-}
-
-#[inline]
-fn maybe_pick_median<T>(a: T, b: T, c: T) -> Option<T>
-where
-    T: PartialOrd,
-{
-    if (b >= a && b <= c) || (b >= c && b <= a) {
-        Some(b)
-    } else {
-        None
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use super::{Avg, Median};
-    use crate::network::specific::U256;
-    use itertools::Itertools;
-    use std::fmt::Debug;
-
-    #[cfg(feature = "network_radix")]
-    use crate::network::radix::u256_ext::U256Ext;
-
-    #[allow(clippy::legacy_numeric_constants)]
-    #[test]
-    fn test_avg() {
-        let u256 = U256::max_value(); // 115792089237316195423570985008687907853269984665640564039457584007913129639935
-        let u256_max_sub_1 = u256 - U256::from(1u32);
-        let u256max_div_2 = u256 / U256::from(2u32);
-
-        assert_eq!(u256.avg(U256::from(0u8)), u256max_div_2);
-        assert_eq!(u256.avg(U256::from(1u8)), u256max_div_2 + U256::from(1u8));
-        assert_eq!(u256.avg(u256_max_sub_1), u256_max_sub_1);
-        assert_eq!(u256.avg(u256), u256);
-
-        assert_eq!((u256_max_sub_1).avg(U256::from(0u8)), u256max_div_2);
-        assert_eq!((u256_max_sub_1).avg(U256::from(1u8)), u256max_div_2);
-        assert_eq!((u256_max_sub_1).avg(u256_max_sub_1), u256_max_sub_1);
-        assert_eq!((u256_max_sub_1).avg(u256), u256_max_sub_1);
-    }
-
-    #[test]
-    #[should_panic(expected = "Array is empty")]
-    fn test_median_empty_vector() {
-        let vec: Vec<i32> = vec![];
-
-        vec.median();
-    }
-
-    #[test]
-    fn test_median_single_element() {
-        assert_eq!(vec![1].median(), 1);
-    }
-
-    #[test]
-    fn test_median_two_elements() {
-        test_all_permutations(vec![1, 3], 2);
-        test_all_permutations(vec![1, 2], 1);
-        test_all_permutations(vec![1, 1], 1);
-    }
-
-    #[test]
-    fn test_median_three_elements() {
-        test_all_permutations(vec![1, 2, 3], 2);
-        test_all_permutations(vec![1, 1, 2], 1);
-        test_all_permutations(vec![1, 2, 2], 2);
-        test_all_permutations(vec![1, 1, 1], 1);
-    }
-
-    #[test]
-    fn test_median_even_number_of_elements() {
-        test_all_permutations(vec![1, 2, 3, 4], 2);
-        test_all_permutations(vec![1, 2, 4, 4], 3);
-        test_all_permutations(vec![1, 1, 3, 3], 2);
-        test_all_permutations(vec![1, 1, 3, 4], 2);
-        test_all_permutations(vec![1, 1, 1, 3], 1);
-        test_all_permutations(vec![1, 3, 3, 3], 3);
-        test_all_permutations(vec![1, 1, 1, 1], 1);
-        test_all_permutations(vec![1, 2, 3, 4, 5, 6], 3);
-    }
-
-    #[test]
-    fn test_median_odd_number_of_elements() {
-        test_all_permutations(vec![1, 2, 3, 4, 5], 3);
-        test_all_permutations(vec![1, 1, 3, 4, 5], 3);
-        test_all_permutations(vec![1, 1, 1, 4, 5], 1);
-        test_all_permutations(vec![1, 1, 1, 3, 3], 1);
-        test_all_permutations(vec![1, 1, 3, 3, 5], 3);
-
-        test_all_permutations(vec![1, 2, 3, 5, 5], 3);
-        test_all_permutations(vec![1, 2, 5, 5, 5], 5);
-        test_all_permutations(vec![1, 1, 3, 3, 3], 3);
-        test_all_permutations(vec![1, 3, 3, 5, 5], 3);
-
-        test_all_permutations(vec![1, 2, 2, 2, 2], 2);
-        test_all_permutations(vec![1, 1, 1, 1, 2], 1);
-        test_all_permutations(vec![1, 1, 1, 1, 1], 1);
-
-        test_all_permutations(vec![1, 2, 3, 4, 5, 6, 7], 4);
-    }
-
-    fn test_all_permutations<T: Copy + Ord + Avg + Debug>(numbers: Vec<T>, expected_value: T) {
-        let perms: Vec<Vec<_>> = numbers.iter().permutations(numbers.len()).collect();
-
-        for perm in perms {
-            let p: Vec<_> = perm.iter().map(|&&v| v).collect();
-
-            assert_eq!(p.median(), expected_value);
-        }
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 44258e67..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/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_casper/doc/src/redstone/utils/trim.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/utils/trim.rs.html deleted file mode 100644 index 551a41a8..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/utils/trim.rs.html +++ /dev/null @@ -1,299 +0,0 @@ -trim.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-
use crate::network::{
-    assert::Unwrap, error::Error, from_bytes_repr::FromBytesRepr, specific::U256,
-};
-
-pub trait Trim<T>
-where
-    Self: Sized,
-{
-    fn trim_end(&mut self, len: usize) -> T;
-}
-
-impl Trim<Vec<u8>> for Vec<u8> {
-    fn trim_end(&mut self, len: usize) -> Self {
-        if len >= self.len() {
-            std::mem::take(self)
-        } else {
-            self.split_off(self.len() - len)
-        }
-    }
-}
-
-impl Trim<U256> for Vec<u8> {
-    fn trim_end(&mut self, len: usize) -> U256 {
-        U256::from_bytes_repr(self.trim_end(len))
-    }
-}
-
-impl Trim<usize> for Vec<u8> {
-    fn trim_end(&mut self, len: usize) -> usize {
-        let y: U256 = self.trim_end(len);
-        y.try_into().unwrap_or_revert(|_| Error::NumberOverflow(y))
-    }
-}
-
-impl Trim<u64> for Vec<u8> {
-    fn trim_end(&mut self, len: usize) -> u64 {
-        let y: U256 = self.trim_end(len);
-        y.try_into().unwrap_or_revert(|_| Error::NumberOverflow(y))
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use crate::{
-        network::specific::U256,
-        protocol::constants::{REDSTONE_MARKER, REDSTONE_MARKER_BS},
-        utils::trim::Trim,
-    };
-
-    const MARKER_DECIMAL: u64 = 823907890102272;
-
-    fn redstone_marker_bytes() -> Vec<u8> {
-        REDSTONE_MARKER.into()
-    }
-
-    #[test]
-    fn test_trim_end_number() {
-        let (rest, result): (_, U256) = test_trim_end(3);
-        assert_eq!(result, (256u32.pow(2) * 30).into());
-        assert_eq!(rest.as_slice(), &REDSTONE_MARKER[..6]);
-
-        let (_, result): (_, u64) = test_trim_end(3);
-        assert_eq!(result, 256u64.pow(2) * 30);
-
-        let (_, result): (_, usize) = test_trim_end(3);
-        assert_eq!(result, 256usize.pow(2) * 30);
-
-        let (_, result): (_, Vec<u8>) = test_trim_end(3);
-        assert_eq!(result.as_slice(), &REDSTONE_MARKER[6..]);
-    }
-
-    #[test]
-    fn test_trim_end_number_null() {
-        let (rest, result): (_, U256) = test_trim_end(0);
-        assert_eq!(result, 0u32.into());
-        assert_eq!(rest.as_slice(), &REDSTONE_MARKER);
-
-        let (_, result): (_, u64) = test_trim_end(0);
-        assert_eq!(result, 0);
-
-        let (_, result): (_, usize) = test_trim_end(0);
-        assert_eq!(result, 0);
-
-        let (_, result): (_, Vec<u8>) = test_trim_end(0);
-        assert_eq!(result, Vec::<u8>::new());
-    }
-
-    #[test]
-    fn test_trim_end_whole() {
-        test_trim_end_whole_size(REDSTONE_MARKER_BS);
-        test_trim_end_whole_size(REDSTONE_MARKER_BS - 1);
-        test_trim_end_whole_size(REDSTONE_MARKER_BS - 2);
-        test_trim_end_whole_size(REDSTONE_MARKER_BS + 1);
-    }
-
-    fn test_trim_end_whole_size(size: usize) {
-        let (rest, result): (_, U256) = test_trim_end(size);
-        assert_eq!(result, MARKER_DECIMAL.into());
-        assert_eq!(
-            rest.as_slice().len(),
-            REDSTONE_MARKER_BS - size.min(REDSTONE_MARKER_BS)
-        );
-
-        let (_, result): (_, u64) = test_trim_end(size);
-        assert_eq!(result, MARKER_DECIMAL);
-
-        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));
-    }
-
-    #[test]
-    fn test_trim_end_u64() {
-        let mut bytes = vec![255, 255, 255, 255, 255, 255, 255, 255, 255];
-        let x: u64 = bytes.trim_end(8);
-
-        let expected_bytes = vec![255];
-
-        assert_eq!(bytes, expected_bytes);
-        assert_eq!(x, 18446744073709551615);
-    }
-
-    #[should_panic(expected = "Number overflow: 18591708106338011145")]
-    #[test]
-    fn test_trim_end_u64_overflow() {
-        let mut bytes = vec![1u8, 2, 3, 4, 5, 6, 7, 8, 9];
-
-        let _: u64 = bytes.trim_end(9);
-    }
-
-    #[allow(dead_code)]
-    trait TestTrimEnd<T>
-    where
-        Self: Sized,
-    {
-        fn test_trim_end(size: usize) -> (Self, T);
-    }
-
-    fn test_trim_end<T>(size: usize) -> (Vec<u8>, T)
-    where
-        Vec<u8>: Trim<T>,
-    {
-        let mut bytes = redstone_marker_bytes();
-        let rest = bytes.trim_end(size);
-        (bytes, rest)
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 0d223de1..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/src/redstone/utils/trim_zeros.rs.html +++ /dev/null @@ -1,91 +0,0 @@ -trim_zeros.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
-
pub trait TrimZeros {
-    fn trim_zeros(self) -> Self;
-}
-
-impl TrimZeros for Vec<u8> {
-    fn trim_zeros(self) -> Self {
-        let mut res = self.len();
-
-        for i in (0..self.len()).rev() {
-            if self[i] != 0 {
-                break;
-            }
-
-            res = i;
-        }
-
-        let (rest, _) = self.split_at(res);
-
-        rest.into()
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use crate::{protocol::constants::REDSTONE_MARKER, utils::trim_zeros::TrimZeros};
-
-    fn redstone_marker_bytes() -> Vec<u8> {
-        REDSTONE_MARKER.as_slice().into()
-    }
-
-    #[test]
-    fn test_trim_zeros() {
-        let trimmed = redstone_marker_bytes().trim_zeros();
-        assert_eq!(trimmed.as_slice(), &REDSTONE_MARKER[..7]);
-
-        let trimmed = trimmed.trim_zeros();
-        assert_eq!(trimmed.as_slice(), &REDSTONE_MARKER[..7]);
-    }
-
-    #[test]
-    fn test_trim_zeros_empty() {
-        let trimmed = Vec::<u8>::default().trim_zeros();
-        assert_eq!(trimmed, Vec::<u8>::default());
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/COPYRIGHT-23e9bde6c69aea69.txt b/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/COPYRIGHT-23e9bde6c69aea69.txt deleted file mode 100644 index 1447df79..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/COPYRIGHT-23e9bde6c69aea69.txt +++ /dev/null @@ -1,50 +0,0 @@ -# REUSE-IgnoreStart - -These documentation pages include resources by third parties. This copyright -file applies only to those resources. The following third party resources are -included, and carry their own copyright notices and license terms: - -* Fira Sans (FiraSans-Regular.woff2, FiraSans-Medium.woff2): - - Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ - with Reserved Font Name Fira Sans. - - Copyright (c) 2014, Telefonica S.A. - - Licensed under the SIL Open Font License, Version 1.1. - See FiraSans-LICENSE.txt. - -* rustdoc.css, main.js, and playpen.js: - - Copyright 2015 The Rust Developers. - Licensed under the Apache License, Version 2.0 (see LICENSE-APACHE.txt) or - the MIT license (LICENSE-MIT.txt) at your option. - -* normalize.css: - - Copyright (c) Nicolas Gallagher and Jonathan Neal. - Licensed under the MIT license (see LICENSE-MIT.txt). - -* Source Code Pro (SourceCodePro-Regular.ttf.woff2, - SourceCodePro-Semibold.ttf.woff2, SourceCodePro-It.ttf.woff2): - - Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), - with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark - of Adobe Systems Incorporated in the United States and/or other countries. - - Licensed under the SIL Open Font License, Version 1.1. - See SourceCodePro-LICENSE.txt. - -* Source Serif 4 (SourceSerif4-Regular.ttf.woff2, SourceSerif4-Bold.ttf.woff2, - SourceSerif4-It.ttf.woff2): - - Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name - 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United - States and/or other countries. - - Licensed under the SIL Open Font License, Version 1.1. - See SourceSerif4-LICENSE.md. - -This copyright file is intended to be distributed with rustdoc output. - -# REUSE-IgnoreEnd diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/FiraSans-LICENSE-db4b642586e02d97.txt b/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/FiraSans-LICENSE-db4b642586e02d97.txt deleted file mode 100644 index d7e9c149..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/FiraSans-LICENSE-db4b642586e02d97.txt +++ /dev/null @@ -1,98 +0,0 @@ -// REUSE-IgnoreStart - -Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. -with Reserved Font Name < Fira >, - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. - -// REUSE-IgnoreEnd diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 b/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 deleted file mode 100644 index 7a1e5fc5..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 b/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 deleted file mode 100644 index e766e06c..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt b/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt deleted file mode 100644 index 16fe87b0..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/LICENSE-MIT-65090b722b3f6c56.txt b/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/LICENSE-MIT-65090b722b3f6c56.txt deleted file mode 100644 index 31aa7938..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/LICENSE-MIT-65090b722b3f6c56.txt +++ /dev/null @@ -1,23 +0,0 @@ -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 b/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 deleted file mode 100644 index 1866ad4b..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt b/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt deleted file mode 100644 index 4b3edc29..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt +++ /dev/null @@ -1,103 +0,0 @@ -// REUSE-IgnoreStart - -Copyright (c) 2010, NAVER Corporation (https://www.navercorp.com/), - -with Reserved Font Name Nanum, Naver Nanum, NanumGothic, Naver NanumGothic, -NanumMyeongjo, Naver NanumMyeongjo, NanumBrush, Naver NanumBrush, NanumPen, -Naver NanumPen, Naver NanumGothicEco, NanumGothicEco, Naver NanumMyeongjoEco, -NanumMyeongjoEco, Naver NanumGothicLight, NanumGothicLight, NanumBarunGothic, -Naver NanumBarunGothic, NanumSquareRound, NanumBarunPen, MaruBuri - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. - -// REUSE-IgnoreEnd diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 b/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 deleted file mode 100644 index 462c34ef..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt b/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt deleted file mode 100644 index 0d2941e1..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt +++ /dev/null @@ -1,97 +0,0 @@ -// REUSE-IgnoreStart - -Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. - -This Font Software is licensed under the SIL Open Font License, Version 1.1. - -This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. - -// REUSE-IgnoreEnd diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 b/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 deleted file mode 100644 index 10b558e0..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 b/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 deleted file mode 100644 index 5ec64eef..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 b/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 deleted file mode 100644 index 181a07f6..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 b/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 deleted file mode 100644 index 2ae08a7b..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md b/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md deleted file mode 100644 index 175fa4f4..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md +++ /dev/null @@ -1,98 +0,0 @@ - - -Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. -Copyright 2014 - 2023 Adobe (http://www.adobe.com/), with Reserved Font Name ‘Source’. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. - -This Font Software is licensed under the SIL Open Font License, Version 1.1. - -This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. - - diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 b/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 deleted file mode 100644 index 0263fc30..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/favicon-2c020d218678b618.svg b/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/favicon-2c020d218678b618.svg deleted file mode 100644 index 8b34b511..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/favicon-2c020d218678b618.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/favicon-32x32-422f7d1d52889060.png b/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/favicon-32x32-422f7d1d52889060.png deleted file mode 100644 index 69b8613c..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/favicon-32x32-422f7d1d52889060.png and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/main-20a3ad099b048cf2.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/main-20a3ad099b048cf2.js deleted file mode 100644 index 133116e4..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/main-20a3ad099b048cf2.js +++ /dev/null @@ -1,11 +0,0 @@ -"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;if(path===current_page){link.className="current"}link.textContent=name;const li=document.createElement("li");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/normalize-76eba96aa4d2e634.css b/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/normalize-76eba96aa4d2e634.css deleted file mode 100644 index 469959f1..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/normalize-76eba96aa4d2e634.css +++ /dev/null @@ -1,2 +0,0 @@ - /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ -html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type="button"],[type="reset"],[type="submit"],button{-webkit-appearance:button}[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none} \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/noscript-df360f571f6edeae.css b/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/noscript-df360f571f6edeae.css deleted file mode 100644 index 4c310ae5..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/noscript-df360f571f6edeae.css +++ /dev/null @@ -1 +0,0 @@ - #main-content .attributes{margin-left:0 !important;}#copy-path,#sidebar-button,.sidebar-resizer{display:none !important;}nav.sub{display:none;}.src .sidebar{display:none;}.notable-traits{display:none;}:root,: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%);}@media (prefers-color-scheme:dark){:root,:root:not([data-theme]){--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;--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%);}} \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/rust-logo-151179464ae7ed46.svg b/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/rust-logo-151179464ae7ed46.svg deleted file mode 100644 index 62424d8f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/rust-logo-151179464ae7ed46.svg +++ /dev/null @@ -1,61 +0,0 @@ - - - diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/rustdoc-dd39b87e5fcfba68.css b/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/rustdoc-dd39b87e5fcfba68.css deleted file mode 100644 index 77f89832..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/rustdoc-dd39b87e5fcfba68.css +++ /dev/null @@ -1,46 +0,0 @@ - :root{--nav-sub-mobile-padding:8px;--search-typename-width:6.75rem;--desktop-sidebar-width:200px;--src-sidebar-width:300px;--desktop-sidebar-z-index:100;}@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-left:-0.25rem;margin-right:0.25rem;}.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:24px;}.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 -16px 0 -16px;text-align:center;}.sidebar-crate h2 a{display:block;margin:0 calc(-24px + 0.25rem) 0 -0.2rem;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);}}@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/scrape-examples-ef1e698c1d417c0c.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/scrape-examples-ef1e698c1d417c0c.js deleted file mode 100644 index ba830e37..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/scrape-examples-ef1e698c1d417c0c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(function(){const DEFAULT_MAX_LINES=5;const HIDDEN_MAX_LINES=10;function scrollToLoc(elt,loc,isHidden){const lines=elt.querySelector(".src-line-numbers");let scrollOffset;const maxLines=isHidden?HIDDEN_MAX_LINES:DEFAULT_MAX_LINES;if(loc[1]-loc[0]>maxLines){const line=Math.max(0,loc[0]-1);scrollOffset=lines.children[line].offsetTop}else{const wrapper=elt.querySelector(".code-wrapper");const halfHeight=wrapper.offsetHeight/2;const offsetTop=lines.children[loc[0]].offsetTop;const lastLine=lines.children[loc[1]];const offsetBot=lastLine.offsetTop+lastLine.offsetHeight;const offsetMid=(offsetTop+offsetBot)/2;scrollOffset=offsetMid-halfHeight}lines.scrollTo(0,scrollOffset);elt.querySelector(".rust").scrollTo(0,scrollOffset)}function updateScrapedExample(example,isHidden){const locs=JSON.parse(example.attributes.getNamedItem("data-locs").textContent);let locIndex=0;const highlights=Array.prototype.slice.call(example.querySelectorAll(".highlight"));const link=example.querySelector(".scraped-example-title a");if(locs.length>1){const onChangeLoc=changeIndex=>{removeClass(highlights[locIndex],"focus");changeIndex();scrollToLoc(example,locs[locIndex][0],isHidden);addClass(highlights[locIndex],"focus");const url=locs[locIndex][1];const title=locs[locIndex][2];link.href=url;link.innerHTML=title};example.querySelector(".prev").addEventListener("click",()=>{onChangeLoc(()=>{locIndex=(locIndex-1+locs.length)%locs.length})});example.querySelector(".next").addEventListener("click",()=>{onChangeLoc(()=>{locIndex=(locIndex+1)%locs.length})})}const expandButton=example.querySelector(".expand");if(expandButton){expandButton.addEventListener("click",()=>{if(hasClass(example,"expanded")){removeClass(example,"expanded");scrollToLoc(example,locs[0][0],isHidden)}else{addClass(example,"expanded")}})}scrollToLoc(example,locs[0][0],isHidden)}const firstExamples=document.querySelectorAll(".scraped-example-list > .scraped-example");onEachLazy(firstExamples,el=>updateScrapedExample(el,false));onEachLazy(document.querySelectorAll(".more-examples-toggle"),toggle=>{onEachLazy(toggle.querySelectorAll(".toggle-line, .hide-more"),button=>{button.addEventListener("click",()=>{toggle.open=false})});const moreExamples=toggle.querySelectorAll(".scraped-example");toggle.querySelector("summary").addEventListener("click",()=>{setTimeout(()=>{onEachLazy(moreExamples,el=>updateScrapedExample(el,true))})},{once:true})})})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/search-d52510db62a78183.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/search-d52510db62a78183.js deleted file mode 100644 index a2824f29..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/search-d52510db62a78183.js +++ /dev/null @@ -1,5 +0,0 @@ -"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;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 isIdentCharacter(c){return(c==="_"||(c>="0"&&c<="9")||(c>="a"&&c<="z")||(c>="A"&&c<="Z"))}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){const start=parserState.pos;let end=parserState.pos;let foundExclamation=-1;while(parserState.pos0){throw["Unexpected ",c," after ",parserState.userQuery[parserState.pos-1]]}else{throw["Unexpected ",c]}}parserState.pos+=1;end=parserState.pos}if(foundExclamation!==-1&&foundExclamation!==start&&isIdentCharacter(parserState.userQuery[foundExclamation-1])){if(parserState.typeFilter===null){parserState.typeFilter="macro"}else if(parserState.typeFilter!=="macro"){throw["Invalid search type: macro ","!"," and ",parserState.typeFilter," both specified",]}end=foundExclamation}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();for(const c in query){if(!isIdentCharacter(query[c])){throw["Unexpected ",query[c]," 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,}}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{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(pushFunc);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){if(typeNameIdMap.has(elem.normalizedPathLast)&&(isAssocType||!typeNameIdMap.get(elem.normalizedPathLast).assocOnly)){elem.id=typeNameIdMap.get(elem.normalizedPathLast).id}else if(!parsedQuery.literalSearch){let match=null;let matchDist=maxEditDistance+1;let matchName="";for(const[name,{id,assocOnly}]of typeNameIdMap){const dist=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(){const cb="}".charCodeAt(0);let c=this.string.charCodeAt(this.offset);const ret=[];while(c!==cb){ret.push(this.decode());c=this.string.charCodeAt(this.offset)}this.offset+=1;return ret}decode(){const[ob,la]=["{","`"].map(c=>c.charCodeAt(0));let n=0;let c=this.string.charCodeAt(this.offset);if(c===ob){this.offset+=1;return this.decodeList()}while(c>1];this.offset+=1;return sign?-value:value}next(){const c=this.string.charCodeAt(this.offset);const[zero,ua,la]=["0","@","`"].map(c=>c.charCodeAt(0));if(c>=zero&&c16){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();const charA="A".charCodeAt(0);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)-charA,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/static.files/settings-4313503d2e1961c2.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/settings-4313503d2e1961c2.js deleted file mode 100644 index ab425fe4..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/settings-4313503d2e1961c2.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict";(function(){const isSettingsPage=window.location.pathname.endsWith("/settings.html");function changeSetting(settingName,value){if(settingName==="theme"){const useSystem=value==="system preference"?"true":"false";updateLocalStorage("use-system-theme",useSystem)}updateLocalStorage(settingName,value);switch(settingName){case"theme":case"preferred-dark-theme":case"preferred-light-theme":updateTheme();updateLightAndDark();break;case"line-numbers":if(value===true){window.rustdoc_add_line_numbers_to_examples()}else{window.rustdoc_remove_line_numbers_from_examples()}break;case"hide-sidebar":if(value===true){addClass(document.documentElement,"hide-sidebar")}else{removeClass(document.documentElement,"hide-sidebar")}break}}function showLightAndDark(){removeClass(document.getElementById("preferred-light-theme"),"hidden");removeClass(document.getElementById("preferred-dark-theme"),"hidden")}function hideLightAndDark(){addClass(document.getElementById("preferred-light-theme"),"hidden");addClass(document.getElementById("preferred-dark-theme"),"hidden")}function updateLightAndDark(){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||(useSystem===null&&getSettingValue("theme")===null)){showLightAndDark()}else{hideLightAndDark()}}function setEvents(settingsElement){updateLightAndDark();onEachLazy(settingsElement.querySelectorAll("input[type=\"checkbox\"]"),toggle=>{const settingId=toggle.id;const settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=()=>{changeSetting(toggle.id,toggle.checked)}});onEachLazy(settingsElement.querySelectorAll("input[type=\"radio\"]"),elem=>{const settingId=elem.name;let settingValue=getSettingValue(settingId);if(settingId==="theme"){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||settingValue===null){settingValue=useSystem==="false"?"light":"system preference"}}if(settingValue!==null&&settingValue!=="null"){elem.checked=settingValue===elem.value}elem.addEventListener("change",ev=>{changeSetting(ev.target.name,ev.target.value)})})}function buildSettingsPageSections(settings){let output="";for(const setting of settings){const js_data_name=setting["js_name"];const setting_name=setting["name"];if(setting["options"]!==undefined){output+=`\ -
-
${setting_name}
-
`;onEach(setting["options"],option=>{const checked=option===setting["default"]?" checked":"";const full=`${js_data_name}-${option.replace(/ /g,"-")}`;output+=`\ - `});output+=`\ -
-
`}else{const checked=setting["default"]===true?" checked":"";output+=`\ -
\ - \ -
`}}return output}function buildSettingsPage(){const theme_names=getVar("themes").split(",").filter(t=>t);theme_names.push("light","dark","ayu");const settings=[{"name":"Theme","js_name":"theme","default":"system preference","options":theme_names.concat("system preference"),},{"name":"Preferred light theme","js_name":"preferred-light-theme","default":"light","options":theme_names,},{"name":"Preferred dark theme","js_name":"preferred-dark-theme","default":"dark","options":theme_names,},{"name":"Auto-hide item contents for large items","js_name":"auto-hide-large-items","default":true,},{"name":"Auto-hide item methods' documentation","js_name":"auto-hide-method-docs","default":false,},{"name":"Auto-hide trait implementation documentation","js_name":"auto-hide-trait-implementations","default":false,},{"name":"Directly go to item in search if there is only one result","js_name":"go-to-only-result","default":false,},{"name":"Show line numbers on code examples","js_name":"line-numbers","default":false,},{"name":"Hide persistent navigation bar","js_name":"hide-sidebar","default":false,},{"name":"Disable keyboard shortcuts","js_name":"disable-shortcuts","default":false,},];const elementKind=isSettingsPage?"section":"div";const innerHTML=`
${buildSettingsPageSections(settings)}
`;const el=document.createElement(elementKind);el.id="settings";if(!isSettingsPage){el.className="popover"}el.innerHTML=innerHTML;if(isSettingsPage){document.getElementById(MAIN_ID).appendChild(el)}else{el.setAttribute("tabindex","-1");getSettingsButton().appendChild(el)}return el}const settingsMenu=buildSettingsPage();function displaySettings(){settingsMenu.style.display="";onEachLazy(settingsMenu.querySelectorAll("input[type='checkbox']"),el=>{const val=getSettingValue(el.id);const checked=val==="true";if(checked!==el.checked&&val!==null){el.checked=checked}})}function settingsBlurHandler(event){blurHandler(event,getSettingsButton(),window.hidePopoverMenus)}if(isSettingsPage){getSettingsButton().onclick=event=>{event.preventDefault()}}else{const settingsButton=getSettingsButton();const settingsMenu=document.getElementById("settings");settingsButton.onclick=event=>{if(settingsMenu.contains(event.target)){return}event.preventDefault();const shouldDisplaySettings=settingsMenu.style.display==="none";window.hideAllModals();if(shouldDisplaySettings){displaySettings()}};settingsButton.onblur=settingsBlurHandler;settingsButton.querySelector("a").onblur=settingsBlurHandler;onEachLazy(settingsMenu.querySelectorAll("input"),el=>{el.onblur=settingsBlurHandler});settingsMenu.onblur=settingsBlurHandler}setTimeout(()=>{setEvents(settingsMenu);if(!isSettingsPage){displaySettings()}removeClass(getSettingsButton(),"rotate")},0)})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/src-script-e66d777a5a92e9b2.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/src-script-e66d777a5a92e9b2.js deleted file mode 100644 index d0aebb85..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/src-script-e66d777a5a92e9b2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(function(){const rootPath=getVar("root-path");const NAME_OFFSET=0;const DIRS_OFFSET=1;const FILES_OFFSET=2;const RUSTDOC_MOBILE_BREAKPOINT=700;function closeSidebarIfMobile(){if(window.innerWidth{removeClass(document.documentElement,"src-sidebar-expanded");updateLocalStorage("source-sidebar-show","false")};window.rustdocShowSourceSidebar=()=>{addClass(document.documentElement,"src-sidebar-expanded");updateLocalStorage("source-sidebar-show","true")};window.rustdocToggleSrcSidebar=()=>{if(document.documentElement.classList.contains("src-sidebar-expanded")){window.rustdocCloseSourceSidebar()}else{window.rustdocShowSourceSidebar()}};function createSrcSidebar(){const container=document.querySelector("nav.sidebar");const sidebar=document.createElement("div");sidebar.id="src-sidebar";let hasFoundFile=false;for(const[key,source]of srcIndex){source[NAME_OFFSET]=key;hasFoundFile=createDirEntry(source,sidebar,"",hasFoundFile)}container.appendChild(sidebar);const selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}}function highlightSrcLines(){const match=window.location.hash.match(/^#?(\d+)(?:-(\d+))?$/);if(!match){return}let from=parseInt(match[1],10);let to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to{onEachLazy(e.getElementsByTagName("a"),i_e=>{removeClass(i_e,"line-highlighted")})});for(let i=from;i<=to;++i){elem=document.getElementById(i);if(!elem){break}addClass(elem,"line-highlighted")}}const handleSrcHighlight=(function(){let prev_line_id=0;const set_fragment=name=>{const x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSrcLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return ev=>{let cur_line_id=parseInt(ev.target.id,10);if(isNaN(cur_line_id)||ev.ctrlKey||ev.altKey||ev.metaKey){return}ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){const tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());window.addEventListener("hashchange",highlightSrcLines);onEachLazy(document.getElementsByClassName("src-line-numbers"),el=>{el.addEventListener("click",handleSrcHighlight)});highlightSrcLines();window.createSrcSidebar=createSrcSidebar})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/storage-118b08c4c78b968e.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/storage-118b08c4c78b968e.js deleted file mode 100644 index 98189467..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/static.files/storage-118b08c4c78b968e.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict";const builtinThemes=["light","dark","ayu"];const darkThemes=["dark","ayu"];window.currentTheme=document.getElementById("themeStyle");const settingsDataset=(function(){const settingsElement=document.getElementById("default-settings");return settingsElement&&settingsElement.dataset?settingsElement.dataset:null})();function getSettingValue(settingName){const current=getCurrentValue(settingName);if(current===null&&settingsDataset!==null){const def=settingsDataset[settingName.replace(/-/g,"_")];if(def!==undefined){return def}}return current}const localStoredTheme=getSettingValue("theme");function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(elem&&elem.classList){elem.classList.add(className)}}function removeClass(elem,className){if(elem&&elem.classList){elem.classList.remove(className)}}function onEach(arr,func){for(const elem of arr){if(func(elem)){return true}}return false}function onEachLazy(lazyArray,func){return onEach(Array.prototype.slice.call(lazyArray),func)}function updateLocalStorage(name,value){try{window.localStorage.setItem("rustdoc-"+name,value)}catch(e){}}function getCurrentValue(name){try{return window.localStorage.getItem("rustdoc-"+name)}catch(e){return null}}const getVar=(function getVar(name){const el=document.querySelector("head > meta[name='rustdoc-vars']");return el?el.attributes["data-"+name].value:null});function switchTheme(newThemeName,saveTheme){const themeNames=getVar("themes").split(",").filter(t=>t);themeNames.push(...builtinThemes);if(themeNames.indexOf(newThemeName)===-1){return}if(saveTheme){updateLocalStorage("theme",newThemeName)}document.documentElement.setAttribute("data-theme",newThemeName);if(builtinThemes.indexOf(newThemeName)!==-1){if(window.currentTheme){window.currentTheme.parentNode.removeChild(window.currentTheme);window.currentTheme=null}}else{const newHref=getVar("root-path")+encodeURIComponent(newThemeName)+getVar("resource-suffix")+".css";if(!window.currentTheme){if(document.readyState==="loading"){document.write(``);window.currentTheme=document.getElementById("themeStyle")}else{window.currentTheme=document.createElement("link");window.currentTheme.rel="stylesheet";window.currentTheme.id="themeStyle";window.currentTheme.href=newHref;document.documentElement.appendChild(window.currentTheme)}}else if(newHref!==window.currentTheme.href){window.currentTheme.href=newHref}}}const updateTheme=(function(){const mql=window.matchMedia("(prefers-color-scheme: dark)");function updateTheme(){if(getSettingValue("use-system-theme")!=="false"){const lightTheme=getSettingValue("preferred-light-theme")||"light";const darkTheme=getSettingValue("preferred-dark-theme")||"dark";updateLocalStorage("use-system-theme","true");switchTheme(mql.matches?darkTheme:lightTheme,true)}else{switchTheme(getSettingValue("theme"),false)}}mql.addEventListener("change",updateTheme);return updateTheme})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("preferred-dark-theme",localStoredTheme)}}updateTheme();if(getSettingValue("source-sidebar-show")==="true"){addClass(document.documentElement,"src-sidebar-expanded")}if(getSettingValue("hide-sidebar")==="true"){addClass(document.documentElement,"hide-sidebar")}function updateSidebarWidth(){const desktopSidebarWidth=getSettingValue("desktop-sidebar-width");if(desktopSidebarWidth&&desktopSidebarWidth!=="null"){document.documentElement.style.setProperty("--desktop-sidebar-width",desktopSidebarWidth+"px",)}const srcSidebarWidth=getSettingValue("src-sidebar-width");if(srcSidebarWidth&&srcSidebarWidth!=="null"){document.documentElement.style.setProperty("--src-sidebar-width",srcSidebarWidth+"px",)}}updateSidebarWidth();window.addEventListener("pageshow",ev=>{if(ev.persisted){setTimeout(updateTheme,0);setTimeout(updateSidebarWidth,0)}});class RustdocSearchElement extends HTMLElement{constructor(){super()}connectedCallback(){const rootPath=getVar("root-path");const currentCrate=getVar("current-crate");this.innerHTML=``}}window.customElements.define("rustdoc-search",RustdocSearchElement) \ 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 deleted file mode 100644 index 270a1587..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/clone/trait.Clone.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"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 deleted file mode 100644 index a573550b..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/cmp/trait.Eq.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"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 deleted file mode 100644 index 695eda8f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/cmp/trait.PartialEq.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"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 deleted file mode 100644 index 28d42f05..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/convert/trait.From.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"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 deleted file mode 100644 index f544c767..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/fmt/trait.Debug.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]] -};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 deleted file mode 100644 index 899cd7d8..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/fmt/trait.Display.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"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 deleted file mode 100644 index 3152e387..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/marker/trait.Freeze.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]]] -};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 deleted file mode 100644 index 2e259f12..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/marker/trait.Send.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]]] -};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 deleted file mode 100644 index 19408b71..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/marker/trait.StructuralPartialEq.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"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 deleted file mode 100644 index 22784882..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/marker/trait.Sync.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]]] -};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 deleted file mode 100644 index 3e63cbc0..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/marker/trait.Unpin.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]]] -};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 deleted file mode 100644 index 6f8f3bd3..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]]] -};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 deleted file mode 100644 index a29a861a..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]]] -};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/redstone/core/validator/trait.Validator.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/redstone/core/validator/trait.Validator.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/redstone/core/validator/trait.Validator.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/network/as_str/trait.AsAsciiStr.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/redstone/network/as_str/trait.AsAsciiStr.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/redstone/network/as_str/trait.AsAsciiStr.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/network/as_str/trait.AsHexStr.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/redstone/network/as_str/trait.AsHexStr.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/redstone/network/as_str/trait.AsHexStr.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/network/assert/trait.Assert.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/redstone/network/assert/trait.Assert.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/redstone/network/assert/trait.Assert.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/network/assert/trait.Unwrap.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/redstone/network/assert/trait.Unwrap.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/redstone/network/assert/trait.Unwrap.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/network/flattened/trait.Flattened.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/redstone/network/flattened/trait.Flattened.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/redstone/network/flattened/trait.Flattened.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/network/from_bytes_repr/trait.FromBytesRepr.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/redstone/network/from_bytes_repr/trait.FromBytesRepr.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/redstone/network/from_bytes_repr/trait.FromBytesRepr.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/network/from_bytes_repr/trait.Sanitized.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/redstone/network/from_bytes_repr/trait.Sanitized.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/redstone/network/from_bytes_repr/trait.Sanitized.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/network/radix/u256_ext/trait.U256Ext.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/redstone/network/radix/u256_ext/trait.U256Ext.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/redstone/network/radix/u256_ext/trait.U256Ext.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/network/specific/trait.NetworkSpecific.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/redstone/network/specific/trait.NetworkSpecific.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/redstone/network/specific/trait.NetworkSpecific.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/utils/filter/trait.FilterSome.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/redstone/utils/filter/trait.FilterSome.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/redstone/utils/filter/trait.FilterSome.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/utils/median/trait.Averageable.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/redstone/utils/median/trait.Averageable.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/redstone/utils/median/trait.Averageable.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/utils/median/trait.Avg.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/redstone/utils/median/trait.Avg.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/redstone/utils/median/trait.Avg.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/utils/median/trait.Median.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/redstone/utils/median/trait.Median.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/redstone/utils/median/trait.Median.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/utils/trim/trait.Trim.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/redstone/utils/trim/trait.Trim.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/redstone/utils/trim/trait.Trim.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/utils/trim_zeros/trait.TrimZeros.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/redstone/utils/trim_zeros/trait.TrimZeros.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/trait.impl/redstone/utils/trim_zeros/trait.TrimZeros.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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 deleted file mode 100644 index 1d91fcbc..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/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"],["
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 deleted file mode 100644 index cadcd6d3..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/type.impl/redstone/network/casper/struct.Casper.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var type_impls = { -"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/redstone/network/pure/struct.Std.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/type.impl/redstone/network/pure/struct.Std.js deleted file mode 100644 index b85e8d1d..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/type.impl/redstone/network/pure/struct.Std.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]] -};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/radix/struct.Radix.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/type.impl/redstone/network/radix/struct.Radix.js deleted file mode 100644 index f8bbe727..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/type.impl/redstone/network/radix/struct.Radix.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]] -};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/type._Network.js b/static/rust/redstone/crypto_secp256k1,network_casper/doc/type.impl/redstone/network/type._Network.js deleted file mode 100644 index 53f96772..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/doc/type.impl/redstone/network/type._Network.js +++ /dev/null @@ -1,3 +0,0 @@ -(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/help.html b/static/rust/redstone/crypto_secp256k1,network_casper/help.html deleted file mode 100644 index f173d86a..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/help.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index d76b13f5..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/all.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 0792edbc..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/aggregator/fn.aggregate_matrix.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 15726f8e..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/aggregator/fn.aggregate_values.html +++ /dev/null @@ -1,25 +0,0 @@ -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.

-

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 -an average of the values, selecting the median, or applying a custom algorithm defined within the -aggregate_matrix function.

-

The primary purpose of this function is to consolidate data from multiple sources into a coherent -and singular value set that adheres to the criteria specified in the Config.

-

§Arguments

-
    -
  • config - A Config instance containing settings and parameters used to guide the aggregation process.
  • -
  • data_packages - A vector of DataPackage instances, each representing a set of values and associated -metadata collected from various sources or signers.
  • -
-

§Returns

-

Returns a Vec<U256>, which is a vector of aggregated values resulting from applying the aggregation -logic to the input data packages as per the specified configuration. Each U256 value in the vector -represents an aggregated result derived from the corresponding data packages.

-

§Note

-

This function is internal to the crate (pub(crate)) and not exposed as part of the public API. It is -designed to be used by other components within the same crate that require value aggregation functionality.

-
\ No newline at end of file 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 deleted file mode 100644 index f3dc8819..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/aggregator/fn.make_value_signer_matrix.html +++ /dev/null @@ -1,4 +0,0 @@ -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 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 deleted file mode 100644 index 7aa39374..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/aggregator/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/aggregator/sidebar-items.js deleted file mode 100644 index c13147cd..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/aggregator/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["aggregate_matrix","aggregate_values","make_value_signer_matrix"],"type":["Matrix"]}; \ 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 deleted file mode 100644 index 61c3f974..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/aggregator/type.Matrix.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 32a77abc..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/config/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/config/sidebar-items.js deleted file mode 100644 index 4cadad77..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/config/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"struct":["Config"]}; \ 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 deleted file mode 100644 index 5f859175..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/config/struct.Config.html +++ /dev/null @@ -1,38 +0,0 @@ -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.

-

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.

-

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.

-

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.

-

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( - &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 - 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 deleted file mode 100644 index e427a2e8..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/index.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index d15046f1..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/processor/fn.make_processor_result.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index b1ad0b84..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/processor/fn.process_payload.html +++ /dev/null @@ -1,7 +0,0 @@ -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.
  • -
  • payload_bytes - Network-specific byte-list of the payload to be processed.
  • -
-
\ No newline at end of file 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 deleted file mode 100644 index ccd25006..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/processor/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/processor/sidebar-items.js deleted file mode 100644 index e25cd4d1..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/processor/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["make_processor_result","process_payload"]}; \ 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 deleted file mode 100644 index 52eaf103..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/processor_result/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/processor_result/sidebar-items.js deleted file mode 100644 index 04eabb0b..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/processor_result/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"struct":["ProcessorResult"]}; \ 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 deleted file mode 100644 index 788c8b93..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/processor_result/struct.ProcessorResult.html +++ /dev/null @@ -1,29 +0,0 @@ -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.

-

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.

-

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).

-

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_casper/redstone/core/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/sidebar-items.js deleted file mode 100644 index ce8d7edb..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["aggregator","config","processor","processor_result","validator"]}; \ 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 deleted file mode 100644 index 141d82cd..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/validator/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/validator/sidebar-items.js deleted file mode 100644 index a9b53ab7..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/validator/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["Validator"]}; \ 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 deleted file mode 100644 index ffbec709..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/core/validator/trait.Validator.html +++ /dev/null @@ -1,70 +0,0 @@ -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 validate_signer_count_threshold(
-        &self,
-        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.

-

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.

-
§Arguments
-
    -
  • feed_id: U256 - The unique identifier of the data feed.
  • -
-
§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.

-

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.

-
§Arguments
-
    -
  • signer: &[u8] - A byte slice representing the signer’s identifier.
  • -
-
§Returns
-
    -
  • Option<usize> - The index of the signer if found, or None if not found.
  • -
-
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.

-

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.

-
§Arguments
-
    -
  • index: usize - The index of the data value being validated.
  • -
  • values: &[Option<U256>] - A slice of optional U256 values associated with the data.
  • -
-
§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.

-

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.

-
§Arguments
-
    -
  • index: usize - The index of the data value whose timestamp is being validated.
  • -
  • timestamp: u64 - The timestamp to be validated.
  • -
-
§Returns
-
    -
  • u64 - The validated timestamp.
  • -
-

Implementors§

\ No newline at end of file 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 deleted file mode 100644 index 541ea6ec..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/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_casper/redstone/crypto/keccak256/fn.keccak256.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/keccak256/fn.keccak256.html deleted file mode 100644 index 2665643a..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/keccak256/fn.keccak256.html +++ /dev/null @@ -1 +0,0 @@ -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 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 deleted file mode 100644 index 96fe770a..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/keccak256/index.html +++ /dev/null @@ -1 +0,0 @@ -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/keccak256/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/keccak256/sidebar-items.js deleted file mode 100644 index 1a5fc982..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/keccak256/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["keccak256"]}; \ 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 deleted file mode 100644 index ba2beac0..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/recover/crypto256/fn.recover_public_key.html +++ /dev/null @@ -1,5 +0,0 @@ -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 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 deleted file mode 100644 index b5563f5f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/recover/crypto256/index.html +++ /dev/null @@ -1 +0,0 @@ -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/crypto256/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/recover/crypto256/sidebar-items.js deleted file mode 100644 index 57bd2c11..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/recover/crypto256/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["recover_public_key"]}; \ 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 deleted file mode 100644 index aba3bde0..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/recover/fn.recover_address.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index e7703e69..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/recover/index.html +++ /dev/null @@ -1 +0,0 @@ -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/recover/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/recover/sidebar-items.js deleted file mode 100644 index 40087146..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/crypto/recover/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["recover_address"],"mod":["crypto256"]}; \ 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 deleted file mode 100644 index 521fe7cb..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/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_casper/redstone/index.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/index.html deleted file mode 100644 index ea091ee8..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/index.html +++ /dev/null @@ -1,6 +0,0 @@ -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. -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/redstone/macro.print_and_panic!.html b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/macro.print_and_panic!.html deleted file mode 100644 index 90775bac..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/macro.print_and_panic!.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to macro.print_and_panic.html...

- - - \ No newline at end of file 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 deleted file mode 100644 index b308eb68..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/macro.print_and_panic.html +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 2d4772f3..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/macro.print_debug!.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to macro.print_debug.html...

- - - \ 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 deleted file mode 100644 index 3cb863d6..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/macro.print_debug.html +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 9f63a8ad..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/as_str/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/as_str/sidebar-items.js deleted file mode 100644 index 01f900d2..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/as_str/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["AsAsciiStr","AsHexStr"]}; \ 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 deleted file mode 100644 index 8fa29f1c..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/as_str/trait.AsAsciiStr.html +++ /dev/null @@ -1,4 +0,0 @@ -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 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 deleted file mode 100644 index 8c78b5e1..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/as_str/trait.AsHexStr.html +++ /dev/null @@ -1,4 +0,0 @@ -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 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 deleted file mode 100644 index 13078112..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/assert/fn.assert_or_revert.html +++ /dev/null @@ -1,7 +0,0 @@ -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 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 deleted file mode 100644 index 385fc71e..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/assert/fn.assert_or_revert_bool_with.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 680c61a9..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/assert/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/assert/sidebar-items.js deleted file mode 100644 index bd99c6f7..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/assert/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["assert_or_revert","assert_or_revert_bool_with"],"trait":["Assert","Unwrap"]}; \ 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 deleted file mode 100644 index e068a406..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/assert/trait.Assert.html +++ /dev/null @@ -1,6 +0,0 @@ -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 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 deleted file mode 100644 index db1ea7bc..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/assert/trait.Unwrap.html +++ /dev/null @@ -1,9 +0,0 @@ -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 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 deleted file mode 100644 index 6501c970..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/casper/error/index.html +++ /dev/null @@ -1 +0,0 @@ -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/error/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/casper/error/sidebar-items.js deleted file mode 100644 index 5244ce01..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/casper/error/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {}; \ 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 deleted file mode 100644 index 5cefed58..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/casper/from_bytes_repr/index.html +++ /dev/null @@ -1 +0,0 @@ -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/from_bytes_repr/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/casper/from_bytes_repr/sidebar-items.js deleted file mode 100644 index 5244ce01..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/casper/from_bytes_repr/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {}; \ 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 deleted file mode 100644 index f585fe38..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/casper/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/casper/sidebar-items.js deleted file mode 100644 index b4952c01..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/casper/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["error","from_bytes_repr"],"struct":["Casper"]}; \ 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 deleted file mode 100644 index a52d09e8..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/casper/struct.Casper.html +++ /dev/null @@ -1,12 +0,0 @@ -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 - 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 deleted file mode 100644 index b0d0096c..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/error/enum.Error.html +++ /dev/null @@ -1,65 +0,0 @@ -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),
-}
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.

-

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.

-

Used when operations on U256 numbers exceed their maximum value, potentially leading -to incorrect calculations or state.

-
§

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.

-

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.

-

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.

-

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.

-

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.

-

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.

-

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.

-

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.

-

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).

-

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 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 deleted file mode 100644 index e083b3b4..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/error/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/error/sidebar-items.js deleted file mode 100644 index 41603cd6..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/error/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"enum":["Error"],"trait":["ContractErrorContent"]}; \ 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 deleted file mode 100644 index 577c3a6f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/error/trait.ContractErrorContent.html +++ /dev/null @@ -1,5 +0,0 @@ -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 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 deleted file mode 100644 index e62982d8..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/flattened/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/flattened/sidebar-items.js deleted file mode 100644 index 25ac6e97..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/flattened/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["Flattened"]}; \ 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 deleted file mode 100644 index 5cfae35f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/flattened/trait.Flattened.html +++ /dev/null @@ -1,4 +0,0 @@ -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 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 deleted file mode 100644 index 037b0f7e..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/from_bytes_repr/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/from_bytes_repr/sidebar-items.js deleted file mode 100644 index 9d06c298..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/from_bytes_repr/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["FromBytesRepr","Sanitized"]}; \ 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 deleted file mode 100644 index 6c56e1ee..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/from_bytes_repr/trait.FromBytesRepr.html +++ /dev/null @@ -1,4 +0,0 @@ -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 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 deleted file mode 100644 index 79baf865..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/from_bytes_repr/trait.Sanitized.html +++ /dev/null @@ -1,4 +0,0 @@ -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 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 deleted file mode 100644 index 2e9c47bf..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/index.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index ac53c72e..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/print_debug/index.html +++ /dev/null @@ -1 +0,0 @@ -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/print_debug/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/print_debug/sidebar-items.js deleted file mode 100644 index 5244ce01..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/print_debug/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/sidebar-items.js deleted file mode 100644 index 1fb98b05..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["as_str","assert","casper","error","flattened","from_bytes_repr","print_debug","specific"],"type":["_Network"]}; \ 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 deleted file mode 100644 index 2e47400c..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/constant.VALUE_SIZE.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 414a9953..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/fn.print.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 2e9edf89..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/fn.revert.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 1378d9dc..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/sidebar-items.js deleted file mode 100644 index 49355aaa..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"constant":["VALUE_SIZE"],"fn":["print","revert"],"trait":["NetworkSpecific"],"type":["Bytes","Network","U256"]}; \ 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 deleted file mode 100644 index 48323dfa..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/trait.NetworkSpecific.html +++ /dev/null @@ -1,11 +0,0 @@ -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;
-
-    // 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 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 deleted file mode 100644 index 04a40a5a..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/type.Bytes.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 40e404c9..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/type.Network.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 4b103256..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/specific/type.U256.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index bf814c95..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/network/type._Network.html +++ /dev/null @@ -1 +0,0 @@ -_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 deleted file mode 100644 index 72b04b86..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.DATA_FEED_ID_BS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index fed432b2..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.DATA_PACKAGES_COUNT_BS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index f25ed2f5..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.DATA_POINTS_COUNT_BS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 95f9c3d5..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.DATA_POINT_VALUE_BYTE_SIZE_BS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 160a69a6..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.MAX_TIMESTAMP_AHEAD_MS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 47c72d3b..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.MAX_TIMESTAMP_DELAY_MS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 07258216..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.REDSTONE_MARKER.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 21ea69ca..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.REDSTONE_MARKER_BS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 2a3a5b7f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.SIGNATURE_BS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 1635207a..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.TIMESTAMP_BS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index a7ccdc60..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/constant.UNSIGNED_METADATA_BYTE_SIZE_BS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 0268cb89..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/index.html +++ /dev/null @@ -1 +0,0 @@ -redstone::protocol::constants - Rust
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/sidebar-items.js deleted file mode 100644 index 7fd4daab..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/constants/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"constant":["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"]}; \ 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 deleted file mode 100644 index f1456016..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_package/fn.trim_data_package.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 393e9998..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_package/fn.trim_data_packages.html +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 4f7ef4c4..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_package/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_package/sidebar-items.js deleted file mode 100644 index 4b17209f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_package/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["trim_data_package","trim_data_packages"],"struct":["DataPackage"]}; \ 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 deleted file mode 100644 index b77c9d35..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_package/struct.DataPackage.html +++ /dev/null @@ -1,22 +0,0 @@ -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).

-

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 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 deleted file mode 100644 index 10a3aa68..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_point/fn.trim_data_point.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 4bc76a0f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_point/fn.trim_data_points.html +++ /dev/null @@ -1,5 +0,0 @@ -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 deleted file mode 100644 index 6ab1baf0..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_point/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_point/sidebar-items.js deleted file mode 100644 index 2a5fa8f1..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_point/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["trim_data_point","trim_data_points"],"struct":["DataPoint"]}; \ 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 deleted file mode 100644 index 4cee4899..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/data_point/struct.DataPoint.html +++ /dev/null @@ -1,21 +0,0 @@ -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).

-

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 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 deleted file mode 100644 index d221f7b2..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/index.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index fb7c7144..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/marker/fn.trim_redstone_marker.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 9844daf7..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/marker/index.html +++ /dev/null @@ -1 +0,0 @@ -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/marker/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/marker/sidebar-items.js deleted file mode 100644 index 2d2958a1..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/marker/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["trim_redstone_marker"]}; \ 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 deleted file mode 100644 index b3e6350e..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/payload/fn.trim_metadata.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 9eae9fdd..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/payload/fn.trim_payload.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 7bedf304..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/payload/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/payload/sidebar-items.js deleted file mode 100644 index 0d79d818..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/payload/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["trim_metadata","trim_payload"],"struct":["Payload"]}; \ 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 deleted file mode 100644 index 9234341b..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/payload/struct.Payload.html +++ /dev/null @@ -1,18 +0,0 @@ -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).

-

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 diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/sidebar-items.js deleted file mode 100644 index 94e7fdb5..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/protocol/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["constants","data_package","data_point","marker","payload"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/sidebar-items.js deleted file mode 100644 index f230d898..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"macro":["print_and_panic","print_debug"],"mod":["core","crypto","network","protocol","utils"]}; \ 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 deleted file mode 100644 index a153fc5f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/filter/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/filter/sidebar-items.js deleted file mode 100644 index 9cc2f1a1..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/filter/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["FilterSome"]}; \ 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 deleted file mode 100644 index 69bc1f28..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/filter/trait.FilterSome.html +++ /dev/null @@ -1,4 +0,0 @@ -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 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 deleted file mode 100644 index ef51ef17..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/index.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index ebb4b4a4..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/median/fn.maybe_pick_median.html +++ /dev/null @@ -1,2 +0,0 @@ -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 deleted file mode 100644 index 9a4952c3..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/median/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/median/sidebar-items.js deleted file mode 100644 index 092646ab..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/median/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["maybe_pick_median"],"trait":["Averageable","Avg","Median"]}; \ 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 deleted file mode 100644 index 87e04bd4..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/median/trait.Averageable.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 200d300b..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/median/trait.Avg.html +++ /dev/null @@ -1,5 +0,0 @@ -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 - 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 deleted file mode 100644 index 60047574..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/median/trait.Median.html +++ /dev/null @@ -1,7 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/sidebar-items.js deleted file mode 100644 index 2f4d851f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["filter","median","trim","trim_zeros"]}; \ 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 deleted file mode 100644 index e7e6608a..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/trim/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/trim/sidebar-items.js deleted file mode 100644 index 076b36c3..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/trim/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["Trim"]}; \ 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 deleted file mode 100644 index 9939a0b8..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/trim/trait.Trim.html +++ /dev/null @@ -1,5 +0,0 @@ -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 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 deleted file mode 100644 index 2a2fd9e0..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/trim_zeros/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/trim_zeros/sidebar-items.js deleted file mode 100644 index eebab388..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/trim_zeros/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["TrimZeros"]}; \ 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 deleted file mode 100644 index f1299ca4..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/redstone/utils/trim_zeros/trait.TrimZeros.html +++ /dev/null @@ -1,4 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/search-index.js b/static/rust/redstone/crypto_secp256k1,network_casper/search-index.js deleted file mode 100644 index d080deeb..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/search-index.js +++ /dev/null @@ -1,5 +0,0 @@ -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"}]\ -]')); -if (typeof exports !== 'undefined') exports.searchIndex = searchIndex; -else if (window.initSearch) window.initSearch(searchIndex); diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/search.desc/redstone/redstone-desc-0-.js b/static/rust/redstone/crypto_secp256k1,network_casper/search.desc/redstone/redstone-desc-0-.js deleted file mode 100644 index a06ca5b3..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/search.desc/redstone/redstone-desc-0-.js +++ /dev/null @@ -1 +0,0 @@ -searchState.loadedDescShard("redstone", 0, "RedStone\nAggregates values from a collection of data packages …\nConfiguration for a RedStone payload processor.\nThe current block time in timestamp format, used for …\nIdentifiers for the data feeds from which values are …\nReturns the argument unchanged.\nCalls U::from(self).\nThe minimum number of signers required validating the data.\nList of identifiers for signers authorized to sign the …\nThe main processor of the RedStone payload.\nRepresents the result of processing the RedStone payload.\nReturns the argument unchanged.\nCalls U::from(self).\nThe minimum timestamp encountered during processing.\nA collection of values processed during the operation.\nA trait defining validation operations for data feeds and …\nRetrieves the index of a given data feed.\nRetrieves the index of a given signer.\nValidates the signer count threshold for a given index …\nValidates the timestamp for a given index.\nReturns the argument unchanged.\nCalls U::from(self).\nUsed when an expected non-empty array or vector is found …\nRepresents errors that need to clone ContractErrorContent, …\nRepresents errors that arise from the contract itself.\nRepresents errors related to cryptographic operations.\nErrors that can be encountered in the …\nIndicates that the number of signers does not meet the …\nUsed when there is leftover data in a payload that should …\nIndicates an overflow error with U256 numbers.\nSignifies that an unsupported size was encountered.\nIndicates that a timestamp is further in the future than …\nUsed when a timestamp is older than allowed by the …\nIndicates that the marker bytes for RedStone are incorrect.\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).") \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/settings.html b/static/rust/redstone/crypto_secp256k1,network_casper/settings.html deleted file mode 100644 index 9631dcb2..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/settings.html +++ /dev/null @@ -1 +0,0 @@ -Settings

Rustdoc settings

Back
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/src-files.js b/static/rust/redstone/crypto_secp256k1,network_casper/src-files.js deleted file mode 100644 index 174b3837..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/src-files.js +++ /dev/null @@ -1,4 +0,0 @@ -var srcIndex = new Map(JSON.parse('[\ -["redstone",["",[["core",[],["aggregator.rs","config.rs","mod.rs","processor.rs","processor_result.rs","validator.rs"]],["crypto",[],["keccak256.rs","mod.rs","recover.rs"]],["network",[["casper",[],["error.rs","from_bytes_repr.rs","mod.rs"]]],["as_str.rs","assert.rs","error.rs","flattened.rs","from_bytes_repr.rs","mod.rs","print_debug.rs","specific.rs"]],["protocol",[],["constants.rs","data_package.rs","data_point.rs","marker.rs","mod.rs","payload.rs"]],["utils",[],["filter.rs","median.rs","mod.rs","trim.rs","trim_zeros.rs"]]],["lib.rs"]]]\ -]')); -createSrcSidebar(); 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 deleted file mode 100644 index e839b506..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/core/aggregator.rs.html +++ /dev/null @@ -1,583 +0,0 @@ -aggregator.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-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
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-287
-288
-289
-290
-291
-
use crate::{
-    core::{config::Config, validator::Validator},
-    network::specific::U256,
-    print_debug,
-    protocol::data_package::DataPackage,
-    utils::median::Median,
-};
-
-type Matrix = Vec<Vec<Option<U256>>>;
-
-/// 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
-/// an average of the values, selecting the median, or applying a custom algorithm defined within the
-/// `aggregate_matrix` function.
-///
-/// The primary purpose of this function is to consolidate data from multiple sources into a coherent
-/// and singular value set that adheres to the criteria specified in the `Config`.
-///
-/// # Arguments
-///
-/// * `config` - A `Config` instance containing settings and parameters used to guide the aggregation process.
-/// * `data_packages` - A vector of `DataPackage` instances, each representing a set of values and associated
-///   metadata collected from various sources or signers.
-///
-/// # Returns
-///
-/// Returns a `Vec<U256>`, which is a vector of aggregated values resulting from applying the aggregation
-/// logic to the input data packages as per the specified configuration. Each `U256` value in the vector
-/// represents an aggregated result derived from the corresponding data packages.
-///
-/// # Note
-///
-/// This function is internal to the crate (`pub(crate)`) and not exposed as part of the public API. It is
-/// designed to be used by other components within the same crate that require value aggregation functionality.
-pub(crate) fn aggregate_values(config: Config, data_packages: Vec<DataPackage>) -> Vec<U256> {
-    aggregate_matrix(make_value_signer_matrix(&config, data_packages), config)
-}
-
-fn aggregate_matrix(matrix: Matrix, config: Config) -> Vec<U256> {
-    matrix
-        .iter()
-        .enumerate()
-        .map(|(index, values)| {
-            config
-                .validate_signer_count_threshold(index, values)
-                .median()
-        })
-        .collect()
-}
-
-fn make_value_signer_matrix(config: &Config, data_packages: Vec<DataPackage>) -> Matrix {
-    let mut matrix = vec![vec![None; config.signers.len()]; config.feed_ids.len()];
-
-    data_packages.iter().for_each(|data_package| {
-        if let Some(signer_index) = config.signer_index(&data_package.signer_address) {
-            data_package.data_points.iter().for_each(|data_point| {
-                if let Some(feed_index) = config.feed_index(data_point.feed_id) {
-                    matrix[feed_index][signer_index] = data_point.value.into()
-                }
-            })
-        }
-    });
-
-    print_debug!("{:?}", matrix);
-
-    matrix
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod aggregate_matrix_tests {
-    use crate::{
-        core::{aggregator::aggregate_matrix, config::Config},
-        helpers::iter_into::{IterInto, IterIntoOpt, OptIterIntoOpt},
-    };
-
-    #[test]
-    fn test_aggregate_matrix() {
-        let matrix = vec![
-            vec![11u8, 13].iter_into_opt(),
-            vec![21u8, 23].iter_into_opt(),
-        ];
-
-        for signer_count_threshold in 0..Config::test().signers.len() + 1 {
-            let mut config = Config::test();
-            config.signer_count_threshold = signer_count_threshold as u8;
-
-            let result = aggregate_matrix(matrix.clone(), config);
-
-            assert_eq!(result, vec![12u8, 22].iter_into());
-        }
-    }
-
-    #[test]
-    fn test_aggregate_matrix_smaller_threshold_missing_one_value() {
-        let mut config = Config::test();
-        config.signer_count_threshold = 1;
-
-        let matrix = vec![
-            vec![11u8, 13].iter_into_opt(),
-            vec![21u8.into(), None].opt_iter_into_opt(),
-        ];
-
-        let result = aggregate_matrix(matrix, config);
-
-        assert_eq!(result, vec![12u8, 21].iter_into());
-    }
-
-    #[should_panic(expected = "Array is empty")]
-    #[test]
-    fn test_aggregate_matrix_smaller_threshold_missing_whole_feed() {
-        let mut config = Config::test();
-        config.signer_count_threshold = 0;
-
-        let matrix = vec![vec![11u8, 13].iter_into_opt(), vec![None; 2]];
-
-        aggregate_matrix(matrix, config);
-    }
-
-    #[should_panic(expected = "Insufficient signer count 1 for #0 (ETH)")]
-    #[test]
-    fn test_aggregate_matrix_missing_one_value() {
-        let matrix = vec![
-            vec![21u8.into(), None].opt_iter_into_opt(),
-            vec![11u8, 12].iter_into_opt(),
-        ];
-
-        aggregate_matrix(matrix, Config::test());
-    }
-
-    #[should_panic(expected = "Insufficient signer count 0 for #1 (BTC)")]
-    #[test]
-    fn test_aggregate_matrix_missing_whole_feed() {
-        let matrix = vec![vec![11u8, 13].iter_into_opt(), vec![None; 2]];
-
-        aggregate_matrix(matrix, Config::test());
-    }
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod make_value_signer_matrix {
-    use crate::{
-        core::{
-            aggregator::{make_value_signer_matrix, Matrix},
-            config::Config,
-            test_helpers::{AVAX, BTC, ETH, TEST_SIGNER_ADDRESS_1, TEST_SIGNER_ADDRESS_2},
-        },
-        helpers::iter_into::IterInto,
-        network::specific::U256,
-        protocol::data_package::DataPackage,
-    };
-
-    #[test]
-    fn test_make_value_signer_matrix_empty() {
-        let config = Config::test();
-
-        test_make_value_signer_matrix_of(
-            vec![],
-            vec![vec![None; config.signers.len()]; config.feed_ids.len()],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_exact() {
-        let data_packages = vec![
-            DataPackage::test(ETH, 11, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(ETH, 12, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(BTC, 22, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(BTC, 21, TEST_SIGNER_ADDRESS_1, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![11, 12].iter_into(), vec![21, 22].iter_into()],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_greater() {
-        let data_packages = vec![
-            DataPackage::test(ETH, 11, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(ETH, 12, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(BTC, 22, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(BTC, 21, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(AVAX, 31, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(AVAX, 32, TEST_SIGNER_ADDRESS_2, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![11, 12].iter_into(), vec![21, 22].iter_into()],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_smaller() {
-        let data_packages = vec![
-            DataPackage::test(ETH, 11, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(ETH, 12, TEST_SIGNER_ADDRESS_2, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![11, 12].iter_into(), vec![None; 2]],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_diagonal() {
-        let data_packages = vec![
-            DataPackage::test(BTC, 22, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(ETH, 11, TEST_SIGNER_ADDRESS_1, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![11.into(), None], vec![None, 22.into()]],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_repetitions() {
-        let data_packages = vec![
-            DataPackage::test(BTC, 21, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(BTC, 22, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(BTC, 202, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(ETH, 11, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(ETH, 101, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(ETH, 12, TEST_SIGNER_ADDRESS_2, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![101, 12].iter_into(), vec![21, 202].iter_into()],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_all_wrong() {
-        let config = Config::test();
-
-        let data_packages = vec![
-            DataPackage::test(AVAX, 32, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(AVAX, 31, TEST_SIGNER_ADDRESS_1, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![None; config.signers.len()]; config.feed_ids.len()],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_mix() {
-        let data_packages = vec![
-            DataPackage::test(ETH, 11, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(ETH, 12, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(AVAX, 32, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(AVAX, 31, TEST_SIGNER_ADDRESS_1, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![11, 12].iter_into(), vec![None; 2]],
-        );
-    }
-
-    fn test_make_value_signer_matrix_of(
-        data_packages: Vec<DataPackage>,
-        expected_values: Vec<Vec<Option<u128>>>,
-    ) {
-        let config = &Config::test();
-        let result = make_value_signer_matrix(config, data_packages);
-
-        let expected_matrix: Matrix = expected_values
-            .iter()
-            .map(|row| {
-                (row.iter()
-                    .map(|&value| value.map(U256::from))
-                    .collect::<Vec<_>>())
-                .iter_into() as Vec<Option<U256>>
-            })
-            .collect();
-
-        assert_eq!(result, expected_matrix)
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 0b9ca7f7..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/core/config.rs.html +++ /dev/null @@ -1,63 +0,0 @@ -config.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
-
use crate::network::specific::{Bytes, U256};
-
-/// 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.
-#[derive(Debug)]
-pub struct Config {
-    /// 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.
-    pub signer_count_threshold: u8,
-
-    /// 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.
-    pub signers: Vec<Bytes>,
-
-    /// Identifiers for the data feeds from which values are aggregated.
-    ///
-    /// Each data feed id is represented by the network-specific `U256` type.
-    pub feed_ids: Vec<U256>,
-
-    /// 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.
-    pub block_timestamp: u64,
-}
-
\ No newline at end of file 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 deleted file mode 100644 index f278fb16..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/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_casper/src/redstone/core/processor.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/core/processor.rs.html deleted file mode 100644 index 2e92e10d..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/core/processor.rs.html +++ /dev/null @@ -1,203 +0,0 @@ -processor.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-
use crate::{
-    core::{
-        aggregator::aggregate_values, config::Config, processor_result::ProcessorResult,
-        validator::Validator,
-    },
-    network::specific::Bytes,
-    print_debug,
-    protocol::payload::Payload,
-};
-
-/// The main processor of the RedStone payload.
-///
-///
-/// # Arguments
-///
-/// * `config` - Configuration of the payload processing.
-/// * `payload_bytes` - Network-specific byte-list of the payload to be processed.
-pub fn process_payload(config: Config, payload_bytes: Bytes) -> ProcessorResult {
-    #[allow(clippy::useless_conversion)]
-    let mut bytes: Vec<u8> = payload_bytes.into();
-    let payload = Payload::make(&mut bytes);
-    print_debug!("{:?}", payload);
-
-    make_processor_result(config, payload)
-}
-
-fn make_processor_result(config: Config, payload: Payload) -> ProcessorResult {
-    let min_timestamp = payload
-        .data_packages
-        .iter()
-        .enumerate()
-        .map(|(index, dp)| config.validate_timestamp(index, dp.timestamp))
-        .min()
-        .unwrap();
-
-    let values = aggregate_values(config, payload.data_packages);
-
-    print_debug!("{} {:?}", min_timestamp, values);
-
-    ProcessorResult {
-        values,
-        min_timestamp,
-    }
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        core::{
-            config::Config,
-            processor::make_processor_result,
-            processor_result::ProcessorResult,
-            test_helpers::{
-                BTC, ETH, TEST_BLOCK_TIMESTAMP, TEST_SIGNER_ADDRESS_1, TEST_SIGNER_ADDRESS_2,
-            },
-        },
-        helpers::iter_into::IterInto,
-        protocol::{data_package::DataPackage, payload::Payload},
-    };
-
-    #[test]
-    fn test_make_processor_result() {
-        let data_packages = vec![
-            DataPackage::test(
-                ETH,
-                11,
-                TEST_SIGNER_ADDRESS_1,
-                (TEST_BLOCK_TIMESTAMP + 5).into(),
-            ),
-            DataPackage::test(
-                ETH,
-                13,
-                TEST_SIGNER_ADDRESS_2,
-                (TEST_BLOCK_TIMESTAMP + 3).into(),
-            ),
-            DataPackage::test(
-                BTC,
-                32,
-                TEST_SIGNER_ADDRESS_2,
-                (TEST_BLOCK_TIMESTAMP - 2).into(),
-            ),
-            DataPackage::test(
-                BTC,
-                31,
-                TEST_SIGNER_ADDRESS_1,
-                (TEST_BLOCK_TIMESTAMP + 400).into(),
-            ),
-        ];
-
-        let result = make_processor_result(Config::test(), Payload { data_packages });
-
-        assert_eq!(
-            result,
-            ProcessorResult {
-                min_timestamp: TEST_BLOCK_TIMESTAMP - 2,
-                values: vec![12u8, 31].iter_into()
-            }
-        );
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index ecdffb37..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/core/processor_result.rs.html +++ /dev/null @@ -1,53 +0,0 @@ -processor_result.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
-
use crate::network::specific::U256;
-
-/// 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`.
-#[derive(Debug, Eq, PartialEq)]
-pub struct ProcessorResult {
-    /// 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.
-    pub min_timestamp: u64,
-
-    /// 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`.
-    pub values: Vec<U256>,
-}
-
-impl From<ProcessorResult> for (u64, Vec<U256>) {
-    fn from(result: ProcessorResult) -> Self {
-        (result.min_timestamp, result.values)
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 1fed8ca0..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/core/validator.rs.html +++ /dev/null @@ -1,573 +0,0 @@ -validator.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-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
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-
use crate::{
-    core::config::Config,
-    network::{
-        assert::Assert,
-        error::Error::{InsufficientSignerCount, TimestampTooFuture, TimestampTooOld},
-        specific::U256,
-    },
-    protocol::constants::{MAX_TIMESTAMP_AHEAD_MS, MAX_TIMESTAMP_DELAY_MS},
-    utils::filter::FilterSome,
-};
-
-/// 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.
-pub(crate) trait Validator {
-    /// 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.
-    ///
-    /// # Arguments
-    ///
-    /// * `feed_id`: `U256` - The unique identifier of the data feed.
-    ///
-    /// # Returns
-    ///
-    /// * `Option<usize>` - The index of the feed if it exists, or `None` if it does not.
-    fn feed_index(&self, feed_id: U256) -> 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.
-    ///
-    /// # Arguments
-    ///
-    /// * `signer`: `&[u8]` - A byte slice representing the signer's identifier.
-    ///
-    /// # Returns
-    ///
-    /// * `Option<usize>` - The index of the signer if found, or `None` if not found.
-    fn signer_index(&self, signer: &[u8]) -> Option<usize>;
-
-    /// 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.
-    ///
-    /// # Arguments
-    ///
-    /// * `index`: `usize` - The index of the data value being validated.
-    /// * `values`: `&[Option<U256>]` - A slice of optional `U256` values associated with the data.
-    ///
-    /// # Returns
-    ///
-    /// * `Vec<U256>` - A vector of `U256` values that meet the validation criteria.
-    fn validate_signer_count_threshold(&self, index: usize, values: &[Option<U256>]) -> Vec<U256>;
-
-    /// 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.
-    ///
-    /// # Arguments
-    ///
-    /// * `index`: `usize` - The index of the data value whose timestamp is being validated.
-    /// * `timestamp`: `u64` - The timestamp to be validated.
-    ///
-    /// # Returns
-    ///
-    /// * `u64` - The validated timestamp.
-    fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64;
-}
-
-impl Validator for Config {
-    #[inline]
-    fn feed_index(&self, feed_id: U256) -> Option<usize> {
-        self.feed_ids.iter().position(|&elt| elt == feed_id)
-    }
-
-    #[inline]
-    fn signer_index(&self, signer: &[u8]) -> Option<usize> {
-        self.signers
-            .iter()
-            .position(|elt| elt.to_ascii_lowercase() == signer.to_ascii_lowercase())
-    }
-
-    #[inline]
-    fn validate_signer_count_threshold(&self, index: usize, values: &[Option<U256>]) -> Vec<U256> {
-        values.filter_some().assert_or_revert(
-            |x| (*x).len() >= self.signer_count_threshold.into(),
-            #[allow(clippy::useless_conversion)]
-            |val| InsufficientSignerCount(index, val.len(), self.feed_ids[index]),
-        )
-    }
-
-    #[inline]
-    fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64 {
-        timestamp.assert_or_revert(
-            |&x| x + MAX_TIMESTAMP_DELAY_MS >= self.block_timestamp,
-            |timestamp| TimestampTooOld(index, *timestamp),
-        );
-
-        timestamp.assert_or_revert(
-            |&x| x <= self.block_timestamp + MAX_TIMESTAMP_AHEAD_MS,
-            |timestamp| TimestampTooFuture(index, *timestamp),
-        )
-    }
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        core::{
-            config::Config,
-            test_helpers::{
-                AVAX, BTC, ETH, TEST_BLOCK_TIMESTAMP, TEST_SIGNER_ADDRESS_1, TEST_SIGNER_ADDRESS_2,
-            },
-            validator::Validator,
-        },
-        helpers::{
-            hex::{hex_to_bytes, make_feed_id},
-            iter_into::{IterInto, IterIntoOpt, OptIterIntoOpt},
-        },
-        network::specific::U256,
-        protocol::constants::{MAX_TIMESTAMP_AHEAD_MS, MAX_TIMESTAMP_DELAY_MS},
-    };
-    use itertools::Itertools;
-
-    #[test]
-    fn test_feed_index() {
-        let config = Config::test();
-
-        let eth_index = config.feed_index(make_feed_id(ETH));
-        assert_eq!(eth_index, 0.into());
-
-        let eth_index = config.feed_index(make_feed_id("778680")); //eth
-        assert_eq!(eth_index, None);
-
-        let btc_index = config.feed_index(make_feed_id(BTC));
-        assert_eq!(btc_index, 1.into());
-
-        let avax_index = config.feed_index(make_feed_id(AVAX));
-        assert_eq!(avax_index, None);
-    }
-
-    #[test]
-    fn test_signer_index() {
-        let config = Config::test();
-        let index = config.signer_index(&hex_to_bytes(TEST_SIGNER_ADDRESS_1.into()));
-        assert_eq!(index, 0.into());
-
-        let index = config.signer_index(&hex_to_bytes(TEST_SIGNER_ADDRESS_1.to_uppercase()));
-        assert_eq!(index, 0.into());
-
-        let index = config.signer_index(&hex_to_bytes(TEST_SIGNER_ADDRESS_2.into()));
-        assert_eq!(index, 1.into());
-
-        let index = config.signer_index(&hex_to_bytes(TEST_SIGNER_ADDRESS_2.replace('0', "1")));
-        assert_eq!(index, None);
-    }
-
-    #[test]
-    fn test_validate_timestamp() {
-        let config = Config::test();
-
-        config.validate_timestamp(0, TEST_BLOCK_TIMESTAMP);
-        config.validate_timestamp(1, TEST_BLOCK_TIMESTAMP + 60000);
-        config.validate_timestamp(2, TEST_BLOCK_TIMESTAMP + MAX_TIMESTAMP_AHEAD_MS);
-        config.validate_timestamp(3, TEST_BLOCK_TIMESTAMP - MAX_TIMESTAMP_DELAY_MS);
-        config.validate_timestamp(4, TEST_BLOCK_TIMESTAMP - 60000);
-    }
-
-    #[should_panic(expected = "Timestamp 2000000180001 is too future for #0")]
-    #[test]
-    fn test_validate_timestamp_too_future() {
-        Config::test().validate_timestamp(0, TEST_BLOCK_TIMESTAMP + MAX_TIMESTAMP_AHEAD_MS + 1);
-    }
-
-    #[should_panic(expected = "Timestamp 1999999099999 is too old for #1")]
-    #[test]
-    fn test_validate_timestamp_too_old() {
-        Config::test().validate_timestamp(1, TEST_BLOCK_TIMESTAMP - MAX_TIMESTAMP_DELAY_MS - 1);
-    }
-
-    #[should_panic(expected = "Timestamp 0 is too old for #2")]
-    #[test]
-    fn test_validate_timestamp_zero() {
-        Config::test().validate_timestamp(2, 0);
-    }
-
-    #[should_panic(expected = "Timestamp 4000000000000 is too future for #3")]
-    #[test]
-    fn test_validate_timestamp_big() {
-        Config::test().validate_timestamp(3, TEST_BLOCK_TIMESTAMP + TEST_BLOCK_TIMESTAMP);
-    }
-
-    #[should_panic(expected = "Timestamp 2000000000000 is too future for #4")]
-    #[test]
-    fn test_validate_timestamp_no_block_timestamp() {
-        let mut config = Config::test();
-
-        config.block_timestamp = 0;
-        config.validate_timestamp(4, TEST_BLOCK_TIMESTAMP);
-    }
-
-    #[should_panic(expected = "Insufficient signer count 0 for #0 (ETH)")]
-    #[test]
-    fn test_validate_signer_count_threshold_empty_list() {
-        Config::test().validate_signer_count_threshold(0, vec![].as_slice());
-    }
-
-    #[should_panic(expected = "Insufficient signer count 1 for #1 (BTC)")]
-    #[test]
-    fn test_validate_signer_count_threshold_shorter_list() {
-        Config::test().validate_signer_count_threshold(1, vec![1u8].iter_into_opt().as_slice());
-    }
-
-    #[should_panic(expected = "Insufficient signer count 1 for #1 (BTC)")]
-    #[test]
-    fn test_validate_signer_count_threshold_list_with_nones() {
-        Config::test().validate_signer_count_threshold(
-            1,
-            vec![None, 1u8.into(), None].opt_iter_into_opt().as_slice(),
-        );
-    }
-
-    #[test]
-    fn test_validate_signer_count_threshold_with_exact_size() {
-        validate_with_all_permutations(vec![1u8, 2].iter_into_opt(), vec![1u8, 2].iter_into());
-    }
-
-    #[test]
-    fn test_validate_signer_count_threshold_with_exact_signer_count() {
-        validate_with_all_permutations(
-            vec![None, 1u8.into(), None, 2.into()].opt_iter_into_opt(),
-            vec![1u8, 2].iter_into(),
-        );
-    }
-
-    #[test]
-    fn test_validate_signer_count_threshold_with_larger_size() {
-        validate_with_all_permutations(
-            vec![
-                1u8.into(),
-                None,
-                None,
-                2.into(),
-                3.into(),
-                None,
-                4.into(),
-                None,
-            ]
-            .opt_iter_into_opt(),
-            vec![1u8, 2, 3, 4].iter_into(),
-        );
-    }
-
-    fn validate_with_all_permutations(numbers: Vec<Option<U256>>, expected_value: Vec<U256>) {
-        let perms: Vec<Vec<_>> = numbers.iter().permutations(numbers.len()).collect();
-        let mut config = Config::test();
-
-        let result = config.validate_signer_count_threshold(0, &numbers);
-        assert_eq!(result, expected_value);
-
-        for threshold in 0..expected_value.len() + 1 {
-            config.signer_count_threshold = threshold as u8;
-
-            for (index, perm) in perms.iter().enumerate() {
-                let p: Vec<_> = perm.iter().map(|&&v| v).collect();
-
-                let result =
-                    config.validate_signer_count_threshold(index % config.feed_ids.len(), &p);
-                assert_eq!(result.len(), expected_value.len());
-            }
-        }
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 7e62e207..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/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_casper/src/redstone/crypto/mod.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/crypto/mod.rs.html deleted file mode 100644 index fa282223..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/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_casper/src/redstone/crypto/recover.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/crypto/recover.rs.html deleted file mode 100644 index f03e84b0..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/crypto/recover.rs.html +++ /dev/null @@ -1,267 +0,0 @@ -recover.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-
use crate::crypto::{keccak256, recover::crypto256::recover_public_key};
-
-pub fn recover_address(message: Vec<u8>, signature: Vec<u8>) -> Vec<u8> {
-    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],
-        recovery_byte - (if recovery_byte >= 27 { 27 } else { 0 }),
-    );
-    let key_hash = keccak256::keccak256(&key[1..]); // skip first uncompressed-key byte
-
-    key_hash[12..].into() // last 20 bytes
-}
-
-#[cfg(feature = "crypto_secp256k1")]
-pub(crate) mod crypto256 {
-    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],
-        recovery_byte: u8,
-    ) -> Box<[u8]> {
-        let msg = Message::from_digest_slice(message_hash.as_ref())
-            .unwrap_or_revert(|_| Error::CryptographicError(message_hash.len()));
-
-        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)
-                .unwrap_or_revert(|_| Error::CryptographicError(signature_bytes.len()));
-
-        let public_key = Secp256k1Curve::new().recover_ecdsa(&msg, &sig);
-
-        public_key.unwrap().serialize_uncompressed().into()
-    }
-}
-
-#[cfg(feature = "crypto_k256")]
-pub(crate) mod crypto256 {
-    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],
-        recovery_byte: u8,
-    ) -> Box<[u8]> {
-        let recovery_id = RecoveryId::from_byte(recovery_byte)
-            .unwrap_or_revert(|_| Error::CryptographicError(recovery_byte.into()));
-
-        let signature = Signature::try_from(signature_bytes)
-            .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());
-
-        recovered_key.unwrap()
-    }
-}
-
-#[cfg(all(not(feature = "crypto_k256"), not(feature = "crypto_secp256k1")))]
-pub(crate) mod crypto256 {
-    pub(crate) fn recover_public_key(
-        _message_hash: Box<[u8]>,
-        _signature_bytes: &[u8],
-        _recovery_byte: u8,
-    ) -> Box<[u8]> {
-        panic!("Not implemented!")
-    }
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        crypto::recover::{crypto256::recover_public_key, recover_address},
-        helpers::hex::hex_to_bytes,
-    };
-
-    const MESSAGE: &str = "415641580000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d394303d018d79bf0ba000000020000001";
-    const MESSAGE_HASH: &str = "f0805644755393876d0e917e553f0c206f8bc68b7ebfe73a79d2a9e7f5a4cea6";
-    const SIG_V27: &str = "475195641dae43318e194c3d9e5fc308773d6fdf5e197e02644dfd9ca3d19e3e2bd7d8656428f7f02e658a16b8f83722169c57126cc50bec8fad188b1bac6d19";
-    const SIG_V28: &str = "c88242d22d88252c845b946c9957dbf3c7d59a3b69ecba2898198869f9f146ff268c3e47a11dbb05cc5198aadd659881817a59ee37e088d3253f4695927428c1";
-    const PUBLIC_KEY_V27: &str =
-        "04f5f035588502146774d0ccfd62ee5bf1d7f1dbb96aae33a79765c636b8ec75a36f5121931b5cc37215a7d4280c5700ca92daaaf93c32b06ca9f98b1f4ece624e";
-    const PUBLIC_KEY_V28: &str =
-        "04626f2ad2cfb0b41a24276d78de8959bcf45fc5e80804416e660aab2089d15e98206526e639ee19d17c8f9ae0ce3a6ff1a8ea4ab773d0fb4214e08aad7ba978c8";
-    const ADDRESS_V27: &str = "2c59617248994D12816EE1Fa77CE0a64eEB456BF";
-    const ADDRESS_V28: &str = "12470f7aBA85c8b81D63137DD5925D6EE114952b";
-
-    #[test]
-    fn test_recover_public_key_v27() {
-        let public_key = recover_public_key(u8_box(MESSAGE_HASH), &u8_box(SIG_V27), 0);
-
-        assert_eq!(u8_box(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);
-
-        assert_eq!(u8_box(PUBLIC_KEY_V28), public_key);
-    }
-
-    #[test]
-    fn test_recover_address_1b() {
-        let address = recover_address(
-            hex_to_bytes(MESSAGE.into()),
-            hex_to_bytes(SIG_V27.to_owned() + "1b"),
-        );
-
-        assert_eq!(hex_to_bytes(ADDRESS_V27.into()), address);
-    }
-
-    #[test]
-    fn test_recover_address_1c() {
-        let address = recover_address(
-            hex_to_bytes(MESSAGE.into()),
-            hex_to_bytes(SIG_V28.to_owned() + "1c"),
-        );
-
-        assert_eq!(hex_to_bytes(ADDRESS_V28.into()), address);
-    }
-
-    fn u8_box(str: &str) -> Box<[u8]> {
-        hex_to_bytes(str.into()).as_slice().into()
-    }
-}
-
\ 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 deleted file mode 100644 index a1f164bf..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/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_casper/src/redstone/network/as_str.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/as_str.rs.html deleted file mode 100644 index f0b58bfb..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/as_str.rs.html +++ /dev/null @@ -1,235 +0,0 @@ -as_str.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-
extern crate alloc;
-
-use crate::network::specific::U256;
-use alloc::{format, string::String};
-
-pub trait AsHexStr {
-    fn as_hex_str(&self) -> String;
-}
-
-impl AsHexStr for &[u8] {
-    #[allow(clippy::format_collect)]
-    fn as_hex_str(&self) -> String {
-        self.iter().map(|byte| format!("{:02x}", byte)).collect()
-    }
-}
-
-#[cfg(feature = "network_casper")]
-impl AsHexStr for casper_types::bytesrepr::Bytes {
-    fn as_hex_str(&self) -> String {
-        self.as_slice().as_hex_str()
-    }
-}
-
-#[cfg(not(feature = "network_radix"))]
-impl AsHexStr for U256 {
-    fn as_hex_str(&self) -> String {
-        format!("{:X}", self)
-    }
-}
-
-#[cfg(feature = "network_radix")]
-impl AsHexStr for U256 {
-    fn as_hex_str(&self) -> String {
-        let digits = self.to_digits();
-        let mut result = String::new();
-        for &part in &digits {
-            if result.is_empty() || part != 0u64 {
-                result.push_str(&format!("{:02X}", part));
-            }
-        }
-        result
-    }
-}
-
-impl AsHexStr for Vec<u8> {
-    fn as_hex_str(&self) -> String {
-        self.as_slice().as_hex_str()
-    }
-}
-
-impl AsHexStr for Box<[u8]> {
-    fn as_hex_str(&self) -> String {
-        self.as_ref().as_hex_str()
-    }
-}
-
-pub trait AsAsciiStr {
-    fn as_ascii_str(&self) -> String;
-}
-
-impl AsAsciiStr for &[u8] {
-    fn as_ascii_str(&self) -> String {
-        self.iter().map(|&code| code as char).collect()
-    }
-}
-
-impl AsAsciiStr for Vec<u8> {
-    fn as_ascii_str(&self) -> String {
-        self.as_slice().as_ascii_str()
-    }
-}
-
-#[cfg(feature = "network_casper")]
-impl AsAsciiStr for casper_types::bytesrepr::Bytes {
-    fn as_ascii_str(&self) -> String {
-        self.as_slice().as_ascii_str()
-    }
-}
-
-impl AsAsciiStr for U256 {
-    fn as_ascii_str(&self) -> String {
-        let hex_string = self.as_hex_str();
-        let bytes = (0..hex_string.len())
-            .step_by(2)
-            .map(|i| u8::from_str_radix(&hex_string[i..i + 2], 16))
-            .collect::<Result<Vec<u8>, _>>()
-            .unwrap();
-
-        bytes.as_ascii_str()
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use crate::network::{
-        as_str::{AsAsciiStr, AsHexStr},
-        specific::U256,
-    };
-
-    const ETH: u32 = 4543560u32;
-
-    #[test]
-    fn test_as_hex_str() {
-        let u256 = U256::from(ETH);
-        let result = u256.as_hex_str();
-
-        assert_eq!(result, "455448");
-    }
-
-    #[test]
-    fn test_as_ascii_str() {
-        let u256 = U256::from(ETH);
-        let result = u256.as_ascii_str();
-
-        assert_eq!(result, "ETH");
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index cfd43818..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/assert.rs.html +++ /dev/null @@ -1,273 +0,0 @@ -assert.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-
use crate::{
-    network::{error::Error, specific::revert},
-    print_debug,
-};
-use std::fmt::Debug;
-
-pub trait Assert<F> {
-    fn assert_or_revert<E: Fn(&Self) -> Error>(self, check: F, error: E) -> Self;
-}
-
-impl<T, F> Assert<F> for T
-where
-    T: Debug,
-    F: Fn(&Self) -> bool,
-{
-    fn assert_or_revert<E: FnOnce(&Self) -> Error>(self, check: F, error: E) -> Self {
-        assert_or_revert(self, check, error)
-    }
-}
-
-#[inline]
-fn assert_or_revert<F, T, E: FnOnce(&T) -> Error>(arg: T, check: F, error: E) -> T
-where
-    F: Fn(&T) -> bool,
-    T: Debug,
-{
-    assert_or_revert_bool_with(check(&arg), || error(&arg));
-
-    arg
-}
-
-#[inline]
-fn assert_or_revert_bool_with<E: FnOnce() -> Error>(check: bool, error: E) {
-    if check {
-        return;
-    }
-
-    let error = error();
-    print_debug!("REVERT({}) - {}!", &error.code(), error);
-    revert(error);
-}
-
-pub trait Unwrap<R> {
-    type ErrorArg;
-
-    fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> R;
-}
-
-impl<T> Unwrap<T> for Option<T>
-where
-    T: Debug,
-{
-    type ErrorArg = ();
-
-    fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> T {
-        assert_or_revert(self, |arg| arg.is_some(), |_| error(&())).unwrap()
-    }
-}
-
-impl<T, Err> Unwrap<T> for Result<T, Err>
-where
-    T: Debug,
-    Err: Debug,
-{
-    type ErrorArg = Err;
-
-    fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> T {
-        assert_or_revert(
-            self,
-            |arg| arg.is_ok(),
-            |e| error(e.as_ref().err().unwrap()),
-        )
-        .unwrap()
-    }
-}
-
-#[cfg(test)]
-mod assert_or_revert_tests {
-    use crate::network::{
-        assert::{assert_or_revert_bool_with, Assert},
-        error::Error,
-    };
-
-    #[test]
-    fn test_assert_or_revert_bool_with_true() {
-        assert_or_revert_bool_with(true, || Error::ArrayIsEmpty);
-    }
-
-    #[should_panic(expected = "Array is empty")]
-    #[test]
-    fn test_assert_or_revert_bool_with_false() {
-        assert_or_revert_bool_with(false, || Error::ArrayIsEmpty);
-    }
-
-    #[test]
-    fn test_assert_or_revert_correct() {
-        5.assert_or_revert(|&x| x == 5, |&size| Error::SizeNotSupported(size));
-    }
-
-    #[should_panic(expected = "Size not supported: 5")]
-    #[test]
-    fn test_assert_or_revert_wrong() {
-        5.assert_or_revert(|&x| x < 5, |&size| Error::SizeNotSupported(size));
-    }
-}
-
-#[cfg(test)]
-mod unwrap_or_revert_tests {
-    use crate::network::{assert::Unwrap, error::Error};
-
-    #[test]
-    fn test_unwrap_or_revert_some() {
-        let result = Some(543).unwrap_or_revert(|_| Error::CryptographicError(333));
-
-        assert_eq!(result, 543);
-    }
-
-    #[should_panic(expected = "Cryptographic Error: 333")]
-    #[test]
-    fn test_unwrap_or_revert_none() {
-        (Option::<u64>::None).unwrap_or_revert(|_| Error::CryptographicError(333));
-    }
-
-    #[test]
-    fn test_unwrap_or_revert_ok() {
-        let result = Ok(256).unwrap_or_revert(|_: &Error| Error::CryptographicError(333));
-
-        assert_eq!(result, 256);
-    }
-
-    #[should_panic(expected = "Cryptographic Error: 567")]
-    #[test]
-    fn test_unwrap_or_revert_err() {
-        Result::<&[u8], Error>::Err(Error::CryptographicError(567)).unwrap_or_revert(|e| e.clone());
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 53deca0d..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/casper/error.rs.html +++ /dev/null @@ -1,17 +0,0 @@ -error.rs - source
1
-2
-3
-4
-5
-6
-7
-8
-
use crate::network::error::Error;
-use casper_types::ApiError;
-
-impl From<Error> for ApiError {
-    fn from(error: Error) -> Self {
-        ApiError::User(error.code())
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 7d4c10ab..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/casper/from_bytes_repr.rs.html +++ /dev/null @@ -1,21 +0,0 @@ -from_bytes_repr.rs - source
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-
use crate::network::{
-    from_bytes_repr::{FromBytesRepr, Sanitized},
-    specific::U256,
-};
-
-impl FromBytesRepr<Vec<u8>> for U256 {
-    fn from_bytes_repr(bytes: Vec<u8>) -> Self {
-        bytes.sanitized().as_slice().into()
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 8df66718..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/casper/mod.rs.html +++ /dev/null @@ -1,77 +0,0 @@ -mod.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
-
use crate::network::{error::Error, specific::NetworkSpecific};
-
-mod error;
-mod from_bytes_repr;
-
-pub struct Casper;
-
-impl NetworkSpecific for Casper {
-    type BytesRepr = casper_types::bytesrepr::Bytes;
-    type ValueRepr = casper_types::U256;
-    type _Self = Self;
-
-    const VALUE_SIZE: usize = 32;
-
-    fn print(_text: String) {
-        #[cfg(all(not(test), feature = "print_debug"))]
-        {
-            casper_contract::contract_api::runtime::print(&_text);
-        }
-
-        #[cfg(test)]
-        {
-            println!("{}", _text);
-        }
-    }
-
-    fn revert(error: Error) -> ! {
-        #[cfg(not(test))]
-        {
-            casper_contract::contract_api::runtime::revert(error)
-        }
-
-        #[cfg(test)]
-        {
-            panic!("{}", error)
-        }
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 4c0588a6..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/error.rs.html +++ /dev/null @@ -1,351 +0,0 @@ -error.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-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
-175
-
use crate::network::{
-    as_str::{AsAsciiStr, AsHexStr},
-    specific::U256,
-};
-use std::fmt::{Debug, Display, Formatter};
-
-pub trait ContractErrorContent: Debug {
-    fn code(&self) -> u8;
-    fn message(&self) -> String;
-}
-
-/// 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.
-#[derive(Debug)]
-pub enum Error {
-    /// 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.
-    ContractError(Box<dyn ContractErrorContent>),
-
-    /// Indicates an overflow error with `U256` numbers.
-    ///
-    /// Used when operations on `U256` numbers exceed their maximum value, potentially leading
-    /// to incorrect calculations or state.
-    NumberOverflow(U256),
-
-    /// 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.
-    ArrayIsEmpty,
-
-    /// 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.
-    CryptographicError(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.
-    SizeNotSupported(usize),
-
-    /// 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.
-    WrongRedStoneMarker(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.
-    NonEmptyPayloadRemainder(Vec<u8>),
-
-    /// 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.
-    InsufficientSignerCount(usize, usize, U256),
-
-    /// 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.
-    TimestampTooOld(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.
-    TimestampTooFuture(usize, u64),
-
-    /// 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.
-    ClonedContractError(u8, String),
-}
-
-impl Error {
-    pub fn contract_error<T: ContractErrorContent + 'static>(value: T) -> Error {
-        Error::ContractError(Box::new(value))
-    }
-
-    pub(crate) fn code(&self) -> u16 {
-        match self {
-            Error::ContractError(boxed) => boxed.code() as u16,
-            Error::NumberOverflow(_) => 509,
-            Error::ArrayIsEmpty => 510,
-            Error::WrongRedStoneMarker(_) => 511,
-            Error::NonEmptyPayloadRemainder(_) => 512,
-            Error::InsufficientSignerCount(data_package_index, value, _) => {
-                (2000 + data_package_index * 10 + value) as u16
-            }
-            Error::SizeNotSupported(size) => 600 + *size as u16,
-            Error::CryptographicError(size) => 700 + *size as u16,
-            Error::TimestampTooOld(data_package_index, _) => 1000 + *data_package_index as u16,
-            Error::TimestampTooFuture(data_package_index, _) => 1050 + *data_package_index as u16,
-            Error::ClonedContractError(code, _) => *code as u16,
-        }
-    }
-}
-
-impl Display for Error {
-    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
-        match self {
-            Error::ContractError(boxed) => write!(f, "Contract error: {}", boxed.message()),
-            Error::NumberOverflow(number) => write!(f, "Number overflow: {}", number),
-            Error::ArrayIsEmpty => write!(f, "Array is empty"),
-            Error::CryptographicError(size) => write!(f, "Cryptographic Error: {}", size),
-            Error::SizeNotSupported(size) => write!(f, "Size not supported: {}", size),
-            Error::WrongRedStoneMarker(bytes) => {
-                write!(f, "Wrong RedStone marker: {}", bytes.as_hex_str())
-            }
-            Error::NonEmptyPayloadRemainder(bytes) => {
-                write!(f, "Non empty payload remainder: {}", bytes.as_hex_str())
-            }
-            Error::InsufficientSignerCount(data_package_index, value, feed_id) => write!(
-                f,
-                "Insufficient signer count {} for #{} ({})",
-                value,
-                data_package_index,
-                feed_id.as_ascii_str()
-            ),
-            Error::TimestampTooOld(data_package_index, value) => {
-                write!(
-                    f,
-                    "Timestamp {} is too old for #{}",
-                    value, data_package_index
-                )
-            }
-            Error::TimestampTooFuture(data_package_index, value) => write!(
-                f,
-                "Timestamp {} is too future for #{}",
-                value, data_package_index
-            ),
-            Error::ClonedContractError(_, message) => {
-                write!(f, "(Cloned) Contract error: {}", message)
-            }
-        }
-    }
-}
-
-impl Clone for Error {
-    fn clone(&self) -> Self {
-        match self {
-            Error::ContractError(content) => {
-                Error::ClonedContractError(content.code(), content.message())
-            }
-            Error::NumberOverflow(value) => Error::NumberOverflow(*value),
-            Error::ArrayIsEmpty => Error::ArrayIsEmpty,
-            Error::CryptographicError(size) => Error::CryptographicError(*size),
-            Error::SizeNotSupported(size) => Error::SizeNotSupported(*size),
-            Error::WrongRedStoneMarker(bytes) => Error::WrongRedStoneMarker(bytes.clone()),
-            Error::NonEmptyPayloadRemainder(bytes) => {
-                Error::NonEmptyPayloadRemainder(bytes.clone())
-            }
-            Error::InsufficientSignerCount(count, needed, bytes) => {
-                Error::InsufficientSignerCount(*count, *needed, *bytes)
-            }
-            Error::TimestampTooOld(index, timestamp) => Error::TimestampTooOld(*index, *timestamp),
-            Error::TimestampTooFuture(index, timestamp) => {
-                Error::TimestampTooFuture(*index, *timestamp)
-            }
-            Error::ClonedContractError(code, message) => {
-                Error::ClonedContractError(*code, message.as_str().into())
-            }
-        }
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index f8226f69..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/flattened.rs.html +++ /dev/null @@ -1,71 +0,0 @@ -flattened.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
-
use crate::network::specific::Bytes;
-
-pub trait Flattened<T> {
-    fn flattened(&self) -> T;
-}
-
-impl Flattened<Bytes> for Vec<Bytes> {
-    fn flattened(&self) -> Bytes {
-        #[allow(clippy::useless_conversion)]
-        self.iter().flatten().copied().collect::<Vec<_>>().into()
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use crate::network::{flattened::Flattened, specific::Bytes};
-
-    #[test]
-    fn test_bytes_flattened() {
-        #[allow(clippy::useless_conversion)]
-        let bytes: Vec<Bytes> = vec![
-            vec![1u8, 2, 3].into(),
-            vec![4u8].into(),
-            vec![].into(),
-            vec![5, 6, 7].into(),
-        ];
-
-        let result: Bytes = bytes.flattened();
-
-        #[allow(clippy::useless_conversion)]
-        let expected_result: Bytes = vec![1u8, 2, 3, 4, 5, 6, 7].into();
-
-        assert_eq!(result, expected_result);
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 0c7663c5..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/from_bytes_repr.rs.html +++ /dev/null @@ -1,257 +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
-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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-
use crate::network::specific::VALUE_SIZE;
-
-pub trait FromBytesRepr<T> {
-    fn from_bytes_repr(bytes: T) -> Self;
-}
-
-pub trait Sanitized {
-    fn sanitized(self) -> Self;
-}
-
-impl Sanitized for Vec<u8> {
-    fn sanitized(self) -> Self {
-        if self.len() <= VALUE_SIZE {
-            return self;
-        }
-
-        let index = self.len().max(VALUE_SIZE) - VALUE_SIZE;
-        let remainder = &self[0..index];
-
-        if remainder != vec![0; index] {
-            panic!("Number to big: {:?} digits", self.len())
-        }
-
-        self[index..].into()
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use crate::network::{
-        from_bytes_repr::FromBytesRepr,
-        specific::{U256, VALUE_SIZE},
-    };
-
-    #[cfg(feature = "network_radix")]
-    use crate::network::radix::u256_ext::U256Ext;
-
-    #[test]
-    fn test_from_bytes_repr_single() {
-        let vec = vec![1];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(1u32));
-    }
-
-    #[test]
-    fn test_from_bytes_repr_double() {
-        let vec = vec![1, 2];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(258u32));
-    }
-
-    #[test]
-    fn test_from_bytes_repr_simple() {
-        let vec = vec![1, 2, 3];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(66051u32));
-    }
-
-    #[test]
-    fn test_from_bytes_repr_bigger() {
-        let vec = vec![101, 202, 255];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(6671103u32));
-    }
-
-    #[test]
-    fn test_from_bytes_repr_empty() {
-        let result = U256::from_bytes_repr(Vec::new());
-
-        assert_eq!(result, U256::from(0u8));
-    }
-
-    #[test]
-    fn test_from_bytes_repr_trailing_zeroes() {
-        let vec = vec![1, 2, 3, 0];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(16909056u32));
-    }
-
-    #[test]
-    fn test_from_bytes_repr_leading_zeroes() {
-        let vec = vec![0, 1, 2, 3];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(66051u32));
-    }
-
-    #[allow(clippy::legacy_numeric_constants)]
-    #[test]
-    fn test_from_bytes_repr_max() {
-        let vec = vec![255; VALUE_SIZE];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::max_value());
-    }
-
-    #[test]
-    fn test_from_bytes_repr_min() {
-        let vec = vec![0; VALUE_SIZE];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(0u8));
-    }
-
-    #[should_panic(expected = "Number to big")]
-    #[test]
-    fn test_from_bytes_repr_too_long() {
-        let x = VALUE_SIZE as u8 + 1;
-        let vec = (1..=x).collect();
-
-        U256::from_bytes_repr(vec);
-    }
-
-    #[allow(clippy::legacy_numeric_constants)]
-    #[test]
-    fn test_from_bytes_repr_too_long_but_zeroes() {
-        let mut vec = vec![255; VALUE_SIZE + 1];
-        vec[0] = 0;
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::max_value());
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index f79fb758..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/mod.rs.html +++ /dev/null @@ -1,51 +0,0 @@ -mod.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
-
pub mod as_str;
-pub mod assert;
-pub mod error;
-pub mod from_bytes_repr;
-pub mod print_debug;
-pub mod specific;
-
-#[cfg(feature = "network_casper")]
-pub mod casper;
-
-#[cfg(feature = "network_casper")]
-pub type _Network = casper::Casper;
-
-#[cfg(feature = "network_radix")]
-pub mod radix;
-
-#[cfg(feature = "network_radix")]
-pub type _Network = radix::Radix;
-
-pub mod flattened;
-#[cfg(all(not(feature = "network_casper"), not(feature = "network_radix")))]
-mod pure;
-
-#[cfg(all(not(feature = "network_casper"), not(feature = "network_radix")))]
-pub type _Network = pure::Std;
-
\ No newline at end of file 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 deleted file mode 100644 index 1fca4faf..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/print_debug.rs.html +++ /dev/null @@ -1,47 +0,0 @@ -print_debug.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
-
extern crate alloc;
-
-#[macro_export]
-macro_rules! print_debug {
-    ($fmt:expr) => {
-        $crate::network::specific::print(format!($fmt))
-    };
-    ($fmt:expr, $($args:tt)*) => {
-        $crate::network::specific::print(format!($fmt, $($args)*))
-    };
-}
-
-#[macro_export]
-macro_rules! print_and_panic {
-    ($fmt:expr) => {{
-        $crate::print_debug!($fmt);
-        panic!($fmt)
-    }};
-    ($fmt:expr, $($args:tt)*) => {{
-        $crate::print_debug!($fmt, $($args)*);
-        panic!($fmt, $($args)*)
-    }};
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/pure/from_bytes_repr.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/pure/from_bytes_repr.rs.html deleted file mode 100644 index dfb1ae60..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/pure/from_bytes_repr.rs.html +++ /dev/null @@ -1,21 +0,0 @@ -from_bytes_repr.rs - source
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-
use crate::network::{
-    from_bytes_repr::{FromBytesRepr, Sanitized},
-    specific::U256,
-};
-
-impl FromBytesRepr<Vec<u8>> for U256 {
-    fn from_bytes_repr(bytes: Vec<u8>) -> Self {
-        Self::from_big_endian(bytes.sanitized().as_slice())
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/pure/mod.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/pure/mod.rs.html deleted file mode 100644 index 36cc7a10..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/pure/mod.rs.html +++ /dev/null @@ -1,47 +0,0 @@ -mod.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
-
use crate::network::{error::Error, specific::NetworkSpecific};
-use primitive_types::U256;
-use std::eprintln;
-
-mod from_bytes_repr;
-
-pub struct Std;
-
-impl NetworkSpecific for Std {
-    type BytesRepr = Vec<u8>;
-    type ValueRepr = U256;
-    type _Self = Std;
-
-    const VALUE_SIZE: usize = 32;
-
-    fn print(text: String) {
-        eprintln!("{}", text)
-    }
-
-    fn revert(error: Error) -> ! {
-        panic!("{}", error)
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 8d698709..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/network/specific.rs.html +++ /dev/null @@ -1,51 +0,0 @@ -specific.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
-
use crate::network::{_Network, error::Error, from_bytes_repr::FromBytesRepr};
-
-pub trait NetworkSpecific {
-    type BytesRepr: From<Vec<u8>> + Into<Vec<u8>>;
-    type ValueRepr: FromBytesRepr<Vec<u8>>;
-    type _Self;
-
-    const VALUE_SIZE: usize;
-
-    fn print(_text: String);
-    fn revert(error: Error) -> !;
-}
-
-pub(crate) type Network = <_Network as NetworkSpecific>::_Self;
-pub type Bytes = <_Network as NetworkSpecific>::BytesRepr;
-pub type U256 = <_Network as NetworkSpecific>::ValueRepr;
-pub const VALUE_SIZE: usize = <_Network as NetworkSpecific>::VALUE_SIZE;
-
-pub fn print(_text: String) {
-    Network::print(_text)
-}
-
-pub fn revert(error: Error) -> ! {
-    Network::revert(error)
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 3e2f4fd5..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/protocol/constants.rs.html +++ /dev/null @@ -1,23 +0,0 @@ -constants.rs - source
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-
pub(crate) const UNSIGNED_METADATA_BYTE_SIZE_BS: usize = 3;
-pub(crate) const DATA_PACKAGES_COUNT_BS: usize = 2;
-pub(crate) const DATA_POINTS_COUNT_BS: usize = 3;
-pub(crate) const SIGNATURE_BS: usize = 65;
-pub(crate) const DATA_POINT_VALUE_BYTE_SIZE_BS: usize = 4;
-pub(crate) const DATA_FEED_ID_BS: usize = 32;
-pub(crate) const TIMESTAMP_BS: usize = 6;
-pub(crate) const MAX_TIMESTAMP_DELAY_MS: u64 = 15 * 60 * 1000; // 15 minutes in milliseconds
-pub(crate) const MAX_TIMESTAMP_AHEAD_MS: u64 = 3 * 60 * 1000; // 3 minutes in milliseconds
-pub(crate) const REDSTONE_MARKER_BS: usize = 9;
-pub(crate) const REDSTONE_MARKER: [u8; 9] = [0, 0, 2, 237, 87, 1, 30, 0, 0]; // 0x000002ed57011e0000
-
\ No newline at end of file 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 deleted file mode 100644 index a1d603e6..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/protocol/data_package.rs.html +++ /dev/null @@ -1,431 +0,0 @@ -data_package.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-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
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-
use crate::{
-    crypto::recover::recover_address,
-    network::as_str::AsHexStr,
-    protocol::{
-        constants::{
-            DATA_FEED_ID_BS, DATA_POINTS_COUNT_BS, DATA_POINT_VALUE_BYTE_SIZE_BS, SIGNATURE_BS,
-            TIMESTAMP_BS,
-        },
-        data_point::{trim_data_points, DataPoint},
-    },
-    utils::trim::Trim,
-};
-use std::fmt::{Debug, Formatter};
-
-#[derive(Clone, PartialEq, Eq)]
-pub(crate) struct DataPackage {
-    pub(crate) signer_address: Vec<u8>,
-    pub(crate) timestamp: u64,
-    pub(crate) data_points: Vec<DataPoint>,
-}
-
-pub(crate) fn trim_data_packages(payload: &mut Vec<u8>, count: usize) -> Vec<DataPackage> {
-    let mut data_packages = Vec::new();
-
-    for _ in 0..count {
-        let data_package = trim_data_package(payload);
-        data_packages.push(data_package);
-    }
-
-    data_packages
-}
-
-fn trim_data_package(payload: &mut Vec<u8>) -> DataPackage {
-    let signature = payload.trim_end(SIGNATURE_BS);
-    let mut tmp = payload.clone();
-
-    let data_point_count = payload.trim_end(DATA_POINTS_COUNT_BS);
-    let value_size = payload.trim_end(DATA_POINT_VALUE_BYTE_SIZE_BS);
-    let timestamp = payload.trim_end(TIMESTAMP_BS);
-    let size = data_point_count * (value_size + DATA_FEED_ID_BS)
-        + DATA_POINT_VALUE_BYTE_SIZE_BS
-        + TIMESTAMP_BS
-        + DATA_POINTS_COUNT_BS;
-
-    let signable_bytes = tmp.trim_end(size);
-    let signer_address = recover_address(signable_bytes, signature);
-
-    let data_points = trim_data_points(payload, data_point_count, value_size);
-
-    DataPackage {
-        data_points,
-        timestamp,
-        signer_address,
-    }
-}
-
-impl Debug for DataPackage {
-    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
-        write!(
-            f,
-            "DataPackage {{\n   signer_address: 0x{}, timestamp: {},\n   data_points: {:?}\n}}",
-            self.signer_address.as_hex_str(),
-            self.timestamp,
-            self.data_points
-        )
-    }
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        helpers::hex::hex_to_bytes,
-        network::{from_bytes_repr::FromBytesRepr, specific::U256},
-        protocol::{
-            constants::{
-                DATA_FEED_ID_BS, DATA_POINTS_COUNT_BS, DATA_POINT_VALUE_BYTE_SIZE_BS, SIGNATURE_BS,
-                TIMESTAMP_BS,
-            },
-            data_package::{trim_data_package, trim_data_packages, DataPackage},
-            data_point::DataPoint,
-        },
-    };
-
-    const DATA_PACKAGE_BYTES_1: &str = "4554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000360cafc94e018d79bf0ba00000002000000151afa8c5c3caf6004b42c0fb17723e524f993b9ecbad3b9bce5ec74930fa436a3660e8edef10e96ee5f222de7ef5787c02ca467c0ec18daa2907b43ac20c63c11c";
-    const DATA_PACKAGE_BYTES_2: &str = "4554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000360cdd851e018d79bf0ba000000020000001473fd9dc72e6814a7de719b403cf4c9eba08934a643fd0666c433b806b31e69904f2226ffd3c8ef75861b11b5e32a1fda4b1458e0da4605a772dfba2a812f3ee1b";
-
-    const SIGNER_ADDRESS_1: &str = "1ea62d73edf8ac05dfcea1a34b9796e937a29eff";
-    const SIGNER_ADDRESS_2: &str = "109b4a318a4f5ddcbca6349b45f881b4137deafb";
-
-    const VALUE_1: u128 = 232141080910;
-    const VALUE_2: u128 = 232144078110;
-
-    const DATA_PACKAGE_SIZE: usize = 32
-        + DATA_FEED_ID_BS
-        + DATA_POINT_VALUE_BYTE_SIZE_BS
-        + TIMESTAMP_BS
-        + SIGNATURE_BS
-        + DATA_POINTS_COUNT_BS;
-
-    #[test]
-    fn test_trim_data_packages() {
-        test_trim_data_packages_of(2, "");
-        test_trim_data_packages_of(0, "");
-        test_trim_data_packages_of(1, "");
-    }
-
-    #[test]
-    fn test_trim_data_packages_with_prefix() {
-        let prefix = "da4687f1914a1c";
-
-        test_trim_data_packages_of(2, prefix);
-    }
-
-    #[test]
-    fn test_trim_data_packages_single() {
-        let mut bytes = hex_to_bytes(DATA_PACKAGE_BYTES_1.into());
-        let data_packages = trim_data_packages(&mut bytes, 1);
-        assert_eq!(data_packages.len(), 1);
-        assert_eq!(bytes, Vec::<u8>::new());
-
-        verify_data_package(data_packages[0].clone(), VALUE_1, SIGNER_ADDRESS_1);
-    }
-
-    fn test_trim_data_packages_of(count: usize, prefix: &str) {
-        let input: Vec<u8> =
-            hex_to_bytes((prefix.to_owned() + DATA_PACKAGE_BYTES_1) + DATA_PACKAGE_BYTES_2);
-        let mut bytes = input.clone();
-        let data_packages = trim_data_packages(&mut bytes, count);
-
-        assert_eq!(data_packages.len(), count);
-        assert_eq!(
-            bytes.as_slice(),
-            &input[..input.len() - count * DATA_PACKAGE_SIZE]
-        );
-
-        let values = &[VALUE_2, VALUE_1];
-        let signers = &[SIGNER_ADDRESS_2, SIGNER_ADDRESS_1];
-
-        for i in 0..count {
-            verify_data_package(data_packages[i].clone(), values[i], signers[i]);
-        }
-    }
-
-    #[should_panic(expected = "index out of bounds")]
-    #[test]
-    fn test_trim_data_packages_bigger_number() {
-        test_trim_data_packages_of(3, "");
-    }
-
-    #[test]
-    fn test_trim_data_package() {
-        test_trim_data_package_of(DATA_PACKAGE_BYTES_1, VALUE_1, SIGNER_ADDRESS_1);
-        test_trim_data_package_of(DATA_PACKAGE_BYTES_2, VALUE_2, SIGNER_ADDRESS_2);
-    }
-
-    #[test]
-    fn test_trim_data_package_with_prefix() {
-        test_trim_data_package_of(
-            &("da4687f1914a1c".to_owned() + DATA_PACKAGE_BYTES_1),
-            VALUE_1,
-            SIGNER_ADDRESS_1,
-        );
-        test_trim_data_package_of(
-            &("da4687f1914a1c".to_owned() + DATA_PACKAGE_BYTES_2),
-            VALUE_2,
-            SIGNER_ADDRESS_2,
-        );
-    }
-
-    #[should_panic]
-    #[test]
-    fn test_trim_data_package_signature_only() {
-        test_trim_data_package_of(
-            &DATA_PACKAGE_BYTES_1[(DATA_PACKAGE_BYTES_1.len() - 2 * SIGNATURE_BS)..],
-            0,
-            "",
-        );
-    }
-
-    #[should_panic]
-    #[test]
-    fn test_trim_data_package_shorter() {
-        test_trim_data_package_of(
-            &DATA_PACKAGE_BYTES_1
-                [(DATA_PACKAGE_BYTES_1.len() - 2 * (SIGNATURE_BS + DATA_POINTS_COUNT_BS))..],
-            0,
-            "",
-        );
-    }
-
-    fn test_trim_data_package_of(bytes_str: &str, expected_value: u128, signer_address: &str) {
-        let mut bytes: Vec<u8> = hex_to_bytes(bytes_str.into());
-        let result = trim_data_package(&mut bytes);
-        assert_eq!(
-            bytes,
-            hex_to_bytes(bytes_str[..bytes_str.len() - 2 * (DATA_PACKAGE_SIZE)].into())
-        );
-
-        verify_data_package(result, expected_value, signer_address);
-    }
-
-    fn verify_data_package(result: DataPackage, expected_value: u128, signer_address: &str) {
-        let data_package = DataPackage {
-            data_points: vec![DataPoint {
-                feed_id: U256::from_bytes_repr(hex_to_bytes(DATA_PACKAGE_BYTES_1[..6].into())),
-                value: U256::from(expected_value),
-            }],
-            timestamp: 1707144580000,
-            signer_address: hex_to_bytes(signer_address.into()),
-        };
-
-        assert_eq!(result, data_package);
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index e643085a..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/protocol/data_point.rs.html +++ /dev/null @@ -1,315 +0,0 @@ -data_point.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-
use crate::{
-    network::{
-        as_str::{AsAsciiStr, AsHexStr},
-        assert::Assert,
-        error::Error,
-        from_bytes_repr::FromBytesRepr,
-        specific::U256,
-    },
-    protocol::constants::DATA_FEED_ID_BS,
-    utils::{trim::Trim, trim_zeros::TrimZeros},
-};
-use std::fmt::{Debug, Formatter};
-
-#[derive(Clone, PartialEq, Eq)]
-pub(crate) struct DataPoint {
-    pub(crate) feed_id: U256,
-    pub(crate) value: U256,
-}
-
-pub(crate) fn trim_data_points(
-    payload: &mut Vec<u8>,
-    count: usize,
-    value_size: usize,
-) -> Vec<DataPoint> {
-    count.assert_or_revert(|&count| count == 1, |&count| Error::SizeNotSupported(count));
-
-    let mut data_points = Vec::new();
-
-    for _ in 0..count {
-        let data_point = trim_data_point(payload, value_size);
-        data_points.push(data_point);
-    }
-
-    data_points
-}
-
-fn trim_data_point(payload: &mut Vec<u8>, value_size: usize) -> DataPoint {
-    let value = payload.trim_end(value_size);
-    let feed_id: Vec<u8> = payload.trim_end(DATA_FEED_ID_BS);
-
-    DataPoint {
-        value,
-        feed_id: U256::from_bytes_repr(feed_id.trim_zeros()),
-    }
-}
-
-impl Debug for DataPoint {
-    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
-        write!(
-            f,
-            "DataPoint {{\n      feed_id: {:?} (0x{}), value: {}\n   }}",
-            self.feed_id.as_ascii_str(),
-            self.feed_id.as_hex_str(),
-            self.value,
-        )
-    }
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        helpers::hex::hex_to_bytes,
-        network::{
-            from_bytes_repr::FromBytesRepr,
-            specific::{U256, VALUE_SIZE},
-        },
-        protocol::{
-            constants::DATA_FEED_ID_BS,
-            data_point::{trim_data_point, trim_data_points, DataPoint},
-        },
-    };
-    use std::ops::Shr;
-
-    const DATA_POINT_BYTES_TAIL: &str = "4554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000360cafc94e";
-    const VALUE: u128 = 232141080910;
-
-    #[test]
-    fn test_trim_data_points() {
-        let mut bytes = hex_to_bytes(DATA_POINT_BYTES_TAIL.into());
-        let result = trim_data_points(&mut bytes, 1, 32);
-
-        assert_eq!(result.len(), 1);
-
-        verify_rest_and_result(
-            DATA_POINT_BYTES_TAIL,
-            32,
-            VALUE.into(),
-            bytes,
-            result[0].clone(),
-        )
-    }
-
-    #[should_panic(expected = "Size not supported: 0")]
-    #[test]
-    fn test_trim_zero_data_points() {
-        trim_data_points(&mut hex_to_bytes(DATA_POINT_BYTES_TAIL.into()), 0, 32);
-    }
-
-    #[should_panic(expected = "Size not supported: 2")]
-    #[test]
-    fn test_trim_two_data_points() {
-        trim_data_points(&mut hex_to_bytes(DATA_POINT_BYTES_TAIL.into()), 2, 32);
-    }
-
-    #[test]
-    fn test_trim_data_point() {
-        test_trim_data_point_of(DATA_POINT_BYTES_TAIL, 32, VALUE.into());
-    }
-
-    #[test]
-    fn test_trim_data_point_with_prefix() {
-        test_trim_data_point_of(
-            &("a2a812f3ee1b".to_owned() + DATA_POINT_BYTES_TAIL),
-            32,
-            VALUE.into(),
-        );
-    }
-
-    #[test]
-    fn test_trim_data_point_other_lengths() {
-        for i in 1..VALUE_SIZE {
-            test_trim_data_point_of(
-                &DATA_POINT_BYTES_TAIL[..DATA_POINT_BYTES_TAIL.len() - 2 * i],
-                32 - i,
-                U256::from(VALUE).shr(8 * i as u32),
-            );
-        }
-    }
-
-    fn test_trim_data_point_of(value: &str, size: usize, expected_value: U256) {
-        let mut bytes = hex_to_bytes(value.into());
-        let result = trim_data_point(&mut bytes, size);
-
-        verify_rest_and_result(value, size, expected_value, bytes, result);
-    }
-
-    fn verify_rest_and_result(
-        value: &str,
-        size: usize,
-        expected_value: U256,
-        rest: Vec<u8>,
-        result: DataPoint,
-    ) {
-        assert_eq!(
-            rest,
-            hex_to_bytes(value[..value.len() - 2 * (size + DATA_FEED_ID_BS)].into())
-        );
-
-        let data_point = DataPoint {
-            value: expected_value,
-            feed_id: U256::from_bytes_repr(hex_to_bytes(DATA_POINT_BYTES_TAIL[..6].to_string())),
-        };
-
-        assert_eq!(result, data_point);
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 15b31817..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/protocol/marker.rs.html +++ /dev/null @@ -1,133 +0,0 @@ -marker.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-
use crate::{
-    network::{assert::Assert, error::Error},
-    protocol::constants::{REDSTONE_MARKER, REDSTONE_MARKER_BS},
-    utils::trim::Trim,
-};
-
-pub fn trim_redstone_marker(payload: &mut Vec<u8>) {
-    let marker: Vec<u8> = payload.trim_end(REDSTONE_MARKER_BS);
-
-    marker.as_slice().assert_or_revert(
-        |&marker| marker == REDSTONE_MARKER,
-        |&val| Error::WrongRedStoneMarker(val.into()),
-    );
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        helpers::hex::hex_to_bytes,
-        protocol::{constants::REDSTONE_MARKER_BS, marker::trim_redstone_marker},
-    };
-
-    const PAYLOAD_TAIL: &str = "1c000f000000000002ed57011e0000";
-
-    #[test]
-    fn test_trim_redstone_marker() {
-        let mut bytes = hex_to_bytes(PAYLOAD_TAIL.into());
-        trim_redstone_marker(&mut bytes);
-
-        assert_eq!(
-            bytes,
-            hex_to_bytes(PAYLOAD_TAIL[..PAYLOAD_TAIL.len() - 2 * REDSTONE_MARKER_BS].into())
-        );
-    }
-
-    #[should_panic(expected = "Wrong RedStone marker: 000002ed57022e0000")]
-    #[test]
-    fn test_trim_redstone_marker_wrong() {
-        trim_redstone_marker(&mut hex_to_bytes(PAYLOAD_TAIL.replace('1', "2")));
-    }
-
-    #[should_panic(expected = "Wrong RedStone marker: 00000002ed57011e00")]
-    #[test]
-    fn test_trim_redstone_marker_wrong_ending() {
-        trim_redstone_marker(&mut hex_to_bytes(
-            PAYLOAD_TAIL[..PAYLOAD_TAIL.len() - 2].into(),
-        ));
-    }
-
-    #[should_panic(expected = "Wrong RedStone marker: 100002ed57011e0000")]
-    #[test]
-    fn test_trim_redstone_marker_wrong_beginning() {
-        trim_redstone_marker(&mut hex_to_bytes(
-            PAYLOAD_TAIL.replace("0000000", "1111111"),
-        ));
-    }
-
-    #[should_panic(expected = "Wrong RedStone marker: 0002ed57011e0000")]
-    #[test]
-    fn test_trim_redstone_marker_too_short() {
-        trim_redstone_marker(&mut hex_to_bytes(
-            PAYLOAD_TAIL[PAYLOAD_TAIL.len() - 2 * (REDSTONE_MARKER_BS - 1)..].into(),
-        ));
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index fbd60f5b..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/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_casper/src/redstone/protocol/payload.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/protocol/payload.rs.html deleted file mode 100644 index 1cd14131..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/protocol/payload.rs.html +++ /dev/null @@ -1,209 +0,0 @@ -payload.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-
use crate::{
-    network::{assert::Assert, error::Error},
-    protocol::{
-        constants::{DATA_PACKAGES_COUNT_BS, UNSIGNED_METADATA_BYTE_SIZE_BS},
-        data_package::{trim_data_packages, DataPackage},
-        marker,
-    },
-    utils::trim::Trim,
-};
-
-#[derive(Clone, Debug)]
-pub(crate) struct Payload {
-    pub(crate) data_packages: Vec<DataPackage>,
-}
-
-impl Payload {
-    pub(crate) fn make(payload_bytes: &mut Vec<u8>) -> Payload {
-        marker::trim_redstone_marker(payload_bytes);
-        let payload = trim_payload(payload_bytes);
-
-        payload_bytes.assert_or_revert(
-            |bytes| bytes.is_empty(),
-            |bytes| Error::NonEmptyPayloadRemainder(bytes.as_slice().into()),
-        );
-
-        payload
-    }
-}
-
-fn trim_payload(payload: &mut Vec<u8>) -> Payload {
-    let data_package_count = trim_metadata(payload);
-    let data_packages = trim_data_packages(payload, data_package_count);
-
-    Payload { data_packages }
-}
-
-fn trim_metadata(payload: &mut Vec<u8>) -> usize {
-    let unsigned_metadata_size = payload.trim_end(UNSIGNED_METADATA_BYTE_SIZE_BS);
-    let _: Vec<u8> = payload.trim_end(unsigned_metadata_size);
-
-    payload.trim_end(DATA_PACKAGES_COUNT_BS)
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        helpers::hex::{hex_to_bytes, read_payload_bytes, read_payload_hex},
-        protocol::{
-            constants::REDSTONE_MARKER_BS,
-            payload::{trim_metadata, trim_payload, Payload},
-        },
-    };
-
-    const PAYLOAD_METADATA_BYTES: &str = "000f000000";
-    const PAYLOAD_METADATA_WITH_UNSIGNED_BYTE: &str = "000f55000001";
-    const PAYLOAD_METADATA_WITH_UNSIGNED_BYTES: &str = "000f11223344556677889900aabbccddeeff000010";
-
-    #[test]
-    fn test_trim_metadata() {
-        let prefix = "9e0294371c";
-
-        for &bytes_str in &[
-            PAYLOAD_METADATA_BYTES,
-            PAYLOAD_METADATA_WITH_UNSIGNED_BYTE,
-            PAYLOAD_METADATA_WITH_UNSIGNED_BYTES,
-        ] {
-            let mut bytes = hex_to_bytes(prefix.to_owned() + bytes_str);
-            let result = trim_metadata(&mut bytes);
-
-            assert_eq!(bytes, hex_to_bytes(prefix.into()));
-            assert_eq!(result, 15);
-        }
-    }
-
-    #[test]
-    fn test_trim_payload() {
-        let payload_hex = read_payload_bytes("./sample-data/payload.hex");
-
-        let mut bytes = payload_hex[..payload_hex.len() - REDSTONE_MARKER_BS].into();
-        let payload = trim_payload(&mut bytes);
-
-        assert_eq!(bytes, Vec::<u8>::new());
-        assert_eq!(payload.data_packages.len(), 15);
-    }
-
-    #[test]
-    fn test_make_payload() {
-        let mut payload_hex = read_payload_bytes("./sample-data/payload.hex");
-        let payload = Payload::make(&mut payload_hex);
-
-        assert_eq!(payload.data_packages.len(), 15);
-    }
-
-    #[should_panic(expected = "Non empty payload remainder: 12")]
-    #[test]
-    fn test_make_payload_with_prefix() {
-        let payload_hex = read_payload_hex("./sample-data/payload.hex");
-        let mut bytes = hex_to_bytes("12".to_owned() + &payload_hex);
-        let payload = Payload::make(&mut bytes);
-
-        assert_eq!(payload.data_packages.len(), 15);
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index f28b29ef..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/utils/filter.rs.html +++ /dev/null @@ -1,43 +0,0 @@ -filter.rs - source
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-
pub(crate) trait FilterSome<Output> {
-    fn filter_some(&self) -> Output;
-}
-
-impl<T: Copy> FilterSome<Vec<T>> for [Option<T>] {
-    fn filter_some(&self) -> Vec<T> {
-        self.iter().filter_map(|&opt| opt).collect()
-    }
-}
-
-#[cfg(test)]
-mod filter_some_tests {
-    use crate::utils::filter::FilterSome;
-
-    #[test]
-    fn test_filter_some() {
-        let values = [None, Some(23u64), None, Some(12), Some(12), None, Some(23)];
-
-        assert_eq!(values.filter_some(), vec![23, 12, 12, 23])
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index c329ff3b..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/utils/median.rs.html +++ /dev/null @@ -1,375 +0,0 @@ -median.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-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
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-
use crate::network::{assert::Assert, error::Error::ArrayIsEmpty, specific::U256};
-use std::ops::{Add, Rem, Shr};
-
-pub(crate) trait Median {
-    type Item;
-
-    fn median(self) -> Self::Item;
-}
-
-trait Avg {
-    fn avg(self, other: Self) -> Self;
-}
-
-trait Averageable:
-    Add<Output = Self> + Shr<Output = Self> + From<u8> + Rem<Output = Self> + Copy
-{
-}
-
-impl Averageable for i32 {}
-
-#[cfg(feature = "network_radix")]
-impl Avg for U256 {
-    fn avg(self, other: Self) -> Self {
-        let one = 1u32;
-        let two = U256::from(2u8);
-
-        self.shr(one) + other.shr(one) + (self % two + other % two).shr(one)
-    }
-}
-
-#[cfg(not(feature = "network_radix"))]
-impl Averageable for U256 {}
-
-impl<T> Avg for T
-where
-    T: Averageable,
-{
-    fn avg(self, other: Self) -> Self {
-        let one = T::from(1);
-        let two = T::from(2);
-
-        self.shr(one) + other.shr(one) + (self % two + other % two).shr(one)
-    }
-}
-
-impl<T> Median for Vec<T>
-where
-    T: Copy + Ord + Avg,
-{
-    type Item = T;
-
-    fn median(self) -> Self::Item {
-        let len = self.len();
-
-        match len.assert_or_revert(|x| *x > 0, |_| ArrayIsEmpty) {
-            1 => self[0],
-            2 => self[0].avg(self[1]),
-            3 => maybe_pick_median(self[0], self[1], self[2]).unwrap_or_else(|| {
-                maybe_pick_median(self[1], self[0], self[2])
-                    .unwrap_or_else(|| maybe_pick_median(self[1], self[2], self[0]).unwrap())
-            }),
-            _ => {
-                let mut values = self;
-                values.sort();
-
-                let mid = len / 2;
-
-                if len % 2 == 0 {
-                    values[mid - 1].avg(values[mid])
-                } else {
-                    values[mid]
-                }
-            }
-        }
-    }
-}
-
-#[inline]
-fn maybe_pick_median<T>(a: T, b: T, c: T) -> Option<T>
-where
-    T: PartialOrd,
-{
-    if (b >= a && b <= c) || (b >= c && b <= a) {
-        Some(b)
-    } else {
-        None
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use super::{Avg, Median};
-    use crate::network::specific::U256;
-    use itertools::Itertools;
-    use std::fmt::Debug;
-
-    #[cfg(feature = "network_radix")]
-    use crate::network::radix::u256_ext::U256Ext;
-
-    #[allow(clippy::legacy_numeric_constants)]
-    #[test]
-    fn test_avg() {
-        let u256 = U256::max_value(); // 115792089237316195423570985008687907853269984665640564039457584007913129639935
-        let u256_max_sub_1 = u256 - U256::from(1u32);
-        let u256max_div_2 = u256 / U256::from(2u32);
-
-        assert_eq!(u256.avg(U256::from(0u8)), u256max_div_2);
-        assert_eq!(u256.avg(U256::from(1u8)), u256max_div_2 + U256::from(1u8));
-        assert_eq!(u256.avg(u256_max_sub_1), u256_max_sub_1);
-        assert_eq!(u256.avg(u256), u256);
-
-        assert_eq!((u256_max_sub_1).avg(U256::from(0u8)), u256max_div_2);
-        assert_eq!((u256_max_sub_1).avg(U256::from(1u8)), u256max_div_2);
-        assert_eq!((u256_max_sub_1).avg(u256_max_sub_1), u256_max_sub_1);
-        assert_eq!((u256_max_sub_1).avg(u256), u256_max_sub_1);
-    }
-
-    #[test]
-    #[should_panic(expected = "Array is empty")]
-    fn test_median_empty_vector() {
-        let vec: Vec<i32> = vec![];
-
-        vec.median();
-    }
-
-    #[test]
-    fn test_median_single_element() {
-        assert_eq!(vec![1].median(), 1);
-    }
-
-    #[test]
-    fn test_median_two_elements() {
-        test_all_permutations(vec![1, 3], 2);
-        test_all_permutations(vec![1, 2], 1);
-        test_all_permutations(vec![1, 1], 1);
-    }
-
-    #[test]
-    fn test_median_three_elements() {
-        test_all_permutations(vec![1, 2, 3], 2);
-        test_all_permutations(vec![1, 1, 2], 1);
-        test_all_permutations(vec![1, 2, 2], 2);
-        test_all_permutations(vec![1, 1, 1], 1);
-    }
-
-    #[test]
-    fn test_median_even_number_of_elements() {
-        test_all_permutations(vec![1, 2, 3, 4], 2);
-        test_all_permutations(vec![1, 2, 4, 4], 3);
-        test_all_permutations(vec![1, 1, 3, 3], 2);
-        test_all_permutations(vec![1, 1, 3, 4], 2);
-        test_all_permutations(vec![1, 1, 1, 3], 1);
-        test_all_permutations(vec![1, 3, 3, 3], 3);
-        test_all_permutations(vec![1, 1, 1, 1], 1);
-        test_all_permutations(vec![1, 2, 3, 4, 5, 6], 3);
-    }
-
-    #[test]
-    fn test_median_odd_number_of_elements() {
-        test_all_permutations(vec![1, 2, 3, 4, 5], 3);
-        test_all_permutations(vec![1, 1, 3, 4, 5], 3);
-        test_all_permutations(vec![1, 1, 1, 4, 5], 1);
-        test_all_permutations(vec![1, 1, 1, 3, 3], 1);
-        test_all_permutations(vec![1, 1, 3, 3, 5], 3);
-
-        test_all_permutations(vec![1, 2, 3, 5, 5], 3);
-        test_all_permutations(vec![1, 2, 5, 5, 5], 5);
-        test_all_permutations(vec![1, 1, 3, 3, 3], 3);
-        test_all_permutations(vec![1, 3, 3, 5, 5], 3);
-
-        test_all_permutations(vec![1, 2, 2, 2, 2], 2);
-        test_all_permutations(vec![1, 1, 1, 1, 2], 1);
-        test_all_permutations(vec![1, 1, 1, 1, 1], 1);
-
-        test_all_permutations(vec![1, 2, 3, 4, 5, 6, 7], 4);
-    }
-
-    fn test_all_permutations<T: Copy + Ord + Avg + Debug>(numbers: Vec<T>, expected_value: T) {
-        let perms: Vec<Vec<_>> = numbers.iter().permutations(numbers.len()).collect();
-
-        for perm in perms {
-            let p: Vec<_> = perm.iter().map(|&&v| v).collect();
-
-            assert_eq!(p.median(), expected_value);
-        }
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 44258e67..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/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_casper/src/redstone/utils/trim.rs.html b/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/utils/trim.rs.html deleted file mode 100644 index 551a41a8..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/utils/trim.rs.html +++ /dev/null @@ -1,299 +0,0 @@ -trim.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-
use crate::network::{
-    assert::Unwrap, error::Error, from_bytes_repr::FromBytesRepr, specific::U256,
-};
-
-pub trait Trim<T>
-where
-    Self: Sized,
-{
-    fn trim_end(&mut self, len: usize) -> T;
-}
-
-impl Trim<Vec<u8>> for Vec<u8> {
-    fn trim_end(&mut self, len: usize) -> Self {
-        if len >= self.len() {
-            std::mem::take(self)
-        } else {
-            self.split_off(self.len() - len)
-        }
-    }
-}
-
-impl Trim<U256> for Vec<u8> {
-    fn trim_end(&mut self, len: usize) -> U256 {
-        U256::from_bytes_repr(self.trim_end(len))
-    }
-}
-
-impl Trim<usize> for Vec<u8> {
-    fn trim_end(&mut self, len: usize) -> usize {
-        let y: U256 = self.trim_end(len);
-        y.try_into().unwrap_or_revert(|_| Error::NumberOverflow(y))
-    }
-}
-
-impl Trim<u64> for Vec<u8> {
-    fn trim_end(&mut self, len: usize) -> u64 {
-        let y: U256 = self.trim_end(len);
-        y.try_into().unwrap_or_revert(|_| Error::NumberOverflow(y))
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use crate::{
-        network::specific::U256,
-        protocol::constants::{REDSTONE_MARKER, REDSTONE_MARKER_BS},
-        utils::trim::Trim,
-    };
-
-    const MARKER_DECIMAL: u64 = 823907890102272;
-
-    fn redstone_marker_bytes() -> Vec<u8> {
-        REDSTONE_MARKER.into()
-    }
-
-    #[test]
-    fn test_trim_end_number() {
-        let (rest, result): (_, U256) = test_trim_end(3);
-        assert_eq!(result, (256u32.pow(2) * 30).into());
-        assert_eq!(rest.as_slice(), &REDSTONE_MARKER[..6]);
-
-        let (_, result): (_, u64) = test_trim_end(3);
-        assert_eq!(result, 256u64.pow(2) * 30);
-
-        let (_, result): (_, usize) = test_trim_end(3);
-        assert_eq!(result, 256usize.pow(2) * 30);
-
-        let (_, result): (_, Vec<u8>) = test_trim_end(3);
-        assert_eq!(result.as_slice(), &REDSTONE_MARKER[6..]);
-    }
-
-    #[test]
-    fn test_trim_end_number_null() {
-        let (rest, result): (_, U256) = test_trim_end(0);
-        assert_eq!(result, 0u32.into());
-        assert_eq!(rest.as_slice(), &REDSTONE_MARKER);
-
-        let (_, result): (_, u64) = test_trim_end(0);
-        assert_eq!(result, 0);
-
-        let (_, result): (_, usize) = test_trim_end(0);
-        assert_eq!(result, 0);
-
-        let (_, result): (_, Vec<u8>) = test_trim_end(0);
-        assert_eq!(result, Vec::<u8>::new());
-    }
-
-    #[test]
-    fn test_trim_end_whole() {
-        test_trim_end_whole_size(REDSTONE_MARKER_BS);
-        test_trim_end_whole_size(REDSTONE_MARKER_BS - 1);
-        test_trim_end_whole_size(REDSTONE_MARKER_BS - 2);
-        test_trim_end_whole_size(REDSTONE_MARKER_BS + 1);
-    }
-
-    fn test_trim_end_whole_size(size: usize) {
-        let (rest, result): (_, U256) = test_trim_end(size);
-        assert_eq!(result, MARKER_DECIMAL.into());
-        assert_eq!(
-            rest.as_slice().len(),
-            REDSTONE_MARKER_BS - size.min(REDSTONE_MARKER_BS)
-        );
-
-        let (_, result): (_, u64) = test_trim_end(size);
-        assert_eq!(result, MARKER_DECIMAL);
-
-        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));
-    }
-
-    #[test]
-    fn test_trim_end_u64() {
-        let mut bytes = vec![255, 255, 255, 255, 255, 255, 255, 255, 255];
-        let x: u64 = bytes.trim_end(8);
-
-        let expected_bytes = vec![255];
-
-        assert_eq!(bytes, expected_bytes);
-        assert_eq!(x, 18446744073709551615);
-    }
-
-    #[should_panic(expected = "Number overflow: 18591708106338011145")]
-    #[test]
-    fn test_trim_end_u64_overflow() {
-        let mut bytes = vec![1u8, 2, 3, 4, 5, 6, 7, 8, 9];
-
-        let _: u64 = bytes.trim_end(9);
-    }
-
-    #[allow(dead_code)]
-    trait TestTrimEnd<T>
-    where
-        Self: Sized,
-    {
-        fn test_trim_end(size: usize) -> (Self, T);
-    }
-
-    fn test_trim_end<T>(size: usize) -> (Vec<u8>, T)
-    where
-        Vec<u8>: Trim<T>,
-    {
-        let mut bytes = redstone_marker_bytes();
-        let rest = bytes.trim_end(size);
-        (bytes, rest)
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 0d223de1..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/src/redstone/utils/trim_zeros.rs.html +++ /dev/null @@ -1,91 +0,0 @@ -trim_zeros.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
-
pub trait TrimZeros {
-    fn trim_zeros(self) -> Self;
-}
-
-impl TrimZeros for Vec<u8> {
-    fn trim_zeros(self) -> Self {
-        let mut res = self.len();
-
-        for i in (0..self.len()).rev() {
-            if self[i] != 0 {
-                break;
-            }
-
-            res = i;
-        }
-
-        let (rest, _) = self.split_at(res);
-
-        rest.into()
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use crate::{protocol::constants::REDSTONE_MARKER, utils::trim_zeros::TrimZeros};
-
-    fn redstone_marker_bytes() -> Vec<u8> {
-        REDSTONE_MARKER.as_slice().into()
-    }
-
-    #[test]
-    fn test_trim_zeros() {
-        let trimmed = redstone_marker_bytes().trim_zeros();
-        assert_eq!(trimmed.as_slice(), &REDSTONE_MARKER[..7]);
-
-        let trimmed = trimmed.trim_zeros();
-        assert_eq!(trimmed.as_slice(), &REDSTONE_MARKER[..7]);
-    }
-
-    #[test]
-    fn test_trim_zeros_empty() {
-        let trimmed = Vec::<u8>::default().trim_zeros();
-        assert_eq!(trimmed, Vec::<u8>::default());
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/COPYRIGHT-23e9bde6c69aea69.txt b/static/rust/redstone/crypto_secp256k1,network_casper/static.files/COPYRIGHT-23e9bde6c69aea69.txt deleted file mode 100644 index 1447df79..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/COPYRIGHT-23e9bde6c69aea69.txt +++ /dev/null @@ -1,50 +0,0 @@ -# REUSE-IgnoreStart - -These documentation pages include resources by third parties. This copyright -file applies only to those resources. The following third party resources are -included, and carry their own copyright notices and license terms: - -* Fira Sans (FiraSans-Regular.woff2, FiraSans-Medium.woff2): - - Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ - with Reserved Font Name Fira Sans. - - Copyright (c) 2014, Telefonica S.A. - - Licensed under the SIL Open Font License, Version 1.1. - See FiraSans-LICENSE.txt. - -* rustdoc.css, main.js, and playpen.js: - - Copyright 2015 The Rust Developers. - Licensed under the Apache License, Version 2.0 (see LICENSE-APACHE.txt) or - the MIT license (LICENSE-MIT.txt) at your option. - -* normalize.css: - - Copyright (c) Nicolas Gallagher and Jonathan Neal. - Licensed under the MIT license (see LICENSE-MIT.txt). - -* Source Code Pro (SourceCodePro-Regular.ttf.woff2, - SourceCodePro-Semibold.ttf.woff2, SourceCodePro-It.ttf.woff2): - - Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), - with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark - of Adobe Systems Incorporated in the United States and/or other countries. - - Licensed under the SIL Open Font License, Version 1.1. - See SourceCodePro-LICENSE.txt. - -* Source Serif 4 (SourceSerif4-Regular.ttf.woff2, SourceSerif4-Bold.ttf.woff2, - SourceSerif4-It.ttf.woff2): - - Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name - 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United - States and/or other countries. - - Licensed under the SIL Open Font License, Version 1.1. - See SourceSerif4-LICENSE.md. - -This copyright file is intended to be distributed with rustdoc output. - -# REUSE-IgnoreEnd diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/FiraSans-LICENSE-db4b642586e02d97.txt b/static/rust/redstone/crypto_secp256k1,network_casper/static.files/FiraSans-LICENSE-db4b642586e02d97.txt deleted file mode 100644 index d7e9c149..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/FiraSans-LICENSE-db4b642586e02d97.txt +++ /dev/null @@ -1,98 +0,0 @@ -// REUSE-IgnoreStart - -Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. -with Reserved Font Name < Fira >, - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. - -// REUSE-IgnoreEnd diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 b/static/rust/redstone/crypto_secp256k1,network_casper/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 deleted file mode 100644 index 7a1e5fc5..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 b/static/rust/redstone/crypto_secp256k1,network_casper/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 deleted file mode 100644 index e766e06c..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt b/static/rust/redstone/crypto_secp256k1,network_casper/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt deleted file mode 100644 index 16fe87b0..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/LICENSE-MIT-65090b722b3f6c56.txt b/static/rust/redstone/crypto_secp256k1,network_casper/static.files/LICENSE-MIT-65090b722b3f6c56.txt deleted file mode 100644 index 31aa7938..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/LICENSE-MIT-65090b722b3f6c56.txt +++ /dev/null @@ -1,23 +0,0 @@ -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 b/static/rust/redstone/crypto_secp256k1,network_casper/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 deleted file mode 100644 index 1866ad4b..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt b/static/rust/redstone/crypto_secp256k1,network_casper/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt deleted file mode 100644 index 4b3edc29..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt +++ /dev/null @@ -1,103 +0,0 @@ -// REUSE-IgnoreStart - -Copyright (c) 2010, NAVER Corporation (https://www.navercorp.com/), - -with Reserved Font Name Nanum, Naver Nanum, NanumGothic, Naver NanumGothic, -NanumMyeongjo, Naver NanumMyeongjo, NanumBrush, Naver NanumBrush, NanumPen, -Naver NanumPen, Naver NanumGothicEco, NanumGothicEco, Naver NanumMyeongjoEco, -NanumMyeongjoEco, Naver NanumGothicLight, NanumGothicLight, NanumBarunGothic, -Naver NanumBarunGothic, NanumSquareRound, NanumBarunPen, MaruBuri - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. - -// REUSE-IgnoreEnd diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 b/static/rust/redstone/crypto_secp256k1,network_casper/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 deleted file mode 100644 index 462c34ef..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt b/static/rust/redstone/crypto_secp256k1,network_casper/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt deleted file mode 100644 index 0d2941e1..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt +++ /dev/null @@ -1,97 +0,0 @@ -// REUSE-IgnoreStart - -Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. - -This Font Software is licensed under the SIL Open Font License, Version 1.1. - -This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. - -// REUSE-IgnoreEnd diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 b/static/rust/redstone/crypto_secp256k1,network_casper/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 deleted file mode 100644 index 10b558e0..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 b/static/rust/redstone/crypto_secp256k1,network_casper/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 deleted file mode 100644 index 5ec64eef..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 b/static/rust/redstone/crypto_secp256k1,network_casper/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 deleted file mode 100644 index 181a07f6..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 b/static/rust/redstone/crypto_secp256k1,network_casper/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 deleted file mode 100644 index 2ae08a7b..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md b/static/rust/redstone/crypto_secp256k1,network_casper/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md deleted file mode 100644 index 175fa4f4..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md +++ /dev/null @@ -1,98 +0,0 @@ - - -Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. -Copyright 2014 - 2023 Adobe (http://www.adobe.com/), with Reserved Font Name ‘Source’. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. - -This Font Software is licensed under the SIL Open Font License, Version 1.1. - -This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. - - diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 b/static/rust/redstone/crypto_secp256k1,network_casper/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 deleted file mode 100644 index 0263fc30..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/favicon-2c020d218678b618.svg b/static/rust/redstone/crypto_secp256k1,network_casper/static.files/favicon-2c020d218678b618.svg deleted file mode 100644 index 8b34b511..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/favicon-2c020d218678b618.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/favicon-32x32-422f7d1d52889060.png b/static/rust/redstone/crypto_secp256k1,network_casper/static.files/favicon-32x32-422f7d1d52889060.png deleted file mode 100644 index 69b8613c..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/favicon-32x32-422f7d1d52889060.png and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/main-20a3ad099b048cf2.js b/static/rust/redstone/crypto_secp256k1,network_casper/static.files/main-20a3ad099b048cf2.js deleted file mode 100644 index 133116e4..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/main-20a3ad099b048cf2.js +++ /dev/null @@ -1,11 +0,0 @@ -"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;if(path===current_page){link.className="current"}link.textContent=name;const li=document.createElement("li");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/normalize-76eba96aa4d2e634.css b/static/rust/redstone/crypto_secp256k1,network_casper/static.files/normalize-76eba96aa4d2e634.css deleted file mode 100644 index 469959f1..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/normalize-76eba96aa4d2e634.css +++ /dev/null @@ -1,2 +0,0 @@ - /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ -html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type="button"],[type="reset"],[type="submit"],button{-webkit-appearance:button}[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none} \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/noscript-df360f571f6edeae.css b/static/rust/redstone/crypto_secp256k1,network_casper/static.files/noscript-df360f571f6edeae.css deleted file mode 100644 index 4c310ae5..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/noscript-df360f571f6edeae.css +++ /dev/null @@ -1 +0,0 @@ - #main-content .attributes{margin-left:0 !important;}#copy-path,#sidebar-button,.sidebar-resizer{display:none !important;}nav.sub{display:none;}.src .sidebar{display:none;}.notable-traits{display:none;}:root,: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%);}@media (prefers-color-scheme:dark){:root,:root:not([data-theme]){--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;--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%);}} \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/rust-logo-151179464ae7ed46.svg b/static/rust/redstone/crypto_secp256k1,network_casper/static.files/rust-logo-151179464ae7ed46.svg deleted file mode 100644 index 62424d8f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/rust-logo-151179464ae7ed46.svg +++ /dev/null @@ -1,61 +0,0 @@ - - - diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/rustdoc-dd39b87e5fcfba68.css b/static/rust/redstone/crypto_secp256k1,network_casper/static.files/rustdoc-dd39b87e5fcfba68.css deleted file mode 100644 index 77f89832..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/rustdoc-dd39b87e5fcfba68.css +++ /dev/null @@ -1,46 +0,0 @@ - :root{--nav-sub-mobile-padding:8px;--search-typename-width:6.75rem;--desktop-sidebar-width:200px;--src-sidebar-width:300px;--desktop-sidebar-z-index:100;}@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-left:-0.25rem;margin-right:0.25rem;}.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:24px;}.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 -16px 0 -16px;text-align:center;}.sidebar-crate h2 a{display:block;margin:0 calc(-24px + 0.25rem) 0 -0.2rem;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);}}@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/scrape-examples-ef1e698c1d417c0c.js b/static/rust/redstone/crypto_secp256k1,network_casper/static.files/scrape-examples-ef1e698c1d417c0c.js deleted file mode 100644 index ba830e37..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/scrape-examples-ef1e698c1d417c0c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(function(){const DEFAULT_MAX_LINES=5;const HIDDEN_MAX_LINES=10;function scrollToLoc(elt,loc,isHidden){const lines=elt.querySelector(".src-line-numbers");let scrollOffset;const maxLines=isHidden?HIDDEN_MAX_LINES:DEFAULT_MAX_LINES;if(loc[1]-loc[0]>maxLines){const line=Math.max(0,loc[0]-1);scrollOffset=lines.children[line].offsetTop}else{const wrapper=elt.querySelector(".code-wrapper");const halfHeight=wrapper.offsetHeight/2;const offsetTop=lines.children[loc[0]].offsetTop;const lastLine=lines.children[loc[1]];const offsetBot=lastLine.offsetTop+lastLine.offsetHeight;const offsetMid=(offsetTop+offsetBot)/2;scrollOffset=offsetMid-halfHeight}lines.scrollTo(0,scrollOffset);elt.querySelector(".rust").scrollTo(0,scrollOffset)}function updateScrapedExample(example,isHidden){const locs=JSON.parse(example.attributes.getNamedItem("data-locs").textContent);let locIndex=0;const highlights=Array.prototype.slice.call(example.querySelectorAll(".highlight"));const link=example.querySelector(".scraped-example-title a");if(locs.length>1){const onChangeLoc=changeIndex=>{removeClass(highlights[locIndex],"focus");changeIndex();scrollToLoc(example,locs[locIndex][0],isHidden);addClass(highlights[locIndex],"focus");const url=locs[locIndex][1];const title=locs[locIndex][2];link.href=url;link.innerHTML=title};example.querySelector(".prev").addEventListener("click",()=>{onChangeLoc(()=>{locIndex=(locIndex-1+locs.length)%locs.length})});example.querySelector(".next").addEventListener("click",()=>{onChangeLoc(()=>{locIndex=(locIndex+1)%locs.length})})}const expandButton=example.querySelector(".expand");if(expandButton){expandButton.addEventListener("click",()=>{if(hasClass(example,"expanded")){removeClass(example,"expanded");scrollToLoc(example,locs[0][0],isHidden)}else{addClass(example,"expanded")}})}scrollToLoc(example,locs[0][0],isHidden)}const firstExamples=document.querySelectorAll(".scraped-example-list > .scraped-example");onEachLazy(firstExamples,el=>updateScrapedExample(el,false));onEachLazy(document.querySelectorAll(".more-examples-toggle"),toggle=>{onEachLazy(toggle.querySelectorAll(".toggle-line, .hide-more"),button=>{button.addEventListener("click",()=>{toggle.open=false})});const moreExamples=toggle.querySelectorAll(".scraped-example");toggle.querySelector("summary").addEventListener("click",()=>{setTimeout(()=>{onEachLazy(moreExamples,el=>updateScrapedExample(el,true))})},{once:true})})})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/search-d52510db62a78183.js b/static/rust/redstone/crypto_secp256k1,network_casper/static.files/search-d52510db62a78183.js deleted file mode 100644 index a2824f29..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/search-d52510db62a78183.js +++ /dev/null @@ -1,5 +0,0 @@ -"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;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 isIdentCharacter(c){return(c==="_"||(c>="0"&&c<="9")||(c>="a"&&c<="z")||(c>="A"&&c<="Z"))}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){const start=parserState.pos;let end=parserState.pos;let foundExclamation=-1;while(parserState.pos0){throw["Unexpected ",c," after ",parserState.userQuery[parserState.pos-1]]}else{throw["Unexpected ",c]}}parserState.pos+=1;end=parserState.pos}if(foundExclamation!==-1&&foundExclamation!==start&&isIdentCharacter(parserState.userQuery[foundExclamation-1])){if(parserState.typeFilter===null){parserState.typeFilter="macro"}else if(parserState.typeFilter!=="macro"){throw["Invalid search type: macro ","!"," and ",parserState.typeFilter," both specified",]}end=foundExclamation}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();for(const c in query){if(!isIdentCharacter(query[c])){throw["Unexpected ",query[c]," 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,}}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{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(pushFunc);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){if(typeNameIdMap.has(elem.normalizedPathLast)&&(isAssocType||!typeNameIdMap.get(elem.normalizedPathLast).assocOnly)){elem.id=typeNameIdMap.get(elem.normalizedPathLast).id}else if(!parsedQuery.literalSearch){let match=null;let matchDist=maxEditDistance+1;let matchName="";for(const[name,{id,assocOnly}]of typeNameIdMap){const dist=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(){const cb="}".charCodeAt(0);let c=this.string.charCodeAt(this.offset);const ret=[];while(c!==cb){ret.push(this.decode());c=this.string.charCodeAt(this.offset)}this.offset+=1;return ret}decode(){const[ob,la]=["{","`"].map(c=>c.charCodeAt(0));let n=0;let c=this.string.charCodeAt(this.offset);if(c===ob){this.offset+=1;return this.decodeList()}while(c>1];this.offset+=1;return sign?-value:value}next(){const c=this.string.charCodeAt(this.offset);const[zero,ua,la]=["0","@","`"].map(c=>c.charCodeAt(0));if(c>=zero&&c16){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();const charA="A".charCodeAt(0);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)-charA,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/static.files/settings-4313503d2e1961c2.js b/static/rust/redstone/crypto_secp256k1,network_casper/static.files/settings-4313503d2e1961c2.js deleted file mode 100644 index ab425fe4..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/settings-4313503d2e1961c2.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict";(function(){const isSettingsPage=window.location.pathname.endsWith("/settings.html");function changeSetting(settingName,value){if(settingName==="theme"){const useSystem=value==="system preference"?"true":"false";updateLocalStorage("use-system-theme",useSystem)}updateLocalStorage(settingName,value);switch(settingName){case"theme":case"preferred-dark-theme":case"preferred-light-theme":updateTheme();updateLightAndDark();break;case"line-numbers":if(value===true){window.rustdoc_add_line_numbers_to_examples()}else{window.rustdoc_remove_line_numbers_from_examples()}break;case"hide-sidebar":if(value===true){addClass(document.documentElement,"hide-sidebar")}else{removeClass(document.documentElement,"hide-sidebar")}break}}function showLightAndDark(){removeClass(document.getElementById("preferred-light-theme"),"hidden");removeClass(document.getElementById("preferred-dark-theme"),"hidden")}function hideLightAndDark(){addClass(document.getElementById("preferred-light-theme"),"hidden");addClass(document.getElementById("preferred-dark-theme"),"hidden")}function updateLightAndDark(){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||(useSystem===null&&getSettingValue("theme")===null)){showLightAndDark()}else{hideLightAndDark()}}function setEvents(settingsElement){updateLightAndDark();onEachLazy(settingsElement.querySelectorAll("input[type=\"checkbox\"]"),toggle=>{const settingId=toggle.id;const settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=()=>{changeSetting(toggle.id,toggle.checked)}});onEachLazy(settingsElement.querySelectorAll("input[type=\"radio\"]"),elem=>{const settingId=elem.name;let settingValue=getSettingValue(settingId);if(settingId==="theme"){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||settingValue===null){settingValue=useSystem==="false"?"light":"system preference"}}if(settingValue!==null&&settingValue!=="null"){elem.checked=settingValue===elem.value}elem.addEventListener("change",ev=>{changeSetting(ev.target.name,ev.target.value)})})}function buildSettingsPageSections(settings){let output="";for(const setting of settings){const js_data_name=setting["js_name"];const setting_name=setting["name"];if(setting["options"]!==undefined){output+=`\ -
-
${setting_name}
-
`;onEach(setting["options"],option=>{const checked=option===setting["default"]?" checked":"";const full=`${js_data_name}-${option.replace(/ /g,"-")}`;output+=`\ - `});output+=`\ -
-
`}else{const checked=setting["default"]===true?" checked":"";output+=`\ -
\ - \ -
`}}return output}function buildSettingsPage(){const theme_names=getVar("themes").split(",").filter(t=>t);theme_names.push("light","dark","ayu");const settings=[{"name":"Theme","js_name":"theme","default":"system preference","options":theme_names.concat("system preference"),},{"name":"Preferred light theme","js_name":"preferred-light-theme","default":"light","options":theme_names,},{"name":"Preferred dark theme","js_name":"preferred-dark-theme","default":"dark","options":theme_names,},{"name":"Auto-hide item contents for large items","js_name":"auto-hide-large-items","default":true,},{"name":"Auto-hide item methods' documentation","js_name":"auto-hide-method-docs","default":false,},{"name":"Auto-hide trait implementation documentation","js_name":"auto-hide-trait-implementations","default":false,},{"name":"Directly go to item in search if there is only one result","js_name":"go-to-only-result","default":false,},{"name":"Show line numbers on code examples","js_name":"line-numbers","default":false,},{"name":"Hide persistent navigation bar","js_name":"hide-sidebar","default":false,},{"name":"Disable keyboard shortcuts","js_name":"disable-shortcuts","default":false,},];const elementKind=isSettingsPage?"section":"div";const innerHTML=`
${buildSettingsPageSections(settings)}
`;const el=document.createElement(elementKind);el.id="settings";if(!isSettingsPage){el.className="popover"}el.innerHTML=innerHTML;if(isSettingsPage){document.getElementById(MAIN_ID).appendChild(el)}else{el.setAttribute("tabindex","-1");getSettingsButton().appendChild(el)}return el}const settingsMenu=buildSettingsPage();function displaySettings(){settingsMenu.style.display="";onEachLazy(settingsMenu.querySelectorAll("input[type='checkbox']"),el=>{const val=getSettingValue(el.id);const checked=val==="true";if(checked!==el.checked&&val!==null){el.checked=checked}})}function settingsBlurHandler(event){blurHandler(event,getSettingsButton(),window.hidePopoverMenus)}if(isSettingsPage){getSettingsButton().onclick=event=>{event.preventDefault()}}else{const settingsButton=getSettingsButton();const settingsMenu=document.getElementById("settings");settingsButton.onclick=event=>{if(settingsMenu.contains(event.target)){return}event.preventDefault();const shouldDisplaySettings=settingsMenu.style.display==="none";window.hideAllModals();if(shouldDisplaySettings){displaySettings()}};settingsButton.onblur=settingsBlurHandler;settingsButton.querySelector("a").onblur=settingsBlurHandler;onEachLazy(settingsMenu.querySelectorAll("input"),el=>{el.onblur=settingsBlurHandler});settingsMenu.onblur=settingsBlurHandler}setTimeout(()=>{setEvents(settingsMenu);if(!isSettingsPage){displaySettings()}removeClass(getSettingsButton(),"rotate")},0)})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/src-script-e66d777a5a92e9b2.js b/static/rust/redstone/crypto_secp256k1,network_casper/static.files/src-script-e66d777a5a92e9b2.js deleted file mode 100644 index d0aebb85..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/src-script-e66d777a5a92e9b2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(function(){const rootPath=getVar("root-path");const NAME_OFFSET=0;const DIRS_OFFSET=1;const FILES_OFFSET=2;const RUSTDOC_MOBILE_BREAKPOINT=700;function closeSidebarIfMobile(){if(window.innerWidth{removeClass(document.documentElement,"src-sidebar-expanded");updateLocalStorage("source-sidebar-show","false")};window.rustdocShowSourceSidebar=()=>{addClass(document.documentElement,"src-sidebar-expanded");updateLocalStorage("source-sidebar-show","true")};window.rustdocToggleSrcSidebar=()=>{if(document.documentElement.classList.contains("src-sidebar-expanded")){window.rustdocCloseSourceSidebar()}else{window.rustdocShowSourceSidebar()}};function createSrcSidebar(){const container=document.querySelector("nav.sidebar");const sidebar=document.createElement("div");sidebar.id="src-sidebar";let hasFoundFile=false;for(const[key,source]of srcIndex){source[NAME_OFFSET]=key;hasFoundFile=createDirEntry(source,sidebar,"",hasFoundFile)}container.appendChild(sidebar);const selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}}function highlightSrcLines(){const match=window.location.hash.match(/^#?(\d+)(?:-(\d+))?$/);if(!match){return}let from=parseInt(match[1],10);let to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to{onEachLazy(e.getElementsByTagName("a"),i_e=>{removeClass(i_e,"line-highlighted")})});for(let i=from;i<=to;++i){elem=document.getElementById(i);if(!elem){break}addClass(elem,"line-highlighted")}}const handleSrcHighlight=(function(){let prev_line_id=0;const set_fragment=name=>{const x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSrcLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return ev=>{let cur_line_id=parseInt(ev.target.id,10);if(isNaN(cur_line_id)||ev.ctrlKey||ev.altKey||ev.metaKey){return}ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){const tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());window.addEventListener("hashchange",highlightSrcLines);onEachLazy(document.getElementsByClassName("src-line-numbers"),el=>{el.addEventListener("click",handleSrcHighlight)});highlightSrcLines();window.createSrcSidebar=createSrcSidebar})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/storage-118b08c4c78b968e.js b/static/rust/redstone/crypto_secp256k1,network_casper/static.files/storage-118b08c4c78b968e.js deleted file mode 100644 index 98189467..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/static.files/storage-118b08c4c78b968e.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict";const builtinThemes=["light","dark","ayu"];const darkThemes=["dark","ayu"];window.currentTheme=document.getElementById("themeStyle");const settingsDataset=(function(){const settingsElement=document.getElementById("default-settings");return settingsElement&&settingsElement.dataset?settingsElement.dataset:null})();function getSettingValue(settingName){const current=getCurrentValue(settingName);if(current===null&&settingsDataset!==null){const def=settingsDataset[settingName.replace(/-/g,"_")];if(def!==undefined){return def}}return current}const localStoredTheme=getSettingValue("theme");function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(elem&&elem.classList){elem.classList.add(className)}}function removeClass(elem,className){if(elem&&elem.classList){elem.classList.remove(className)}}function onEach(arr,func){for(const elem of arr){if(func(elem)){return true}}return false}function onEachLazy(lazyArray,func){return onEach(Array.prototype.slice.call(lazyArray),func)}function updateLocalStorage(name,value){try{window.localStorage.setItem("rustdoc-"+name,value)}catch(e){}}function getCurrentValue(name){try{return window.localStorage.getItem("rustdoc-"+name)}catch(e){return null}}const getVar=(function getVar(name){const el=document.querySelector("head > meta[name='rustdoc-vars']");return el?el.attributes["data-"+name].value:null});function switchTheme(newThemeName,saveTheme){const themeNames=getVar("themes").split(",").filter(t=>t);themeNames.push(...builtinThemes);if(themeNames.indexOf(newThemeName)===-1){return}if(saveTheme){updateLocalStorage("theme",newThemeName)}document.documentElement.setAttribute("data-theme",newThemeName);if(builtinThemes.indexOf(newThemeName)!==-1){if(window.currentTheme){window.currentTheme.parentNode.removeChild(window.currentTheme);window.currentTheme=null}}else{const newHref=getVar("root-path")+encodeURIComponent(newThemeName)+getVar("resource-suffix")+".css";if(!window.currentTheme){if(document.readyState==="loading"){document.write(``);window.currentTheme=document.getElementById("themeStyle")}else{window.currentTheme=document.createElement("link");window.currentTheme.rel="stylesheet";window.currentTheme.id="themeStyle";window.currentTheme.href=newHref;document.documentElement.appendChild(window.currentTheme)}}else if(newHref!==window.currentTheme.href){window.currentTheme.href=newHref}}}const updateTheme=(function(){const mql=window.matchMedia("(prefers-color-scheme: dark)");function updateTheme(){if(getSettingValue("use-system-theme")!=="false"){const lightTheme=getSettingValue("preferred-light-theme")||"light";const darkTheme=getSettingValue("preferred-dark-theme")||"dark";updateLocalStorage("use-system-theme","true");switchTheme(mql.matches?darkTheme:lightTheme,true)}else{switchTheme(getSettingValue("theme"),false)}}mql.addEventListener("change",updateTheme);return updateTheme})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("preferred-dark-theme",localStoredTheme)}}updateTheme();if(getSettingValue("source-sidebar-show")==="true"){addClass(document.documentElement,"src-sidebar-expanded")}if(getSettingValue("hide-sidebar")==="true"){addClass(document.documentElement,"hide-sidebar")}function updateSidebarWidth(){const desktopSidebarWidth=getSettingValue("desktop-sidebar-width");if(desktopSidebarWidth&&desktopSidebarWidth!=="null"){document.documentElement.style.setProperty("--desktop-sidebar-width",desktopSidebarWidth+"px",)}const srcSidebarWidth=getSettingValue("src-sidebar-width");if(srcSidebarWidth&&srcSidebarWidth!=="null"){document.documentElement.style.setProperty("--src-sidebar-width",srcSidebarWidth+"px",)}}updateSidebarWidth();window.addEventListener("pageshow",ev=>{if(ev.persisted){setTimeout(updateTheme,0);setTimeout(updateSidebarWidth,0)}});class RustdocSearchElement extends HTMLElement{constructor(){super()}connectedCallback(){const rootPath=getVar("root-path");const currentCrate=getVar("current-crate");this.innerHTML=``}}window.customElements.define("rustdoc-search",RustdocSearchElement) \ 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 deleted file mode 100644 index 270a1587..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/clone/trait.Clone.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"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 deleted file mode 100644 index a573550b..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/cmp/trait.Eq.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"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 deleted file mode 100644 index 695eda8f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/cmp/trait.PartialEq.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"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 deleted file mode 100644 index 28d42f05..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/convert/trait.From.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"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 deleted file mode 100644 index f544c767..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/fmt/trait.Debug.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]] -};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 deleted file mode 100644 index 899cd7d8..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/fmt/trait.Display.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"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 deleted file mode 100644 index 3152e387..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/marker/trait.Freeze.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]]] -};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 deleted file mode 100644 index 2e259f12..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/marker/trait.Send.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]]] -};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 deleted file mode 100644 index 19408b71..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/marker/trait.StructuralPartialEq.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"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 deleted file mode 100644 index 22784882..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/marker/trait.Sync.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]]] -};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 deleted file mode 100644 index 3e63cbc0..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/marker/trait.Unpin.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]]] -};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 deleted file mode 100644 index 6f8f3bd3..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]]] -};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 deleted file mode 100644 index a29a861a..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]]] -};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/redstone/core/validator/trait.Validator.js b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/redstone/core/validator/trait.Validator.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/redstone/core/validator/trait.Validator.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/network/as_str/trait.AsAsciiStr.js b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/redstone/network/as_str/trait.AsAsciiStr.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/redstone/network/as_str/trait.AsAsciiStr.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/network/as_str/trait.AsHexStr.js b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/redstone/network/as_str/trait.AsHexStr.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/redstone/network/as_str/trait.AsHexStr.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/network/assert/trait.Assert.js b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/redstone/network/assert/trait.Assert.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/redstone/network/assert/trait.Assert.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/network/assert/trait.Unwrap.js b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/redstone/network/assert/trait.Unwrap.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/redstone/network/assert/trait.Unwrap.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/network/flattened/trait.Flattened.js b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/redstone/network/flattened/trait.Flattened.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/redstone/network/flattened/trait.Flattened.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/network/from_bytes_repr/trait.FromBytesRepr.js b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/redstone/network/from_bytes_repr/trait.FromBytesRepr.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/redstone/network/from_bytes_repr/trait.FromBytesRepr.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/network/from_bytes_repr/trait.Sanitized.js b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/redstone/network/from_bytes_repr/trait.Sanitized.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/redstone/network/from_bytes_repr/trait.Sanitized.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/network/specific/trait.NetworkSpecific.js b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/redstone/network/specific/trait.NetworkSpecific.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/redstone/network/specific/trait.NetworkSpecific.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/utils/filter/trait.FilterSome.js b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/redstone/utils/filter/trait.FilterSome.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/redstone/utils/filter/trait.FilterSome.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/utils/median/trait.Averageable.js b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/redstone/utils/median/trait.Averageable.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/redstone/utils/median/trait.Averageable.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/utils/median/trait.Avg.js b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/redstone/utils/median/trait.Avg.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/redstone/utils/median/trait.Avg.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/utils/median/trait.Median.js b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/redstone/utils/median/trait.Median.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/redstone/utils/median/trait.Median.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/utils/trim/trait.Trim.js b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/redstone/utils/trim/trait.Trim.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/redstone/utils/trim/trait.Trim.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/utils/trim_zeros/trait.TrimZeros.js b/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/redstone/utils/trim_zeros/trait.TrimZeros.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/trait.impl/redstone/utils/trim_zeros/trait.TrimZeros.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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 deleted file mode 100644 index 1d91fcbc..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/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"],["
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 deleted file mode 100644 index cadcd6d3..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/type.impl/redstone/network/casper/struct.Casper.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var type_impls = { -"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/redstone/network/pure/struct.Std.js b/static/rust/redstone/crypto_secp256k1,network_casper/type.impl/redstone/network/pure/struct.Std.js deleted file mode 100644 index b85e8d1d..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/type.impl/redstone/network/pure/struct.Std.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]] -};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/type._Network.js b/static/rust/redstone/crypto_secp256k1,network_casper/type.impl/redstone/network/type._Network.js deleted file mode 100644 index 53f96772..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_casper/type.impl/redstone/network/type._Network.js +++ /dev/null @@ -1,3 +0,0 @@ -(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_radix/.lock b/static/rust/redstone/crypto_secp256k1,network_radix/.lock deleted file mode 100755 index e69de29b..00000000 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/crates.js b/static/rust/redstone/crypto_secp256k1,network_radix/crates.js deleted file mode 100644 index 6d4f9bdc..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/crates.js +++ /dev/null @@ -1 +0,0 @@ -window.ALL_CRATES = ["redstone"]; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/.lock b/static/rust/redstone/crypto_secp256k1,network_radix/doc/.lock deleted file mode 100755 index e69de29b..00000000 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/crates.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/crates.js deleted file mode 100644 index 6d4f9bdc..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/crates.js +++ /dev/null @@ -1 +0,0 @@ -window.ALL_CRATES = ["redstone"]; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/help.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/help.html deleted file mode 100644 index f173d86a..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/help.html +++ /dev/null @@ -1 +0,0 @@ -Help

Rustdoc help

Back
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/all.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/all.html deleted file mode 100644 index 552ba979..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/all.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/core/aggregator/fn.aggregate_matrix.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/aggregator/fn.aggregate_matrix.html deleted file mode 100644 index 0792edbc..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/aggregator/fn.aggregate_matrix.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/core/aggregator/fn.aggregate_values.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/aggregator/fn.aggregate_values.html deleted file mode 100644 index 15726f8e..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/aggregator/fn.aggregate_values.html +++ /dev/null @@ -1,25 +0,0 @@ -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.

-

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 -an average of the values, selecting the median, or applying a custom algorithm defined within the -aggregate_matrix function.

-

The primary purpose of this function is to consolidate data from multiple sources into a coherent -and singular value set that adheres to the criteria specified in the Config.

-

§Arguments

-
    -
  • config - A Config instance containing settings and parameters used to guide the aggregation process.
  • -
  • data_packages - A vector of DataPackage instances, each representing a set of values and associated -metadata collected from various sources or signers.
  • -
-

§Returns

-

Returns a Vec<U256>, which is a vector of aggregated values resulting from applying the aggregation -logic to the input data packages as per the specified configuration. Each U256 value in the vector -represents an aggregated result derived from the corresponding data packages.

-

§Note

-

This function is internal to the crate (pub(crate)) and not exposed as part of the public API. It is -designed to be used by other components within the same crate that require value aggregation functionality.

-
\ No newline at end of file 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_secp256k1,network_radix/doc/redstone/core/aggregator/fn.make_value_signer_matrix.html deleted file mode 100644 index f3dc8819..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/aggregator/fn.make_value_signer_matrix.html +++ /dev/null @@ -1,4 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/aggregator/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/aggregator/index.html deleted file mode 100644 index 7aa39374..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/aggregator/index.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/core/aggregator/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/aggregator/sidebar-items.js deleted file mode 100644 index c13147cd..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/aggregator/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["aggregate_matrix","aggregate_values","make_value_signer_matrix"],"type":["Matrix"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/aggregator/type.Matrix.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/aggregator/type.Matrix.html deleted file mode 100644 index 61c3f974..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/aggregator/type.Matrix.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/core/config/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/config/index.html deleted file mode 100644 index 32a77abc..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/config/index.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/core/config/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/config/sidebar-items.js deleted file mode 100644 index 4cadad77..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/config/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"struct":["Config"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/config/struct.Config.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/config/struct.Config.html deleted file mode 100644 index 67c161a4..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/config/struct.Config.html +++ /dev/null @@ -1,39 +0,0 @@ -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.

-

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.

-

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.

-

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.

-

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( - &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 - 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).

-

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/doc/redstone/core/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/index.html deleted file mode 100644 index e427a2e8..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/index.html +++ /dev/null @@ -1 +0,0 @@ -redstone::core - Rust

Module redstone::core

source ·

Modules§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/processor/fn.make_processor_result.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/processor/fn.make_processor_result.html deleted file mode 100644 index d15046f1..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/processor/fn.make_processor_result.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/core/processor/fn.process_payload.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/processor/fn.process_payload.html deleted file mode 100644 index b1ad0b84..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/processor/fn.process_payload.html +++ /dev/null @@ -1,7 +0,0 @@ -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.
  • -
  • payload_bytes - Network-specific byte-list of the payload to be processed.
  • -
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/processor/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/processor/index.html deleted file mode 100644 index ccd25006..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/processor/index.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/core/processor/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/processor/sidebar-items.js deleted file mode 100644 index e25cd4d1..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/processor/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["make_processor_result","process_payload"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/processor_result/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/processor_result/index.html deleted file mode 100644 index 52eaf103..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/processor_result/index.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/core/processor_result/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/processor_result/sidebar-items.js deleted file mode 100644 index 04eabb0b..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/processor_result/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"struct":["ProcessorResult"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/processor_result/struct.ProcessorResult.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/processor_result/struct.ProcessorResult.html deleted file mode 100644 index 185a34b7..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/processor_result/struct.ProcessorResult.html +++ /dev/null @@ -1,34 +0,0 @@ -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.

-

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.

-

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 - 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).

-

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/doc/redstone/core/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/sidebar-items.js deleted file mode 100644 index ce8d7edb..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["aggregator","config","processor","processor_result","validator"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/validator/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/validator/index.html deleted file mode 100644 index 141d82cd..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/validator/index.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/core/validator/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/validator/sidebar-items.js deleted file mode 100644 index a9b53ab7..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/validator/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["Validator"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/validator/trait.Validator.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/validator/trait.Validator.html deleted file mode 100644 index ffbec709..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/core/validator/trait.Validator.html +++ /dev/null @@ -1,70 +0,0 @@ -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 validate_signer_count_threshold(
-        &self,
-        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.

-

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.

-
§Arguments
-
    -
  • feed_id: U256 - The unique identifier of the data feed.
  • -
-
§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.

-

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.

-
§Arguments
-
    -
  • signer: &[u8] - A byte slice representing the signer’s identifier.
  • -
-
§Returns
-
    -
  • Option<usize> - The index of the signer if found, or None if not found.
  • -
-
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.

-

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.

-
§Arguments
-
    -
  • index: usize - The index of the data value being validated.
  • -
  • values: &[Option<U256>] - A slice of optional U256 values associated with the data.
  • -
-
§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.

-

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.

-
§Arguments
-
    -
  • index: usize - The index of the data value whose timestamp is being validated.
  • -
  • timestamp: u64 - The timestamp to be validated.
  • -
-
§Returns
-
    -
  • u64 - The validated timestamp.
  • -
-

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/index.html deleted file mode 100644 index 541ea6ec..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/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/doc/redstone/crypto/keccak256/fn.keccak256.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/keccak256/fn.keccak256.html deleted file mode 100644 index 2665643a..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/keccak256/fn.keccak256.html +++ /dev/null @@ -1 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/keccak256/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/keccak256/index.html deleted file mode 100644 index 96fe770a..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/keccak256/index.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/crypto/keccak256/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/keccak256/sidebar-items.js deleted file mode 100644 index 1a5fc982..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/keccak256/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["keccak256"]}; \ No newline at end of file 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_secp256k1,network_radix/doc/redstone/crypto/recover/crypto256/fn.recover_public_key.html deleted file mode 100644 index ba2beac0..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/recover/crypto256/fn.recover_public_key.html +++ /dev/null @@ -1,5 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/recover/crypto256/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/recover/crypto256/index.html deleted file mode 100644 index b5563f5f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/recover/crypto256/index.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/crypto/recover/crypto256/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/recover/crypto256/sidebar-items.js deleted file mode 100644 index 57bd2c11..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/recover/crypto256/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["recover_public_key"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/recover/fn.recover_address.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/recover/fn.recover_address.html deleted file mode 100644 index aba3bde0..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/recover/fn.recover_address.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/crypto/recover/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/recover/index.html deleted file mode 100644 index e7703e69..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/recover/index.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/crypto/recover/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/recover/sidebar-items.js deleted file mode 100644 index 40087146..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/recover/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["recover_address"],"mod":["crypto256"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/crypto/sidebar-items.js deleted file mode 100644 index 521fe7cb..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/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/doc/redstone/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/index.html deleted file mode 100644 index ab2ae7f0..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/index.html +++ /dev/null @@ -1,6 +0,0 @@ -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.

-

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_radix/doc/redstone/macro.print_and_panic!.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/macro.print_and_panic!.html deleted file mode 100644 index 90775bac..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/macro.print_and_panic!.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to macro.print_and_panic.html...

- - - \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/macro.print_and_panic.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/macro.print_and_panic.html deleted file mode 100644 index b308eb68..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/macro.print_and_panic.html +++ /dev/null @@ -1,4 +0,0 @@ -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/doc/redstone/macro.print_debug!.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/macro.print_debug!.html deleted file mode 100644 index 2d4772f3..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/macro.print_debug!.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to macro.print_debug.html...

- - - \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/macro.print_debug.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/macro.print_debug.html deleted file mode 100644 index 3cb863d6..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/macro.print_debug.html +++ /dev/null @@ -1,4 +0,0 @@ -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/doc/redstone/network/as_str/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/as_str/index.html deleted file mode 100644 index 9f63a8ad..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/as_str/index.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/network/as_str/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/as_str/sidebar-items.js deleted file mode 100644 index 01f900d2..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/as_str/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["AsAsciiStr","AsHexStr"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/as_str/trait.AsAsciiStr.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/as_str/trait.AsAsciiStr.html deleted file mode 100644 index cdb84389..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/as_str/trait.AsAsciiStr.html +++ /dev/null @@ -1,4 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/as_str/trait.AsHexStr.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/as_str/trait.AsHexStr.html deleted file mode 100644 index 59b9e783..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/as_str/trait.AsHexStr.html +++ /dev/null @@ -1,4 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/assert/fn.assert_or_revert.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/assert/fn.assert_or_revert.html deleted file mode 100644 index 13078112..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/assert/fn.assert_or_revert.html +++ /dev/null @@ -1,7 +0,0 @@ -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 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_secp256k1,network_radix/doc/redstone/network/assert/fn.assert_or_revert_bool_with.html deleted file mode 100644 index 385fc71e..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/assert/fn.assert_or_revert_bool_with.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/network/assert/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/assert/index.html deleted file mode 100644 index 680c61a9..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/assert/index.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/network/assert/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/assert/sidebar-items.js deleted file mode 100644 index bd99c6f7..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/assert/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["assert_or_revert","assert_or_revert_bool_with"],"trait":["Assert","Unwrap"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/assert/trait.Assert.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/assert/trait.Assert.html deleted file mode 100644 index e068a406..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/assert/trait.Assert.html +++ /dev/null @@ -1,6 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/assert/trait.Unwrap.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/assert/trait.Unwrap.html deleted file mode 100644 index db1ea7bc..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/assert/trait.Unwrap.html +++ /dev/null @@ -1,9 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/error/enum.Error.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/error/enum.Error.html deleted file mode 100644 index ebd30a78..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/error/enum.Error.html +++ /dev/null @@ -1,66 +0,0 @@ -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),
-}
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.

-

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.

-

Used when operations on U256 numbers exceed their maximum value, potentially leading -to incorrect calculations or state.

-
§

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.

-

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.

-

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.

-

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.

-

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.

-

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.

-

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.

-

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.

-

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 - 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).

-

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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/error/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/error/index.html deleted file mode 100644 index e083b3b4..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/error/index.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/network/error/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/error/sidebar-items.js deleted file mode 100644 index 41603cd6..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/error/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"enum":["Error"],"trait":["ContractErrorContent"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/error/trait.ContractErrorContent.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/error/trait.ContractErrorContent.html deleted file mode 100644 index 577c3a6f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/error/trait.ContractErrorContent.html +++ /dev/null @@ -1,5 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/flattened/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/flattened/index.html deleted file mode 100644 index e62982d8..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/flattened/index.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/network/flattened/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/flattened/sidebar-items.js deleted file mode 100644 index 25ac6e97..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/flattened/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["Flattened"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/flattened/trait.Flattened.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/flattened/trait.Flattened.html deleted file mode 100644 index bbbf1554..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/flattened/trait.Flattened.html +++ /dev/null @@ -1,4 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/from_bytes_repr/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/from_bytes_repr/index.html deleted file mode 100644 index 037b0f7e..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/from_bytes_repr/index.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/network/from_bytes_repr/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/from_bytes_repr/sidebar-items.js deleted file mode 100644 index 9d06c298..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/from_bytes_repr/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["FromBytesRepr","Sanitized"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/from_bytes_repr/trait.FromBytesRepr.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/from_bytes_repr/trait.FromBytesRepr.html deleted file mode 100644 index 4bcada1e..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/from_bytes_repr/trait.FromBytesRepr.html +++ /dev/null @@ -1,4 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/from_bytes_repr/trait.Sanitized.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/from_bytes_repr/trait.Sanitized.html deleted file mode 100644 index 79baf865..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/from_bytes_repr/trait.Sanitized.html +++ /dev/null @@ -1,4 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/index.html deleted file mode 100644 index c1984fe4..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/index.html +++ /dev/null @@ -1 +0,0 @@ -redstone::network - Rust
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/print_debug/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/print_debug/index.html deleted file mode 100644 index ac53c72e..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/print_debug/index.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/network/print_debug/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/print_debug/sidebar-items.js deleted file mode 100644 index 5244ce01..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/print_debug/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/radix/from_bytes_repr/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/radix/from_bytes_repr/index.html deleted file mode 100644 index f74ff884..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/radix/from_bytes_repr/index.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/network/radix/from_bytes_repr/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/radix/from_bytes_repr/sidebar-items.js deleted file mode 100644 index 5244ce01..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/radix/from_bytes_repr/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/radix/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/radix/index.html deleted file mode 100644 index 3b436f13..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/radix/index.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/network/radix/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/radix/sidebar-items.js deleted file mode 100644 index 1c5d6d59..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/radix/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["from_bytes_repr","u256_ext"],"struct":["Radix"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/radix/struct.Radix.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/radix/struct.Radix.html deleted file mode 100644 index b85d42ea..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/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/doc/redstone/network/radix/u256_ext/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/radix/u256_ext/index.html deleted file mode 100644 index 4b1d935a..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/radix/u256_ext/index.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/network/radix/u256_ext/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/radix/u256_ext/sidebar-items.js deleted file mode 100644 index 2ec56290..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/radix/u256_ext/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["U256Ext"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/radix/u256_ext/trait.U256Ext.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/radix/u256_ext/trait.U256Ext.html deleted file mode 100644 index c8692cdf..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/radix/u256_ext/trait.U256Ext.html +++ /dev/null @@ -1,4 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/sidebar-items.js deleted file mode 100644 index 45f7c837..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["as_str","assert","error","flattened","from_bytes_repr","print_debug","radix","specific"],"type":["_Network"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/constant.VALUE_SIZE.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/constant.VALUE_SIZE.html deleted file mode 100644 index 2e47400c..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/constant.VALUE_SIZE.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/network/specific/fn.print.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/fn.print.html deleted file mode 100644 index 414a9953..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/fn.print.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/network/specific/fn.revert.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/fn.revert.html deleted file mode 100644 index 2e9edf89..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/fn.revert.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/network/specific/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/index.html deleted file mode 100644 index 1378d9dc..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/index.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/network/specific/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/sidebar-items.js deleted file mode 100644 index 49355aaa..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"constant":["VALUE_SIZE"],"fn":["print","revert"],"trait":["NetworkSpecific"],"type":["Bytes","Network","U256"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/trait.NetworkSpecific.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/trait.NetworkSpecific.html deleted file mode 100644 index e13fc617..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/trait.NetworkSpecific.html +++ /dev/null @@ -1,11 +0,0 @@ -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;
-
-    // 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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/type.Bytes.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/type.Bytes.html deleted file mode 100644 index 04a40a5a..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/type.Bytes.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/network/specific/type.Network.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/type.Network.html deleted file mode 100644 index 40e404c9..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/type.Network.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/network/specific/type.U256.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/type.U256.html deleted file mode 100644 index 19fa4bd4..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/specific/type.U256.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/network/type._Network.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/type._Network.html deleted file mode 100644 index b059c3a0..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/network/type._Network.html +++ /dev/null @@ -1 +0,0 @@ -_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/doc/redstone/protocol/constants/constant.DATA_FEED_ID_BS.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.DATA_FEED_ID_BS.html deleted file mode 100644 index 72b04b86..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.DATA_FEED_ID_BS.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/protocol/constants/constant.DATA_PACKAGES_COUNT_BS.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.DATA_PACKAGES_COUNT_BS.html deleted file mode 100644 index fed432b2..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.DATA_PACKAGES_COUNT_BS.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/protocol/constants/constant.DATA_POINTS_COUNT_BS.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.DATA_POINTS_COUNT_BS.html deleted file mode 100644 index f25ed2f5..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.DATA_POINTS_COUNT_BS.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/protocol/constants/constant.DATA_POINT_VALUE_BYTE_SIZE_BS.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.DATA_POINT_VALUE_BYTE_SIZE_BS.html deleted file mode 100644 index 95f9c3d5..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.DATA_POINT_VALUE_BYTE_SIZE_BS.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/protocol/constants/constant.MAX_TIMESTAMP_AHEAD_MS.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.MAX_TIMESTAMP_AHEAD_MS.html deleted file mode 100644 index 160a69a6..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.MAX_TIMESTAMP_AHEAD_MS.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/protocol/constants/constant.MAX_TIMESTAMP_DELAY_MS.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.MAX_TIMESTAMP_DELAY_MS.html deleted file mode 100644 index 47c72d3b..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.MAX_TIMESTAMP_DELAY_MS.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/protocol/constants/constant.REDSTONE_MARKER.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.REDSTONE_MARKER.html deleted file mode 100644 index 07258216..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.REDSTONE_MARKER.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/protocol/constants/constant.REDSTONE_MARKER_BS.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.REDSTONE_MARKER_BS.html deleted file mode 100644 index 21ea69ca..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.REDSTONE_MARKER_BS.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/protocol/constants/constant.SIGNATURE_BS.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.SIGNATURE_BS.html deleted file mode 100644 index 2a3a5b7f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.SIGNATURE_BS.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/protocol/constants/constant.TIMESTAMP_BS.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.TIMESTAMP_BS.html deleted file mode 100644 index 1635207a..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.TIMESTAMP_BS.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/protocol/constants/constant.UNSIGNED_METADATA_BYTE_SIZE_BS.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.UNSIGNED_METADATA_BYTE_SIZE_BS.html deleted file mode 100644 index a7ccdc60..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/constant.UNSIGNED_METADATA_BYTE_SIZE_BS.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/protocol/constants/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/index.html deleted file mode 100644 index 0268cb89..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/index.html +++ /dev/null @@ -1 +0,0 @@ -redstone::protocol::constants - Rust
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/sidebar-items.js deleted file mode 100644 index 7fd4daab..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/constants/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"constant":["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"]}; \ No newline at end of file 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_secp256k1,network_radix/doc/redstone/protocol/data_package/fn.trim_data_package.html deleted file mode 100644 index f1456016..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_package/fn.trim_data_package.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/protocol/data_package/fn.trim_data_packages.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_package/fn.trim_data_packages.html deleted file mode 100644 index 393e9998..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_package/fn.trim_data_packages.html +++ /dev/null @@ -1,4 +0,0 @@ -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/doc/redstone/protocol/data_package/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_package/index.html deleted file mode 100644 index 4f7ef4c4..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_package/index.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/protocol/data_package/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_package/sidebar-items.js deleted file mode 100644 index 4b17209f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_package/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["trim_data_package","trim_data_packages"],"struct":["DataPackage"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_package/struct.DataPackage.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_package/struct.DataPackage.html deleted file mode 100644 index 8bbb2a1d..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_package/struct.DataPackage.html +++ /dev/null @@ -1,27 +0,0 @@ -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).

-

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 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_secp256k1,network_radix/doc/redstone/protocol/data_point/fn.trim_data_point.html deleted file mode 100644 index 10a3aa68..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_point/fn.trim_data_point.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/protocol/data_point/fn.trim_data_points.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_point/fn.trim_data_points.html deleted file mode 100644 index 4bc76a0f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_point/fn.trim_data_points.html +++ /dev/null @@ -1,5 +0,0 @@ -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/doc/redstone/protocol/data_point/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_point/index.html deleted file mode 100644 index 6ab1baf0..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_point/index.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/protocol/data_point/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_point/sidebar-items.js deleted file mode 100644 index 2a5fa8f1..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_point/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["trim_data_point","trim_data_points"],"struct":["DataPoint"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_point/struct.DataPoint.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_point/struct.DataPoint.html deleted file mode 100644 index 78e807ea..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/data_point/struct.DataPoint.html +++ /dev/null @@ -1,26 +0,0 @@ -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 - 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).

-

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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/index.html deleted file mode 100644 index d221f7b2..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/index.html +++ /dev/null @@ -1 +0,0 @@ -redstone::protocol - Rust

Module redstone::protocol

source ·

Modules§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/marker/fn.trim_redstone_marker.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/marker/fn.trim_redstone_marker.html deleted file mode 100644 index fb7c7144..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/marker/fn.trim_redstone_marker.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/protocol/marker/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/marker/index.html deleted file mode 100644 index 9844daf7..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/marker/index.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/protocol/marker/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/marker/sidebar-items.js deleted file mode 100644 index 2d2958a1..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/marker/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["trim_redstone_marker"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/payload/fn.trim_metadata.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/payload/fn.trim_metadata.html deleted file mode 100644 index b3e6350e..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/payload/fn.trim_metadata.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/protocol/payload/fn.trim_payload.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/payload/fn.trim_payload.html deleted file mode 100644 index 9eae9fdd..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/payload/fn.trim_payload.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/protocol/payload/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/payload/index.html deleted file mode 100644 index 7bedf304..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/payload/index.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/protocol/payload/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/payload/sidebar-items.js deleted file mode 100644 index 0d79d818..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/payload/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["trim_metadata","trim_payload"],"struct":["Payload"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/payload/struct.Payload.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/payload/struct.Payload.html deleted file mode 100644 index 739030bf..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/payload/struct.Payload.html +++ /dev/null @@ -1,19 +0,0 @@ -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).

-

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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/sidebar-items.js deleted file mode 100644 index 94e7fdb5..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/protocol/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["constants","data_package","data_point","marker","payload"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/sidebar-items.js deleted file mode 100644 index f230d898..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"macro":["print_and_panic","print_debug"],"mod":["core","crypto","network","protocol","utils"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/filter/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/filter/index.html deleted file mode 100644 index a153fc5f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/filter/index.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/utils/filter/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/filter/sidebar-items.js deleted file mode 100644 index 9cc2f1a1..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/filter/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["FilterSome"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/filter/trait.FilterSome.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/filter/trait.FilterSome.html deleted file mode 100644 index 69bc1f28..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/filter/trait.FilterSome.html +++ /dev/null @@ -1,4 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/index.html deleted file mode 100644 index ef51ef17..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/index.html +++ /dev/null @@ -1 +0,0 @@ -redstone::utils - Rust

Module redstone::utils

source ·

Modules§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/median/fn.maybe_pick_median.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/median/fn.maybe_pick_median.html deleted file mode 100644 index ebb4b4a4..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/median/fn.maybe_pick_median.html +++ /dev/null @@ -1,2 +0,0 @@ -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/doc/redstone/utils/median/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/median/index.html deleted file mode 100644 index 9a4952c3..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/median/index.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/utils/median/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/median/sidebar-items.js deleted file mode 100644 index 092646ab..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/median/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["maybe_pick_median"],"trait":["Averageable","Avg","Median"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/median/trait.Averageable.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/median/trait.Averageable.html deleted file mode 100644 index 6ac8fd85..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/median/trait.Averageable.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/utils/median/trait.Avg.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/median/trait.Avg.html deleted file mode 100644 index 2cd8ef5a..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/median/trait.Avg.html +++ /dev/null @@ -1,5 +0,0 @@ -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 - T: Averageable,

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/median/trait.Median.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/median/trait.Median.html deleted file mode 100644 index 60047574..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/median/trait.Median.html +++ /dev/null @@ -1,7 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/sidebar-items.js deleted file mode 100644 index 2f4d851f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["filter","median","trim","trim_zeros"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/trim/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/trim/index.html deleted file mode 100644 index e7e6608a..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/trim/index.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/utils/trim/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/trim/sidebar-items.js deleted file mode 100644 index 076b36c3..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/trim/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["Trim"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/trim/trait.Trim.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/trim/trait.Trim.html deleted file mode 100644 index e6fa965e..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/trim/trait.Trim.html +++ /dev/null @@ -1,5 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/trim_zeros/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/trim_zeros/index.html deleted file mode 100644 index 2a2fd9e0..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/trim_zeros/index.html +++ /dev/null @@ -1 +0,0 @@ -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/doc/redstone/utils/trim_zeros/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/trim_zeros/sidebar-items.js deleted file mode 100644 index eebab388..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/trim_zeros/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["TrimZeros"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/trim_zeros/trait.TrimZeros.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/trim_zeros/trait.TrimZeros.html deleted file mode 100644 index f1299ca4..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/redstone/utils/trim_zeros/trait.TrimZeros.html +++ /dev/null @@ -1,4 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/search-index.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/search-index.js deleted file mode 100644 index 456ed3aa..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/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/doc/search.desc/redstone/redstone-desc-0-.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/search.desc/redstone/redstone-desc-0-.js deleted file mode 100644 index 81611d2e..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/search.desc/redstone/redstone-desc-0-.js +++ /dev/null @@ -1 +0,0 @@ -searchState.loadedDescShard("redstone", 0, "RedStone\nAggregates values from a collection of data packages …\nConfiguration for a RedStone payload processor.\nThe current block time in timestamp format, used for …\nIdentifiers for the data feeds from which values are …\nReturns the argument unchanged.\nCalls U::from(self).\nThe minimum number of signers required validating the data.\nList of identifiers for signers authorized to sign the …\nThe main processor of the RedStone payload.\nRepresents the result of processing the RedStone payload.\nReturns the argument unchanged.\nCalls U::from(self).\nThe minimum timestamp encountered during processing.\nA collection of values processed during the operation.\nA trait defining validation operations for data feeds and …\nRetrieves the index of a given data feed.\nRetrieves the index of a given signer.\nValidates the signer count threshold for a given index …\nValidates the timestamp for a given index.\nUsed when an expected non-empty array or vector is found …\nRepresents errors that need to clone ContractErrorContent, …\nRepresents errors that arise from the contract itself.\nRepresents errors related to cryptographic operations.\nErrors that can be encountered in the …\nIndicates that the number of signers does not meet the …\nUsed when there is leftover data in a payload that should …\nIndicates an overflow error with U256 numbers.\nSignifies that an unsupported size was encountered.\nIndicates that a timestamp is further in the future than …\nUsed when a timestamp is older than allowed by the …\nIndicates that the marker bytes for RedStone are incorrect.\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).") \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/settings.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/settings.html deleted file mode 100644 index 9631dcb2..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/settings.html +++ /dev/null @@ -1 +0,0 @@ -Settings

Rustdoc settings

Back
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src-files.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/src-files.js deleted file mode 100644 index b96f3020..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src-files.js +++ /dev/null @@ -1,4 +0,0 @@ -var srcIndex = new Map(JSON.parse('[\ -["redstone",["",[["core",[],["aggregator.rs","config.rs","mod.rs","processor.rs","processor_result.rs","validator.rs"]],["crypto",[],["keccak256.rs","mod.rs","recover.rs"]],["network",[["radix",[],["from_bytes_repr.rs","mod.rs","u256_ext.rs"]]],["as_str.rs","assert.rs","error.rs","flattened.rs","from_bytes_repr.rs","mod.rs","print_debug.rs","specific.rs"]],["protocol",[],["constants.rs","data_package.rs","data_point.rs","marker.rs","mod.rs","payload.rs"]],["utils",[],["filter.rs","median.rs","mod.rs","trim.rs","trim_zeros.rs"]]],["lib.rs"]]]\ -]')); -createSrcSidebar(); diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/core/aggregator.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/core/aggregator.rs.html deleted file mode 100644 index e839b506..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/core/aggregator.rs.html +++ /dev/null @@ -1,583 +0,0 @@ -aggregator.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-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
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-287
-288
-289
-290
-291
-
use crate::{
-    core::{config::Config, validator::Validator},
-    network::specific::U256,
-    print_debug,
-    protocol::data_package::DataPackage,
-    utils::median::Median,
-};
-
-type Matrix = Vec<Vec<Option<U256>>>;
-
-/// 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
-/// an average of the values, selecting the median, or applying a custom algorithm defined within the
-/// `aggregate_matrix` function.
-///
-/// The primary purpose of this function is to consolidate data from multiple sources into a coherent
-/// and singular value set that adheres to the criteria specified in the `Config`.
-///
-/// # Arguments
-///
-/// * `config` - A `Config` instance containing settings and parameters used to guide the aggregation process.
-/// * `data_packages` - A vector of `DataPackage` instances, each representing a set of values and associated
-///   metadata collected from various sources or signers.
-///
-/// # Returns
-///
-/// Returns a `Vec<U256>`, which is a vector of aggregated values resulting from applying the aggregation
-/// logic to the input data packages as per the specified configuration. Each `U256` value in the vector
-/// represents an aggregated result derived from the corresponding data packages.
-///
-/// # Note
-///
-/// This function is internal to the crate (`pub(crate)`) and not exposed as part of the public API. It is
-/// designed to be used by other components within the same crate that require value aggregation functionality.
-pub(crate) fn aggregate_values(config: Config, data_packages: Vec<DataPackage>) -> Vec<U256> {
-    aggregate_matrix(make_value_signer_matrix(&config, data_packages), config)
-}
-
-fn aggregate_matrix(matrix: Matrix, config: Config) -> Vec<U256> {
-    matrix
-        .iter()
-        .enumerate()
-        .map(|(index, values)| {
-            config
-                .validate_signer_count_threshold(index, values)
-                .median()
-        })
-        .collect()
-}
-
-fn make_value_signer_matrix(config: &Config, data_packages: Vec<DataPackage>) -> Matrix {
-    let mut matrix = vec![vec![None; config.signers.len()]; config.feed_ids.len()];
-
-    data_packages.iter().for_each(|data_package| {
-        if let Some(signer_index) = config.signer_index(&data_package.signer_address) {
-            data_package.data_points.iter().for_each(|data_point| {
-                if let Some(feed_index) = config.feed_index(data_point.feed_id) {
-                    matrix[feed_index][signer_index] = data_point.value.into()
-                }
-            })
-        }
-    });
-
-    print_debug!("{:?}", matrix);
-
-    matrix
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod aggregate_matrix_tests {
-    use crate::{
-        core::{aggregator::aggregate_matrix, config::Config},
-        helpers::iter_into::{IterInto, IterIntoOpt, OptIterIntoOpt},
-    };
-
-    #[test]
-    fn test_aggregate_matrix() {
-        let matrix = vec![
-            vec![11u8, 13].iter_into_opt(),
-            vec![21u8, 23].iter_into_opt(),
-        ];
-
-        for signer_count_threshold in 0..Config::test().signers.len() + 1 {
-            let mut config = Config::test();
-            config.signer_count_threshold = signer_count_threshold as u8;
-
-            let result = aggregate_matrix(matrix.clone(), config);
-
-            assert_eq!(result, vec![12u8, 22].iter_into());
-        }
-    }
-
-    #[test]
-    fn test_aggregate_matrix_smaller_threshold_missing_one_value() {
-        let mut config = Config::test();
-        config.signer_count_threshold = 1;
-
-        let matrix = vec![
-            vec![11u8, 13].iter_into_opt(),
-            vec![21u8.into(), None].opt_iter_into_opt(),
-        ];
-
-        let result = aggregate_matrix(matrix, config);
-
-        assert_eq!(result, vec![12u8, 21].iter_into());
-    }
-
-    #[should_panic(expected = "Array is empty")]
-    #[test]
-    fn test_aggregate_matrix_smaller_threshold_missing_whole_feed() {
-        let mut config = Config::test();
-        config.signer_count_threshold = 0;
-
-        let matrix = vec![vec![11u8, 13].iter_into_opt(), vec![None; 2]];
-
-        aggregate_matrix(matrix, config);
-    }
-
-    #[should_panic(expected = "Insufficient signer count 1 for #0 (ETH)")]
-    #[test]
-    fn test_aggregate_matrix_missing_one_value() {
-        let matrix = vec![
-            vec![21u8.into(), None].opt_iter_into_opt(),
-            vec![11u8, 12].iter_into_opt(),
-        ];
-
-        aggregate_matrix(matrix, Config::test());
-    }
-
-    #[should_panic(expected = "Insufficient signer count 0 for #1 (BTC)")]
-    #[test]
-    fn test_aggregate_matrix_missing_whole_feed() {
-        let matrix = vec![vec![11u8, 13].iter_into_opt(), vec![None; 2]];
-
-        aggregate_matrix(matrix, Config::test());
-    }
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod make_value_signer_matrix {
-    use crate::{
-        core::{
-            aggregator::{make_value_signer_matrix, Matrix},
-            config::Config,
-            test_helpers::{AVAX, BTC, ETH, TEST_SIGNER_ADDRESS_1, TEST_SIGNER_ADDRESS_2},
-        },
-        helpers::iter_into::IterInto,
-        network::specific::U256,
-        protocol::data_package::DataPackage,
-    };
-
-    #[test]
-    fn test_make_value_signer_matrix_empty() {
-        let config = Config::test();
-
-        test_make_value_signer_matrix_of(
-            vec![],
-            vec![vec![None; config.signers.len()]; config.feed_ids.len()],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_exact() {
-        let data_packages = vec![
-            DataPackage::test(ETH, 11, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(ETH, 12, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(BTC, 22, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(BTC, 21, TEST_SIGNER_ADDRESS_1, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![11, 12].iter_into(), vec![21, 22].iter_into()],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_greater() {
-        let data_packages = vec![
-            DataPackage::test(ETH, 11, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(ETH, 12, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(BTC, 22, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(BTC, 21, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(AVAX, 31, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(AVAX, 32, TEST_SIGNER_ADDRESS_2, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![11, 12].iter_into(), vec![21, 22].iter_into()],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_smaller() {
-        let data_packages = vec![
-            DataPackage::test(ETH, 11, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(ETH, 12, TEST_SIGNER_ADDRESS_2, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![11, 12].iter_into(), vec![None; 2]],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_diagonal() {
-        let data_packages = vec![
-            DataPackage::test(BTC, 22, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(ETH, 11, TEST_SIGNER_ADDRESS_1, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![11.into(), None], vec![None, 22.into()]],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_repetitions() {
-        let data_packages = vec![
-            DataPackage::test(BTC, 21, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(BTC, 22, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(BTC, 202, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(ETH, 11, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(ETH, 101, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(ETH, 12, TEST_SIGNER_ADDRESS_2, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![101, 12].iter_into(), vec![21, 202].iter_into()],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_all_wrong() {
-        let config = Config::test();
-
-        let data_packages = vec![
-            DataPackage::test(AVAX, 32, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(AVAX, 31, TEST_SIGNER_ADDRESS_1, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![None; config.signers.len()]; config.feed_ids.len()],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_mix() {
-        let data_packages = vec![
-            DataPackage::test(ETH, 11, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(ETH, 12, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(AVAX, 32, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(AVAX, 31, TEST_SIGNER_ADDRESS_1, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![11, 12].iter_into(), vec![None; 2]],
-        );
-    }
-
-    fn test_make_value_signer_matrix_of(
-        data_packages: Vec<DataPackage>,
-        expected_values: Vec<Vec<Option<u128>>>,
-    ) {
-        let config = &Config::test();
-        let result = make_value_signer_matrix(config, data_packages);
-
-        let expected_matrix: Matrix = expected_values
-            .iter()
-            .map(|row| {
-                (row.iter()
-                    .map(|&value| value.map(U256::from))
-                    .collect::<Vec<_>>())
-                .iter_into() as Vec<Option<U256>>
-            })
-            .collect();
-
-        assert_eq!(result, expected_matrix)
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/core/config.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/core/config.rs.html deleted file mode 100644 index 0b9ca7f7..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/core/config.rs.html +++ /dev/null @@ -1,63 +0,0 @@ -config.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
-
use crate::network::specific::{Bytes, U256};
-
-/// 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.
-#[derive(Debug)]
-pub struct Config {
-    /// 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.
-    pub signer_count_threshold: u8,
-
-    /// 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.
-    pub signers: Vec<Bytes>,
-
-    /// Identifiers for the data feeds from which values are aggregated.
-    ///
-    /// Each data feed id is represented by the network-specific `U256` type.
-    pub feed_ids: Vec<U256>,
-
-    /// 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.
-    pub block_timestamp: u64,
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/core/mod.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/core/mod.rs.html deleted file mode 100644 index f278fb16..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/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/doc/src/redstone/core/processor.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/core/processor.rs.html deleted file mode 100644 index 2e92e10d..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/core/processor.rs.html +++ /dev/null @@ -1,203 +0,0 @@ -processor.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-
use crate::{
-    core::{
-        aggregator::aggregate_values, config::Config, processor_result::ProcessorResult,
-        validator::Validator,
-    },
-    network::specific::Bytes,
-    print_debug,
-    protocol::payload::Payload,
-};
-
-/// The main processor of the RedStone payload.
-///
-///
-/// # Arguments
-///
-/// * `config` - Configuration of the payload processing.
-/// * `payload_bytes` - Network-specific byte-list of the payload to be processed.
-pub fn process_payload(config: Config, payload_bytes: Bytes) -> ProcessorResult {
-    #[allow(clippy::useless_conversion)]
-    let mut bytes: Vec<u8> = payload_bytes.into();
-    let payload = Payload::make(&mut bytes);
-    print_debug!("{:?}", payload);
-
-    make_processor_result(config, payload)
-}
-
-fn make_processor_result(config: Config, payload: Payload) -> ProcessorResult {
-    let min_timestamp = payload
-        .data_packages
-        .iter()
-        .enumerate()
-        .map(|(index, dp)| config.validate_timestamp(index, dp.timestamp))
-        .min()
-        .unwrap();
-
-    let values = aggregate_values(config, payload.data_packages);
-
-    print_debug!("{} {:?}", min_timestamp, values);
-
-    ProcessorResult {
-        values,
-        min_timestamp,
-    }
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        core::{
-            config::Config,
-            processor::make_processor_result,
-            processor_result::ProcessorResult,
-            test_helpers::{
-                BTC, ETH, TEST_BLOCK_TIMESTAMP, TEST_SIGNER_ADDRESS_1, TEST_SIGNER_ADDRESS_2,
-            },
-        },
-        helpers::iter_into::IterInto,
-        protocol::{data_package::DataPackage, payload::Payload},
-    };
-
-    #[test]
-    fn test_make_processor_result() {
-        let data_packages = vec![
-            DataPackage::test(
-                ETH,
-                11,
-                TEST_SIGNER_ADDRESS_1,
-                (TEST_BLOCK_TIMESTAMP + 5).into(),
-            ),
-            DataPackage::test(
-                ETH,
-                13,
-                TEST_SIGNER_ADDRESS_2,
-                (TEST_BLOCK_TIMESTAMP + 3).into(),
-            ),
-            DataPackage::test(
-                BTC,
-                32,
-                TEST_SIGNER_ADDRESS_2,
-                (TEST_BLOCK_TIMESTAMP - 2).into(),
-            ),
-            DataPackage::test(
-                BTC,
-                31,
-                TEST_SIGNER_ADDRESS_1,
-                (TEST_BLOCK_TIMESTAMP + 400).into(),
-            ),
-        ];
-
-        let result = make_processor_result(Config::test(), Payload { data_packages });
-
-        assert_eq!(
-            result,
-            ProcessorResult {
-                min_timestamp: TEST_BLOCK_TIMESTAMP - 2,
-                values: vec![12u8, 31].iter_into()
-            }
-        );
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/core/processor_result.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/core/processor_result.rs.html deleted file mode 100644 index ecdffb37..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/core/processor_result.rs.html +++ /dev/null @@ -1,53 +0,0 @@ -processor_result.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
-
use crate::network::specific::U256;
-
-/// 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`.
-#[derive(Debug, Eq, PartialEq)]
-pub struct ProcessorResult {
-    /// 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.
-    pub min_timestamp: u64,
-
-    /// 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`.
-    pub values: Vec<U256>,
-}
-
-impl From<ProcessorResult> for (u64, Vec<U256>) {
-    fn from(result: ProcessorResult) -> Self {
-        (result.min_timestamp, result.values)
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/core/validator.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/core/validator.rs.html deleted file mode 100644 index 1fed8ca0..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/core/validator.rs.html +++ /dev/null @@ -1,573 +0,0 @@ -validator.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-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
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-
use crate::{
-    core::config::Config,
-    network::{
-        assert::Assert,
-        error::Error::{InsufficientSignerCount, TimestampTooFuture, TimestampTooOld},
-        specific::U256,
-    },
-    protocol::constants::{MAX_TIMESTAMP_AHEAD_MS, MAX_TIMESTAMP_DELAY_MS},
-    utils::filter::FilterSome,
-};
-
-/// 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.
-pub(crate) trait Validator {
-    /// 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.
-    ///
-    /// # Arguments
-    ///
-    /// * `feed_id`: `U256` - The unique identifier of the data feed.
-    ///
-    /// # Returns
-    ///
-    /// * `Option<usize>` - The index of the feed if it exists, or `None` if it does not.
-    fn feed_index(&self, feed_id: U256) -> 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.
-    ///
-    /// # Arguments
-    ///
-    /// * `signer`: `&[u8]` - A byte slice representing the signer's identifier.
-    ///
-    /// # Returns
-    ///
-    /// * `Option<usize>` - The index of the signer if found, or `None` if not found.
-    fn signer_index(&self, signer: &[u8]) -> Option<usize>;
-
-    /// 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.
-    ///
-    /// # Arguments
-    ///
-    /// * `index`: `usize` - The index of the data value being validated.
-    /// * `values`: `&[Option<U256>]` - A slice of optional `U256` values associated with the data.
-    ///
-    /// # Returns
-    ///
-    /// * `Vec<U256>` - A vector of `U256` values that meet the validation criteria.
-    fn validate_signer_count_threshold(&self, index: usize, values: &[Option<U256>]) -> Vec<U256>;
-
-    /// 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.
-    ///
-    /// # Arguments
-    ///
-    /// * `index`: `usize` - The index of the data value whose timestamp is being validated.
-    /// * `timestamp`: `u64` - The timestamp to be validated.
-    ///
-    /// # Returns
-    ///
-    /// * `u64` - The validated timestamp.
-    fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64;
-}
-
-impl Validator for Config {
-    #[inline]
-    fn feed_index(&self, feed_id: U256) -> Option<usize> {
-        self.feed_ids.iter().position(|&elt| elt == feed_id)
-    }
-
-    #[inline]
-    fn signer_index(&self, signer: &[u8]) -> Option<usize> {
-        self.signers
-            .iter()
-            .position(|elt| elt.to_ascii_lowercase() == signer.to_ascii_lowercase())
-    }
-
-    #[inline]
-    fn validate_signer_count_threshold(&self, index: usize, values: &[Option<U256>]) -> Vec<U256> {
-        values.filter_some().assert_or_revert(
-            |x| (*x).len() >= self.signer_count_threshold.into(),
-            #[allow(clippy::useless_conversion)]
-            |val| InsufficientSignerCount(index, val.len(), self.feed_ids[index]),
-        )
-    }
-
-    #[inline]
-    fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64 {
-        timestamp.assert_or_revert(
-            |&x| x + MAX_TIMESTAMP_DELAY_MS >= self.block_timestamp,
-            |timestamp| TimestampTooOld(index, *timestamp),
-        );
-
-        timestamp.assert_or_revert(
-            |&x| x <= self.block_timestamp + MAX_TIMESTAMP_AHEAD_MS,
-            |timestamp| TimestampTooFuture(index, *timestamp),
-        )
-    }
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        core::{
-            config::Config,
-            test_helpers::{
-                AVAX, BTC, ETH, TEST_BLOCK_TIMESTAMP, TEST_SIGNER_ADDRESS_1, TEST_SIGNER_ADDRESS_2,
-            },
-            validator::Validator,
-        },
-        helpers::{
-            hex::{hex_to_bytes, make_feed_id},
-            iter_into::{IterInto, IterIntoOpt, OptIterIntoOpt},
-        },
-        network::specific::U256,
-        protocol::constants::{MAX_TIMESTAMP_AHEAD_MS, MAX_TIMESTAMP_DELAY_MS},
-    };
-    use itertools::Itertools;
-
-    #[test]
-    fn test_feed_index() {
-        let config = Config::test();
-
-        let eth_index = config.feed_index(make_feed_id(ETH));
-        assert_eq!(eth_index, 0.into());
-
-        let eth_index = config.feed_index(make_feed_id("778680")); //eth
-        assert_eq!(eth_index, None);
-
-        let btc_index = config.feed_index(make_feed_id(BTC));
-        assert_eq!(btc_index, 1.into());
-
-        let avax_index = config.feed_index(make_feed_id(AVAX));
-        assert_eq!(avax_index, None);
-    }
-
-    #[test]
-    fn test_signer_index() {
-        let config = Config::test();
-        let index = config.signer_index(&hex_to_bytes(TEST_SIGNER_ADDRESS_1.into()));
-        assert_eq!(index, 0.into());
-
-        let index = config.signer_index(&hex_to_bytes(TEST_SIGNER_ADDRESS_1.to_uppercase()));
-        assert_eq!(index, 0.into());
-
-        let index = config.signer_index(&hex_to_bytes(TEST_SIGNER_ADDRESS_2.into()));
-        assert_eq!(index, 1.into());
-
-        let index = config.signer_index(&hex_to_bytes(TEST_SIGNER_ADDRESS_2.replace('0', "1")));
-        assert_eq!(index, None);
-    }
-
-    #[test]
-    fn test_validate_timestamp() {
-        let config = Config::test();
-
-        config.validate_timestamp(0, TEST_BLOCK_TIMESTAMP);
-        config.validate_timestamp(1, TEST_BLOCK_TIMESTAMP + 60000);
-        config.validate_timestamp(2, TEST_BLOCK_TIMESTAMP + MAX_TIMESTAMP_AHEAD_MS);
-        config.validate_timestamp(3, TEST_BLOCK_TIMESTAMP - MAX_TIMESTAMP_DELAY_MS);
-        config.validate_timestamp(4, TEST_BLOCK_TIMESTAMP - 60000);
-    }
-
-    #[should_panic(expected = "Timestamp 2000000180001 is too future for #0")]
-    #[test]
-    fn test_validate_timestamp_too_future() {
-        Config::test().validate_timestamp(0, TEST_BLOCK_TIMESTAMP + MAX_TIMESTAMP_AHEAD_MS + 1);
-    }
-
-    #[should_panic(expected = "Timestamp 1999999099999 is too old for #1")]
-    #[test]
-    fn test_validate_timestamp_too_old() {
-        Config::test().validate_timestamp(1, TEST_BLOCK_TIMESTAMP - MAX_TIMESTAMP_DELAY_MS - 1);
-    }
-
-    #[should_panic(expected = "Timestamp 0 is too old for #2")]
-    #[test]
-    fn test_validate_timestamp_zero() {
-        Config::test().validate_timestamp(2, 0);
-    }
-
-    #[should_panic(expected = "Timestamp 4000000000000 is too future for #3")]
-    #[test]
-    fn test_validate_timestamp_big() {
-        Config::test().validate_timestamp(3, TEST_BLOCK_TIMESTAMP + TEST_BLOCK_TIMESTAMP);
-    }
-
-    #[should_panic(expected = "Timestamp 2000000000000 is too future for #4")]
-    #[test]
-    fn test_validate_timestamp_no_block_timestamp() {
-        let mut config = Config::test();
-
-        config.block_timestamp = 0;
-        config.validate_timestamp(4, TEST_BLOCK_TIMESTAMP);
-    }
-
-    #[should_panic(expected = "Insufficient signer count 0 for #0 (ETH)")]
-    #[test]
-    fn test_validate_signer_count_threshold_empty_list() {
-        Config::test().validate_signer_count_threshold(0, vec![].as_slice());
-    }
-
-    #[should_panic(expected = "Insufficient signer count 1 for #1 (BTC)")]
-    #[test]
-    fn test_validate_signer_count_threshold_shorter_list() {
-        Config::test().validate_signer_count_threshold(1, vec![1u8].iter_into_opt().as_slice());
-    }
-
-    #[should_panic(expected = "Insufficient signer count 1 for #1 (BTC)")]
-    #[test]
-    fn test_validate_signer_count_threshold_list_with_nones() {
-        Config::test().validate_signer_count_threshold(
-            1,
-            vec![None, 1u8.into(), None].opt_iter_into_opt().as_slice(),
-        );
-    }
-
-    #[test]
-    fn test_validate_signer_count_threshold_with_exact_size() {
-        validate_with_all_permutations(vec![1u8, 2].iter_into_opt(), vec![1u8, 2].iter_into());
-    }
-
-    #[test]
-    fn test_validate_signer_count_threshold_with_exact_signer_count() {
-        validate_with_all_permutations(
-            vec![None, 1u8.into(), None, 2.into()].opt_iter_into_opt(),
-            vec![1u8, 2].iter_into(),
-        );
-    }
-
-    #[test]
-    fn test_validate_signer_count_threshold_with_larger_size() {
-        validate_with_all_permutations(
-            vec![
-                1u8.into(),
-                None,
-                None,
-                2.into(),
-                3.into(),
-                None,
-                4.into(),
-                None,
-            ]
-            .opt_iter_into_opt(),
-            vec![1u8, 2, 3, 4].iter_into(),
-        );
-    }
-
-    fn validate_with_all_permutations(numbers: Vec<Option<U256>>, expected_value: Vec<U256>) {
-        let perms: Vec<Vec<_>> = numbers.iter().permutations(numbers.len()).collect();
-        let mut config = Config::test();
-
-        let result = config.validate_signer_count_threshold(0, &numbers);
-        assert_eq!(result, expected_value);
-
-        for threshold in 0..expected_value.len() + 1 {
-            config.signer_count_threshold = threshold as u8;
-
-            for (index, perm) in perms.iter().enumerate() {
-                let p: Vec<_> = perm.iter().map(|&&v| v).collect();
-
-                let result =
-                    config.validate_signer_count_threshold(index % config.feed_ids.len(), &p);
-                assert_eq!(result.len(), expected_value.len());
-            }
-        }
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/crypto/keccak256.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/crypto/keccak256.rs.html deleted file mode 100644 index 7e62e207..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/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/doc/src/redstone/crypto/mod.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/crypto/mod.rs.html deleted file mode 100644 index fa282223..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/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/doc/src/redstone/crypto/recover.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/crypto/recover.rs.html deleted file mode 100644 index f03e84b0..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/crypto/recover.rs.html +++ /dev/null @@ -1,267 +0,0 @@ -recover.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-
use crate::crypto::{keccak256, recover::crypto256::recover_public_key};
-
-pub fn recover_address(message: Vec<u8>, signature: Vec<u8>) -> Vec<u8> {
-    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],
-        recovery_byte - (if recovery_byte >= 27 { 27 } else { 0 }),
-    );
-    let key_hash = keccak256::keccak256(&key[1..]); // skip first uncompressed-key byte
-
-    key_hash[12..].into() // last 20 bytes
-}
-
-#[cfg(feature = "crypto_secp256k1")]
-pub(crate) mod crypto256 {
-    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],
-        recovery_byte: u8,
-    ) -> Box<[u8]> {
-        let msg = Message::from_digest_slice(message_hash.as_ref())
-            .unwrap_or_revert(|_| Error::CryptographicError(message_hash.len()));
-
-        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)
-                .unwrap_or_revert(|_| Error::CryptographicError(signature_bytes.len()));
-
-        let public_key = Secp256k1Curve::new().recover_ecdsa(&msg, &sig);
-
-        public_key.unwrap().serialize_uncompressed().into()
-    }
-}
-
-#[cfg(feature = "crypto_k256")]
-pub(crate) mod crypto256 {
-    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],
-        recovery_byte: u8,
-    ) -> Box<[u8]> {
-        let recovery_id = RecoveryId::from_byte(recovery_byte)
-            .unwrap_or_revert(|_| Error::CryptographicError(recovery_byte.into()));
-
-        let signature = Signature::try_from(signature_bytes)
-            .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());
-
-        recovered_key.unwrap()
-    }
-}
-
-#[cfg(all(not(feature = "crypto_k256"), not(feature = "crypto_secp256k1")))]
-pub(crate) mod crypto256 {
-    pub(crate) fn recover_public_key(
-        _message_hash: Box<[u8]>,
-        _signature_bytes: &[u8],
-        _recovery_byte: u8,
-    ) -> Box<[u8]> {
-        panic!("Not implemented!")
-    }
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        crypto::recover::{crypto256::recover_public_key, recover_address},
-        helpers::hex::hex_to_bytes,
-    };
-
-    const MESSAGE: &str = "415641580000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d394303d018d79bf0ba000000020000001";
-    const MESSAGE_HASH: &str = "f0805644755393876d0e917e553f0c206f8bc68b7ebfe73a79d2a9e7f5a4cea6";
-    const SIG_V27: &str = "475195641dae43318e194c3d9e5fc308773d6fdf5e197e02644dfd9ca3d19e3e2bd7d8656428f7f02e658a16b8f83722169c57126cc50bec8fad188b1bac6d19";
-    const SIG_V28: &str = "c88242d22d88252c845b946c9957dbf3c7d59a3b69ecba2898198869f9f146ff268c3e47a11dbb05cc5198aadd659881817a59ee37e088d3253f4695927428c1";
-    const PUBLIC_KEY_V27: &str =
-        "04f5f035588502146774d0ccfd62ee5bf1d7f1dbb96aae33a79765c636b8ec75a36f5121931b5cc37215a7d4280c5700ca92daaaf93c32b06ca9f98b1f4ece624e";
-    const PUBLIC_KEY_V28: &str =
-        "04626f2ad2cfb0b41a24276d78de8959bcf45fc5e80804416e660aab2089d15e98206526e639ee19d17c8f9ae0ce3a6ff1a8ea4ab773d0fb4214e08aad7ba978c8";
-    const ADDRESS_V27: &str = "2c59617248994D12816EE1Fa77CE0a64eEB456BF";
-    const ADDRESS_V28: &str = "12470f7aBA85c8b81D63137DD5925D6EE114952b";
-
-    #[test]
-    fn test_recover_public_key_v27() {
-        let public_key = recover_public_key(u8_box(MESSAGE_HASH), &u8_box(SIG_V27), 0);
-
-        assert_eq!(u8_box(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);
-
-        assert_eq!(u8_box(PUBLIC_KEY_V28), public_key);
-    }
-
-    #[test]
-    fn test_recover_address_1b() {
-        let address = recover_address(
-            hex_to_bytes(MESSAGE.into()),
-            hex_to_bytes(SIG_V27.to_owned() + "1b"),
-        );
-
-        assert_eq!(hex_to_bytes(ADDRESS_V27.into()), address);
-    }
-
-    #[test]
-    fn test_recover_address_1c() {
-        let address = recover_address(
-            hex_to_bytes(MESSAGE.into()),
-            hex_to_bytes(SIG_V28.to_owned() + "1c"),
-        );
-
-        assert_eq!(hex_to_bytes(ADDRESS_V28.into()), address);
-    }
-
-    fn u8_box(str: &str) -> Box<[u8]> {
-        hex_to_bytes(str.into()).as_slice().into()
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/lib.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/lib.rs.html deleted file mode 100644 index 8b3ee7a1..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/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 contains a pure Rust implementation and also an extension for some 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/doc/src/redstone/network/as_str.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/as_str.rs.html deleted file mode 100644 index f0b58bfb..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/as_str.rs.html +++ /dev/null @@ -1,235 +0,0 @@ -as_str.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-
extern crate alloc;
-
-use crate::network::specific::U256;
-use alloc::{format, string::String};
-
-pub trait AsHexStr {
-    fn as_hex_str(&self) -> String;
-}
-
-impl AsHexStr for &[u8] {
-    #[allow(clippy::format_collect)]
-    fn as_hex_str(&self) -> String {
-        self.iter().map(|byte| format!("{:02x}", byte)).collect()
-    }
-}
-
-#[cfg(feature = "network_casper")]
-impl AsHexStr for casper_types::bytesrepr::Bytes {
-    fn as_hex_str(&self) -> String {
-        self.as_slice().as_hex_str()
-    }
-}
-
-#[cfg(not(feature = "network_radix"))]
-impl AsHexStr for U256 {
-    fn as_hex_str(&self) -> String {
-        format!("{:X}", self)
-    }
-}
-
-#[cfg(feature = "network_radix")]
-impl AsHexStr for U256 {
-    fn as_hex_str(&self) -> String {
-        let digits = self.to_digits();
-        let mut result = String::new();
-        for &part in &digits {
-            if result.is_empty() || part != 0u64 {
-                result.push_str(&format!("{:02X}", part));
-            }
-        }
-        result
-    }
-}
-
-impl AsHexStr for Vec<u8> {
-    fn as_hex_str(&self) -> String {
-        self.as_slice().as_hex_str()
-    }
-}
-
-impl AsHexStr for Box<[u8]> {
-    fn as_hex_str(&self) -> String {
-        self.as_ref().as_hex_str()
-    }
-}
-
-pub trait AsAsciiStr {
-    fn as_ascii_str(&self) -> String;
-}
-
-impl AsAsciiStr for &[u8] {
-    fn as_ascii_str(&self) -> String {
-        self.iter().map(|&code| code as char).collect()
-    }
-}
-
-impl AsAsciiStr for Vec<u8> {
-    fn as_ascii_str(&self) -> String {
-        self.as_slice().as_ascii_str()
-    }
-}
-
-#[cfg(feature = "network_casper")]
-impl AsAsciiStr for casper_types::bytesrepr::Bytes {
-    fn as_ascii_str(&self) -> String {
-        self.as_slice().as_ascii_str()
-    }
-}
-
-impl AsAsciiStr for U256 {
-    fn as_ascii_str(&self) -> String {
-        let hex_string = self.as_hex_str();
-        let bytes = (0..hex_string.len())
-            .step_by(2)
-            .map(|i| u8::from_str_radix(&hex_string[i..i + 2], 16))
-            .collect::<Result<Vec<u8>, _>>()
-            .unwrap();
-
-        bytes.as_ascii_str()
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use crate::network::{
-        as_str::{AsAsciiStr, AsHexStr},
-        specific::U256,
-    };
-
-    const ETH: u32 = 4543560u32;
-
-    #[test]
-    fn test_as_hex_str() {
-        let u256 = U256::from(ETH);
-        let result = u256.as_hex_str();
-
-        assert_eq!(result, "455448");
-    }
-
-    #[test]
-    fn test_as_ascii_str() {
-        let u256 = U256::from(ETH);
-        let result = u256.as_ascii_str();
-
-        assert_eq!(result, "ETH");
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/assert.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/assert.rs.html deleted file mode 100644 index cfd43818..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/assert.rs.html +++ /dev/null @@ -1,273 +0,0 @@ -assert.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-
use crate::{
-    network::{error::Error, specific::revert},
-    print_debug,
-};
-use std::fmt::Debug;
-
-pub trait Assert<F> {
-    fn assert_or_revert<E: Fn(&Self) -> Error>(self, check: F, error: E) -> Self;
-}
-
-impl<T, F> Assert<F> for T
-where
-    T: Debug,
-    F: Fn(&Self) -> bool,
-{
-    fn assert_or_revert<E: FnOnce(&Self) -> Error>(self, check: F, error: E) -> Self {
-        assert_or_revert(self, check, error)
-    }
-}
-
-#[inline]
-fn assert_or_revert<F, T, E: FnOnce(&T) -> Error>(arg: T, check: F, error: E) -> T
-where
-    F: Fn(&T) -> bool,
-    T: Debug,
-{
-    assert_or_revert_bool_with(check(&arg), || error(&arg));
-
-    arg
-}
-
-#[inline]
-fn assert_or_revert_bool_with<E: FnOnce() -> Error>(check: bool, error: E) {
-    if check {
-        return;
-    }
-
-    let error = error();
-    print_debug!("REVERT({}) - {}!", &error.code(), error);
-    revert(error);
-}
-
-pub trait Unwrap<R> {
-    type ErrorArg;
-
-    fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> R;
-}
-
-impl<T> Unwrap<T> for Option<T>
-where
-    T: Debug,
-{
-    type ErrorArg = ();
-
-    fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> T {
-        assert_or_revert(self, |arg| arg.is_some(), |_| error(&())).unwrap()
-    }
-}
-
-impl<T, Err> Unwrap<T> for Result<T, Err>
-where
-    T: Debug,
-    Err: Debug,
-{
-    type ErrorArg = Err;
-
-    fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> T {
-        assert_or_revert(
-            self,
-            |arg| arg.is_ok(),
-            |e| error(e.as_ref().err().unwrap()),
-        )
-        .unwrap()
-    }
-}
-
-#[cfg(test)]
-mod assert_or_revert_tests {
-    use crate::network::{
-        assert::{assert_or_revert_bool_with, Assert},
-        error::Error,
-    };
-
-    #[test]
-    fn test_assert_or_revert_bool_with_true() {
-        assert_or_revert_bool_with(true, || Error::ArrayIsEmpty);
-    }
-
-    #[should_panic(expected = "Array is empty")]
-    #[test]
-    fn test_assert_or_revert_bool_with_false() {
-        assert_or_revert_bool_with(false, || Error::ArrayIsEmpty);
-    }
-
-    #[test]
-    fn test_assert_or_revert_correct() {
-        5.assert_or_revert(|&x| x == 5, |&size| Error::SizeNotSupported(size));
-    }
-
-    #[should_panic(expected = "Size not supported: 5")]
-    #[test]
-    fn test_assert_or_revert_wrong() {
-        5.assert_or_revert(|&x| x < 5, |&size| Error::SizeNotSupported(size));
-    }
-}
-
-#[cfg(test)]
-mod unwrap_or_revert_tests {
-    use crate::network::{assert::Unwrap, error::Error};
-
-    #[test]
-    fn test_unwrap_or_revert_some() {
-        let result = Some(543).unwrap_or_revert(|_| Error::CryptographicError(333));
-
-        assert_eq!(result, 543);
-    }
-
-    #[should_panic(expected = "Cryptographic Error: 333")]
-    #[test]
-    fn test_unwrap_or_revert_none() {
-        (Option::<u64>::None).unwrap_or_revert(|_| Error::CryptographicError(333));
-    }
-
-    #[test]
-    fn test_unwrap_or_revert_ok() {
-        let result = Ok(256).unwrap_or_revert(|_: &Error| Error::CryptographicError(333));
-
-        assert_eq!(result, 256);
-    }
-
-    #[should_panic(expected = "Cryptographic Error: 567")]
-    #[test]
-    fn test_unwrap_or_revert_err() {
-        Result::<&[u8], Error>::Err(Error::CryptographicError(567)).unwrap_or_revert(|e| e.clone());
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/casper/error.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/casper/error.rs.html deleted file mode 100644 index 53deca0d..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/casper/error.rs.html +++ /dev/null @@ -1,17 +0,0 @@ -error.rs - source
1
-2
-3
-4
-5
-6
-7
-8
-
use crate::network::error::Error;
-use casper_types::ApiError;
-
-impl From<Error> for ApiError {
-    fn from(error: Error) -> Self {
-        ApiError::User(error.code())
-    }
-}
-
\ No newline at end of file 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_secp256k1,network_radix/doc/src/redstone/network/casper/from_bytes_repr.rs.html deleted file mode 100644 index 7d4c10ab..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/casper/from_bytes_repr.rs.html +++ /dev/null @@ -1,21 +0,0 @@ -from_bytes_repr.rs - source
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-
use crate::network::{
-    from_bytes_repr::{FromBytesRepr, Sanitized},
-    specific::U256,
-};
-
-impl FromBytesRepr<Vec<u8>> for U256 {
-    fn from_bytes_repr(bytes: Vec<u8>) -> Self {
-        bytes.sanitized().as_slice().into()
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/casper/mod.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/casper/mod.rs.html deleted file mode 100644 index 8df66718..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/casper/mod.rs.html +++ /dev/null @@ -1,77 +0,0 @@ -mod.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
-
use crate::network::{error::Error, specific::NetworkSpecific};
-
-mod error;
-mod from_bytes_repr;
-
-pub struct Casper;
-
-impl NetworkSpecific for Casper {
-    type BytesRepr = casper_types::bytesrepr::Bytes;
-    type ValueRepr = casper_types::U256;
-    type _Self = Self;
-
-    const VALUE_SIZE: usize = 32;
-
-    fn print(_text: String) {
-        #[cfg(all(not(test), feature = "print_debug"))]
-        {
-            casper_contract::contract_api::runtime::print(&_text);
-        }
-
-        #[cfg(test)]
-        {
-            println!("{}", _text);
-        }
-    }
-
-    fn revert(error: Error) -> ! {
-        #[cfg(not(test))]
-        {
-            casper_contract::contract_api::runtime::revert(error)
-        }
-
-        #[cfg(test)]
-        {
-            panic!("{}", error)
-        }
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/error.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/error.rs.html deleted file mode 100644 index 4c0588a6..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/error.rs.html +++ /dev/null @@ -1,351 +0,0 @@ -error.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-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
-175
-
use crate::network::{
-    as_str::{AsAsciiStr, AsHexStr},
-    specific::U256,
-};
-use std::fmt::{Debug, Display, Formatter};
-
-pub trait ContractErrorContent: Debug {
-    fn code(&self) -> u8;
-    fn message(&self) -> String;
-}
-
-/// 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.
-#[derive(Debug)]
-pub enum Error {
-    /// 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.
-    ContractError(Box<dyn ContractErrorContent>),
-
-    /// Indicates an overflow error with `U256` numbers.
-    ///
-    /// Used when operations on `U256` numbers exceed their maximum value, potentially leading
-    /// to incorrect calculations or state.
-    NumberOverflow(U256),
-
-    /// 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.
-    ArrayIsEmpty,
-
-    /// 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.
-    CryptographicError(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.
-    SizeNotSupported(usize),
-
-    /// 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.
-    WrongRedStoneMarker(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.
-    NonEmptyPayloadRemainder(Vec<u8>),
-
-    /// 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.
-    InsufficientSignerCount(usize, usize, U256),
-
-    /// 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.
-    TimestampTooOld(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.
-    TimestampTooFuture(usize, u64),
-
-    /// 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.
-    ClonedContractError(u8, String),
-}
-
-impl Error {
-    pub fn contract_error<T: ContractErrorContent + 'static>(value: T) -> Error {
-        Error::ContractError(Box::new(value))
-    }
-
-    pub(crate) fn code(&self) -> u16 {
-        match self {
-            Error::ContractError(boxed) => boxed.code() as u16,
-            Error::NumberOverflow(_) => 509,
-            Error::ArrayIsEmpty => 510,
-            Error::WrongRedStoneMarker(_) => 511,
-            Error::NonEmptyPayloadRemainder(_) => 512,
-            Error::InsufficientSignerCount(data_package_index, value, _) => {
-                (2000 + data_package_index * 10 + value) as u16
-            }
-            Error::SizeNotSupported(size) => 600 + *size as u16,
-            Error::CryptographicError(size) => 700 + *size as u16,
-            Error::TimestampTooOld(data_package_index, _) => 1000 + *data_package_index as u16,
-            Error::TimestampTooFuture(data_package_index, _) => 1050 + *data_package_index as u16,
-            Error::ClonedContractError(code, _) => *code as u16,
-        }
-    }
-}
-
-impl Display for Error {
-    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
-        match self {
-            Error::ContractError(boxed) => write!(f, "Contract error: {}", boxed.message()),
-            Error::NumberOverflow(number) => write!(f, "Number overflow: {}", number),
-            Error::ArrayIsEmpty => write!(f, "Array is empty"),
-            Error::CryptographicError(size) => write!(f, "Cryptographic Error: {}", size),
-            Error::SizeNotSupported(size) => write!(f, "Size not supported: {}", size),
-            Error::WrongRedStoneMarker(bytes) => {
-                write!(f, "Wrong RedStone marker: {}", bytes.as_hex_str())
-            }
-            Error::NonEmptyPayloadRemainder(bytes) => {
-                write!(f, "Non empty payload remainder: {}", bytes.as_hex_str())
-            }
-            Error::InsufficientSignerCount(data_package_index, value, feed_id) => write!(
-                f,
-                "Insufficient signer count {} for #{} ({})",
-                value,
-                data_package_index,
-                feed_id.as_ascii_str()
-            ),
-            Error::TimestampTooOld(data_package_index, value) => {
-                write!(
-                    f,
-                    "Timestamp {} is too old for #{}",
-                    value, data_package_index
-                )
-            }
-            Error::TimestampTooFuture(data_package_index, value) => write!(
-                f,
-                "Timestamp {} is too future for #{}",
-                value, data_package_index
-            ),
-            Error::ClonedContractError(_, message) => {
-                write!(f, "(Cloned) Contract error: {}", message)
-            }
-        }
-    }
-}
-
-impl Clone for Error {
-    fn clone(&self) -> Self {
-        match self {
-            Error::ContractError(content) => {
-                Error::ClonedContractError(content.code(), content.message())
-            }
-            Error::NumberOverflow(value) => Error::NumberOverflow(*value),
-            Error::ArrayIsEmpty => Error::ArrayIsEmpty,
-            Error::CryptographicError(size) => Error::CryptographicError(*size),
-            Error::SizeNotSupported(size) => Error::SizeNotSupported(*size),
-            Error::WrongRedStoneMarker(bytes) => Error::WrongRedStoneMarker(bytes.clone()),
-            Error::NonEmptyPayloadRemainder(bytes) => {
-                Error::NonEmptyPayloadRemainder(bytes.clone())
-            }
-            Error::InsufficientSignerCount(count, needed, bytes) => {
-                Error::InsufficientSignerCount(*count, *needed, *bytes)
-            }
-            Error::TimestampTooOld(index, timestamp) => Error::TimestampTooOld(*index, *timestamp),
-            Error::TimestampTooFuture(index, timestamp) => {
-                Error::TimestampTooFuture(*index, *timestamp)
-            }
-            Error::ClonedContractError(code, message) => {
-                Error::ClonedContractError(*code, message.as_str().into())
-            }
-        }
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/flattened.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/flattened.rs.html deleted file mode 100644 index f8226f69..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/flattened.rs.html +++ /dev/null @@ -1,71 +0,0 @@ -flattened.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
-
use crate::network::specific::Bytes;
-
-pub trait Flattened<T> {
-    fn flattened(&self) -> T;
-}
-
-impl Flattened<Bytes> for Vec<Bytes> {
-    fn flattened(&self) -> Bytes {
-        #[allow(clippy::useless_conversion)]
-        self.iter().flatten().copied().collect::<Vec<_>>().into()
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use crate::network::{flattened::Flattened, specific::Bytes};
-
-    #[test]
-    fn test_bytes_flattened() {
-        #[allow(clippy::useless_conversion)]
-        let bytes: Vec<Bytes> = vec![
-            vec![1u8, 2, 3].into(),
-            vec![4u8].into(),
-            vec![].into(),
-            vec![5, 6, 7].into(),
-        ];
-
-        let result: Bytes = bytes.flattened();
-
-        #[allow(clippy::useless_conversion)]
-        let expected_result: Bytes = vec![1u8, 2, 3, 4, 5, 6, 7].into();
-
-        assert_eq!(result, expected_result);
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/from_bytes_repr.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/from_bytes_repr.rs.html deleted file mode 100644 index 0c7663c5..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/from_bytes_repr.rs.html +++ /dev/null @@ -1,257 +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
-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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-
use crate::network::specific::VALUE_SIZE;
-
-pub trait FromBytesRepr<T> {
-    fn from_bytes_repr(bytes: T) -> Self;
-}
-
-pub trait Sanitized {
-    fn sanitized(self) -> Self;
-}
-
-impl Sanitized for Vec<u8> {
-    fn sanitized(self) -> Self {
-        if self.len() <= VALUE_SIZE {
-            return self;
-        }
-
-        let index = self.len().max(VALUE_SIZE) - VALUE_SIZE;
-        let remainder = &self[0..index];
-
-        if remainder != vec![0; index] {
-            panic!("Number to big: {:?} digits", self.len())
-        }
-
-        self[index..].into()
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use crate::network::{
-        from_bytes_repr::FromBytesRepr,
-        specific::{U256, VALUE_SIZE},
-    };
-
-    #[cfg(feature = "network_radix")]
-    use crate::network::radix::u256_ext::U256Ext;
-
-    #[test]
-    fn test_from_bytes_repr_single() {
-        let vec = vec![1];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(1u32));
-    }
-
-    #[test]
-    fn test_from_bytes_repr_double() {
-        let vec = vec![1, 2];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(258u32));
-    }
-
-    #[test]
-    fn test_from_bytes_repr_simple() {
-        let vec = vec![1, 2, 3];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(66051u32));
-    }
-
-    #[test]
-    fn test_from_bytes_repr_bigger() {
-        let vec = vec![101, 202, 255];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(6671103u32));
-    }
-
-    #[test]
-    fn test_from_bytes_repr_empty() {
-        let result = U256::from_bytes_repr(Vec::new());
-
-        assert_eq!(result, U256::from(0u8));
-    }
-
-    #[test]
-    fn test_from_bytes_repr_trailing_zeroes() {
-        let vec = vec![1, 2, 3, 0];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(16909056u32));
-    }
-
-    #[test]
-    fn test_from_bytes_repr_leading_zeroes() {
-        let vec = vec![0, 1, 2, 3];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(66051u32));
-    }
-
-    #[allow(clippy::legacy_numeric_constants)]
-    #[test]
-    fn test_from_bytes_repr_max() {
-        let vec = vec![255; VALUE_SIZE];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::max_value());
-    }
-
-    #[test]
-    fn test_from_bytes_repr_min() {
-        let vec = vec![0; VALUE_SIZE];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(0u8));
-    }
-
-    #[should_panic(expected = "Number to big")]
-    #[test]
-    fn test_from_bytes_repr_too_long() {
-        let x = VALUE_SIZE as u8 + 1;
-        let vec = (1..=x).collect();
-
-        U256::from_bytes_repr(vec);
-    }
-
-    #[allow(clippy::legacy_numeric_constants)]
-    #[test]
-    fn test_from_bytes_repr_too_long_but_zeroes() {
-        let mut vec = vec![255; VALUE_SIZE + 1];
-        vec[0] = 0;
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::max_value());
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/mod.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/mod.rs.html deleted file mode 100644 index f79fb758..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/mod.rs.html +++ /dev/null @@ -1,51 +0,0 @@ -mod.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
-
pub mod as_str;
-pub mod assert;
-pub mod error;
-pub mod from_bytes_repr;
-pub mod print_debug;
-pub mod specific;
-
-#[cfg(feature = "network_casper")]
-pub mod casper;
-
-#[cfg(feature = "network_casper")]
-pub type _Network = casper::Casper;
-
-#[cfg(feature = "network_radix")]
-pub mod radix;
-
-#[cfg(feature = "network_radix")]
-pub type _Network = radix::Radix;
-
-pub mod flattened;
-#[cfg(all(not(feature = "network_casper"), not(feature = "network_radix")))]
-mod pure;
-
-#[cfg(all(not(feature = "network_casper"), not(feature = "network_radix")))]
-pub type _Network = pure::Std;
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/print_debug.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/print_debug.rs.html deleted file mode 100644 index 1fca4faf..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/print_debug.rs.html +++ /dev/null @@ -1,47 +0,0 @@ -print_debug.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
-
extern crate alloc;
-
-#[macro_export]
-macro_rules! print_debug {
-    ($fmt:expr) => {
-        $crate::network::specific::print(format!($fmt))
-    };
-    ($fmt:expr, $($args:tt)*) => {
-        $crate::network::specific::print(format!($fmt, $($args)*))
-    };
-}
-
-#[macro_export]
-macro_rules! print_and_panic {
-    ($fmt:expr) => {{
-        $crate::print_debug!($fmt);
-        panic!($fmt)
-    }};
-    ($fmt:expr, $($args:tt)*) => {{
-        $crate::print_debug!($fmt, $($args)*);
-        panic!($fmt, $($args)*)
-    }};
-}
-
\ No newline at end of file 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_secp256k1,network_radix/doc/src/redstone/network/pure/from_bytes_repr.rs.html deleted file mode 100644 index dfb1ae60..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/pure/from_bytes_repr.rs.html +++ /dev/null @@ -1,21 +0,0 @@ -from_bytes_repr.rs - source
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-
use crate::network::{
-    from_bytes_repr::{FromBytesRepr, Sanitized},
-    specific::U256,
-};
-
-impl FromBytesRepr<Vec<u8>> for U256 {
-    fn from_bytes_repr(bytes: Vec<u8>) -> Self {
-        Self::from_big_endian(bytes.sanitized().as_slice())
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/pure/mod.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/pure/mod.rs.html deleted file mode 100644 index 36cc7a10..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/pure/mod.rs.html +++ /dev/null @@ -1,47 +0,0 @@ -mod.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
-
use crate::network::{error::Error, specific::NetworkSpecific};
-use primitive_types::U256;
-use std::eprintln;
-
-mod from_bytes_repr;
-
-pub struct Std;
-
-impl NetworkSpecific for Std {
-    type BytesRepr = Vec<u8>;
-    type ValueRepr = U256;
-    type _Self = Std;
-
-    const VALUE_SIZE: usize = 32;
-
-    fn print(text: String) {
-        eprintln!("{}", text)
-    }
-
-    fn revert(error: Error) -> ! {
-        panic!("{}", error)
-    }
-}
-
\ No newline at end of file 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_secp256k1,network_radix/doc/src/redstone/network/radix/from_bytes_repr.rs.html deleted file mode 100644 index cae6ae57..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/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/doc/src/redstone/network/radix/mod.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/radix/mod.rs.html deleted file mode 100644 index 63716f28..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/radix/mod.rs.html +++ /dev/null @@ -1,77 +0,0 @@ -mod.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
-
use crate::network::{error::Error, specific::NetworkSpecific};
-
-mod from_bytes_repr;
-pub mod u256_ext;
-
-pub struct Radix;
-
-impl NetworkSpecific for Radix {
-    type BytesRepr = Vec<u8>;
-    type ValueRepr = radix_common::math::bnum_integer::U256;
-    type _Self = Self;
-
-    const VALUE_SIZE: usize = 32;
-
-    fn print(_text: String) {
-        #[cfg(all(not(test), feature = "print_debug"))]
-        {
-            scrypto::prelude::info!("{}", _text);
-        }
-
-        #[cfg(test)]
-        {
-            println!("{}", _text);
-        }
-    }
-
-    fn revert(error: Error) -> ! {
-        #[cfg(not(test))]
-        {
-            scrypto::prelude::Runtime::panic(error.to_string())
-        }
-
-        #[cfg(test)]
-        {
-            panic!("{}", error)
-        }
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/radix/u256_ext.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/radix/u256_ext.rs.html deleted file mode 100644 index f834b2d9..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/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/doc/src/redstone/network/specific.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/specific.rs.html deleted file mode 100644 index 8d698709..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/network/specific.rs.html +++ /dev/null @@ -1,51 +0,0 @@ -specific.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
-
use crate::network::{_Network, error::Error, from_bytes_repr::FromBytesRepr};
-
-pub trait NetworkSpecific {
-    type BytesRepr: From<Vec<u8>> + Into<Vec<u8>>;
-    type ValueRepr: FromBytesRepr<Vec<u8>>;
-    type _Self;
-
-    const VALUE_SIZE: usize;
-
-    fn print(_text: String);
-    fn revert(error: Error) -> !;
-}
-
-pub(crate) type Network = <_Network as NetworkSpecific>::_Self;
-pub type Bytes = <_Network as NetworkSpecific>::BytesRepr;
-pub type U256 = <_Network as NetworkSpecific>::ValueRepr;
-pub const VALUE_SIZE: usize = <_Network as NetworkSpecific>::VALUE_SIZE;
-
-pub fn print(_text: String) {
-    Network::print(_text)
-}
-
-pub fn revert(error: Error) -> ! {
-    Network::revert(error)
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/protocol/constants.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/protocol/constants.rs.html deleted file mode 100644 index 3e2f4fd5..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/protocol/constants.rs.html +++ /dev/null @@ -1,23 +0,0 @@ -constants.rs - source
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-
pub(crate) const UNSIGNED_METADATA_BYTE_SIZE_BS: usize = 3;
-pub(crate) const DATA_PACKAGES_COUNT_BS: usize = 2;
-pub(crate) const DATA_POINTS_COUNT_BS: usize = 3;
-pub(crate) const SIGNATURE_BS: usize = 65;
-pub(crate) const DATA_POINT_VALUE_BYTE_SIZE_BS: usize = 4;
-pub(crate) const DATA_FEED_ID_BS: usize = 32;
-pub(crate) const TIMESTAMP_BS: usize = 6;
-pub(crate) const MAX_TIMESTAMP_DELAY_MS: u64 = 15 * 60 * 1000; // 15 minutes in milliseconds
-pub(crate) const MAX_TIMESTAMP_AHEAD_MS: u64 = 3 * 60 * 1000; // 3 minutes in milliseconds
-pub(crate) const REDSTONE_MARKER_BS: usize = 9;
-pub(crate) const REDSTONE_MARKER: [u8; 9] = [0, 0, 2, 237, 87, 1, 30, 0, 0]; // 0x000002ed57011e0000
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/protocol/data_package.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/protocol/data_package.rs.html deleted file mode 100644 index a1d603e6..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/protocol/data_package.rs.html +++ /dev/null @@ -1,431 +0,0 @@ -data_package.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-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
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-
use crate::{
-    crypto::recover::recover_address,
-    network::as_str::AsHexStr,
-    protocol::{
-        constants::{
-            DATA_FEED_ID_BS, DATA_POINTS_COUNT_BS, DATA_POINT_VALUE_BYTE_SIZE_BS, SIGNATURE_BS,
-            TIMESTAMP_BS,
-        },
-        data_point::{trim_data_points, DataPoint},
-    },
-    utils::trim::Trim,
-};
-use std::fmt::{Debug, Formatter};
-
-#[derive(Clone, PartialEq, Eq)]
-pub(crate) struct DataPackage {
-    pub(crate) signer_address: Vec<u8>,
-    pub(crate) timestamp: u64,
-    pub(crate) data_points: Vec<DataPoint>,
-}
-
-pub(crate) fn trim_data_packages(payload: &mut Vec<u8>, count: usize) -> Vec<DataPackage> {
-    let mut data_packages = Vec::new();
-
-    for _ in 0..count {
-        let data_package = trim_data_package(payload);
-        data_packages.push(data_package);
-    }
-
-    data_packages
-}
-
-fn trim_data_package(payload: &mut Vec<u8>) -> DataPackage {
-    let signature = payload.trim_end(SIGNATURE_BS);
-    let mut tmp = payload.clone();
-
-    let data_point_count = payload.trim_end(DATA_POINTS_COUNT_BS);
-    let value_size = payload.trim_end(DATA_POINT_VALUE_BYTE_SIZE_BS);
-    let timestamp = payload.trim_end(TIMESTAMP_BS);
-    let size = data_point_count * (value_size + DATA_FEED_ID_BS)
-        + DATA_POINT_VALUE_BYTE_SIZE_BS
-        + TIMESTAMP_BS
-        + DATA_POINTS_COUNT_BS;
-
-    let signable_bytes = tmp.trim_end(size);
-    let signer_address = recover_address(signable_bytes, signature);
-
-    let data_points = trim_data_points(payload, data_point_count, value_size);
-
-    DataPackage {
-        data_points,
-        timestamp,
-        signer_address,
-    }
-}
-
-impl Debug for DataPackage {
-    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
-        write!(
-            f,
-            "DataPackage {{\n   signer_address: 0x{}, timestamp: {},\n   data_points: {:?}\n}}",
-            self.signer_address.as_hex_str(),
-            self.timestamp,
-            self.data_points
-        )
-    }
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        helpers::hex::hex_to_bytes,
-        network::{from_bytes_repr::FromBytesRepr, specific::U256},
-        protocol::{
-            constants::{
-                DATA_FEED_ID_BS, DATA_POINTS_COUNT_BS, DATA_POINT_VALUE_BYTE_SIZE_BS, SIGNATURE_BS,
-                TIMESTAMP_BS,
-            },
-            data_package::{trim_data_package, trim_data_packages, DataPackage},
-            data_point::DataPoint,
-        },
-    };
-
-    const DATA_PACKAGE_BYTES_1: &str = "4554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000360cafc94e018d79bf0ba00000002000000151afa8c5c3caf6004b42c0fb17723e524f993b9ecbad3b9bce5ec74930fa436a3660e8edef10e96ee5f222de7ef5787c02ca467c0ec18daa2907b43ac20c63c11c";
-    const DATA_PACKAGE_BYTES_2: &str = "4554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000360cdd851e018d79bf0ba000000020000001473fd9dc72e6814a7de719b403cf4c9eba08934a643fd0666c433b806b31e69904f2226ffd3c8ef75861b11b5e32a1fda4b1458e0da4605a772dfba2a812f3ee1b";
-
-    const SIGNER_ADDRESS_1: &str = "1ea62d73edf8ac05dfcea1a34b9796e937a29eff";
-    const SIGNER_ADDRESS_2: &str = "109b4a318a4f5ddcbca6349b45f881b4137deafb";
-
-    const VALUE_1: u128 = 232141080910;
-    const VALUE_2: u128 = 232144078110;
-
-    const DATA_PACKAGE_SIZE: usize = 32
-        + DATA_FEED_ID_BS
-        + DATA_POINT_VALUE_BYTE_SIZE_BS
-        + TIMESTAMP_BS
-        + SIGNATURE_BS
-        + DATA_POINTS_COUNT_BS;
-
-    #[test]
-    fn test_trim_data_packages() {
-        test_trim_data_packages_of(2, "");
-        test_trim_data_packages_of(0, "");
-        test_trim_data_packages_of(1, "");
-    }
-
-    #[test]
-    fn test_trim_data_packages_with_prefix() {
-        let prefix = "da4687f1914a1c";
-
-        test_trim_data_packages_of(2, prefix);
-    }
-
-    #[test]
-    fn test_trim_data_packages_single() {
-        let mut bytes = hex_to_bytes(DATA_PACKAGE_BYTES_1.into());
-        let data_packages = trim_data_packages(&mut bytes, 1);
-        assert_eq!(data_packages.len(), 1);
-        assert_eq!(bytes, Vec::<u8>::new());
-
-        verify_data_package(data_packages[0].clone(), VALUE_1, SIGNER_ADDRESS_1);
-    }
-
-    fn test_trim_data_packages_of(count: usize, prefix: &str) {
-        let input: Vec<u8> =
-            hex_to_bytes((prefix.to_owned() + DATA_PACKAGE_BYTES_1) + DATA_PACKAGE_BYTES_2);
-        let mut bytes = input.clone();
-        let data_packages = trim_data_packages(&mut bytes, count);
-
-        assert_eq!(data_packages.len(), count);
-        assert_eq!(
-            bytes.as_slice(),
-            &input[..input.len() - count * DATA_PACKAGE_SIZE]
-        );
-
-        let values = &[VALUE_2, VALUE_1];
-        let signers = &[SIGNER_ADDRESS_2, SIGNER_ADDRESS_1];
-
-        for i in 0..count {
-            verify_data_package(data_packages[i].clone(), values[i], signers[i]);
-        }
-    }
-
-    #[should_panic(expected = "index out of bounds")]
-    #[test]
-    fn test_trim_data_packages_bigger_number() {
-        test_trim_data_packages_of(3, "");
-    }
-
-    #[test]
-    fn test_trim_data_package() {
-        test_trim_data_package_of(DATA_PACKAGE_BYTES_1, VALUE_1, SIGNER_ADDRESS_1);
-        test_trim_data_package_of(DATA_PACKAGE_BYTES_2, VALUE_2, SIGNER_ADDRESS_2);
-    }
-
-    #[test]
-    fn test_trim_data_package_with_prefix() {
-        test_trim_data_package_of(
-            &("da4687f1914a1c".to_owned() + DATA_PACKAGE_BYTES_1),
-            VALUE_1,
-            SIGNER_ADDRESS_1,
-        );
-        test_trim_data_package_of(
-            &("da4687f1914a1c".to_owned() + DATA_PACKAGE_BYTES_2),
-            VALUE_2,
-            SIGNER_ADDRESS_2,
-        );
-    }
-
-    #[should_panic]
-    #[test]
-    fn test_trim_data_package_signature_only() {
-        test_trim_data_package_of(
-            &DATA_PACKAGE_BYTES_1[(DATA_PACKAGE_BYTES_1.len() - 2 * SIGNATURE_BS)..],
-            0,
-            "",
-        );
-    }
-
-    #[should_panic]
-    #[test]
-    fn test_trim_data_package_shorter() {
-        test_trim_data_package_of(
-            &DATA_PACKAGE_BYTES_1
-                [(DATA_PACKAGE_BYTES_1.len() - 2 * (SIGNATURE_BS + DATA_POINTS_COUNT_BS))..],
-            0,
-            "",
-        );
-    }
-
-    fn test_trim_data_package_of(bytes_str: &str, expected_value: u128, signer_address: &str) {
-        let mut bytes: Vec<u8> = hex_to_bytes(bytes_str.into());
-        let result = trim_data_package(&mut bytes);
-        assert_eq!(
-            bytes,
-            hex_to_bytes(bytes_str[..bytes_str.len() - 2 * (DATA_PACKAGE_SIZE)].into())
-        );
-
-        verify_data_package(result, expected_value, signer_address);
-    }
-
-    fn verify_data_package(result: DataPackage, expected_value: u128, signer_address: &str) {
-        let data_package = DataPackage {
-            data_points: vec![DataPoint {
-                feed_id: U256::from_bytes_repr(hex_to_bytes(DATA_PACKAGE_BYTES_1[..6].into())),
-                value: U256::from(expected_value),
-            }],
-            timestamp: 1707144580000,
-            signer_address: hex_to_bytes(signer_address.into()),
-        };
-
-        assert_eq!(result, data_package);
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/protocol/data_point.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/protocol/data_point.rs.html deleted file mode 100644 index e643085a..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/protocol/data_point.rs.html +++ /dev/null @@ -1,315 +0,0 @@ -data_point.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-
use crate::{
-    network::{
-        as_str::{AsAsciiStr, AsHexStr},
-        assert::Assert,
-        error::Error,
-        from_bytes_repr::FromBytesRepr,
-        specific::U256,
-    },
-    protocol::constants::DATA_FEED_ID_BS,
-    utils::{trim::Trim, trim_zeros::TrimZeros},
-};
-use std::fmt::{Debug, Formatter};
-
-#[derive(Clone, PartialEq, Eq)]
-pub(crate) struct DataPoint {
-    pub(crate) feed_id: U256,
-    pub(crate) value: U256,
-}
-
-pub(crate) fn trim_data_points(
-    payload: &mut Vec<u8>,
-    count: usize,
-    value_size: usize,
-) -> Vec<DataPoint> {
-    count.assert_or_revert(|&count| count == 1, |&count| Error::SizeNotSupported(count));
-
-    let mut data_points = Vec::new();
-
-    for _ in 0..count {
-        let data_point = trim_data_point(payload, value_size);
-        data_points.push(data_point);
-    }
-
-    data_points
-}
-
-fn trim_data_point(payload: &mut Vec<u8>, value_size: usize) -> DataPoint {
-    let value = payload.trim_end(value_size);
-    let feed_id: Vec<u8> = payload.trim_end(DATA_FEED_ID_BS);
-
-    DataPoint {
-        value,
-        feed_id: U256::from_bytes_repr(feed_id.trim_zeros()),
-    }
-}
-
-impl Debug for DataPoint {
-    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
-        write!(
-            f,
-            "DataPoint {{\n      feed_id: {:?} (0x{}), value: {}\n   }}",
-            self.feed_id.as_ascii_str(),
-            self.feed_id.as_hex_str(),
-            self.value,
-        )
-    }
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        helpers::hex::hex_to_bytes,
-        network::{
-            from_bytes_repr::FromBytesRepr,
-            specific::{U256, VALUE_SIZE},
-        },
-        protocol::{
-            constants::DATA_FEED_ID_BS,
-            data_point::{trim_data_point, trim_data_points, DataPoint},
-        },
-    };
-    use std::ops::Shr;
-
-    const DATA_POINT_BYTES_TAIL: &str = "4554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000360cafc94e";
-    const VALUE: u128 = 232141080910;
-
-    #[test]
-    fn test_trim_data_points() {
-        let mut bytes = hex_to_bytes(DATA_POINT_BYTES_TAIL.into());
-        let result = trim_data_points(&mut bytes, 1, 32);
-
-        assert_eq!(result.len(), 1);
-
-        verify_rest_and_result(
-            DATA_POINT_BYTES_TAIL,
-            32,
-            VALUE.into(),
-            bytes,
-            result[0].clone(),
-        )
-    }
-
-    #[should_panic(expected = "Size not supported: 0")]
-    #[test]
-    fn test_trim_zero_data_points() {
-        trim_data_points(&mut hex_to_bytes(DATA_POINT_BYTES_TAIL.into()), 0, 32);
-    }
-
-    #[should_panic(expected = "Size not supported: 2")]
-    #[test]
-    fn test_trim_two_data_points() {
-        trim_data_points(&mut hex_to_bytes(DATA_POINT_BYTES_TAIL.into()), 2, 32);
-    }
-
-    #[test]
-    fn test_trim_data_point() {
-        test_trim_data_point_of(DATA_POINT_BYTES_TAIL, 32, VALUE.into());
-    }
-
-    #[test]
-    fn test_trim_data_point_with_prefix() {
-        test_trim_data_point_of(
-            &("a2a812f3ee1b".to_owned() + DATA_POINT_BYTES_TAIL),
-            32,
-            VALUE.into(),
-        );
-    }
-
-    #[test]
-    fn test_trim_data_point_other_lengths() {
-        for i in 1..VALUE_SIZE {
-            test_trim_data_point_of(
-                &DATA_POINT_BYTES_TAIL[..DATA_POINT_BYTES_TAIL.len() - 2 * i],
-                32 - i,
-                U256::from(VALUE).shr(8 * i as u32),
-            );
-        }
-    }
-
-    fn test_trim_data_point_of(value: &str, size: usize, expected_value: U256) {
-        let mut bytes = hex_to_bytes(value.into());
-        let result = trim_data_point(&mut bytes, size);
-
-        verify_rest_and_result(value, size, expected_value, bytes, result);
-    }
-
-    fn verify_rest_and_result(
-        value: &str,
-        size: usize,
-        expected_value: U256,
-        rest: Vec<u8>,
-        result: DataPoint,
-    ) {
-        assert_eq!(
-            rest,
-            hex_to_bytes(value[..value.len() - 2 * (size + DATA_FEED_ID_BS)].into())
-        );
-
-        let data_point = DataPoint {
-            value: expected_value,
-            feed_id: U256::from_bytes_repr(hex_to_bytes(DATA_POINT_BYTES_TAIL[..6].to_string())),
-        };
-
-        assert_eq!(result, data_point);
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/protocol/marker.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/protocol/marker.rs.html deleted file mode 100644 index 15b31817..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/protocol/marker.rs.html +++ /dev/null @@ -1,133 +0,0 @@ -marker.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-
use crate::{
-    network::{assert::Assert, error::Error},
-    protocol::constants::{REDSTONE_MARKER, REDSTONE_MARKER_BS},
-    utils::trim::Trim,
-};
-
-pub fn trim_redstone_marker(payload: &mut Vec<u8>) {
-    let marker: Vec<u8> = payload.trim_end(REDSTONE_MARKER_BS);
-
-    marker.as_slice().assert_or_revert(
-        |&marker| marker == REDSTONE_MARKER,
-        |&val| Error::WrongRedStoneMarker(val.into()),
-    );
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        helpers::hex::hex_to_bytes,
-        protocol::{constants::REDSTONE_MARKER_BS, marker::trim_redstone_marker},
-    };
-
-    const PAYLOAD_TAIL: &str = "1c000f000000000002ed57011e0000";
-
-    #[test]
-    fn test_trim_redstone_marker() {
-        let mut bytes = hex_to_bytes(PAYLOAD_TAIL.into());
-        trim_redstone_marker(&mut bytes);
-
-        assert_eq!(
-            bytes,
-            hex_to_bytes(PAYLOAD_TAIL[..PAYLOAD_TAIL.len() - 2 * REDSTONE_MARKER_BS].into())
-        );
-    }
-
-    #[should_panic(expected = "Wrong RedStone marker: 000002ed57022e0000")]
-    #[test]
-    fn test_trim_redstone_marker_wrong() {
-        trim_redstone_marker(&mut hex_to_bytes(PAYLOAD_TAIL.replace('1', "2")));
-    }
-
-    #[should_panic(expected = "Wrong RedStone marker: 00000002ed57011e00")]
-    #[test]
-    fn test_trim_redstone_marker_wrong_ending() {
-        trim_redstone_marker(&mut hex_to_bytes(
-            PAYLOAD_TAIL[..PAYLOAD_TAIL.len() - 2].into(),
-        ));
-    }
-
-    #[should_panic(expected = "Wrong RedStone marker: 100002ed57011e0000")]
-    #[test]
-    fn test_trim_redstone_marker_wrong_beginning() {
-        trim_redstone_marker(&mut hex_to_bytes(
-            PAYLOAD_TAIL.replace("0000000", "1111111"),
-        ));
-    }
-
-    #[should_panic(expected = "Wrong RedStone marker: 0002ed57011e0000")]
-    #[test]
-    fn test_trim_redstone_marker_too_short() {
-        trim_redstone_marker(&mut hex_to_bytes(
-            PAYLOAD_TAIL[PAYLOAD_TAIL.len() - 2 * (REDSTONE_MARKER_BS - 1)..].into(),
-        ));
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/protocol/mod.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/protocol/mod.rs.html deleted file mode 100644 index fbd60f5b..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/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/doc/src/redstone/protocol/payload.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/protocol/payload.rs.html deleted file mode 100644 index 1cd14131..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/protocol/payload.rs.html +++ /dev/null @@ -1,209 +0,0 @@ -payload.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-
use crate::{
-    network::{assert::Assert, error::Error},
-    protocol::{
-        constants::{DATA_PACKAGES_COUNT_BS, UNSIGNED_METADATA_BYTE_SIZE_BS},
-        data_package::{trim_data_packages, DataPackage},
-        marker,
-    },
-    utils::trim::Trim,
-};
-
-#[derive(Clone, Debug)]
-pub(crate) struct Payload {
-    pub(crate) data_packages: Vec<DataPackage>,
-}
-
-impl Payload {
-    pub(crate) fn make(payload_bytes: &mut Vec<u8>) -> Payload {
-        marker::trim_redstone_marker(payload_bytes);
-        let payload = trim_payload(payload_bytes);
-
-        payload_bytes.assert_or_revert(
-            |bytes| bytes.is_empty(),
-            |bytes| Error::NonEmptyPayloadRemainder(bytes.as_slice().into()),
-        );
-
-        payload
-    }
-}
-
-fn trim_payload(payload: &mut Vec<u8>) -> Payload {
-    let data_package_count = trim_metadata(payload);
-    let data_packages = trim_data_packages(payload, data_package_count);
-
-    Payload { data_packages }
-}
-
-fn trim_metadata(payload: &mut Vec<u8>) -> usize {
-    let unsigned_metadata_size = payload.trim_end(UNSIGNED_METADATA_BYTE_SIZE_BS);
-    let _: Vec<u8> = payload.trim_end(unsigned_metadata_size);
-
-    payload.trim_end(DATA_PACKAGES_COUNT_BS)
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        helpers::hex::{hex_to_bytes, read_payload_bytes, read_payload_hex},
-        protocol::{
-            constants::REDSTONE_MARKER_BS,
-            payload::{trim_metadata, trim_payload, Payload},
-        },
-    };
-
-    const PAYLOAD_METADATA_BYTES: &str = "000f000000";
-    const PAYLOAD_METADATA_WITH_UNSIGNED_BYTE: &str = "000f55000001";
-    const PAYLOAD_METADATA_WITH_UNSIGNED_BYTES: &str = "000f11223344556677889900aabbccddeeff000010";
-
-    #[test]
-    fn test_trim_metadata() {
-        let prefix = "9e0294371c";
-
-        for &bytes_str in &[
-            PAYLOAD_METADATA_BYTES,
-            PAYLOAD_METADATA_WITH_UNSIGNED_BYTE,
-            PAYLOAD_METADATA_WITH_UNSIGNED_BYTES,
-        ] {
-            let mut bytes = hex_to_bytes(prefix.to_owned() + bytes_str);
-            let result = trim_metadata(&mut bytes);
-
-            assert_eq!(bytes, hex_to_bytes(prefix.into()));
-            assert_eq!(result, 15);
-        }
-    }
-
-    #[test]
-    fn test_trim_payload() {
-        let payload_hex = read_payload_bytes("./sample-data/payload.hex");
-
-        let mut bytes = payload_hex[..payload_hex.len() - REDSTONE_MARKER_BS].into();
-        let payload = trim_payload(&mut bytes);
-
-        assert_eq!(bytes, Vec::<u8>::new());
-        assert_eq!(payload.data_packages.len(), 15);
-    }
-
-    #[test]
-    fn test_make_payload() {
-        let mut payload_hex = read_payload_bytes("./sample-data/payload.hex");
-        let payload = Payload::make(&mut payload_hex);
-
-        assert_eq!(payload.data_packages.len(), 15);
-    }
-
-    #[should_panic(expected = "Non empty payload remainder: 12")]
-    #[test]
-    fn test_make_payload_with_prefix() {
-        let payload_hex = read_payload_hex("./sample-data/payload.hex");
-        let mut bytes = hex_to_bytes("12".to_owned() + &payload_hex);
-        let payload = Payload::make(&mut bytes);
-
-        assert_eq!(payload.data_packages.len(), 15);
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/utils/filter.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/utils/filter.rs.html deleted file mode 100644 index f28b29ef..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/utils/filter.rs.html +++ /dev/null @@ -1,43 +0,0 @@ -filter.rs - source
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-
pub(crate) trait FilterSome<Output> {
-    fn filter_some(&self) -> Output;
-}
-
-impl<T: Copy> FilterSome<Vec<T>> for [Option<T>] {
-    fn filter_some(&self) -> Vec<T> {
-        self.iter().filter_map(|&opt| opt).collect()
-    }
-}
-
-#[cfg(test)]
-mod filter_some_tests {
-    use crate::utils::filter::FilterSome;
-
-    #[test]
-    fn test_filter_some() {
-        let values = [None, Some(23u64), None, Some(12), Some(12), None, Some(23)];
-
-        assert_eq!(values.filter_some(), vec![23, 12, 12, 23])
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/utils/median.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/utils/median.rs.html deleted file mode 100644 index c329ff3b..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/utils/median.rs.html +++ /dev/null @@ -1,375 +0,0 @@ -median.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-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
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-
use crate::network::{assert::Assert, error::Error::ArrayIsEmpty, specific::U256};
-use std::ops::{Add, Rem, Shr};
-
-pub(crate) trait Median {
-    type Item;
-
-    fn median(self) -> Self::Item;
-}
-
-trait Avg {
-    fn avg(self, other: Self) -> Self;
-}
-
-trait Averageable:
-    Add<Output = Self> + Shr<Output = Self> + From<u8> + Rem<Output = Self> + Copy
-{
-}
-
-impl Averageable for i32 {}
-
-#[cfg(feature = "network_radix")]
-impl Avg for U256 {
-    fn avg(self, other: Self) -> Self {
-        let one = 1u32;
-        let two = U256::from(2u8);
-
-        self.shr(one) + other.shr(one) + (self % two + other % two).shr(one)
-    }
-}
-
-#[cfg(not(feature = "network_radix"))]
-impl Averageable for U256 {}
-
-impl<T> Avg for T
-where
-    T: Averageable,
-{
-    fn avg(self, other: Self) -> Self {
-        let one = T::from(1);
-        let two = T::from(2);
-
-        self.shr(one) + other.shr(one) + (self % two + other % two).shr(one)
-    }
-}
-
-impl<T> Median for Vec<T>
-where
-    T: Copy + Ord + Avg,
-{
-    type Item = T;
-
-    fn median(self) -> Self::Item {
-        let len = self.len();
-
-        match len.assert_or_revert(|x| *x > 0, |_| ArrayIsEmpty) {
-            1 => self[0],
-            2 => self[0].avg(self[1]),
-            3 => maybe_pick_median(self[0], self[1], self[2]).unwrap_or_else(|| {
-                maybe_pick_median(self[1], self[0], self[2])
-                    .unwrap_or_else(|| maybe_pick_median(self[1], self[2], self[0]).unwrap())
-            }),
-            _ => {
-                let mut values = self;
-                values.sort();
-
-                let mid = len / 2;
-
-                if len % 2 == 0 {
-                    values[mid - 1].avg(values[mid])
-                } else {
-                    values[mid]
-                }
-            }
-        }
-    }
-}
-
-#[inline]
-fn maybe_pick_median<T>(a: T, b: T, c: T) -> Option<T>
-where
-    T: PartialOrd,
-{
-    if (b >= a && b <= c) || (b >= c && b <= a) {
-        Some(b)
-    } else {
-        None
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use super::{Avg, Median};
-    use crate::network::specific::U256;
-    use itertools::Itertools;
-    use std::fmt::Debug;
-
-    #[cfg(feature = "network_radix")]
-    use crate::network::radix::u256_ext::U256Ext;
-
-    #[allow(clippy::legacy_numeric_constants)]
-    #[test]
-    fn test_avg() {
-        let u256 = U256::max_value(); // 115792089237316195423570985008687907853269984665640564039457584007913129639935
-        let u256_max_sub_1 = u256 - U256::from(1u32);
-        let u256max_div_2 = u256 / U256::from(2u32);
-
-        assert_eq!(u256.avg(U256::from(0u8)), u256max_div_2);
-        assert_eq!(u256.avg(U256::from(1u8)), u256max_div_2 + U256::from(1u8));
-        assert_eq!(u256.avg(u256_max_sub_1), u256_max_sub_1);
-        assert_eq!(u256.avg(u256), u256);
-
-        assert_eq!((u256_max_sub_1).avg(U256::from(0u8)), u256max_div_2);
-        assert_eq!((u256_max_sub_1).avg(U256::from(1u8)), u256max_div_2);
-        assert_eq!((u256_max_sub_1).avg(u256_max_sub_1), u256_max_sub_1);
-        assert_eq!((u256_max_sub_1).avg(u256), u256_max_sub_1);
-    }
-
-    #[test]
-    #[should_panic(expected = "Array is empty")]
-    fn test_median_empty_vector() {
-        let vec: Vec<i32> = vec![];
-
-        vec.median();
-    }
-
-    #[test]
-    fn test_median_single_element() {
-        assert_eq!(vec![1].median(), 1);
-    }
-
-    #[test]
-    fn test_median_two_elements() {
-        test_all_permutations(vec![1, 3], 2);
-        test_all_permutations(vec![1, 2], 1);
-        test_all_permutations(vec![1, 1], 1);
-    }
-
-    #[test]
-    fn test_median_three_elements() {
-        test_all_permutations(vec![1, 2, 3], 2);
-        test_all_permutations(vec![1, 1, 2], 1);
-        test_all_permutations(vec![1, 2, 2], 2);
-        test_all_permutations(vec![1, 1, 1], 1);
-    }
-
-    #[test]
-    fn test_median_even_number_of_elements() {
-        test_all_permutations(vec![1, 2, 3, 4], 2);
-        test_all_permutations(vec![1, 2, 4, 4], 3);
-        test_all_permutations(vec![1, 1, 3, 3], 2);
-        test_all_permutations(vec![1, 1, 3, 4], 2);
-        test_all_permutations(vec![1, 1, 1, 3], 1);
-        test_all_permutations(vec![1, 3, 3, 3], 3);
-        test_all_permutations(vec![1, 1, 1, 1], 1);
-        test_all_permutations(vec![1, 2, 3, 4, 5, 6], 3);
-    }
-
-    #[test]
-    fn test_median_odd_number_of_elements() {
-        test_all_permutations(vec![1, 2, 3, 4, 5], 3);
-        test_all_permutations(vec![1, 1, 3, 4, 5], 3);
-        test_all_permutations(vec![1, 1, 1, 4, 5], 1);
-        test_all_permutations(vec![1, 1, 1, 3, 3], 1);
-        test_all_permutations(vec![1, 1, 3, 3, 5], 3);
-
-        test_all_permutations(vec![1, 2, 3, 5, 5], 3);
-        test_all_permutations(vec![1, 2, 5, 5, 5], 5);
-        test_all_permutations(vec![1, 1, 3, 3, 3], 3);
-        test_all_permutations(vec![1, 3, 3, 5, 5], 3);
-
-        test_all_permutations(vec![1, 2, 2, 2, 2], 2);
-        test_all_permutations(vec![1, 1, 1, 1, 2], 1);
-        test_all_permutations(vec![1, 1, 1, 1, 1], 1);
-
-        test_all_permutations(vec![1, 2, 3, 4, 5, 6, 7], 4);
-    }
-
-    fn test_all_permutations<T: Copy + Ord + Avg + Debug>(numbers: Vec<T>, expected_value: T) {
-        let perms: Vec<Vec<_>> = numbers.iter().permutations(numbers.len()).collect();
-
-        for perm in perms {
-            let p: Vec<_> = perm.iter().map(|&&v| v).collect();
-
-            assert_eq!(p.median(), expected_value);
-        }
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/utils/mod.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/utils/mod.rs.html deleted file mode 100644 index 44258e67..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/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/doc/src/redstone/utils/trim.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/utils/trim.rs.html deleted file mode 100644 index 551a41a8..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/utils/trim.rs.html +++ /dev/null @@ -1,299 +0,0 @@ -trim.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-
use crate::network::{
-    assert::Unwrap, error::Error, from_bytes_repr::FromBytesRepr, specific::U256,
-};
-
-pub trait Trim<T>
-where
-    Self: Sized,
-{
-    fn trim_end(&mut self, len: usize) -> T;
-}
-
-impl Trim<Vec<u8>> for Vec<u8> {
-    fn trim_end(&mut self, len: usize) -> Self {
-        if len >= self.len() {
-            std::mem::take(self)
-        } else {
-            self.split_off(self.len() - len)
-        }
-    }
-}
-
-impl Trim<U256> for Vec<u8> {
-    fn trim_end(&mut self, len: usize) -> U256 {
-        U256::from_bytes_repr(self.trim_end(len))
-    }
-}
-
-impl Trim<usize> for Vec<u8> {
-    fn trim_end(&mut self, len: usize) -> usize {
-        let y: U256 = self.trim_end(len);
-        y.try_into().unwrap_or_revert(|_| Error::NumberOverflow(y))
-    }
-}
-
-impl Trim<u64> for Vec<u8> {
-    fn trim_end(&mut self, len: usize) -> u64 {
-        let y: U256 = self.trim_end(len);
-        y.try_into().unwrap_or_revert(|_| Error::NumberOverflow(y))
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use crate::{
-        network::specific::U256,
-        protocol::constants::{REDSTONE_MARKER, REDSTONE_MARKER_BS},
-        utils::trim::Trim,
-    };
-
-    const MARKER_DECIMAL: u64 = 823907890102272;
-
-    fn redstone_marker_bytes() -> Vec<u8> {
-        REDSTONE_MARKER.into()
-    }
-
-    #[test]
-    fn test_trim_end_number() {
-        let (rest, result): (_, U256) = test_trim_end(3);
-        assert_eq!(result, (256u32.pow(2) * 30).into());
-        assert_eq!(rest.as_slice(), &REDSTONE_MARKER[..6]);
-
-        let (_, result): (_, u64) = test_trim_end(3);
-        assert_eq!(result, 256u64.pow(2) * 30);
-
-        let (_, result): (_, usize) = test_trim_end(3);
-        assert_eq!(result, 256usize.pow(2) * 30);
-
-        let (_, result): (_, Vec<u8>) = test_trim_end(3);
-        assert_eq!(result.as_slice(), &REDSTONE_MARKER[6..]);
-    }
-
-    #[test]
-    fn test_trim_end_number_null() {
-        let (rest, result): (_, U256) = test_trim_end(0);
-        assert_eq!(result, 0u32.into());
-        assert_eq!(rest.as_slice(), &REDSTONE_MARKER);
-
-        let (_, result): (_, u64) = test_trim_end(0);
-        assert_eq!(result, 0);
-
-        let (_, result): (_, usize) = test_trim_end(0);
-        assert_eq!(result, 0);
-
-        let (_, result): (_, Vec<u8>) = test_trim_end(0);
-        assert_eq!(result, Vec::<u8>::new());
-    }
-
-    #[test]
-    fn test_trim_end_whole() {
-        test_trim_end_whole_size(REDSTONE_MARKER_BS);
-        test_trim_end_whole_size(REDSTONE_MARKER_BS - 1);
-        test_trim_end_whole_size(REDSTONE_MARKER_BS - 2);
-        test_trim_end_whole_size(REDSTONE_MARKER_BS + 1);
-    }
-
-    fn test_trim_end_whole_size(size: usize) {
-        let (rest, result): (_, U256) = test_trim_end(size);
-        assert_eq!(result, MARKER_DECIMAL.into());
-        assert_eq!(
-            rest.as_slice().len(),
-            REDSTONE_MARKER_BS - size.min(REDSTONE_MARKER_BS)
-        );
-
-        let (_, result): (_, u64) = test_trim_end(size);
-        assert_eq!(result, MARKER_DECIMAL);
-
-        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));
-    }
-
-    #[test]
-    fn test_trim_end_u64() {
-        let mut bytes = vec![255, 255, 255, 255, 255, 255, 255, 255, 255];
-        let x: u64 = bytes.trim_end(8);
-
-        let expected_bytes = vec![255];
-
-        assert_eq!(bytes, expected_bytes);
-        assert_eq!(x, 18446744073709551615);
-    }
-
-    #[should_panic(expected = "Number overflow: 18591708106338011145")]
-    #[test]
-    fn test_trim_end_u64_overflow() {
-        let mut bytes = vec![1u8, 2, 3, 4, 5, 6, 7, 8, 9];
-
-        let _: u64 = bytes.trim_end(9);
-    }
-
-    #[allow(dead_code)]
-    trait TestTrimEnd<T>
-    where
-        Self: Sized,
-    {
-        fn test_trim_end(size: usize) -> (Self, T);
-    }
-
-    fn test_trim_end<T>(size: usize) -> (Vec<u8>, T)
-    where
-        Vec<u8>: Trim<T>,
-    {
-        let mut bytes = redstone_marker_bytes();
-        let rest = bytes.trim_end(size);
-        (bytes, rest)
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/utils/trim_zeros.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/utils/trim_zeros.rs.html deleted file mode 100644 index 0d223de1..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/src/redstone/utils/trim_zeros.rs.html +++ /dev/null @@ -1,91 +0,0 @@ -trim_zeros.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
-
pub trait TrimZeros {
-    fn trim_zeros(self) -> Self;
-}
-
-impl TrimZeros for Vec<u8> {
-    fn trim_zeros(self) -> Self {
-        let mut res = self.len();
-
-        for i in (0..self.len()).rev() {
-            if self[i] != 0 {
-                break;
-            }
-
-            res = i;
-        }
-
-        let (rest, _) = self.split_at(res);
-
-        rest.into()
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use crate::{protocol::constants::REDSTONE_MARKER, utils::trim_zeros::TrimZeros};
-
-    fn redstone_marker_bytes() -> Vec<u8> {
-        REDSTONE_MARKER.as_slice().into()
-    }
-
-    #[test]
-    fn test_trim_zeros() {
-        let trimmed = redstone_marker_bytes().trim_zeros();
-        assert_eq!(trimmed.as_slice(), &REDSTONE_MARKER[..7]);
-
-        let trimmed = trimmed.trim_zeros();
-        assert_eq!(trimmed.as_slice(), &REDSTONE_MARKER[..7]);
-    }
-
-    #[test]
-    fn test_trim_zeros_empty() {
-        let trimmed = Vec::<u8>::default().trim_zeros();
-        assert_eq!(trimmed, Vec::<u8>::default());
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/COPYRIGHT-23e9bde6c69aea69.txt b/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/COPYRIGHT-23e9bde6c69aea69.txt deleted file mode 100644 index 1447df79..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/COPYRIGHT-23e9bde6c69aea69.txt +++ /dev/null @@ -1,50 +0,0 @@ -# REUSE-IgnoreStart - -These documentation pages include resources by third parties. This copyright -file applies only to those resources. The following third party resources are -included, and carry their own copyright notices and license terms: - -* Fira Sans (FiraSans-Regular.woff2, FiraSans-Medium.woff2): - - Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ - with Reserved Font Name Fira Sans. - - Copyright (c) 2014, Telefonica S.A. - - Licensed under the SIL Open Font License, Version 1.1. - See FiraSans-LICENSE.txt. - -* rustdoc.css, main.js, and playpen.js: - - Copyright 2015 The Rust Developers. - Licensed under the Apache License, Version 2.0 (see LICENSE-APACHE.txt) or - the MIT license (LICENSE-MIT.txt) at your option. - -* normalize.css: - - Copyright (c) Nicolas Gallagher and Jonathan Neal. - Licensed under the MIT license (see LICENSE-MIT.txt). - -* Source Code Pro (SourceCodePro-Regular.ttf.woff2, - SourceCodePro-Semibold.ttf.woff2, SourceCodePro-It.ttf.woff2): - - Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), - with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark - of Adobe Systems Incorporated in the United States and/or other countries. - - Licensed under the SIL Open Font License, Version 1.1. - See SourceCodePro-LICENSE.txt. - -* Source Serif 4 (SourceSerif4-Regular.ttf.woff2, SourceSerif4-Bold.ttf.woff2, - SourceSerif4-It.ttf.woff2): - - Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name - 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United - States and/or other countries. - - Licensed under the SIL Open Font License, Version 1.1. - See SourceSerif4-LICENSE.md. - -This copyright file is intended to be distributed with rustdoc output. - -# REUSE-IgnoreEnd diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/FiraSans-LICENSE-db4b642586e02d97.txt b/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/FiraSans-LICENSE-db4b642586e02d97.txt deleted file mode 100644 index d7e9c149..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/FiraSans-LICENSE-db4b642586e02d97.txt +++ /dev/null @@ -1,98 +0,0 @@ -// REUSE-IgnoreStart - -Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. -with Reserved Font Name < Fira >, - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. - -// REUSE-IgnoreEnd diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 b/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 deleted file mode 100644 index 7a1e5fc5..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 b/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 deleted file mode 100644 index e766e06c..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt b/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt deleted file mode 100644 index 16fe87b0..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/LICENSE-MIT-65090b722b3f6c56.txt b/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/LICENSE-MIT-65090b722b3f6c56.txt deleted file mode 100644 index 31aa7938..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/LICENSE-MIT-65090b722b3f6c56.txt +++ /dev/null @@ -1,23 +0,0 @@ -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 b/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 deleted file mode 100644 index 1866ad4b..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt b/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt deleted file mode 100644 index 4b3edc29..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt +++ /dev/null @@ -1,103 +0,0 @@ -// REUSE-IgnoreStart - -Copyright (c) 2010, NAVER Corporation (https://www.navercorp.com/), - -with Reserved Font Name Nanum, Naver Nanum, NanumGothic, Naver NanumGothic, -NanumMyeongjo, Naver NanumMyeongjo, NanumBrush, Naver NanumBrush, NanumPen, -Naver NanumPen, Naver NanumGothicEco, NanumGothicEco, Naver NanumMyeongjoEco, -NanumMyeongjoEco, Naver NanumGothicLight, NanumGothicLight, NanumBarunGothic, -Naver NanumBarunGothic, NanumSquareRound, NanumBarunPen, MaruBuri - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. - -// REUSE-IgnoreEnd diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 b/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 deleted file mode 100644 index 462c34ef..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt b/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt deleted file mode 100644 index 0d2941e1..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt +++ /dev/null @@ -1,97 +0,0 @@ -// REUSE-IgnoreStart - -Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. - -This Font Software is licensed under the SIL Open Font License, Version 1.1. - -This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. - -// REUSE-IgnoreEnd diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 b/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 deleted file mode 100644 index 10b558e0..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 b/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 deleted file mode 100644 index 5ec64eef..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 b/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 deleted file mode 100644 index 181a07f6..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 b/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 deleted file mode 100644 index 2ae08a7b..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md b/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md deleted file mode 100644 index 175fa4f4..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md +++ /dev/null @@ -1,98 +0,0 @@ - - -Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. -Copyright 2014 - 2023 Adobe (http://www.adobe.com/), with Reserved Font Name ‘Source’. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. - -This Font Software is licensed under the SIL Open Font License, Version 1.1. - -This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. - - diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 b/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 deleted file mode 100644 index 0263fc30..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/favicon-2c020d218678b618.svg b/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/favicon-2c020d218678b618.svg deleted file mode 100644 index 8b34b511..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/favicon-2c020d218678b618.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/favicon-32x32-422f7d1d52889060.png b/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/favicon-32x32-422f7d1d52889060.png deleted file mode 100644 index 69b8613c..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/favicon-32x32-422f7d1d52889060.png and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/main-20a3ad099b048cf2.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/main-20a3ad099b048cf2.js deleted file mode 100644 index 133116e4..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/main-20a3ad099b048cf2.js +++ /dev/null @@ -1,11 +0,0 @@ -"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;if(path===current_page){link.className="current"}link.textContent=name;const li=document.createElement("li");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/doc/static.files/normalize-76eba96aa4d2e634.css b/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/normalize-76eba96aa4d2e634.css deleted file mode 100644 index 469959f1..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/normalize-76eba96aa4d2e634.css +++ /dev/null @@ -1,2 +0,0 @@ - /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ -html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type="button"],[type="reset"],[type="submit"],button{-webkit-appearance:button}[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none} \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/noscript-df360f571f6edeae.css b/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/noscript-df360f571f6edeae.css deleted file mode 100644 index 4c310ae5..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/noscript-df360f571f6edeae.css +++ /dev/null @@ -1 +0,0 @@ - #main-content .attributes{margin-left:0 !important;}#copy-path,#sidebar-button,.sidebar-resizer{display:none !important;}nav.sub{display:none;}.src .sidebar{display:none;}.notable-traits{display:none;}:root,: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%);}@media (prefers-color-scheme:dark){:root,:root:not([data-theme]){--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;--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%);}} \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/rust-logo-151179464ae7ed46.svg b/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/rust-logo-151179464ae7ed46.svg deleted file mode 100644 index 62424d8f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/rust-logo-151179464ae7ed46.svg +++ /dev/null @@ -1,61 +0,0 @@ - - - diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/rustdoc-dd39b87e5fcfba68.css b/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/rustdoc-dd39b87e5fcfba68.css deleted file mode 100644 index 77f89832..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/rustdoc-dd39b87e5fcfba68.css +++ /dev/null @@ -1,46 +0,0 @@ - :root{--nav-sub-mobile-padding:8px;--search-typename-width:6.75rem;--desktop-sidebar-width:200px;--src-sidebar-width:300px;--desktop-sidebar-z-index:100;}@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-left:-0.25rem;margin-right:0.25rem;}.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:24px;}.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 -16px 0 -16px;text-align:center;}.sidebar-crate h2 a{display:block;margin:0 calc(-24px + 0.25rem) 0 -0.2rem;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);}}@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/doc/static.files/scrape-examples-ef1e698c1d417c0c.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/scrape-examples-ef1e698c1d417c0c.js deleted file mode 100644 index ba830e37..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/scrape-examples-ef1e698c1d417c0c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(function(){const DEFAULT_MAX_LINES=5;const HIDDEN_MAX_LINES=10;function scrollToLoc(elt,loc,isHidden){const lines=elt.querySelector(".src-line-numbers");let scrollOffset;const maxLines=isHidden?HIDDEN_MAX_LINES:DEFAULT_MAX_LINES;if(loc[1]-loc[0]>maxLines){const line=Math.max(0,loc[0]-1);scrollOffset=lines.children[line].offsetTop}else{const wrapper=elt.querySelector(".code-wrapper");const halfHeight=wrapper.offsetHeight/2;const offsetTop=lines.children[loc[0]].offsetTop;const lastLine=lines.children[loc[1]];const offsetBot=lastLine.offsetTop+lastLine.offsetHeight;const offsetMid=(offsetTop+offsetBot)/2;scrollOffset=offsetMid-halfHeight}lines.scrollTo(0,scrollOffset);elt.querySelector(".rust").scrollTo(0,scrollOffset)}function updateScrapedExample(example,isHidden){const locs=JSON.parse(example.attributes.getNamedItem("data-locs").textContent);let locIndex=0;const highlights=Array.prototype.slice.call(example.querySelectorAll(".highlight"));const link=example.querySelector(".scraped-example-title a");if(locs.length>1){const onChangeLoc=changeIndex=>{removeClass(highlights[locIndex],"focus");changeIndex();scrollToLoc(example,locs[locIndex][0],isHidden);addClass(highlights[locIndex],"focus");const url=locs[locIndex][1];const title=locs[locIndex][2];link.href=url;link.innerHTML=title};example.querySelector(".prev").addEventListener("click",()=>{onChangeLoc(()=>{locIndex=(locIndex-1+locs.length)%locs.length})});example.querySelector(".next").addEventListener("click",()=>{onChangeLoc(()=>{locIndex=(locIndex+1)%locs.length})})}const expandButton=example.querySelector(".expand");if(expandButton){expandButton.addEventListener("click",()=>{if(hasClass(example,"expanded")){removeClass(example,"expanded");scrollToLoc(example,locs[0][0],isHidden)}else{addClass(example,"expanded")}})}scrollToLoc(example,locs[0][0],isHidden)}const firstExamples=document.querySelectorAll(".scraped-example-list > .scraped-example");onEachLazy(firstExamples,el=>updateScrapedExample(el,false));onEachLazy(document.querySelectorAll(".more-examples-toggle"),toggle=>{onEachLazy(toggle.querySelectorAll(".toggle-line, .hide-more"),button=>{button.addEventListener("click",()=>{toggle.open=false})});const moreExamples=toggle.querySelectorAll(".scraped-example");toggle.querySelector("summary").addEventListener("click",()=>{setTimeout(()=>{onEachLazy(moreExamples,el=>updateScrapedExample(el,true))})},{once:true})})})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/search-d52510db62a78183.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/search-d52510db62a78183.js deleted file mode 100644 index a2824f29..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/search-d52510db62a78183.js +++ /dev/null @@ -1,5 +0,0 @@ -"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;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 isIdentCharacter(c){return(c==="_"||(c>="0"&&c<="9")||(c>="a"&&c<="z")||(c>="A"&&c<="Z"))}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){const start=parserState.pos;let end=parserState.pos;let foundExclamation=-1;while(parserState.pos0){throw["Unexpected ",c," after ",parserState.userQuery[parserState.pos-1]]}else{throw["Unexpected ",c]}}parserState.pos+=1;end=parserState.pos}if(foundExclamation!==-1&&foundExclamation!==start&&isIdentCharacter(parserState.userQuery[foundExclamation-1])){if(parserState.typeFilter===null){parserState.typeFilter="macro"}else if(parserState.typeFilter!=="macro"){throw["Invalid search type: macro ","!"," and ",parserState.typeFilter," both specified",]}end=foundExclamation}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();for(const c in query){if(!isIdentCharacter(query[c])){throw["Unexpected ",query[c]," 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,}}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{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(pushFunc);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){if(typeNameIdMap.has(elem.normalizedPathLast)&&(isAssocType||!typeNameIdMap.get(elem.normalizedPathLast).assocOnly)){elem.id=typeNameIdMap.get(elem.normalizedPathLast).id}else if(!parsedQuery.literalSearch){let match=null;let matchDist=maxEditDistance+1;let matchName="";for(const[name,{id,assocOnly}]of typeNameIdMap){const dist=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(){const cb="}".charCodeAt(0);let c=this.string.charCodeAt(this.offset);const ret=[];while(c!==cb){ret.push(this.decode());c=this.string.charCodeAt(this.offset)}this.offset+=1;return ret}decode(){const[ob,la]=["{","`"].map(c=>c.charCodeAt(0));let n=0;let c=this.string.charCodeAt(this.offset);if(c===ob){this.offset+=1;return this.decodeList()}while(c>1];this.offset+=1;return sign?-value:value}next(){const c=this.string.charCodeAt(this.offset);const[zero,ua,la]=["0","@","`"].map(c=>c.charCodeAt(0));if(c>=zero&&c16){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();const charA="A".charCodeAt(0);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)-charA,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/doc/static.files/settings-4313503d2e1961c2.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/settings-4313503d2e1961c2.js deleted file mode 100644 index ab425fe4..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/settings-4313503d2e1961c2.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict";(function(){const isSettingsPage=window.location.pathname.endsWith("/settings.html");function changeSetting(settingName,value){if(settingName==="theme"){const useSystem=value==="system preference"?"true":"false";updateLocalStorage("use-system-theme",useSystem)}updateLocalStorage(settingName,value);switch(settingName){case"theme":case"preferred-dark-theme":case"preferred-light-theme":updateTheme();updateLightAndDark();break;case"line-numbers":if(value===true){window.rustdoc_add_line_numbers_to_examples()}else{window.rustdoc_remove_line_numbers_from_examples()}break;case"hide-sidebar":if(value===true){addClass(document.documentElement,"hide-sidebar")}else{removeClass(document.documentElement,"hide-sidebar")}break}}function showLightAndDark(){removeClass(document.getElementById("preferred-light-theme"),"hidden");removeClass(document.getElementById("preferred-dark-theme"),"hidden")}function hideLightAndDark(){addClass(document.getElementById("preferred-light-theme"),"hidden");addClass(document.getElementById("preferred-dark-theme"),"hidden")}function updateLightAndDark(){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||(useSystem===null&&getSettingValue("theme")===null)){showLightAndDark()}else{hideLightAndDark()}}function setEvents(settingsElement){updateLightAndDark();onEachLazy(settingsElement.querySelectorAll("input[type=\"checkbox\"]"),toggle=>{const settingId=toggle.id;const settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=()=>{changeSetting(toggle.id,toggle.checked)}});onEachLazy(settingsElement.querySelectorAll("input[type=\"radio\"]"),elem=>{const settingId=elem.name;let settingValue=getSettingValue(settingId);if(settingId==="theme"){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||settingValue===null){settingValue=useSystem==="false"?"light":"system preference"}}if(settingValue!==null&&settingValue!=="null"){elem.checked=settingValue===elem.value}elem.addEventListener("change",ev=>{changeSetting(ev.target.name,ev.target.value)})})}function buildSettingsPageSections(settings){let output="";for(const setting of settings){const js_data_name=setting["js_name"];const setting_name=setting["name"];if(setting["options"]!==undefined){output+=`\ -
-
${setting_name}
-
`;onEach(setting["options"],option=>{const checked=option===setting["default"]?" checked":"";const full=`${js_data_name}-${option.replace(/ /g,"-")}`;output+=`\ - `});output+=`\ -
-
`}else{const checked=setting["default"]===true?" checked":"";output+=`\ -
\ - \ -
`}}return output}function buildSettingsPage(){const theme_names=getVar("themes").split(",").filter(t=>t);theme_names.push("light","dark","ayu");const settings=[{"name":"Theme","js_name":"theme","default":"system preference","options":theme_names.concat("system preference"),},{"name":"Preferred light theme","js_name":"preferred-light-theme","default":"light","options":theme_names,},{"name":"Preferred dark theme","js_name":"preferred-dark-theme","default":"dark","options":theme_names,},{"name":"Auto-hide item contents for large items","js_name":"auto-hide-large-items","default":true,},{"name":"Auto-hide item methods' documentation","js_name":"auto-hide-method-docs","default":false,},{"name":"Auto-hide trait implementation documentation","js_name":"auto-hide-trait-implementations","default":false,},{"name":"Directly go to item in search if there is only one result","js_name":"go-to-only-result","default":false,},{"name":"Show line numbers on code examples","js_name":"line-numbers","default":false,},{"name":"Hide persistent navigation bar","js_name":"hide-sidebar","default":false,},{"name":"Disable keyboard shortcuts","js_name":"disable-shortcuts","default":false,},];const elementKind=isSettingsPage?"section":"div";const innerHTML=`
${buildSettingsPageSections(settings)}
`;const el=document.createElement(elementKind);el.id="settings";if(!isSettingsPage){el.className="popover"}el.innerHTML=innerHTML;if(isSettingsPage){document.getElementById(MAIN_ID).appendChild(el)}else{el.setAttribute("tabindex","-1");getSettingsButton().appendChild(el)}return el}const settingsMenu=buildSettingsPage();function displaySettings(){settingsMenu.style.display="";onEachLazy(settingsMenu.querySelectorAll("input[type='checkbox']"),el=>{const val=getSettingValue(el.id);const checked=val==="true";if(checked!==el.checked&&val!==null){el.checked=checked}})}function settingsBlurHandler(event){blurHandler(event,getSettingsButton(),window.hidePopoverMenus)}if(isSettingsPage){getSettingsButton().onclick=event=>{event.preventDefault()}}else{const settingsButton=getSettingsButton();const settingsMenu=document.getElementById("settings");settingsButton.onclick=event=>{if(settingsMenu.contains(event.target)){return}event.preventDefault();const shouldDisplaySettings=settingsMenu.style.display==="none";window.hideAllModals();if(shouldDisplaySettings){displaySettings()}};settingsButton.onblur=settingsBlurHandler;settingsButton.querySelector("a").onblur=settingsBlurHandler;onEachLazy(settingsMenu.querySelectorAll("input"),el=>{el.onblur=settingsBlurHandler});settingsMenu.onblur=settingsBlurHandler}setTimeout(()=>{setEvents(settingsMenu);if(!isSettingsPage){displaySettings()}removeClass(getSettingsButton(),"rotate")},0)})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/src-script-e66d777a5a92e9b2.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/src-script-e66d777a5a92e9b2.js deleted file mode 100644 index d0aebb85..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/src-script-e66d777a5a92e9b2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(function(){const rootPath=getVar("root-path");const NAME_OFFSET=0;const DIRS_OFFSET=1;const FILES_OFFSET=2;const RUSTDOC_MOBILE_BREAKPOINT=700;function closeSidebarIfMobile(){if(window.innerWidth{removeClass(document.documentElement,"src-sidebar-expanded");updateLocalStorage("source-sidebar-show","false")};window.rustdocShowSourceSidebar=()=>{addClass(document.documentElement,"src-sidebar-expanded");updateLocalStorage("source-sidebar-show","true")};window.rustdocToggleSrcSidebar=()=>{if(document.documentElement.classList.contains("src-sidebar-expanded")){window.rustdocCloseSourceSidebar()}else{window.rustdocShowSourceSidebar()}};function createSrcSidebar(){const container=document.querySelector("nav.sidebar");const sidebar=document.createElement("div");sidebar.id="src-sidebar";let hasFoundFile=false;for(const[key,source]of srcIndex){source[NAME_OFFSET]=key;hasFoundFile=createDirEntry(source,sidebar,"",hasFoundFile)}container.appendChild(sidebar);const selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}}function highlightSrcLines(){const match=window.location.hash.match(/^#?(\d+)(?:-(\d+))?$/);if(!match){return}let from=parseInt(match[1],10);let to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to{onEachLazy(e.getElementsByTagName("a"),i_e=>{removeClass(i_e,"line-highlighted")})});for(let i=from;i<=to;++i){elem=document.getElementById(i);if(!elem){break}addClass(elem,"line-highlighted")}}const handleSrcHighlight=(function(){let prev_line_id=0;const set_fragment=name=>{const x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSrcLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return ev=>{let cur_line_id=parseInt(ev.target.id,10);if(isNaN(cur_line_id)||ev.ctrlKey||ev.altKey||ev.metaKey){return}ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){const tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());window.addEventListener("hashchange",highlightSrcLines);onEachLazy(document.getElementsByClassName("src-line-numbers"),el=>{el.addEventListener("click",handleSrcHighlight)});highlightSrcLines();window.createSrcSidebar=createSrcSidebar})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/storage-118b08c4c78b968e.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/storage-118b08c4c78b968e.js deleted file mode 100644 index 98189467..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/static.files/storage-118b08c4c78b968e.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict";const builtinThemes=["light","dark","ayu"];const darkThemes=["dark","ayu"];window.currentTheme=document.getElementById("themeStyle");const settingsDataset=(function(){const settingsElement=document.getElementById("default-settings");return settingsElement&&settingsElement.dataset?settingsElement.dataset:null})();function getSettingValue(settingName){const current=getCurrentValue(settingName);if(current===null&&settingsDataset!==null){const def=settingsDataset[settingName.replace(/-/g,"_")];if(def!==undefined){return def}}return current}const localStoredTheme=getSettingValue("theme");function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(elem&&elem.classList){elem.classList.add(className)}}function removeClass(elem,className){if(elem&&elem.classList){elem.classList.remove(className)}}function onEach(arr,func){for(const elem of arr){if(func(elem)){return true}}return false}function onEachLazy(lazyArray,func){return onEach(Array.prototype.slice.call(lazyArray),func)}function updateLocalStorage(name,value){try{window.localStorage.setItem("rustdoc-"+name,value)}catch(e){}}function getCurrentValue(name){try{return window.localStorage.getItem("rustdoc-"+name)}catch(e){return null}}const getVar=(function getVar(name){const el=document.querySelector("head > meta[name='rustdoc-vars']");return el?el.attributes["data-"+name].value:null});function switchTheme(newThemeName,saveTheme){const themeNames=getVar("themes").split(",").filter(t=>t);themeNames.push(...builtinThemes);if(themeNames.indexOf(newThemeName)===-1){return}if(saveTheme){updateLocalStorage("theme",newThemeName)}document.documentElement.setAttribute("data-theme",newThemeName);if(builtinThemes.indexOf(newThemeName)!==-1){if(window.currentTheme){window.currentTheme.parentNode.removeChild(window.currentTheme);window.currentTheme=null}}else{const newHref=getVar("root-path")+encodeURIComponent(newThemeName)+getVar("resource-suffix")+".css";if(!window.currentTheme){if(document.readyState==="loading"){document.write(``);window.currentTheme=document.getElementById("themeStyle")}else{window.currentTheme=document.createElement("link");window.currentTheme.rel="stylesheet";window.currentTheme.id="themeStyle";window.currentTheme.href=newHref;document.documentElement.appendChild(window.currentTheme)}}else if(newHref!==window.currentTheme.href){window.currentTheme.href=newHref}}}const updateTheme=(function(){const mql=window.matchMedia("(prefers-color-scheme: dark)");function updateTheme(){if(getSettingValue("use-system-theme")!=="false"){const lightTheme=getSettingValue("preferred-light-theme")||"light";const darkTheme=getSettingValue("preferred-dark-theme")||"dark";updateLocalStorage("use-system-theme","true");switchTheme(mql.matches?darkTheme:lightTheme,true)}else{switchTheme(getSettingValue("theme"),false)}}mql.addEventListener("change",updateTheme);return updateTheme})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("preferred-dark-theme",localStoredTheme)}}updateTheme();if(getSettingValue("source-sidebar-show")==="true"){addClass(document.documentElement,"src-sidebar-expanded")}if(getSettingValue("hide-sidebar")==="true"){addClass(document.documentElement,"hide-sidebar")}function updateSidebarWidth(){const desktopSidebarWidth=getSettingValue("desktop-sidebar-width");if(desktopSidebarWidth&&desktopSidebarWidth!=="null"){document.documentElement.style.setProperty("--desktop-sidebar-width",desktopSidebarWidth+"px",)}const srcSidebarWidth=getSettingValue("src-sidebar-width");if(srcSidebarWidth&&srcSidebarWidth!=="null"){document.documentElement.style.setProperty("--src-sidebar-width",srcSidebarWidth+"px",)}}updateSidebarWidth();window.addEventListener("pageshow",ev=>{if(ev.persisted){setTimeout(updateTheme,0);setTimeout(updateSidebarWidth,0)}});class RustdocSearchElement extends HTMLElement{constructor(){super()}connectedCallback(){const rootPath=getVar("root-path");const currentCrate=getVar("current-crate");this.innerHTML=``}}window.customElements.define("rustdoc-search",RustdocSearchElement) \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/clone/trait.Clone.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/clone/trait.Clone.js deleted file mode 100644 index 270a1587..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/clone/trait.Clone.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"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/doc/trait.impl/core/cmp/trait.Eq.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/cmp/trait.Eq.js deleted file mode 100644 index a573550b..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/cmp/trait.Eq.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"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/doc/trait.impl/core/cmp/trait.PartialEq.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/cmp/trait.PartialEq.js deleted file mode 100644 index 695eda8f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/cmp/trait.PartialEq.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"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/doc/trait.impl/core/convert/trait.From.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/convert/trait.From.js deleted file mode 100644 index 92afa7bb..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/convert/trait.From.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"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/doc/trait.impl/core/fmt/trait.Debug.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/fmt/trait.Debug.js deleted file mode 100644 index f544c767..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/fmt/trait.Debug.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]] -};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/doc/trait.impl/core/fmt/trait.Display.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/fmt/trait.Display.js deleted file mode 100644 index 899cd7d8..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/fmt/trait.Display.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"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/doc/trait.impl/core/marker/trait.Freeze.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/marker/trait.Freeze.js deleted file mode 100644 index 2ec0218e..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/marker/trait.Freeze.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]]] -};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/doc/trait.impl/core/marker/trait.Send.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/marker/trait.Send.js deleted file mode 100644 index e17567a7..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/marker/trait.Send.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]]] -};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/doc/trait.impl/core/marker/trait.StructuralPartialEq.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/marker/trait.StructuralPartialEq.js deleted file mode 100644 index 19408b71..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/marker/trait.StructuralPartialEq.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"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/doc/trait.impl/core/marker/trait.Sync.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/marker/trait.Sync.js deleted file mode 100644 index 8fba0265..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/marker/trait.Sync.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]]] -};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/doc/trait.impl/core/marker/trait.Unpin.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/marker/trait.Unpin.js deleted file mode 100644 index fdff3b25..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/marker/trait.Unpin.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]]] -};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/doc/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js deleted file mode 100644 index 8adf6221..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]]] -};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/doc/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js deleted file mode 100644 index a69fc799..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]]] -};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/doc/trait.impl/redstone/core/validator/trait.Validator.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/core/validator/trait.Validator.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/core/validator/trait.Validator.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/doc/trait.impl/redstone/network/as_str/trait.AsAsciiStr.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/network/as_str/trait.AsAsciiStr.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/network/as_str/trait.AsAsciiStr.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/doc/trait.impl/redstone/network/as_str/trait.AsHexStr.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/network/as_str/trait.AsHexStr.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/network/as_str/trait.AsHexStr.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/doc/trait.impl/redstone/network/assert/trait.Assert.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/network/assert/trait.Assert.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/network/assert/trait.Assert.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/doc/trait.impl/redstone/network/assert/trait.Unwrap.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/network/assert/trait.Unwrap.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/network/assert/trait.Unwrap.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/doc/trait.impl/redstone/network/flattened/trait.Flattened.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/network/flattened/trait.Flattened.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/network/flattened/trait.Flattened.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/doc/trait.impl/redstone/network/from_bytes_repr/trait.FromBytesRepr.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/network/from_bytes_repr/trait.FromBytesRepr.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/network/from_bytes_repr/trait.FromBytesRepr.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/doc/trait.impl/redstone/network/from_bytes_repr/trait.Sanitized.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/network/from_bytes_repr/trait.Sanitized.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/network/from_bytes_repr/trait.Sanitized.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/doc/trait.impl/redstone/network/radix/u256_ext/trait.U256Ext.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/network/radix/u256_ext/trait.U256Ext.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/network/radix/u256_ext/trait.U256Ext.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/doc/trait.impl/redstone/network/specific/trait.NetworkSpecific.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/network/specific/trait.NetworkSpecific.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/network/specific/trait.NetworkSpecific.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/doc/trait.impl/redstone/utils/filter/trait.FilterSome.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/utils/filter/trait.FilterSome.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/utils/filter/trait.FilterSome.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/doc/trait.impl/redstone/utils/median/trait.Averageable.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/utils/median/trait.Averageable.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/utils/median/trait.Averageable.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/doc/trait.impl/redstone/utils/median/trait.Avg.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/utils/median/trait.Avg.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/utils/median/trait.Avg.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/doc/trait.impl/redstone/utils/median/trait.Median.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/utils/median/trait.Median.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/utils/median/trait.Median.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/doc/trait.impl/redstone/utils/trim/trait.Trim.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/utils/trim/trait.Trim.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/utils/trim/trait.Trim.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/doc/trait.impl/redstone/utils/trim_zeros/trait.TrimZeros.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/utils/trim_zeros/trait.TrimZeros.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/trait.impl/redstone/utils/trim_zeros/trait.TrimZeros.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/doc/type.impl/alloc/vec/struct.Vec.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/type.impl/alloc/vec/struct.Vec.js deleted file mode 100644 index 00d2c4fb..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/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,network_radix/doc/type.impl/redstone/network/casper/struct.Casper.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/type.impl/redstone/network/casper/struct.Casper.js deleted file mode 100644 index cadcd6d3..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/type.impl/redstone/network/casper/struct.Casper.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var type_impls = { -"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_radix/doc/type.impl/redstone/network/pure/struct.Std.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/type.impl/redstone/network/pure/struct.Std.js deleted file mode 100644 index b85e8d1d..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/type.impl/redstone/network/pure/struct.Std.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]] -};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/doc/type.impl/redstone/network/radix/struct.Radix.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/type.impl/redstone/network/radix/struct.Radix.js deleted file mode 100644 index f8bbe727..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/type.impl/redstone/network/radix/struct.Radix.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]] -};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/doc/type.impl/redstone/network/type._Network.js b/static/rust/redstone/crypto_secp256k1,network_radix/doc/type.impl/redstone/network/type._Network.js deleted file mode 100644 index 53f96772..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/doc/type.impl/redstone/network/type._Network.js +++ /dev/null @@ -1,3 +0,0 @@ -(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_radix/help.html b/static/rust/redstone/crypto_secp256k1,network_radix/help.html deleted file mode 100644 index f173d86a..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/help.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/all.html deleted file mode 100644 index 552ba979..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/all.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/core/aggregator/fn.aggregate_matrix.html deleted file mode 100644 index 0792edbc..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/aggregator/fn.aggregate_matrix.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/core/aggregator/fn.aggregate_values.html deleted file mode 100644 index 15726f8e..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/aggregator/fn.aggregate_values.html +++ /dev/null @@ -1,25 +0,0 @@ -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.

-

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 -an average of the values, selecting the median, or applying a custom algorithm defined within the -aggregate_matrix function.

-

The primary purpose of this function is to consolidate data from multiple sources into a coherent -and singular value set that adheres to the criteria specified in the Config.

-

§Arguments

-
    -
  • config - A Config instance containing settings and parameters used to guide the aggregation process.
  • -
  • data_packages - A vector of DataPackage instances, each representing a set of values and associated -metadata collected from various sources or signers.
  • -
-

§Returns

-

Returns a Vec<U256>, which is a vector of aggregated values resulting from applying the aggregation -logic to the input data packages as per the specified configuration. Each U256 value in the vector -represents an aggregated result derived from the corresponding data packages.

-

§Note

-

This function is internal to the crate (pub(crate)) and not exposed as part of the public API. It is -designed to be used by other components within the same crate that require value aggregation functionality.

-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/aggregator/fn.make_value_signer_matrix.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/aggregator/fn.make_value_signer_matrix.html deleted file mode 100644 index f3dc8819..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/aggregator/fn.make_value_signer_matrix.html +++ /dev/null @@ -1,4 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/aggregator/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/aggregator/index.html deleted file mode 100644 index 7aa39374..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/aggregator/index.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/core/aggregator/sidebar-items.js deleted file mode 100644 index c13147cd..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/aggregator/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["aggregate_matrix","aggregate_values","make_value_signer_matrix"],"type":["Matrix"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/aggregator/type.Matrix.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/aggregator/type.Matrix.html deleted file mode 100644 index 61c3f974..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/aggregator/type.Matrix.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/core/config/index.html deleted file mode 100644 index 32a77abc..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/config/index.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/core/config/sidebar-items.js deleted file mode 100644 index 4cadad77..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/config/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"struct":["Config"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/config/struct.Config.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/config/struct.Config.html deleted file mode 100644 index 67c161a4..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/config/struct.Config.html +++ /dev/null @@ -1,39 +0,0 @@ -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.

-

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.

-

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.

-

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.

-

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( - &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 - 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).

-

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/redstone/core/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/index.html deleted file mode 100644 index e427a2e8..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/index.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/core/processor/fn.make_processor_result.html deleted file mode 100644 index d15046f1..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/processor/fn.make_processor_result.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/core/processor/fn.process_payload.html deleted file mode 100644 index b1ad0b84..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/processor/fn.process_payload.html +++ /dev/null @@ -1,7 +0,0 @@ -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.
  • -
  • payload_bytes - Network-specific byte-list of the payload to be processed.
  • -
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/processor/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/processor/index.html deleted file mode 100644 index ccd25006..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/processor/index.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/core/processor/sidebar-items.js deleted file mode 100644 index e25cd4d1..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/processor/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["make_processor_result","process_payload"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/processor_result/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/processor_result/index.html deleted file mode 100644 index 52eaf103..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/processor_result/index.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/core/processor_result/sidebar-items.js deleted file mode 100644 index 04eabb0b..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/processor_result/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"struct":["ProcessorResult"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/processor_result/struct.ProcessorResult.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/processor_result/struct.ProcessorResult.html deleted file mode 100644 index 185a34b7..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/processor_result/struct.ProcessorResult.html +++ /dev/null @@ -1,34 +0,0 @@ -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.

-

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.

-

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 - 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).

-

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/redstone/core/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/sidebar-items.js deleted file mode 100644 index ce8d7edb..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["aggregator","config","processor","processor_result","validator"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/validator/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/validator/index.html deleted file mode 100644 index 141d82cd..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/validator/index.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/core/validator/sidebar-items.js deleted file mode 100644 index a9b53ab7..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/validator/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["Validator"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/validator/trait.Validator.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/validator/trait.Validator.html deleted file mode 100644 index ffbec709..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/core/validator/trait.Validator.html +++ /dev/null @@ -1,70 +0,0 @@ -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 validate_signer_count_threshold(
-        &self,
-        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.

-

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.

-
§Arguments
-
    -
  • feed_id: U256 - The unique identifier of the data feed.
  • -
-
§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.

-

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.

-
§Arguments
-
    -
  • signer: &[u8] - A byte slice representing the signer’s identifier.
  • -
-
§Returns
-
    -
  • Option<usize> - The index of the signer if found, or None if not found.
  • -
-
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.

-

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.

-
§Arguments
-
    -
  • index: usize - The index of the data value being validated.
  • -
  • values: &[Option<U256>] - A slice of optional U256 values associated with the data.
  • -
-
§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.

-

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.

-
§Arguments
-
    -
  • index: usize - The index of the data value whose timestamp is being validated.
  • -
  • timestamp: u64 - The timestamp to be validated.
  • -
-
§Returns
-
    -
  • u64 - The validated timestamp.
  • -
-

Implementors§

\ 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/keccak256/fn.keccak256.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/keccak256/fn.keccak256.html deleted file mode 100644 index 2665643a..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/keccak256/fn.keccak256.html +++ /dev/null @@ -1 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/keccak256/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/keccak256/index.html deleted file mode 100644 index 96fe770a..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/keccak256/index.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/crypto/keccak256/sidebar-items.js deleted file mode 100644 index 1a5fc982..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/keccak256/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["keccak256"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/recover/crypto256/fn.recover_public_key.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/recover/crypto256/fn.recover_public_key.html deleted file mode 100644 index ba2beac0..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/recover/crypto256/fn.recover_public_key.html +++ /dev/null @@ -1,5 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/recover/crypto256/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/recover/crypto256/index.html deleted file mode 100644 index b5563f5f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/recover/crypto256/index.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/crypto/recover/crypto256/sidebar-items.js deleted file mode 100644 index 57bd2c11..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/recover/crypto256/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["recover_public_key"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/recover/fn.recover_address.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/recover/fn.recover_address.html deleted file mode 100644 index aba3bde0..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/recover/fn.recover_address.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/crypto/recover/index.html deleted file mode 100644 index e7703e69..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/recover/index.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/crypto/recover/sidebar-items.js deleted file mode 100644 index 40087146..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/crypto/recover/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["recover_address"],"mod":["crypto256"]}; \ 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/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/index.html deleted file mode 100644 index ea091ee8..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/index.html +++ /dev/null @@ -1,6 +0,0 @@ -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. -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_radix/redstone/macro.print_and_panic!.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/macro.print_and_panic!.html deleted file mode 100644 index 90775bac..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/macro.print_and_panic!.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to macro.print_and_panic.html...

- - - \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/macro.print_and_panic.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/macro.print_and_panic.html deleted file mode 100644 index b308eb68..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/macro.print_and_panic.html +++ /dev/null @@ -1,4 +0,0 @@ -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_secp256k1,network_radix/redstone/macro.print_debug!.html deleted file mode 100644 index 2d4772f3..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/macro.print_debug!.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to macro.print_debug.html...

- - - \ 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_secp256k1,network_radix/redstone/macro.print_debug.html deleted file mode 100644 index 3cb863d6..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/macro.print_debug.html +++ /dev/null @@ -1,4 +0,0 @@ -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_secp256k1,network_radix/redstone/network/as_str/index.html deleted file mode 100644 index 9f63a8ad..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/as_str/index.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/network/as_str/sidebar-items.js deleted file mode 100644 index 01f900d2..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/as_str/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["AsAsciiStr","AsHexStr"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/as_str/trait.AsAsciiStr.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/as_str/trait.AsAsciiStr.html deleted file mode 100644 index cdb84389..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/as_str/trait.AsAsciiStr.html +++ /dev/null @@ -1,4 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/as_str/trait.AsHexStr.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/as_str/trait.AsHexStr.html deleted file mode 100644 index 59b9e783..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/as_str/trait.AsHexStr.html +++ /dev/null @@ -1,4 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/assert/fn.assert_or_revert.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/assert/fn.assert_or_revert.html deleted file mode 100644 index 13078112..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/assert/fn.assert_or_revert.html +++ /dev/null @@ -1,7 +0,0 @@ -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 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_secp256k1,network_radix/redstone/network/assert/fn.assert_or_revert_bool_with.html deleted file mode 100644 index 385fc71e..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/assert/fn.assert_or_revert_bool_with.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/network/assert/index.html deleted file mode 100644 index 680c61a9..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/assert/index.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/network/assert/sidebar-items.js deleted file mode 100644 index bd99c6f7..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/assert/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["assert_or_revert","assert_or_revert_bool_with"],"trait":["Assert","Unwrap"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/assert/trait.Assert.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/assert/trait.Assert.html deleted file mode 100644 index e068a406..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/assert/trait.Assert.html +++ /dev/null @@ -1,6 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/assert/trait.Unwrap.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/assert/trait.Unwrap.html deleted file mode 100644 index db1ea7bc..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/assert/trait.Unwrap.html +++ /dev/null @@ -1,9 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/error/enum.Error.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/error/enum.Error.html deleted file mode 100644 index ebd30a78..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/error/enum.Error.html +++ /dev/null @@ -1,66 +0,0 @@ -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),
-}
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.

-

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.

-

Used when operations on U256 numbers exceed their maximum value, potentially leading -to incorrect calculations or state.

-
§

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.

-

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.

-

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.

-

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.

-

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.

-

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.

-

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.

-

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.

-

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 - 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).

-

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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/error/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/error/index.html deleted file mode 100644 index e083b3b4..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/error/index.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/network/error/sidebar-items.js deleted file mode 100644 index 41603cd6..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/error/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"enum":["Error"],"trait":["ContractErrorContent"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/error/trait.ContractErrorContent.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/error/trait.ContractErrorContent.html deleted file mode 100644 index 577c3a6f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/error/trait.ContractErrorContent.html +++ /dev/null @@ -1,5 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/flattened/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/flattened/index.html deleted file mode 100644 index e62982d8..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/flattened/index.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/network/flattened/sidebar-items.js deleted file mode 100644 index 25ac6e97..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/flattened/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["Flattened"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/flattened/trait.Flattened.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/flattened/trait.Flattened.html deleted file mode 100644 index bbbf1554..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/flattened/trait.Flattened.html +++ /dev/null @@ -1,4 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/from_bytes_repr/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/from_bytes_repr/index.html deleted file mode 100644 index 037b0f7e..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/from_bytes_repr/index.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/network/from_bytes_repr/sidebar-items.js deleted file mode 100644 index 9d06c298..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/from_bytes_repr/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["FromBytesRepr","Sanitized"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/from_bytes_repr/trait.FromBytesRepr.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/from_bytes_repr/trait.FromBytesRepr.html deleted file mode 100644 index 4bcada1e..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/from_bytes_repr/trait.FromBytesRepr.html +++ /dev/null @@ -1,4 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/from_bytes_repr/trait.Sanitized.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/from_bytes_repr/trait.Sanitized.html deleted file mode 100644 index 79baf865..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/from_bytes_repr/trait.Sanitized.html +++ /dev/null @@ -1,4 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/index.html deleted file mode 100644 index c1984fe4..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/index.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/network/print_debug/index.html deleted file mode 100644 index ac53c72e..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/print_debug/index.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/network/print_debug/sidebar-items.js deleted file mode 100644 index 5244ce01..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/print_debug/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/radix/from_bytes_repr/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/radix/from_bytes_repr/index.html deleted file mode 100644 index f74ff884..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/radix/from_bytes_repr/index.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/network/radix/from_bytes_repr/sidebar-items.js deleted file mode 100644 index 5244ce01..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/radix/from_bytes_repr/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/radix/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/radix/index.html deleted file mode 100644 index 3b436f13..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/radix/index.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/network/radix/sidebar-items.js deleted file mode 100644 index 1c5d6d59..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/radix/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["from_bytes_repr","u256_ext"],"struct":["Radix"]}; \ 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/redstone/network/radix/u256_ext/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/radix/u256_ext/index.html deleted file mode 100644 index 4b1d935a..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/radix/u256_ext/index.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/network/radix/u256_ext/sidebar-items.js deleted file mode 100644 index 2ec56290..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/radix/u256_ext/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["U256Ext"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/radix/u256_ext/trait.U256Ext.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/radix/u256_ext/trait.U256Ext.html deleted file mode 100644 index c8692cdf..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/radix/u256_ext/trait.U256Ext.html +++ /dev/null @@ -1,4 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/sidebar-items.js deleted file mode 100644 index 45f7c837..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["as_str","assert","error","flattened","from_bytes_repr","print_debug","radix","specific"],"type":["_Network"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/constant.VALUE_SIZE.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/constant.VALUE_SIZE.html deleted file mode 100644 index 2e47400c..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/constant.VALUE_SIZE.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/network/specific/fn.print.html deleted file mode 100644 index 414a9953..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/fn.print.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/network/specific/fn.revert.html deleted file mode 100644 index 2e9edf89..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/fn.revert.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/network/specific/index.html deleted file mode 100644 index 1378d9dc..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/index.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/network/specific/sidebar-items.js deleted file mode 100644 index 49355aaa..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"constant":["VALUE_SIZE"],"fn":["print","revert"],"trait":["NetworkSpecific"],"type":["Bytes","Network","U256"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/trait.NetworkSpecific.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/trait.NetworkSpecific.html deleted file mode 100644 index e13fc617..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/trait.NetworkSpecific.html +++ /dev/null @@ -1,11 +0,0 @@ -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;
-
-    // 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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/type.Bytes.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/type.Bytes.html deleted file mode 100644 index 04a40a5a..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/type.Bytes.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/network/specific/type.Network.html deleted file mode 100644 index 40e404c9..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/type.Network.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/network/specific/type.U256.html deleted file mode 100644 index 19fa4bd4..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/specific/type.U256.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/network/type._Network.html deleted file mode 100644 index b059c3a0..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/network/type._Network.html +++ /dev/null @@ -1 +0,0 @@ -_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_secp256k1,network_radix/redstone/protocol/constants/constant.DATA_FEED_ID_BS.html deleted file mode 100644 index 72b04b86..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.DATA_FEED_ID_BS.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/protocol/constants/constant.DATA_PACKAGES_COUNT_BS.html deleted file mode 100644 index fed432b2..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.DATA_PACKAGES_COUNT_BS.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/protocol/constants/constant.DATA_POINTS_COUNT_BS.html deleted file mode 100644 index f25ed2f5..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.DATA_POINTS_COUNT_BS.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/protocol/constants/constant.DATA_POINT_VALUE_BYTE_SIZE_BS.html deleted file mode 100644 index 95f9c3d5..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.DATA_POINT_VALUE_BYTE_SIZE_BS.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/protocol/constants/constant.MAX_TIMESTAMP_AHEAD_MS.html deleted file mode 100644 index 160a69a6..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.MAX_TIMESTAMP_AHEAD_MS.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/protocol/constants/constant.MAX_TIMESTAMP_DELAY_MS.html deleted file mode 100644 index 47c72d3b..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.MAX_TIMESTAMP_DELAY_MS.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/protocol/constants/constant.REDSTONE_MARKER.html deleted file mode 100644 index 07258216..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.REDSTONE_MARKER.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/protocol/constants/constant.REDSTONE_MARKER_BS.html deleted file mode 100644 index 21ea69ca..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.REDSTONE_MARKER_BS.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/protocol/constants/constant.SIGNATURE_BS.html deleted file mode 100644 index 2a3a5b7f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.SIGNATURE_BS.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/protocol/constants/constant.TIMESTAMP_BS.html deleted file mode 100644 index 1635207a..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.TIMESTAMP_BS.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/protocol/constants/constant.UNSIGNED_METADATA_BYTE_SIZE_BS.html deleted file mode 100644 index a7ccdc60..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/constant.UNSIGNED_METADATA_BYTE_SIZE_BS.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/protocol/constants/index.html deleted file mode 100644 index 0268cb89..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/index.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/protocol/constants/sidebar-items.js deleted file mode 100644 index 7fd4daab..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/constants/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"constant":["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"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_package/fn.trim_data_package.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_package/fn.trim_data_package.html deleted file mode 100644 index f1456016..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_package/fn.trim_data_package.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/protocol/data_package/fn.trim_data_packages.html deleted file mode 100644 index 393e9998..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_package/fn.trim_data_packages.html +++ /dev/null @@ -1,4 +0,0 @@ -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_secp256k1,network_radix/redstone/protocol/data_package/index.html deleted file mode 100644 index 4f7ef4c4..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_package/index.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/protocol/data_package/sidebar-items.js deleted file mode 100644 index 4b17209f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_package/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["trim_data_package","trim_data_packages"],"struct":["DataPackage"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_package/struct.DataPackage.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_package/struct.DataPackage.html deleted file mode 100644 index 8bbb2a1d..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_package/struct.DataPackage.html +++ /dev/null @@ -1,27 +0,0 @@ -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).

-

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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_point/fn.trim_data_point.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_point/fn.trim_data_point.html deleted file mode 100644 index 10a3aa68..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_point/fn.trim_data_point.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/protocol/data_point/fn.trim_data_points.html deleted file mode 100644 index 4bc76a0f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_point/fn.trim_data_points.html +++ /dev/null @@ -1,5 +0,0 @@ -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_secp256k1,network_radix/redstone/protocol/data_point/index.html deleted file mode 100644 index 6ab1baf0..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_point/index.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/protocol/data_point/sidebar-items.js deleted file mode 100644 index 2a5fa8f1..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_point/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["trim_data_point","trim_data_points"],"struct":["DataPoint"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_point/struct.DataPoint.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_point/struct.DataPoint.html deleted file mode 100644 index 78e807ea..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/data_point/struct.DataPoint.html +++ /dev/null @@ -1,26 +0,0 @@ -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 - 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).

-

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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/index.html deleted file mode 100644 index d221f7b2..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/index.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/protocol/marker/fn.trim_redstone_marker.html deleted file mode 100644 index fb7c7144..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/marker/fn.trim_redstone_marker.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/protocol/marker/index.html deleted file mode 100644 index 9844daf7..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/marker/index.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/protocol/marker/sidebar-items.js deleted file mode 100644 index 2d2958a1..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/marker/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["trim_redstone_marker"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/payload/fn.trim_metadata.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/payload/fn.trim_metadata.html deleted file mode 100644 index b3e6350e..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/payload/fn.trim_metadata.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/protocol/payload/fn.trim_payload.html deleted file mode 100644 index 9eae9fdd..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/payload/fn.trim_payload.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/protocol/payload/index.html deleted file mode 100644 index 7bedf304..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/payload/index.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/protocol/payload/sidebar-items.js deleted file mode 100644 index 0d79d818..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/payload/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["trim_metadata","trim_payload"],"struct":["Payload"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/payload/struct.Payload.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/payload/struct.Payload.html deleted file mode 100644 index 739030bf..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/payload/struct.Payload.html +++ /dev/null @@ -1,19 +0,0 @@ -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).

-

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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/sidebar-items.js deleted file mode 100644 index 94e7fdb5..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/protocol/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["constants","data_package","data_point","marker","payload"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/sidebar-items.js deleted file mode 100644 index f230d898..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"macro":["print_and_panic","print_debug"],"mod":["core","crypto","network","protocol","utils"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/filter/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/filter/index.html deleted file mode 100644 index a153fc5f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/filter/index.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/utils/filter/sidebar-items.js deleted file mode 100644 index 9cc2f1a1..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/filter/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["FilterSome"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/filter/trait.FilterSome.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/filter/trait.FilterSome.html deleted file mode 100644 index 69bc1f28..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/filter/trait.FilterSome.html +++ /dev/null @@ -1,4 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/index.html deleted file mode 100644 index ef51ef17..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/index.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/utils/median/fn.maybe_pick_median.html deleted file mode 100644 index ebb4b4a4..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/median/fn.maybe_pick_median.html +++ /dev/null @@ -1,2 +0,0 @@ -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_secp256k1,network_radix/redstone/utils/median/index.html deleted file mode 100644 index 9a4952c3..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/median/index.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/utils/median/sidebar-items.js deleted file mode 100644 index 092646ab..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/median/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["maybe_pick_median"],"trait":["Averageable","Avg","Median"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/median/trait.Averageable.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/median/trait.Averageable.html deleted file mode 100644 index 6ac8fd85..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/median/trait.Averageable.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/utils/median/trait.Avg.html deleted file mode 100644 index 2cd8ef5a..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/median/trait.Avg.html +++ /dev/null @@ -1,5 +0,0 @@ -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 - 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_secp256k1,network_radix/redstone/utils/median/trait.Median.html deleted file mode 100644 index 60047574..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/median/trait.Median.html +++ /dev/null @@ -1,7 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/sidebar-items.js b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/sidebar-items.js deleted file mode 100644 index 2f4d851f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["filter","median","trim","trim_zeros"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/trim/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/trim/index.html deleted file mode 100644 index e7e6608a..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/trim/index.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/utils/trim/sidebar-items.js deleted file mode 100644 index 076b36c3..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/trim/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["Trim"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/trim/trait.Trim.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/trim/trait.Trim.html deleted file mode 100644 index e6fa965e..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/trim/trait.Trim.html +++ /dev/null @@ -1,5 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/trim_zeros/index.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/trim_zeros/index.html deleted file mode 100644 index 2a2fd9e0..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/trim_zeros/index.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/redstone/utils/trim_zeros/sidebar-items.js deleted file mode 100644 index eebab388..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/trim_zeros/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["TrimZeros"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/trim_zeros/trait.TrimZeros.html b/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/trim_zeros/trait.TrimZeros.html deleted file mode 100644 index f1299ca4..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/redstone/utils/trim_zeros/trait.TrimZeros.html +++ /dev/null @@ -1,4 +0,0 @@ -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 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/search.desc/redstone/redstone-desc-0-.js b/static/rust/redstone/crypto_secp256k1,network_radix/search.desc/redstone/redstone-desc-0-.js deleted file mode 100644 index 81611d2e..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/search.desc/redstone/redstone-desc-0-.js +++ /dev/null @@ -1 +0,0 @@ -searchState.loadedDescShard("redstone", 0, "RedStone\nAggregates values from a collection of data packages …\nConfiguration for a RedStone payload processor.\nThe current block time in timestamp format, used for …\nIdentifiers for the data feeds from which values are …\nReturns the argument unchanged.\nCalls U::from(self).\nThe minimum number of signers required validating the data.\nList of identifiers for signers authorized to sign the …\nThe main processor of the RedStone payload.\nRepresents the result of processing the RedStone payload.\nReturns the argument unchanged.\nCalls U::from(self).\nThe minimum timestamp encountered during processing.\nA collection of values processed during the operation.\nA trait defining validation operations for data feeds and …\nRetrieves the index of a given data feed.\nRetrieves the index of a given signer.\nValidates the signer count threshold for a given index …\nValidates the timestamp for a given index.\nUsed when an expected non-empty array or vector is found …\nRepresents errors that need to clone ContractErrorContent, …\nRepresents errors that arise from the contract itself.\nRepresents errors related to cryptographic operations.\nErrors that can be encountered in the …\nIndicates that the number of signers does not meet the …\nUsed when there is leftover data in a payload that should …\nIndicates an overflow error with U256 numbers.\nSignifies that an unsupported size was encountered.\nIndicates that a timestamp is further in the future than …\nUsed when a timestamp is older than allowed by the …\nIndicates that the marker bytes for RedStone are incorrect.\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).") \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/settings.html b/static/rust/redstone/crypto_secp256k1,network_radix/settings.html deleted file mode 100644 index 9631dcb2..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/settings.html +++ /dev/null @@ -1 +0,0 @@ -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_secp256k1,network_radix/src-files.js deleted file mode 100644 index b96f3020..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src-files.js +++ /dev/null @@ -1,4 +0,0 @@ -var srcIndex = new Map(JSON.parse('[\ -["redstone",["",[["core",[],["aggregator.rs","config.rs","mod.rs","processor.rs","processor_result.rs","validator.rs"]],["crypto",[],["keccak256.rs","mod.rs","recover.rs"]],["network",[["radix",[],["from_bytes_repr.rs","mod.rs","u256_ext.rs"]]],["as_str.rs","assert.rs","error.rs","flattened.rs","from_bytes_repr.rs","mod.rs","print_debug.rs","specific.rs"]],["protocol",[],["constants.rs","data_package.rs","data_point.rs","marker.rs","mod.rs","payload.rs"]],["utils",[],["filter.rs","median.rs","mod.rs","trim.rs","trim_zeros.rs"]]],["lib.rs"]]]\ -]')); -createSrcSidebar(); diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/core/aggregator.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/core/aggregator.rs.html deleted file mode 100644 index e839b506..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/core/aggregator.rs.html +++ /dev/null @@ -1,583 +0,0 @@ -aggregator.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-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
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-287
-288
-289
-290
-291
-
use crate::{
-    core::{config::Config, validator::Validator},
-    network::specific::U256,
-    print_debug,
-    protocol::data_package::DataPackage,
-    utils::median::Median,
-};
-
-type Matrix = Vec<Vec<Option<U256>>>;
-
-/// 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
-/// an average of the values, selecting the median, or applying a custom algorithm defined within the
-/// `aggregate_matrix` function.
-///
-/// The primary purpose of this function is to consolidate data from multiple sources into a coherent
-/// and singular value set that adheres to the criteria specified in the `Config`.
-///
-/// # Arguments
-///
-/// * `config` - A `Config` instance containing settings and parameters used to guide the aggregation process.
-/// * `data_packages` - A vector of `DataPackage` instances, each representing a set of values and associated
-///   metadata collected from various sources or signers.
-///
-/// # Returns
-///
-/// Returns a `Vec<U256>`, which is a vector of aggregated values resulting from applying the aggregation
-/// logic to the input data packages as per the specified configuration. Each `U256` value in the vector
-/// represents an aggregated result derived from the corresponding data packages.
-///
-/// # Note
-///
-/// This function is internal to the crate (`pub(crate)`) and not exposed as part of the public API. It is
-/// designed to be used by other components within the same crate that require value aggregation functionality.
-pub(crate) fn aggregate_values(config: Config, data_packages: Vec<DataPackage>) -> Vec<U256> {
-    aggregate_matrix(make_value_signer_matrix(&config, data_packages), config)
-}
-
-fn aggregate_matrix(matrix: Matrix, config: Config) -> Vec<U256> {
-    matrix
-        .iter()
-        .enumerate()
-        .map(|(index, values)| {
-            config
-                .validate_signer_count_threshold(index, values)
-                .median()
-        })
-        .collect()
-}
-
-fn make_value_signer_matrix(config: &Config, data_packages: Vec<DataPackage>) -> Matrix {
-    let mut matrix = vec![vec![None; config.signers.len()]; config.feed_ids.len()];
-
-    data_packages.iter().for_each(|data_package| {
-        if let Some(signer_index) = config.signer_index(&data_package.signer_address) {
-            data_package.data_points.iter().for_each(|data_point| {
-                if let Some(feed_index) = config.feed_index(data_point.feed_id) {
-                    matrix[feed_index][signer_index] = data_point.value.into()
-                }
-            })
-        }
-    });
-
-    print_debug!("{:?}", matrix);
-
-    matrix
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod aggregate_matrix_tests {
-    use crate::{
-        core::{aggregator::aggregate_matrix, config::Config},
-        helpers::iter_into::{IterInto, IterIntoOpt, OptIterIntoOpt},
-    };
-
-    #[test]
-    fn test_aggregate_matrix() {
-        let matrix = vec![
-            vec![11u8, 13].iter_into_opt(),
-            vec![21u8, 23].iter_into_opt(),
-        ];
-
-        for signer_count_threshold in 0..Config::test().signers.len() + 1 {
-            let mut config = Config::test();
-            config.signer_count_threshold = signer_count_threshold as u8;
-
-            let result = aggregate_matrix(matrix.clone(), config);
-
-            assert_eq!(result, vec![12u8, 22].iter_into());
-        }
-    }
-
-    #[test]
-    fn test_aggregate_matrix_smaller_threshold_missing_one_value() {
-        let mut config = Config::test();
-        config.signer_count_threshold = 1;
-
-        let matrix = vec![
-            vec![11u8, 13].iter_into_opt(),
-            vec![21u8.into(), None].opt_iter_into_opt(),
-        ];
-
-        let result = aggregate_matrix(matrix, config);
-
-        assert_eq!(result, vec![12u8, 21].iter_into());
-    }
-
-    #[should_panic(expected = "Array is empty")]
-    #[test]
-    fn test_aggregate_matrix_smaller_threshold_missing_whole_feed() {
-        let mut config = Config::test();
-        config.signer_count_threshold = 0;
-
-        let matrix = vec![vec![11u8, 13].iter_into_opt(), vec![None; 2]];
-
-        aggregate_matrix(matrix, config);
-    }
-
-    #[should_panic(expected = "Insufficient signer count 1 for #0 (ETH)")]
-    #[test]
-    fn test_aggregate_matrix_missing_one_value() {
-        let matrix = vec![
-            vec![21u8.into(), None].opt_iter_into_opt(),
-            vec![11u8, 12].iter_into_opt(),
-        ];
-
-        aggregate_matrix(matrix, Config::test());
-    }
-
-    #[should_panic(expected = "Insufficient signer count 0 for #1 (BTC)")]
-    #[test]
-    fn test_aggregate_matrix_missing_whole_feed() {
-        let matrix = vec![vec![11u8, 13].iter_into_opt(), vec![None; 2]];
-
-        aggregate_matrix(matrix, Config::test());
-    }
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod make_value_signer_matrix {
-    use crate::{
-        core::{
-            aggregator::{make_value_signer_matrix, Matrix},
-            config::Config,
-            test_helpers::{AVAX, BTC, ETH, TEST_SIGNER_ADDRESS_1, TEST_SIGNER_ADDRESS_2},
-        },
-        helpers::iter_into::IterInto,
-        network::specific::U256,
-        protocol::data_package::DataPackage,
-    };
-
-    #[test]
-    fn test_make_value_signer_matrix_empty() {
-        let config = Config::test();
-
-        test_make_value_signer_matrix_of(
-            vec![],
-            vec![vec![None; config.signers.len()]; config.feed_ids.len()],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_exact() {
-        let data_packages = vec![
-            DataPackage::test(ETH, 11, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(ETH, 12, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(BTC, 22, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(BTC, 21, TEST_SIGNER_ADDRESS_1, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![11, 12].iter_into(), vec![21, 22].iter_into()],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_greater() {
-        let data_packages = vec![
-            DataPackage::test(ETH, 11, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(ETH, 12, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(BTC, 22, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(BTC, 21, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(AVAX, 31, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(AVAX, 32, TEST_SIGNER_ADDRESS_2, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![11, 12].iter_into(), vec![21, 22].iter_into()],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_smaller() {
-        let data_packages = vec![
-            DataPackage::test(ETH, 11, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(ETH, 12, TEST_SIGNER_ADDRESS_2, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![11, 12].iter_into(), vec![None; 2]],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_diagonal() {
-        let data_packages = vec![
-            DataPackage::test(BTC, 22, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(ETH, 11, TEST_SIGNER_ADDRESS_1, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![11.into(), None], vec![None, 22.into()]],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_repetitions() {
-        let data_packages = vec![
-            DataPackage::test(BTC, 21, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(BTC, 22, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(BTC, 202, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(ETH, 11, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(ETH, 101, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(ETH, 12, TEST_SIGNER_ADDRESS_2, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![101, 12].iter_into(), vec![21, 202].iter_into()],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_all_wrong() {
-        let config = Config::test();
-
-        let data_packages = vec![
-            DataPackage::test(AVAX, 32, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(AVAX, 31, TEST_SIGNER_ADDRESS_1, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![None; config.signers.len()]; config.feed_ids.len()],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_mix() {
-        let data_packages = vec![
-            DataPackage::test(ETH, 11, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(ETH, 12, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(AVAX, 32, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(AVAX, 31, TEST_SIGNER_ADDRESS_1, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![11, 12].iter_into(), vec![None; 2]],
-        );
-    }
-
-    fn test_make_value_signer_matrix_of(
-        data_packages: Vec<DataPackage>,
-        expected_values: Vec<Vec<Option<u128>>>,
-    ) {
-        let config = &Config::test();
-        let result = make_value_signer_matrix(config, data_packages);
-
-        let expected_matrix: Matrix = expected_values
-            .iter()
-            .map(|row| {
-                (row.iter()
-                    .map(|&value| value.map(U256::from))
-                    .collect::<Vec<_>>())
-                .iter_into() as Vec<Option<U256>>
-            })
-            .collect();
-
-        assert_eq!(result, expected_matrix)
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/core/config.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/core/config.rs.html deleted file mode 100644 index 0b9ca7f7..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/core/config.rs.html +++ /dev/null @@ -1,63 +0,0 @@ -config.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
-
use crate::network::specific::{Bytes, U256};
-
-/// 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.
-#[derive(Debug)]
-pub struct Config {
-    /// 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.
-    pub signer_count_threshold: u8,
-
-    /// 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.
-    pub signers: Vec<Bytes>,
-
-    /// Identifiers for the data feeds from which values are aggregated.
-    ///
-    /// Each data feed id is represented by the network-specific `U256` type.
-    pub feed_ids: Vec<U256>,
-
-    /// 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.
-    pub block_timestamp: u64,
-}
-
\ No newline at end of file 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/core/processor.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/core/processor.rs.html deleted file mode 100644 index 2e92e10d..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/core/processor.rs.html +++ /dev/null @@ -1,203 +0,0 @@ -processor.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-
use crate::{
-    core::{
-        aggregator::aggregate_values, config::Config, processor_result::ProcessorResult,
-        validator::Validator,
-    },
-    network::specific::Bytes,
-    print_debug,
-    protocol::payload::Payload,
-};
-
-/// The main processor of the RedStone payload.
-///
-///
-/// # Arguments
-///
-/// * `config` - Configuration of the payload processing.
-/// * `payload_bytes` - Network-specific byte-list of the payload to be processed.
-pub fn process_payload(config: Config, payload_bytes: Bytes) -> ProcessorResult {
-    #[allow(clippy::useless_conversion)]
-    let mut bytes: Vec<u8> = payload_bytes.into();
-    let payload = Payload::make(&mut bytes);
-    print_debug!("{:?}", payload);
-
-    make_processor_result(config, payload)
-}
-
-fn make_processor_result(config: Config, payload: Payload) -> ProcessorResult {
-    let min_timestamp = payload
-        .data_packages
-        .iter()
-        .enumerate()
-        .map(|(index, dp)| config.validate_timestamp(index, dp.timestamp))
-        .min()
-        .unwrap();
-
-    let values = aggregate_values(config, payload.data_packages);
-
-    print_debug!("{} {:?}", min_timestamp, values);
-
-    ProcessorResult {
-        values,
-        min_timestamp,
-    }
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        core::{
-            config::Config,
-            processor::make_processor_result,
-            processor_result::ProcessorResult,
-            test_helpers::{
-                BTC, ETH, TEST_BLOCK_TIMESTAMP, TEST_SIGNER_ADDRESS_1, TEST_SIGNER_ADDRESS_2,
-            },
-        },
-        helpers::iter_into::IterInto,
-        protocol::{data_package::DataPackage, payload::Payload},
-    };
-
-    #[test]
-    fn test_make_processor_result() {
-        let data_packages = vec![
-            DataPackage::test(
-                ETH,
-                11,
-                TEST_SIGNER_ADDRESS_1,
-                (TEST_BLOCK_TIMESTAMP + 5).into(),
-            ),
-            DataPackage::test(
-                ETH,
-                13,
-                TEST_SIGNER_ADDRESS_2,
-                (TEST_BLOCK_TIMESTAMP + 3).into(),
-            ),
-            DataPackage::test(
-                BTC,
-                32,
-                TEST_SIGNER_ADDRESS_2,
-                (TEST_BLOCK_TIMESTAMP - 2).into(),
-            ),
-            DataPackage::test(
-                BTC,
-                31,
-                TEST_SIGNER_ADDRESS_1,
-                (TEST_BLOCK_TIMESTAMP + 400).into(),
-            ),
-        ];
-
-        let result = make_processor_result(Config::test(), Payload { data_packages });
-
-        assert_eq!(
-            result,
-            ProcessorResult {
-                min_timestamp: TEST_BLOCK_TIMESTAMP - 2,
-                values: vec![12u8, 31].iter_into()
-            }
-        );
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/core/processor_result.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/core/processor_result.rs.html deleted file mode 100644 index ecdffb37..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/core/processor_result.rs.html +++ /dev/null @@ -1,53 +0,0 @@ -processor_result.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
-
use crate::network::specific::U256;
-
-/// 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`.
-#[derive(Debug, Eq, PartialEq)]
-pub struct ProcessorResult {
-    /// 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.
-    pub min_timestamp: u64,
-
-    /// 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`.
-    pub values: Vec<U256>,
-}
-
-impl From<ProcessorResult> for (u64, Vec<U256>) {
-    fn from(result: ProcessorResult) -> Self {
-        (result.min_timestamp, result.values)
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/core/validator.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/core/validator.rs.html deleted file mode 100644 index 1fed8ca0..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/core/validator.rs.html +++ /dev/null @@ -1,573 +0,0 @@ -validator.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-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
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-
use crate::{
-    core::config::Config,
-    network::{
-        assert::Assert,
-        error::Error::{InsufficientSignerCount, TimestampTooFuture, TimestampTooOld},
-        specific::U256,
-    },
-    protocol::constants::{MAX_TIMESTAMP_AHEAD_MS, MAX_TIMESTAMP_DELAY_MS},
-    utils::filter::FilterSome,
-};
-
-/// 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.
-pub(crate) trait Validator {
-    /// 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.
-    ///
-    /// # Arguments
-    ///
-    /// * `feed_id`: `U256` - The unique identifier of the data feed.
-    ///
-    /// # Returns
-    ///
-    /// * `Option<usize>` - The index of the feed if it exists, or `None` if it does not.
-    fn feed_index(&self, feed_id: U256) -> 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.
-    ///
-    /// # Arguments
-    ///
-    /// * `signer`: `&[u8]` - A byte slice representing the signer's identifier.
-    ///
-    /// # Returns
-    ///
-    /// * `Option<usize>` - The index of the signer if found, or `None` if not found.
-    fn signer_index(&self, signer: &[u8]) -> Option<usize>;
-
-    /// 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.
-    ///
-    /// # Arguments
-    ///
-    /// * `index`: `usize` - The index of the data value being validated.
-    /// * `values`: `&[Option<U256>]` - A slice of optional `U256` values associated with the data.
-    ///
-    /// # Returns
-    ///
-    /// * `Vec<U256>` - A vector of `U256` values that meet the validation criteria.
-    fn validate_signer_count_threshold(&self, index: usize, values: &[Option<U256>]) -> Vec<U256>;
-
-    /// 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.
-    ///
-    /// # Arguments
-    ///
-    /// * `index`: `usize` - The index of the data value whose timestamp is being validated.
-    /// * `timestamp`: `u64` - The timestamp to be validated.
-    ///
-    /// # Returns
-    ///
-    /// * `u64` - The validated timestamp.
-    fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64;
-}
-
-impl Validator for Config {
-    #[inline]
-    fn feed_index(&self, feed_id: U256) -> Option<usize> {
-        self.feed_ids.iter().position(|&elt| elt == feed_id)
-    }
-
-    #[inline]
-    fn signer_index(&self, signer: &[u8]) -> Option<usize> {
-        self.signers
-            .iter()
-            .position(|elt| elt.to_ascii_lowercase() == signer.to_ascii_lowercase())
-    }
-
-    #[inline]
-    fn validate_signer_count_threshold(&self, index: usize, values: &[Option<U256>]) -> Vec<U256> {
-        values.filter_some().assert_or_revert(
-            |x| (*x).len() >= self.signer_count_threshold.into(),
-            #[allow(clippy::useless_conversion)]
-            |val| InsufficientSignerCount(index, val.len(), self.feed_ids[index]),
-        )
-    }
-
-    #[inline]
-    fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64 {
-        timestamp.assert_or_revert(
-            |&x| x + MAX_TIMESTAMP_DELAY_MS >= self.block_timestamp,
-            |timestamp| TimestampTooOld(index, *timestamp),
-        );
-
-        timestamp.assert_or_revert(
-            |&x| x <= self.block_timestamp + MAX_TIMESTAMP_AHEAD_MS,
-            |timestamp| TimestampTooFuture(index, *timestamp),
-        )
-    }
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        core::{
-            config::Config,
-            test_helpers::{
-                AVAX, BTC, ETH, TEST_BLOCK_TIMESTAMP, TEST_SIGNER_ADDRESS_1, TEST_SIGNER_ADDRESS_2,
-            },
-            validator::Validator,
-        },
-        helpers::{
-            hex::{hex_to_bytes, make_feed_id},
-            iter_into::{IterInto, IterIntoOpt, OptIterIntoOpt},
-        },
-        network::specific::U256,
-        protocol::constants::{MAX_TIMESTAMP_AHEAD_MS, MAX_TIMESTAMP_DELAY_MS},
-    };
-    use itertools::Itertools;
-
-    #[test]
-    fn test_feed_index() {
-        let config = Config::test();
-
-        let eth_index = config.feed_index(make_feed_id(ETH));
-        assert_eq!(eth_index, 0.into());
-
-        let eth_index = config.feed_index(make_feed_id("778680")); //eth
-        assert_eq!(eth_index, None);
-
-        let btc_index = config.feed_index(make_feed_id(BTC));
-        assert_eq!(btc_index, 1.into());
-
-        let avax_index = config.feed_index(make_feed_id(AVAX));
-        assert_eq!(avax_index, None);
-    }
-
-    #[test]
-    fn test_signer_index() {
-        let config = Config::test();
-        let index = config.signer_index(&hex_to_bytes(TEST_SIGNER_ADDRESS_1.into()));
-        assert_eq!(index, 0.into());
-
-        let index = config.signer_index(&hex_to_bytes(TEST_SIGNER_ADDRESS_1.to_uppercase()));
-        assert_eq!(index, 0.into());
-
-        let index = config.signer_index(&hex_to_bytes(TEST_SIGNER_ADDRESS_2.into()));
-        assert_eq!(index, 1.into());
-
-        let index = config.signer_index(&hex_to_bytes(TEST_SIGNER_ADDRESS_2.replace('0', "1")));
-        assert_eq!(index, None);
-    }
-
-    #[test]
-    fn test_validate_timestamp() {
-        let config = Config::test();
-
-        config.validate_timestamp(0, TEST_BLOCK_TIMESTAMP);
-        config.validate_timestamp(1, TEST_BLOCK_TIMESTAMP + 60000);
-        config.validate_timestamp(2, TEST_BLOCK_TIMESTAMP + MAX_TIMESTAMP_AHEAD_MS);
-        config.validate_timestamp(3, TEST_BLOCK_TIMESTAMP - MAX_TIMESTAMP_DELAY_MS);
-        config.validate_timestamp(4, TEST_BLOCK_TIMESTAMP - 60000);
-    }
-
-    #[should_panic(expected = "Timestamp 2000000180001 is too future for #0")]
-    #[test]
-    fn test_validate_timestamp_too_future() {
-        Config::test().validate_timestamp(0, TEST_BLOCK_TIMESTAMP + MAX_TIMESTAMP_AHEAD_MS + 1);
-    }
-
-    #[should_panic(expected = "Timestamp 1999999099999 is too old for #1")]
-    #[test]
-    fn test_validate_timestamp_too_old() {
-        Config::test().validate_timestamp(1, TEST_BLOCK_TIMESTAMP - MAX_TIMESTAMP_DELAY_MS - 1);
-    }
-
-    #[should_panic(expected = "Timestamp 0 is too old for #2")]
-    #[test]
-    fn test_validate_timestamp_zero() {
-        Config::test().validate_timestamp(2, 0);
-    }
-
-    #[should_panic(expected = "Timestamp 4000000000000 is too future for #3")]
-    #[test]
-    fn test_validate_timestamp_big() {
-        Config::test().validate_timestamp(3, TEST_BLOCK_TIMESTAMP + TEST_BLOCK_TIMESTAMP);
-    }
-
-    #[should_panic(expected = "Timestamp 2000000000000 is too future for #4")]
-    #[test]
-    fn test_validate_timestamp_no_block_timestamp() {
-        let mut config = Config::test();
-
-        config.block_timestamp = 0;
-        config.validate_timestamp(4, TEST_BLOCK_TIMESTAMP);
-    }
-
-    #[should_panic(expected = "Insufficient signer count 0 for #0 (ETH)")]
-    #[test]
-    fn test_validate_signer_count_threshold_empty_list() {
-        Config::test().validate_signer_count_threshold(0, vec![].as_slice());
-    }
-
-    #[should_panic(expected = "Insufficient signer count 1 for #1 (BTC)")]
-    #[test]
-    fn test_validate_signer_count_threshold_shorter_list() {
-        Config::test().validate_signer_count_threshold(1, vec![1u8].iter_into_opt().as_slice());
-    }
-
-    #[should_panic(expected = "Insufficient signer count 1 for #1 (BTC)")]
-    #[test]
-    fn test_validate_signer_count_threshold_list_with_nones() {
-        Config::test().validate_signer_count_threshold(
-            1,
-            vec![None, 1u8.into(), None].opt_iter_into_opt().as_slice(),
-        );
-    }
-
-    #[test]
-    fn test_validate_signer_count_threshold_with_exact_size() {
-        validate_with_all_permutations(vec![1u8, 2].iter_into_opt(), vec![1u8, 2].iter_into());
-    }
-
-    #[test]
-    fn test_validate_signer_count_threshold_with_exact_signer_count() {
-        validate_with_all_permutations(
-            vec![None, 1u8.into(), None, 2.into()].opt_iter_into_opt(),
-            vec![1u8, 2].iter_into(),
-        );
-    }
-
-    #[test]
-    fn test_validate_signer_count_threshold_with_larger_size() {
-        validate_with_all_permutations(
-            vec![
-                1u8.into(),
-                None,
-                None,
-                2.into(),
-                3.into(),
-                None,
-                4.into(),
-                None,
-            ]
-            .opt_iter_into_opt(),
-            vec![1u8, 2, 3, 4].iter_into(),
-        );
-    }
-
-    fn validate_with_all_permutations(numbers: Vec<Option<U256>>, expected_value: Vec<U256>) {
-        let perms: Vec<Vec<_>> = numbers.iter().permutations(numbers.len()).collect();
-        let mut config = Config::test();
-
-        let result = config.validate_signer_count_threshold(0, &numbers);
-        assert_eq!(result, expected_value);
-
-        for threshold in 0..expected_value.len() + 1 {
-            config.signer_count_threshold = threshold as u8;
-
-            for (index, perm) in perms.iter().enumerate() {
-                let p: Vec<_> = perm.iter().map(|&&v| v).collect();
-
-                let result =
-                    config.validate_signer_count_threshold(index % config.feed_ids.len(), &p);
-                assert_eq!(result.len(), expected_value.len());
-            }
-        }
-    }
-}
-
\ 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/crypto/recover.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/crypto/recover.rs.html deleted file mode 100644 index f03e84b0..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/crypto/recover.rs.html +++ /dev/null @@ -1,267 +0,0 @@ -recover.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-
use crate::crypto::{keccak256, recover::crypto256::recover_public_key};
-
-pub fn recover_address(message: Vec<u8>, signature: Vec<u8>) -> Vec<u8> {
-    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],
-        recovery_byte - (if recovery_byte >= 27 { 27 } else { 0 }),
-    );
-    let key_hash = keccak256::keccak256(&key[1..]); // skip first uncompressed-key byte
-
-    key_hash[12..].into() // last 20 bytes
-}
-
-#[cfg(feature = "crypto_secp256k1")]
-pub(crate) mod crypto256 {
-    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],
-        recovery_byte: u8,
-    ) -> Box<[u8]> {
-        let msg = Message::from_digest_slice(message_hash.as_ref())
-            .unwrap_or_revert(|_| Error::CryptographicError(message_hash.len()));
-
-        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)
-                .unwrap_or_revert(|_| Error::CryptographicError(signature_bytes.len()));
-
-        let public_key = Secp256k1Curve::new().recover_ecdsa(&msg, &sig);
-
-        public_key.unwrap().serialize_uncompressed().into()
-    }
-}
-
-#[cfg(feature = "crypto_k256")]
-pub(crate) mod crypto256 {
-    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],
-        recovery_byte: u8,
-    ) -> Box<[u8]> {
-        let recovery_id = RecoveryId::from_byte(recovery_byte)
-            .unwrap_or_revert(|_| Error::CryptographicError(recovery_byte.into()));
-
-        let signature = Signature::try_from(signature_bytes)
-            .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());
-
-        recovered_key.unwrap()
-    }
-}
-
-#[cfg(all(not(feature = "crypto_k256"), not(feature = "crypto_secp256k1")))]
-pub(crate) mod crypto256 {
-    pub(crate) fn recover_public_key(
-        _message_hash: Box<[u8]>,
-        _signature_bytes: &[u8],
-        _recovery_byte: u8,
-    ) -> Box<[u8]> {
-        panic!("Not implemented!")
-    }
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        crypto::recover::{crypto256::recover_public_key, recover_address},
-        helpers::hex::hex_to_bytes,
-    };
-
-    const MESSAGE: &str = "415641580000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d394303d018d79bf0ba000000020000001";
-    const MESSAGE_HASH: &str = "f0805644755393876d0e917e553f0c206f8bc68b7ebfe73a79d2a9e7f5a4cea6";
-    const SIG_V27: &str = "475195641dae43318e194c3d9e5fc308773d6fdf5e197e02644dfd9ca3d19e3e2bd7d8656428f7f02e658a16b8f83722169c57126cc50bec8fad188b1bac6d19";
-    const SIG_V28: &str = "c88242d22d88252c845b946c9957dbf3c7d59a3b69ecba2898198869f9f146ff268c3e47a11dbb05cc5198aadd659881817a59ee37e088d3253f4695927428c1";
-    const PUBLIC_KEY_V27: &str =
-        "04f5f035588502146774d0ccfd62ee5bf1d7f1dbb96aae33a79765c636b8ec75a36f5121931b5cc37215a7d4280c5700ca92daaaf93c32b06ca9f98b1f4ece624e";
-    const PUBLIC_KEY_V28: &str =
-        "04626f2ad2cfb0b41a24276d78de8959bcf45fc5e80804416e660aab2089d15e98206526e639ee19d17c8f9ae0ce3a6ff1a8ea4ab773d0fb4214e08aad7ba978c8";
-    const ADDRESS_V27: &str = "2c59617248994D12816EE1Fa77CE0a64eEB456BF";
-    const ADDRESS_V28: &str = "12470f7aBA85c8b81D63137DD5925D6EE114952b";
-
-    #[test]
-    fn test_recover_public_key_v27() {
-        let public_key = recover_public_key(u8_box(MESSAGE_HASH), &u8_box(SIG_V27), 0);
-
-        assert_eq!(u8_box(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);
-
-        assert_eq!(u8_box(PUBLIC_KEY_V28), public_key);
-    }
-
-    #[test]
-    fn test_recover_address_1b() {
-        let address = recover_address(
-            hex_to_bytes(MESSAGE.into()),
-            hex_to_bytes(SIG_V27.to_owned() + "1b"),
-        );
-
-        assert_eq!(hex_to_bytes(ADDRESS_V27.into()), address);
-    }
-
-    #[test]
-    fn test_recover_address_1c() {
-        let address = recover_address(
-            hex_to_bytes(MESSAGE.into()),
-            hex_to_bytes(SIG_V28.to_owned() + "1c"),
-        );
-
-        assert_eq!(hex_to_bytes(ADDRESS_V28.into()), address);
-    }
-
-    fn u8_box(str: &str) -> Box<[u8]> {
-        hex_to_bytes(str.into()).as_slice().into()
-    }
-}
-
\ 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/as_str.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/as_str.rs.html deleted file mode 100644 index f0b58bfb..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/as_str.rs.html +++ /dev/null @@ -1,235 +0,0 @@ -as_str.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-
extern crate alloc;
-
-use crate::network::specific::U256;
-use alloc::{format, string::String};
-
-pub trait AsHexStr {
-    fn as_hex_str(&self) -> String;
-}
-
-impl AsHexStr for &[u8] {
-    #[allow(clippy::format_collect)]
-    fn as_hex_str(&self) -> String {
-        self.iter().map(|byte| format!("{:02x}", byte)).collect()
-    }
-}
-
-#[cfg(feature = "network_casper")]
-impl AsHexStr for casper_types::bytesrepr::Bytes {
-    fn as_hex_str(&self) -> String {
-        self.as_slice().as_hex_str()
-    }
-}
-
-#[cfg(not(feature = "network_radix"))]
-impl AsHexStr for U256 {
-    fn as_hex_str(&self) -> String {
-        format!("{:X}", self)
-    }
-}
-
-#[cfg(feature = "network_radix")]
-impl AsHexStr for U256 {
-    fn as_hex_str(&self) -> String {
-        let digits = self.to_digits();
-        let mut result = String::new();
-        for &part in &digits {
-            if result.is_empty() || part != 0u64 {
-                result.push_str(&format!("{:02X}", part));
-            }
-        }
-        result
-    }
-}
-
-impl AsHexStr for Vec<u8> {
-    fn as_hex_str(&self) -> String {
-        self.as_slice().as_hex_str()
-    }
-}
-
-impl AsHexStr for Box<[u8]> {
-    fn as_hex_str(&self) -> String {
-        self.as_ref().as_hex_str()
-    }
-}
-
-pub trait AsAsciiStr {
-    fn as_ascii_str(&self) -> String;
-}
-
-impl AsAsciiStr for &[u8] {
-    fn as_ascii_str(&self) -> String {
-        self.iter().map(|&code| code as char).collect()
-    }
-}
-
-impl AsAsciiStr for Vec<u8> {
-    fn as_ascii_str(&self) -> String {
-        self.as_slice().as_ascii_str()
-    }
-}
-
-#[cfg(feature = "network_casper")]
-impl AsAsciiStr for casper_types::bytesrepr::Bytes {
-    fn as_ascii_str(&self) -> String {
-        self.as_slice().as_ascii_str()
-    }
-}
-
-impl AsAsciiStr for U256 {
-    fn as_ascii_str(&self) -> String {
-        let hex_string = self.as_hex_str();
-        let bytes = (0..hex_string.len())
-            .step_by(2)
-            .map(|i| u8::from_str_radix(&hex_string[i..i + 2], 16))
-            .collect::<Result<Vec<u8>, _>>()
-            .unwrap();
-
-        bytes.as_ascii_str()
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use crate::network::{
-        as_str::{AsAsciiStr, AsHexStr},
-        specific::U256,
-    };
-
-    const ETH: u32 = 4543560u32;
-
-    #[test]
-    fn test_as_hex_str() {
-        let u256 = U256::from(ETH);
-        let result = u256.as_hex_str();
-
-        assert_eq!(result, "455448");
-    }
-
-    #[test]
-    fn test_as_ascii_str() {
-        let u256 = U256::from(ETH);
-        let result = u256.as_ascii_str();
-
-        assert_eq!(result, "ETH");
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/assert.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/assert.rs.html deleted file mode 100644 index cfd43818..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/assert.rs.html +++ /dev/null @@ -1,273 +0,0 @@ -assert.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-
use crate::{
-    network::{error::Error, specific::revert},
-    print_debug,
-};
-use std::fmt::Debug;
-
-pub trait Assert<F> {
-    fn assert_or_revert<E: Fn(&Self) -> Error>(self, check: F, error: E) -> Self;
-}
-
-impl<T, F> Assert<F> for T
-where
-    T: Debug,
-    F: Fn(&Self) -> bool,
-{
-    fn assert_or_revert<E: FnOnce(&Self) -> Error>(self, check: F, error: E) -> Self {
-        assert_or_revert(self, check, error)
-    }
-}
-
-#[inline]
-fn assert_or_revert<F, T, E: FnOnce(&T) -> Error>(arg: T, check: F, error: E) -> T
-where
-    F: Fn(&T) -> bool,
-    T: Debug,
-{
-    assert_or_revert_bool_with(check(&arg), || error(&arg));
-
-    arg
-}
-
-#[inline]
-fn assert_or_revert_bool_with<E: FnOnce() -> Error>(check: bool, error: E) {
-    if check {
-        return;
-    }
-
-    let error = error();
-    print_debug!("REVERT({}) - {}!", &error.code(), error);
-    revert(error);
-}
-
-pub trait Unwrap<R> {
-    type ErrorArg;
-
-    fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> R;
-}
-
-impl<T> Unwrap<T> for Option<T>
-where
-    T: Debug,
-{
-    type ErrorArg = ();
-
-    fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> T {
-        assert_or_revert(self, |arg| arg.is_some(), |_| error(&())).unwrap()
-    }
-}
-
-impl<T, Err> Unwrap<T> for Result<T, Err>
-where
-    T: Debug,
-    Err: Debug,
-{
-    type ErrorArg = Err;
-
-    fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> T {
-        assert_or_revert(
-            self,
-            |arg| arg.is_ok(),
-            |e| error(e.as_ref().err().unwrap()),
-        )
-        .unwrap()
-    }
-}
-
-#[cfg(test)]
-mod assert_or_revert_tests {
-    use crate::network::{
-        assert::{assert_or_revert_bool_with, Assert},
-        error::Error,
-    };
-
-    #[test]
-    fn test_assert_or_revert_bool_with_true() {
-        assert_or_revert_bool_with(true, || Error::ArrayIsEmpty);
-    }
-
-    #[should_panic(expected = "Array is empty")]
-    #[test]
-    fn test_assert_or_revert_bool_with_false() {
-        assert_or_revert_bool_with(false, || Error::ArrayIsEmpty);
-    }
-
-    #[test]
-    fn test_assert_or_revert_correct() {
-        5.assert_or_revert(|&x| x == 5, |&size| Error::SizeNotSupported(size));
-    }
-
-    #[should_panic(expected = "Size not supported: 5")]
-    #[test]
-    fn test_assert_or_revert_wrong() {
-        5.assert_or_revert(|&x| x < 5, |&size| Error::SizeNotSupported(size));
-    }
-}
-
-#[cfg(test)]
-mod unwrap_or_revert_tests {
-    use crate::network::{assert::Unwrap, error::Error};
-
-    #[test]
-    fn test_unwrap_or_revert_some() {
-        let result = Some(543).unwrap_or_revert(|_| Error::CryptographicError(333));
-
-        assert_eq!(result, 543);
-    }
-
-    #[should_panic(expected = "Cryptographic Error: 333")]
-    #[test]
-    fn test_unwrap_or_revert_none() {
-        (Option::<u64>::None).unwrap_or_revert(|_| Error::CryptographicError(333));
-    }
-
-    #[test]
-    fn test_unwrap_or_revert_ok() {
-        let result = Ok(256).unwrap_or_revert(|_: &Error| Error::CryptographicError(333));
-
-        assert_eq!(result, 256);
-    }
-
-    #[should_panic(expected = "Cryptographic Error: 567")]
-    #[test]
-    fn test_unwrap_or_revert_err() {
-        Result::<&[u8], Error>::Err(Error::CryptographicError(567)).unwrap_or_revert(|e| e.clone());
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/casper/error.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/casper/error.rs.html deleted file mode 100644 index 53deca0d..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/casper/error.rs.html +++ /dev/null @@ -1,17 +0,0 @@ -error.rs - source
1
-2
-3
-4
-5
-6
-7
-8
-
use crate::network::error::Error;
-use casper_types::ApiError;
-
-impl From<Error> for ApiError {
-    fn from(error: Error) -> Self {
-        ApiError::User(error.code())
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/casper/from_bytes_repr.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/casper/from_bytes_repr.rs.html deleted file mode 100644 index 7d4c10ab..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/casper/from_bytes_repr.rs.html +++ /dev/null @@ -1,21 +0,0 @@ -from_bytes_repr.rs - source
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-
use crate::network::{
-    from_bytes_repr::{FromBytesRepr, Sanitized},
-    specific::U256,
-};
-
-impl FromBytesRepr<Vec<u8>> for U256 {
-    fn from_bytes_repr(bytes: Vec<u8>) -> Self {
-        bytes.sanitized().as_slice().into()
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/casper/mod.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/casper/mod.rs.html deleted file mode 100644 index 8df66718..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/casper/mod.rs.html +++ /dev/null @@ -1,77 +0,0 @@ -mod.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
-
use crate::network::{error::Error, specific::NetworkSpecific};
-
-mod error;
-mod from_bytes_repr;
-
-pub struct Casper;
-
-impl NetworkSpecific for Casper {
-    type BytesRepr = casper_types::bytesrepr::Bytes;
-    type ValueRepr = casper_types::U256;
-    type _Self = Self;
-
-    const VALUE_SIZE: usize = 32;
-
-    fn print(_text: String) {
-        #[cfg(all(not(test), feature = "print_debug"))]
-        {
-            casper_contract::contract_api::runtime::print(&_text);
-        }
-
-        #[cfg(test)]
-        {
-            println!("{}", _text);
-        }
-    }
-
-    fn revert(error: Error) -> ! {
-        #[cfg(not(test))]
-        {
-            casper_contract::contract_api::runtime::revert(error)
-        }
-
-        #[cfg(test)]
-        {
-            panic!("{}", error)
-        }
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/error.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/error.rs.html deleted file mode 100644 index 4c0588a6..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/error.rs.html +++ /dev/null @@ -1,351 +0,0 @@ -error.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-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
-175
-
use crate::network::{
-    as_str::{AsAsciiStr, AsHexStr},
-    specific::U256,
-};
-use std::fmt::{Debug, Display, Formatter};
-
-pub trait ContractErrorContent: Debug {
-    fn code(&self) -> u8;
-    fn message(&self) -> String;
-}
-
-/// 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.
-#[derive(Debug)]
-pub enum Error {
-    /// 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.
-    ContractError(Box<dyn ContractErrorContent>),
-
-    /// Indicates an overflow error with `U256` numbers.
-    ///
-    /// Used when operations on `U256` numbers exceed their maximum value, potentially leading
-    /// to incorrect calculations or state.
-    NumberOverflow(U256),
-
-    /// 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.
-    ArrayIsEmpty,
-
-    /// 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.
-    CryptographicError(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.
-    SizeNotSupported(usize),
-
-    /// 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.
-    WrongRedStoneMarker(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.
-    NonEmptyPayloadRemainder(Vec<u8>),
-
-    /// 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.
-    InsufficientSignerCount(usize, usize, U256),
-
-    /// 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.
-    TimestampTooOld(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.
-    TimestampTooFuture(usize, u64),
-
-    /// 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.
-    ClonedContractError(u8, String),
-}
-
-impl Error {
-    pub fn contract_error<T: ContractErrorContent + 'static>(value: T) -> Error {
-        Error::ContractError(Box::new(value))
-    }
-
-    pub(crate) fn code(&self) -> u16 {
-        match self {
-            Error::ContractError(boxed) => boxed.code() as u16,
-            Error::NumberOverflow(_) => 509,
-            Error::ArrayIsEmpty => 510,
-            Error::WrongRedStoneMarker(_) => 511,
-            Error::NonEmptyPayloadRemainder(_) => 512,
-            Error::InsufficientSignerCount(data_package_index, value, _) => {
-                (2000 + data_package_index * 10 + value) as u16
-            }
-            Error::SizeNotSupported(size) => 600 + *size as u16,
-            Error::CryptographicError(size) => 700 + *size as u16,
-            Error::TimestampTooOld(data_package_index, _) => 1000 + *data_package_index as u16,
-            Error::TimestampTooFuture(data_package_index, _) => 1050 + *data_package_index as u16,
-            Error::ClonedContractError(code, _) => *code as u16,
-        }
-    }
-}
-
-impl Display for Error {
-    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
-        match self {
-            Error::ContractError(boxed) => write!(f, "Contract error: {}", boxed.message()),
-            Error::NumberOverflow(number) => write!(f, "Number overflow: {}", number),
-            Error::ArrayIsEmpty => write!(f, "Array is empty"),
-            Error::CryptographicError(size) => write!(f, "Cryptographic Error: {}", size),
-            Error::SizeNotSupported(size) => write!(f, "Size not supported: {}", size),
-            Error::WrongRedStoneMarker(bytes) => {
-                write!(f, "Wrong RedStone marker: {}", bytes.as_hex_str())
-            }
-            Error::NonEmptyPayloadRemainder(bytes) => {
-                write!(f, "Non empty payload remainder: {}", bytes.as_hex_str())
-            }
-            Error::InsufficientSignerCount(data_package_index, value, feed_id) => write!(
-                f,
-                "Insufficient signer count {} for #{} ({})",
-                value,
-                data_package_index,
-                feed_id.as_ascii_str()
-            ),
-            Error::TimestampTooOld(data_package_index, value) => {
-                write!(
-                    f,
-                    "Timestamp {} is too old for #{}",
-                    value, data_package_index
-                )
-            }
-            Error::TimestampTooFuture(data_package_index, value) => write!(
-                f,
-                "Timestamp {} is too future for #{}",
-                value, data_package_index
-            ),
-            Error::ClonedContractError(_, message) => {
-                write!(f, "(Cloned) Contract error: {}", message)
-            }
-        }
-    }
-}
-
-impl Clone for Error {
-    fn clone(&self) -> Self {
-        match self {
-            Error::ContractError(content) => {
-                Error::ClonedContractError(content.code(), content.message())
-            }
-            Error::NumberOverflow(value) => Error::NumberOverflow(*value),
-            Error::ArrayIsEmpty => Error::ArrayIsEmpty,
-            Error::CryptographicError(size) => Error::CryptographicError(*size),
-            Error::SizeNotSupported(size) => Error::SizeNotSupported(*size),
-            Error::WrongRedStoneMarker(bytes) => Error::WrongRedStoneMarker(bytes.clone()),
-            Error::NonEmptyPayloadRemainder(bytes) => {
-                Error::NonEmptyPayloadRemainder(bytes.clone())
-            }
-            Error::InsufficientSignerCount(count, needed, bytes) => {
-                Error::InsufficientSignerCount(*count, *needed, *bytes)
-            }
-            Error::TimestampTooOld(index, timestamp) => Error::TimestampTooOld(*index, *timestamp),
-            Error::TimestampTooFuture(index, timestamp) => {
-                Error::TimestampTooFuture(*index, *timestamp)
-            }
-            Error::ClonedContractError(code, message) => {
-                Error::ClonedContractError(*code, message.as_str().into())
-            }
-        }
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/flattened.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/flattened.rs.html deleted file mode 100644 index f8226f69..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/flattened.rs.html +++ /dev/null @@ -1,71 +0,0 @@ -flattened.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
-
use crate::network::specific::Bytes;
-
-pub trait Flattened<T> {
-    fn flattened(&self) -> T;
-}
-
-impl Flattened<Bytes> for Vec<Bytes> {
-    fn flattened(&self) -> Bytes {
-        #[allow(clippy::useless_conversion)]
-        self.iter().flatten().copied().collect::<Vec<_>>().into()
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use crate::network::{flattened::Flattened, specific::Bytes};
-
-    #[test]
-    fn test_bytes_flattened() {
-        #[allow(clippy::useless_conversion)]
-        let bytes: Vec<Bytes> = vec![
-            vec![1u8, 2, 3].into(),
-            vec![4u8].into(),
-            vec![].into(),
-            vec![5, 6, 7].into(),
-        ];
-
-        let result: Bytes = bytes.flattened();
-
-        #[allow(clippy::useless_conversion)]
-        let expected_result: Bytes = vec![1u8, 2, 3, 4, 5, 6, 7].into();
-
-        assert_eq!(result, expected_result);
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/from_bytes_repr.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/from_bytes_repr.rs.html deleted file mode 100644 index 0c7663c5..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/from_bytes_repr.rs.html +++ /dev/null @@ -1,257 +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
-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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-
use crate::network::specific::VALUE_SIZE;
-
-pub trait FromBytesRepr<T> {
-    fn from_bytes_repr(bytes: T) -> Self;
-}
-
-pub trait Sanitized {
-    fn sanitized(self) -> Self;
-}
-
-impl Sanitized for Vec<u8> {
-    fn sanitized(self) -> Self {
-        if self.len() <= VALUE_SIZE {
-            return self;
-        }
-
-        let index = self.len().max(VALUE_SIZE) - VALUE_SIZE;
-        let remainder = &self[0..index];
-
-        if remainder != vec![0; index] {
-            panic!("Number to big: {:?} digits", self.len())
-        }
-
-        self[index..].into()
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use crate::network::{
-        from_bytes_repr::FromBytesRepr,
-        specific::{U256, VALUE_SIZE},
-    };
-
-    #[cfg(feature = "network_radix")]
-    use crate::network::radix::u256_ext::U256Ext;
-
-    #[test]
-    fn test_from_bytes_repr_single() {
-        let vec = vec![1];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(1u32));
-    }
-
-    #[test]
-    fn test_from_bytes_repr_double() {
-        let vec = vec![1, 2];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(258u32));
-    }
-
-    #[test]
-    fn test_from_bytes_repr_simple() {
-        let vec = vec![1, 2, 3];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(66051u32));
-    }
-
-    #[test]
-    fn test_from_bytes_repr_bigger() {
-        let vec = vec![101, 202, 255];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(6671103u32));
-    }
-
-    #[test]
-    fn test_from_bytes_repr_empty() {
-        let result = U256::from_bytes_repr(Vec::new());
-
-        assert_eq!(result, U256::from(0u8));
-    }
-
-    #[test]
-    fn test_from_bytes_repr_trailing_zeroes() {
-        let vec = vec![1, 2, 3, 0];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(16909056u32));
-    }
-
-    #[test]
-    fn test_from_bytes_repr_leading_zeroes() {
-        let vec = vec![0, 1, 2, 3];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(66051u32));
-    }
-
-    #[allow(clippy::legacy_numeric_constants)]
-    #[test]
-    fn test_from_bytes_repr_max() {
-        let vec = vec![255; VALUE_SIZE];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::max_value());
-    }
-
-    #[test]
-    fn test_from_bytes_repr_min() {
-        let vec = vec![0; VALUE_SIZE];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(0u8));
-    }
-
-    #[should_panic(expected = "Number to big")]
-    #[test]
-    fn test_from_bytes_repr_too_long() {
-        let x = VALUE_SIZE as u8 + 1;
-        let vec = (1..=x).collect();
-
-        U256::from_bytes_repr(vec);
-    }
-
-    #[allow(clippy::legacy_numeric_constants)]
-    #[test]
-    fn test_from_bytes_repr_too_long_but_zeroes() {
-        let mut vec = vec![255; VALUE_SIZE + 1];
-        vec[0] = 0;
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::max_value());
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/mod.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/mod.rs.html deleted file mode 100644 index f79fb758..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/mod.rs.html +++ /dev/null @@ -1,51 +0,0 @@ -mod.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
-
pub mod as_str;
-pub mod assert;
-pub mod error;
-pub mod from_bytes_repr;
-pub mod print_debug;
-pub mod specific;
-
-#[cfg(feature = "network_casper")]
-pub mod casper;
-
-#[cfg(feature = "network_casper")]
-pub type _Network = casper::Casper;
-
-#[cfg(feature = "network_radix")]
-pub mod radix;
-
-#[cfg(feature = "network_radix")]
-pub type _Network = radix::Radix;
-
-pub mod flattened;
-#[cfg(all(not(feature = "network_casper"), not(feature = "network_radix")))]
-mod pure;
-
-#[cfg(all(not(feature = "network_casper"), not(feature = "network_radix")))]
-pub type _Network = pure::Std;
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/print_debug.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/print_debug.rs.html deleted file mode 100644 index 1fca4faf..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/print_debug.rs.html +++ /dev/null @@ -1,47 +0,0 @@ -print_debug.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
-
extern crate alloc;
-
-#[macro_export]
-macro_rules! print_debug {
-    ($fmt:expr) => {
-        $crate::network::specific::print(format!($fmt))
-    };
-    ($fmt:expr, $($args:tt)*) => {
-        $crate::network::specific::print(format!($fmt, $($args)*))
-    };
-}
-
-#[macro_export]
-macro_rules! print_and_panic {
-    ($fmt:expr) => {{
-        $crate::print_debug!($fmt);
-        panic!($fmt)
-    }};
-    ($fmt:expr, $($args:tt)*) => {{
-        $crate::print_debug!($fmt, $($args)*);
-        panic!($fmt, $($args)*)
-    }};
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/pure/from_bytes_repr.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/pure/from_bytes_repr.rs.html deleted file mode 100644 index dfb1ae60..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/pure/from_bytes_repr.rs.html +++ /dev/null @@ -1,21 +0,0 @@ -from_bytes_repr.rs - source
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-
use crate::network::{
-    from_bytes_repr::{FromBytesRepr, Sanitized},
-    specific::U256,
-};
-
-impl FromBytesRepr<Vec<u8>> for U256 {
-    fn from_bytes_repr(bytes: Vec<u8>) -> Self {
-        Self::from_big_endian(bytes.sanitized().as_slice())
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/pure/mod.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/pure/mod.rs.html deleted file mode 100644 index 36cc7a10..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/pure/mod.rs.html +++ /dev/null @@ -1,47 +0,0 @@ -mod.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
-
use crate::network::{error::Error, specific::NetworkSpecific};
-use primitive_types::U256;
-use std::eprintln;
-
-mod from_bytes_repr;
-
-pub struct Std;
-
-impl NetworkSpecific for Std {
-    type BytesRepr = Vec<u8>;
-    type ValueRepr = U256;
-    type _Self = Std;
-
-    const VALUE_SIZE: usize = 32;
-
-    fn print(text: String) {
-        eprintln!("{}", text)
-    }
-
-    fn revert(error: Error) -> ! {
-        panic!("{}", error)
-    }
-}
-
\ 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/mod.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/radix/mod.rs.html deleted file mode 100644 index 63716f28..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/radix/mod.rs.html +++ /dev/null @@ -1,77 +0,0 @@ -mod.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
-
use crate::network::{error::Error, specific::NetworkSpecific};
-
-mod from_bytes_repr;
-pub mod u256_ext;
-
-pub struct Radix;
-
-impl NetworkSpecific for Radix {
-    type BytesRepr = Vec<u8>;
-    type ValueRepr = radix_common::math::bnum_integer::U256;
-    type _Self = Self;
-
-    const VALUE_SIZE: usize = 32;
-
-    fn print(_text: String) {
-        #[cfg(all(not(test), feature = "print_debug"))]
-        {
-            scrypto::prelude::info!("{}", _text);
-        }
-
-        #[cfg(test)]
-        {
-            println!("{}", _text);
-        }
-    }
-
-    fn revert(error: Error) -> ! {
-        #[cfg(not(test))]
-        {
-            scrypto::prelude::Runtime::panic(error.to_string())
-        }
-
-        #[cfg(test)]
-        {
-            panic!("{}", error)
-        }
-    }
-}
-
\ 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/network/specific.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/specific.rs.html deleted file mode 100644 index 8d698709..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/network/specific.rs.html +++ /dev/null @@ -1,51 +0,0 @@ -specific.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
-
use crate::network::{_Network, error::Error, from_bytes_repr::FromBytesRepr};
-
-pub trait NetworkSpecific {
-    type BytesRepr: From<Vec<u8>> + Into<Vec<u8>>;
-    type ValueRepr: FromBytesRepr<Vec<u8>>;
-    type _Self;
-
-    const VALUE_SIZE: usize;
-
-    fn print(_text: String);
-    fn revert(error: Error) -> !;
-}
-
-pub(crate) type Network = <_Network as NetworkSpecific>::_Self;
-pub type Bytes = <_Network as NetworkSpecific>::BytesRepr;
-pub type U256 = <_Network as NetworkSpecific>::ValueRepr;
-pub const VALUE_SIZE: usize = <_Network as NetworkSpecific>::VALUE_SIZE;
-
-pub fn print(_text: String) {
-    Network::print(_text)
-}
-
-pub fn revert(error: Error) -> ! {
-    Network::revert(error)
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/protocol/constants.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/protocol/constants.rs.html deleted file mode 100644 index 3e2f4fd5..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/protocol/constants.rs.html +++ /dev/null @@ -1,23 +0,0 @@ -constants.rs - source
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-
pub(crate) const UNSIGNED_METADATA_BYTE_SIZE_BS: usize = 3;
-pub(crate) const DATA_PACKAGES_COUNT_BS: usize = 2;
-pub(crate) const DATA_POINTS_COUNT_BS: usize = 3;
-pub(crate) const SIGNATURE_BS: usize = 65;
-pub(crate) const DATA_POINT_VALUE_BYTE_SIZE_BS: usize = 4;
-pub(crate) const DATA_FEED_ID_BS: usize = 32;
-pub(crate) const TIMESTAMP_BS: usize = 6;
-pub(crate) const MAX_TIMESTAMP_DELAY_MS: u64 = 15 * 60 * 1000; // 15 minutes in milliseconds
-pub(crate) const MAX_TIMESTAMP_AHEAD_MS: u64 = 3 * 60 * 1000; // 3 minutes in milliseconds
-pub(crate) const REDSTONE_MARKER_BS: usize = 9;
-pub(crate) const REDSTONE_MARKER: [u8; 9] = [0, 0, 2, 237, 87, 1, 30, 0, 0]; // 0x000002ed57011e0000
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/protocol/data_package.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/protocol/data_package.rs.html deleted file mode 100644 index a1d603e6..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/protocol/data_package.rs.html +++ /dev/null @@ -1,431 +0,0 @@ -data_package.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-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
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-
use crate::{
-    crypto::recover::recover_address,
-    network::as_str::AsHexStr,
-    protocol::{
-        constants::{
-            DATA_FEED_ID_BS, DATA_POINTS_COUNT_BS, DATA_POINT_VALUE_BYTE_SIZE_BS, SIGNATURE_BS,
-            TIMESTAMP_BS,
-        },
-        data_point::{trim_data_points, DataPoint},
-    },
-    utils::trim::Trim,
-};
-use std::fmt::{Debug, Formatter};
-
-#[derive(Clone, PartialEq, Eq)]
-pub(crate) struct DataPackage {
-    pub(crate) signer_address: Vec<u8>,
-    pub(crate) timestamp: u64,
-    pub(crate) data_points: Vec<DataPoint>,
-}
-
-pub(crate) fn trim_data_packages(payload: &mut Vec<u8>, count: usize) -> Vec<DataPackage> {
-    let mut data_packages = Vec::new();
-
-    for _ in 0..count {
-        let data_package = trim_data_package(payload);
-        data_packages.push(data_package);
-    }
-
-    data_packages
-}
-
-fn trim_data_package(payload: &mut Vec<u8>) -> DataPackage {
-    let signature = payload.trim_end(SIGNATURE_BS);
-    let mut tmp = payload.clone();
-
-    let data_point_count = payload.trim_end(DATA_POINTS_COUNT_BS);
-    let value_size = payload.trim_end(DATA_POINT_VALUE_BYTE_SIZE_BS);
-    let timestamp = payload.trim_end(TIMESTAMP_BS);
-    let size = data_point_count * (value_size + DATA_FEED_ID_BS)
-        + DATA_POINT_VALUE_BYTE_SIZE_BS
-        + TIMESTAMP_BS
-        + DATA_POINTS_COUNT_BS;
-
-    let signable_bytes = tmp.trim_end(size);
-    let signer_address = recover_address(signable_bytes, signature);
-
-    let data_points = trim_data_points(payload, data_point_count, value_size);
-
-    DataPackage {
-        data_points,
-        timestamp,
-        signer_address,
-    }
-}
-
-impl Debug for DataPackage {
-    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
-        write!(
-            f,
-            "DataPackage {{\n   signer_address: 0x{}, timestamp: {},\n   data_points: {:?}\n}}",
-            self.signer_address.as_hex_str(),
-            self.timestamp,
-            self.data_points
-        )
-    }
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        helpers::hex::hex_to_bytes,
-        network::{from_bytes_repr::FromBytesRepr, specific::U256},
-        protocol::{
-            constants::{
-                DATA_FEED_ID_BS, DATA_POINTS_COUNT_BS, DATA_POINT_VALUE_BYTE_SIZE_BS, SIGNATURE_BS,
-                TIMESTAMP_BS,
-            },
-            data_package::{trim_data_package, trim_data_packages, DataPackage},
-            data_point::DataPoint,
-        },
-    };
-
-    const DATA_PACKAGE_BYTES_1: &str = "4554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000360cafc94e018d79bf0ba00000002000000151afa8c5c3caf6004b42c0fb17723e524f993b9ecbad3b9bce5ec74930fa436a3660e8edef10e96ee5f222de7ef5787c02ca467c0ec18daa2907b43ac20c63c11c";
-    const DATA_PACKAGE_BYTES_2: &str = "4554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000360cdd851e018d79bf0ba000000020000001473fd9dc72e6814a7de719b403cf4c9eba08934a643fd0666c433b806b31e69904f2226ffd3c8ef75861b11b5e32a1fda4b1458e0da4605a772dfba2a812f3ee1b";
-
-    const SIGNER_ADDRESS_1: &str = "1ea62d73edf8ac05dfcea1a34b9796e937a29eff";
-    const SIGNER_ADDRESS_2: &str = "109b4a318a4f5ddcbca6349b45f881b4137deafb";
-
-    const VALUE_1: u128 = 232141080910;
-    const VALUE_2: u128 = 232144078110;
-
-    const DATA_PACKAGE_SIZE: usize = 32
-        + DATA_FEED_ID_BS
-        + DATA_POINT_VALUE_BYTE_SIZE_BS
-        + TIMESTAMP_BS
-        + SIGNATURE_BS
-        + DATA_POINTS_COUNT_BS;
-
-    #[test]
-    fn test_trim_data_packages() {
-        test_trim_data_packages_of(2, "");
-        test_trim_data_packages_of(0, "");
-        test_trim_data_packages_of(1, "");
-    }
-
-    #[test]
-    fn test_trim_data_packages_with_prefix() {
-        let prefix = "da4687f1914a1c";
-
-        test_trim_data_packages_of(2, prefix);
-    }
-
-    #[test]
-    fn test_trim_data_packages_single() {
-        let mut bytes = hex_to_bytes(DATA_PACKAGE_BYTES_1.into());
-        let data_packages = trim_data_packages(&mut bytes, 1);
-        assert_eq!(data_packages.len(), 1);
-        assert_eq!(bytes, Vec::<u8>::new());
-
-        verify_data_package(data_packages[0].clone(), VALUE_1, SIGNER_ADDRESS_1);
-    }
-
-    fn test_trim_data_packages_of(count: usize, prefix: &str) {
-        let input: Vec<u8> =
-            hex_to_bytes((prefix.to_owned() + DATA_PACKAGE_BYTES_1) + DATA_PACKAGE_BYTES_2);
-        let mut bytes = input.clone();
-        let data_packages = trim_data_packages(&mut bytes, count);
-
-        assert_eq!(data_packages.len(), count);
-        assert_eq!(
-            bytes.as_slice(),
-            &input[..input.len() - count * DATA_PACKAGE_SIZE]
-        );
-
-        let values = &[VALUE_2, VALUE_1];
-        let signers = &[SIGNER_ADDRESS_2, SIGNER_ADDRESS_1];
-
-        for i in 0..count {
-            verify_data_package(data_packages[i].clone(), values[i], signers[i]);
-        }
-    }
-
-    #[should_panic(expected = "index out of bounds")]
-    #[test]
-    fn test_trim_data_packages_bigger_number() {
-        test_trim_data_packages_of(3, "");
-    }
-
-    #[test]
-    fn test_trim_data_package() {
-        test_trim_data_package_of(DATA_PACKAGE_BYTES_1, VALUE_1, SIGNER_ADDRESS_1);
-        test_trim_data_package_of(DATA_PACKAGE_BYTES_2, VALUE_2, SIGNER_ADDRESS_2);
-    }
-
-    #[test]
-    fn test_trim_data_package_with_prefix() {
-        test_trim_data_package_of(
-            &("da4687f1914a1c".to_owned() + DATA_PACKAGE_BYTES_1),
-            VALUE_1,
-            SIGNER_ADDRESS_1,
-        );
-        test_trim_data_package_of(
-            &("da4687f1914a1c".to_owned() + DATA_PACKAGE_BYTES_2),
-            VALUE_2,
-            SIGNER_ADDRESS_2,
-        );
-    }
-
-    #[should_panic]
-    #[test]
-    fn test_trim_data_package_signature_only() {
-        test_trim_data_package_of(
-            &DATA_PACKAGE_BYTES_1[(DATA_PACKAGE_BYTES_1.len() - 2 * SIGNATURE_BS)..],
-            0,
-            "",
-        );
-    }
-
-    #[should_panic]
-    #[test]
-    fn test_trim_data_package_shorter() {
-        test_trim_data_package_of(
-            &DATA_PACKAGE_BYTES_1
-                [(DATA_PACKAGE_BYTES_1.len() - 2 * (SIGNATURE_BS + DATA_POINTS_COUNT_BS))..],
-            0,
-            "",
-        );
-    }
-
-    fn test_trim_data_package_of(bytes_str: &str, expected_value: u128, signer_address: &str) {
-        let mut bytes: Vec<u8> = hex_to_bytes(bytes_str.into());
-        let result = trim_data_package(&mut bytes);
-        assert_eq!(
-            bytes,
-            hex_to_bytes(bytes_str[..bytes_str.len() - 2 * (DATA_PACKAGE_SIZE)].into())
-        );
-
-        verify_data_package(result, expected_value, signer_address);
-    }
-
-    fn verify_data_package(result: DataPackage, expected_value: u128, signer_address: &str) {
-        let data_package = DataPackage {
-            data_points: vec![DataPoint {
-                feed_id: U256::from_bytes_repr(hex_to_bytes(DATA_PACKAGE_BYTES_1[..6].into())),
-                value: U256::from(expected_value),
-            }],
-            timestamp: 1707144580000,
-            signer_address: hex_to_bytes(signer_address.into()),
-        };
-
-        assert_eq!(result, data_package);
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/protocol/data_point.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/protocol/data_point.rs.html deleted file mode 100644 index e643085a..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/protocol/data_point.rs.html +++ /dev/null @@ -1,315 +0,0 @@ -data_point.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-
use crate::{
-    network::{
-        as_str::{AsAsciiStr, AsHexStr},
-        assert::Assert,
-        error::Error,
-        from_bytes_repr::FromBytesRepr,
-        specific::U256,
-    },
-    protocol::constants::DATA_FEED_ID_BS,
-    utils::{trim::Trim, trim_zeros::TrimZeros},
-};
-use std::fmt::{Debug, Formatter};
-
-#[derive(Clone, PartialEq, Eq)]
-pub(crate) struct DataPoint {
-    pub(crate) feed_id: U256,
-    pub(crate) value: U256,
-}
-
-pub(crate) fn trim_data_points(
-    payload: &mut Vec<u8>,
-    count: usize,
-    value_size: usize,
-) -> Vec<DataPoint> {
-    count.assert_or_revert(|&count| count == 1, |&count| Error::SizeNotSupported(count));
-
-    let mut data_points = Vec::new();
-
-    for _ in 0..count {
-        let data_point = trim_data_point(payload, value_size);
-        data_points.push(data_point);
-    }
-
-    data_points
-}
-
-fn trim_data_point(payload: &mut Vec<u8>, value_size: usize) -> DataPoint {
-    let value = payload.trim_end(value_size);
-    let feed_id: Vec<u8> = payload.trim_end(DATA_FEED_ID_BS);
-
-    DataPoint {
-        value,
-        feed_id: U256::from_bytes_repr(feed_id.trim_zeros()),
-    }
-}
-
-impl Debug for DataPoint {
-    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
-        write!(
-            f,
-            "DataPoint {{\n      feed_id: {:?} (0x{}), value: {}\n   }}",
-            self.feed_id.as_ascii_str(),
-            self.feed_id.as_hex_str(),
-            self.value,
-        )
-    }
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        helpers::hex::hex_to_bytes,
-        network::{
-            from_bytes_repr::FromBytesRepr,
-            specific::{U256, VALUE_SIZE},
-        },
-        protocol::{
-            constants::DATA_FEED_ID_BS,
-            data_point::{trim_data_point, trim_data_points, DataPoint},
-        },
-    };
-    use std::ops::Shr;
-
-    const DATA_POINT_BYTES_TAIL: &str = "4554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000360cafc94e";
-    const VALUE: u128 = 232141080910;
-
-    #[test]
-    fn test_trim_data_points() {
-        let mut bytes = hex_to_bytes(DATA_POINT_BYTES_TAIL.into());
-        let result = trim_data_points(&mut bytes, 1, 32);
-
-        assert_eq!(result.len(), 1);
-
-        verify_rest_and_result(
-            DATA_POINT_BYTES_TAIL,
-            32,
-            VALUE.into(),
-            bytes,
-            result[0].clone(),
-        )
-    }
-
-    #[should_panic(expected = "Size not supported: 0")]
-    #[test]
-    fn test_trim_zero_data_points() {
-        trim_data_points(&mut hex_to_bytes(DATA_POINT_BYTES_TAIL.into()), 0, 32);
-    }
-
-    #[should_panic(expected = "Size not supported: 2")]
-    #[test]
-    fn test_trim_two_data_points() {
-        trim_data_points(&mut hex_to_bytes(DATA_POINT_BYTES_TAIL.into()), 2, 32);
-    }
-
-    #[test]
-    fn test_trim_data_point() {
-        test_trim_data_point_of(DATA_POINT_BYTES_TAIL, 32, VALUE.into());
-    }
-
-    #[test]
-    fn test_trim_data_point_with_prefix() {
-        test_trim_data_point_of(
-            &("a2a812f3ee1b".to_owned() + DATA_POINT_BYTES_TAIL),
-            32,
-            VALUE.into(),
-        );
-    }
-
-    #[test]
-    fn test_trim_data_point_other_lengths() {
-        for i in 1..VALUE_SIZE {
-            test_trim_data_point_of(
-                &DATA_POINT_BYTES_TAIL[..DATA_POINT_BYTES_TAIL.len() - 2 * i],
-                32 - i,
-                U256::from(VALUE).shr(8 * i as u32),
-            );
-        }
-    }
-
-    fn test_trim_data_point_of(value: &str, size: usize, expected_value: U256) {
-        let mut bytes = hex_to_bytes(value.into());
-        let result = trim_data_point(&mut bytes, size);
-
-        verify_rest_and_result(value, size, expected_value, bytes, result);
-    }
-
-    fn verify_rest_and_result(
-        value: &str,
-        size: usize,
-        expected_value: U256,
-        rest: Vec<u8>,
-        result: DataPoint,
-    ) {
-        assert_eq!(
-            rest,
-            hex_to_bytes(value[..value.len() - 2 * (size + DATA_FEED_ID_BS)].into())
-        );
-
-        let data_point = DataPoint {
-            value: expected_value,
-            feed_id: U256::from_bytes_repr(hex_to_bytes(DATA_POINT_BYTES_TAIL[..6].to_string())),
-        };
-
-        assert_eq!(result, data_point);
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/protocol/marker.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/protocol/marker.rs.html deleted file mode 100644 index 15b31817..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/protocol/marker.rs.html +++ /dev/null @@ -1,133 +0,0 @@ -marker.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-
use crate::{
-    network::{assert::Assert, error::Error},
-    protocol::constants::{REDSTONE_MARKER, REDSTONE_MARKER_BS},
-    utils::trim::Trim,
-};
-
-pub fn trim_redstone_marker(payload: &mut Vec<u8>) {
-    let marker: Vec<u8> = payload.trim_end(REDSTONE_MARKER_BS);
-
-    marker.as_slice().assert_or_revert(
-        |&marker| marker == REDSTONE_MARKER,
-        |&val| Error::WrongRedStoneMarker(val.into()),
-    );
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        helpers::hex::hex_to_bytes,
-        protocol::{constants::REDSTONE_MARKER_BS, marker::trim_redstone_marker},
-    };
-
-    const PAYLOAD_TAIL: &str = "1c000f000000000002ed57011e0000";
-
-    #[test]
-    fn test_trim_redstone_marker() {
-        let mut bytes = hex_to_bytes(PAYLOAD_TAIL.into());
-        trim_redstone_marker(&mut bytes);
-
-        assert_eq!(
-            bytes,
-            hex_to_bytes(PAYLOAD_TAIL[..PAYLOAD_TAIL.len() - 2 * REDSTONE_MARKER_BS].into())
-        );
-    }
-
-    #[should_panic(expected = "Wrong RedStone marker: 000002ed57022e0000")]
-    #[test]
-    fn test_trim_redstone_marker_wrong() {
-        trim_redstone_marker(&mut hex_to_bytes(PAYLOAD_TAIL.replace('1', "2")));
-    }
-
-    #[should_panic(expected = "Wrong RedStone marker: 00000002ed57011e00")]
-    #[test]
-    fn test_trim_redstone_marker_wrong_ending() {
-        trim_redstone_marker(&mut hex_to_bytes(
-            PAYLOAD_TAIL[..PAYLOAD_TAIL.len() - 2].into(),
-        ));
-    }
-
-    #[should_panic(expected = "Wrong RedStone marker: 100002ed57011e0000")]
-    #[test]
-    fn test_trim_redstone_marker_wrong_beginning() {
-        trim_redstone_marker(&mut hex_to_bytes(
-            PAYLOAD_TAIL.replace("0000000", "1111111"),
-        ));
-    }
-
-    #[should_panic(expected = "Wrong RedStone marker: 0002ed57011e0000")]
-    #[test]
-    fn test_trim_redstone_marker_too_short() {
-        trim_redstone_marker(&mut hex_to_bytes(
-            PAYLOAD_TAIL[PAYLOAD_TAIL.len() - 2 * (REDSTONE_MARKER_BS - 1)..].into(),
-        ));
-    }
-}
-
\ 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/protocol/payload.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/protocol/payload.rs.html deleted file mode 100644 index 1cd14131..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/protocol/payload.rs.html +++ /dev/null @@ -1,209 +0,0 @@ -payload.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-
use crate::{
-    network::{assert::Assert, error::Error},
-    protocol::{
-        constants::{DATA_PACKAGES_COUNT_BS, UNSIGNED_METADATA_BYTE_SIZE_BS},
-        data_package::{trim_data_packages, DataPackage},
-        marker,
-    },
-    utils::trim::Trim,
-};
-
-#[derive(Clone, Debug)]
-pub(crate) struct Payload {
-    pub(crate) data_packages: Vec<DataPackage>,
-}
-
-impl Payload {
-    pub(crate) fn make(payload_bytes: &mut Vec<u8>) -> Payload {
-        marker::trim_redstone_marker(payload_bytes);
-        let payload = trim_payload(payload_bytes);
-
-        payload_bytes.assert_or_revert(
-            |bytes| bytes.is_empty(),
-            |bytes| Error::NonEmptyPayloadRemainder(bytes.as_slice().into()),
-        );
-
-        payload
-    }
-}
-
-fn trim_payload(payload: &mut Vec<u8>) -> Payload {
-    let data_package_count = trim_metadata(payload);
-    let data_packages = trim_data_packages(payload, data_package_count);
-
-    Payload { data_packages }
-}
-
-fn trim_metadata(payload: &mut Vec<u8>) -> usize {
-    let unsigned_metadata_size = payload.trim_end(UNSIGNED_METADATA_BYTE_SIZE_BS);
-    let _: Vec<u8> = payload.trim_end(unsigned_metadata_size);
-
-    payload.trim_end(DATA_PACKAGES_COUNT_BS)
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        helpers::hex::{hex_to_bytes, read_payload_bytes, read_payload_hex},
-        protocol::{
-            constants::REDSTONE_MARKER_BS,
-            payload::{trim_metadata, trim_payload, Payload},
-        },
-    };
-
-    const PAYLOAD_METADATA_BYTES: &str = "000f000000";
-    const PAYLOAD_METADATA_WITH_UNSIGNED_BYTE: &str = "000f55000001";
-    const PAYLOAD_METADATA_WITH_UNSIGNED_BYTES: &str = "000f11223344556677889900aabbccddeeff000010";
-
-    #[test]
-    fn test_trim_metadata() {
-        let prefix = "9e0294371c";
-
-        for &bytes_str in &[
-            PAYLOAD_METADATA_BYTES,
-            PAYLOAD_METADATA_WITH_UNSIGNED_BYTE,
-            PAYLOAD_METADATA_WITH_UNSIGNED_BYTES,
-        ] {
-            let mut bytes = hex_to_bytes(prefix.to_owned() + bytes_str);
-            let result = trim_metadata(&mut bytes);
-
-            assert_eq!(bytes, hex_to_bytes(prefix.into()));
-            assert_eq!(result, 15);
-        }
-    }
-
-    #[test]
-    fn test_trim_payload() {
-        let payload_hex = read_payload_bytes("./sample-data/payload.hex");
-
-        let mut bytes = payload_hex[..payload_hex.len() - REDSTONE_MARKER_BS].into();
-        let payload = trim_payload(&mut bytes);
-
-        assert_eq!(bytes, Vec::<u8>::new());
-        assert_eq!(payload.data_packages.len(), 15);
-    }
-
-    #[test]
-    fn test_make_payload() {
-        let mut payload_hex = read_payload_bytes("./sample-data/payload.hex");
-        let payload = Payload::make(&mut payload_hex);
-
-        assert_eq!(payload.data_packages.len(), 15);
-    }
-
-    #[should_panic(expected = "Non empty payload remainder: 12")]
-    #[test]
-    fn test_make_payload_with_prefix() {
-        let payload_hex = read_payload_hex("./sample-data/payload.hex");
-        let mut bytes = hex_to_bytes("12".to_owned() + &payload_hex);
-        let payload = Payload::make(&mut bytes);
-
-        assert_eq!(payload.data_packages.len(), 15);
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/utils/filter.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/utils/filter.rs.html deleted file mode 100644 index f28b29ef..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/utils/filter.rs.html +++ /dev/null @@ -1,43 +0,0 @@ -filter.rs - source
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-
pub(crate) trait FilterSome<Output> {
-    fn filter_some(&self) -> Output;
-}
-
-impl<T: Copy> FilterSome<Vec<T>> for [Option<T>] {
-    fn filter_some(&self) -> Vec<T> {
-        self.iter().filter_map(|&opt| opt).collect()
-    }
-}
-
-#[cfg(test)]
-mod filter_some_tests {
-    use crate::utils::filter::FilterSome;
-
-    #[test]
-    fn test_filter_some() {
-        let values = [None, Some(23u64), None, Some(12), Some(12), None, Some(23)];
-
-        assert_eq!(values.filter_some(), vec![23, 12, 12, 23])
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/utils/median.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/utils/median.rs.html deleted file mode 100644 index c329ff3b..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/utils/median.rs.html +++ /dev/null @@ -1,375 +0,0 @@ -median.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-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
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-
use crate::network::{assert::Assert, error::Error::ArrayIsEmpty, specific::U256};
-use std::ops::{Add, Rem, Shr};
-
-pub(crate) trait Median {
-    type Item;
-
-    fn median(self) -> Self::Item;
-}
-
-trait Avg {
-    fn avg(self, other: Self) -> Self;
-}
-
-trait Averageable:
-    Add<Output = Self> + Shr<Output = Self> + From<u8> + Rem<Output = Self> + Copy
-{
-}
-
-impl Averageable for i32 {}
-
-#[cfg(feature = "network_radix")]
-impl Avg for U256 {
-    fn avg(self, other: Self) -> Self {
-        let one = 1u32;
-        let two = U256::from(2u8);
-
-        self.shr(one) + other.shr(one) + (self % two + other % two).shr(one)
-    }
-}
-
-#[cfg(not(feature = "network_radix"))]
-impl Averageable for U256 {}
-
-impl<T> Avg for T
-where
-    T: Averageable,
-{
-    fn avg(self, other: Self) -> Self {
-        let one = T::from(1);
-        let two = T::from(2);
-
-        self.shr(one) + other.shr(one) + (self % two + other % two).shr(one)
-    }
-}
-
-impl<T> Median for Vec<T>
-where
-    T: Copy + Ord + Avg,
-{
-    type Item = T;
-
-    fn median(self) -> Self::Item {
-        let len = self.len();
-
-        match len.assert_or_revert(|x| *x > 0, |_| ArrayIsEmpty) {
-            1 => self[0],
-            2 => self[0].avg(self[1]),
-            3 => maybe_pick_median(self[0], self[1], self[2]).unwrap_or_else(|| {
-                maybe_pick_median(self[1], self[0], self[2])
-                    .unwrap_or_else(|| maybe_pick_median(self[1], self[2], self[0]).unwrap())
-            }),
-            _ => {
-                let mut values = self;
-                values.sort();
-
-                let mid = len / 2;
-
-                if len % 2 == 0 {
-                    values[mid - 1].avg(values[mid])
-                } else {
-                    values[mid]
-                }
-            }
-        }
-    }
-}
-
-#[inline]
-fn maybe_pick_median<T>(a: T, b: T, c: T) -> Option<T>
-where
-    T: PartialOrd,
-{
-    if (b >= a && b <= c) || (b >= c && b <= a) {
-        Some(b)
-    } else {
-        None
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use super::{Avg, Median};
-    use crate::network::specific::U256;
-    use itertools::Itertools;
-    use std::fmt::Debug;
-
-    #[cfg(feature = "network_radix")]
-    use crate::network::radix::u256_ext::U256Ext;
-
-    #[allow(clippy::legacy_numeric_constants)]
-    #[test]
-    fn test_avg() {
-        let u256 = U256::max_value(); // 115792089237316195423570985008687907853269984665640564039457584007913129639935
-        let u256_max_sub_1 = u256 - U256::from(1u32);
-        let u256max_div_2 = u256 / U256::from(2u32);
-
-        assert_eq!(u256.avg(U256::from(0u8)), u256max_div_2);
-        assert_eq!(u256.avg(U256::from(1u8)), u256max_div_2 + U256::from(1u8));
-        assert_eq!(u256.avg(u256_max_sub_1), u256_max_sub_1);
-        assert_eq!(u256.avg(u256), u256);
-
-        assert_eq!((u256_max_sub_1).avg(U256::from(0u8)), u256max_div_2);
-        assert_eq!((u256_max_sub_1).avg(U256::from(1u8)), u256max_div_2);
-        assert_eq!((u256_max_sub_1).avg(u256_max_sub_1), u256_max_sub_1);
-        assert_eq!((u256_max_sub_1).avg(u256), u256_max_sub_1);
-    }
-
-    #[test]
-    #[should_panic(expected = "Array is empty")]
-    fn test_median_empty_vector() {
-        let vec: Vec<i32> = vec![];
-
-        vec.median();
-    }
-
-    #[test]
-    fn test_median_single_element() {
-        assert_eq!(vec![1].median(), 1);
-    }
-
-    #[test]
-    fn test_median_two_elements() {
-        test_all_permutations(vec![1, 3], 2);
-        test_all_permutations(vec![1, 2], 1);
-        test_all_permutations(vec![1, 1], 1);
-    }
-
-    #[test]
-    fn test_median_three_elements() {
-        test_all_permutations(vec![1, 2, 3], 2);
-        test_all_permutations(vec![1, 1, 2], 1);
-        test_all_permutations(vec![1, 2, 2], 2);
-        test_all_permutations(vec![1, 1, 1], 1);
-    }
-
-    #[test]
-    fn test_median_even_number_of_elements() {
-        test_all_permutations(vec![1, 2, 3, 4], 2);
-        test_all_permutations(vec![1, 2, 4, 4], 3);
-        test_all_permutations(vec![1, 1, 3, 3], 2);
-        test_all_permutations(vec![1, 1, 3, 4], 2);
-        test_all_permutations(vec![1, 1, 1, 3], 1);
-        test_all_permutations(vec![1, 3, 3, 3], 3);
-        test_all_permutations(vec![1, 1, 1, 1], 1);
-        test_all_permutations(vec![1, 2, 3, 4, 5, 6], 3);
-    }
-
-    #[test]
-    fn test_median_odd_number_of_elements() {
-        test_all_permutations(vec![1, 2, 3, 4, 5], 3);
-        test_all_permutations(vec![1, 1, 3, 4, 5], 3);
-        test_all_permutations(vec![1, 1, 1, 4, 5], 1);
-        test_all_permutations(vec![1, 1, 1, 3, 3], 1);
-        test_all_permutations(vec![1, 1, 3, 3, 5], 3);
-
-        test_all_permutations(vec![1, 2, 3, 5, 5], 3);
-        test_all_permutations(vec![1, 2, 5, 5, 5], 5);
-        test_all_permutations(vec![1, 1, 3, 3, 3], 3);
-        test_all_permutations(vec![1, 3, 3, 5, 5], 3);
-
-        test_all_permutations(vec![1, 2, 2, 2, 2], 2);
-        test_all_permutations(vec![1, 1, 1, 1, 2], 1);
-        test_all_permutations(vec![1, 1, 1, 1, 1], 1);
-
-        test_all_permutations(vec![1, 2, 3, 4, 5, 6, 7], 4);
-    }
-
-    fn test_all_permutations<T: Copy + Ord + Avg + Debug>(numbers: Vec<T>, expected_value: T) {
-        let perms: Vec<Vec<_>> = numbers.iter().permutations(numbers.len()).collect();
-
-        for perm in perms {
-            let p: Vec<_> = perm.iter().map(|&&v| v).collect();
-
-            assert_eq!(p.median(), expected_value);
-        }
-    }
-}
-
\ 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/src/redstone/utils/trim.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/utils/trim.rs.html deleted file mode 100644 index 551a41a8..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/utils/trim.rs.html +++ /dev/null @@ -1,299 +0,0 @@ -trim.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-
use crate::network::{
-    assert::Unwrap, error::Error, from_bytes_repr::FromBytesRepr, specific::U256,
-};
-
-pub trait Trim<T>
-where
-    Self: Sized,
-{
-    fn trim_end(&mut self, len: usize) -> T;
-}
-
-impl Trim<Vec<u8>> for Vec<u8> {
-    fn trim_end(&mut self, len: usize) -> Self {
-        if len >= self.len() {
-            std::mem::take(self)
-        } else {
-            self.split_off(self.len() - len)
-        }
-    }
-}
-
-impl Trim<U256> for Vec<u8> {
-    fn trim_end(&mut self, len: usize) -> U256 {
-        U256::from_bytes_repr(self.trim_end(len))
-    }
-}
-
-impl Trim<usize> for Vec<u8> {
-    fn trim_end(&mut self, len: usize) -> usize {
-        let y: U256 = self.trim_end(len);
-        y.try_into().unwrap_or_revert(|_| Error::NumberOverflow(y))
-    }
-}
-
-impl Trim<u64> for Vec<u8> {
-    fn trim_end(&mut self, len: usize) -> u64 {
-        let y: U256 = self.trim_end(len);
-        y.try_into().unwrap_or_revert(|_| Error::NumberOverflow(y))
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use crate::{
-        network::specific::U256,
-        protocol::constants::{REDSTONE_MARKER, REDSTONE_MARKER_BS},
-        utils::trim::Trim,
-    };
-
-    const MARKER_DECIMAL: u64 = 823907890102272;
-
-    fn redstone_marker_bytes() -> Vec<u8> {
-        REDSTONE_MARKER.into()
-    }
-
-    #[test]
-    fn test_trim_end_number() {
-        let (rest, result): (_, U256) = test_trim_end(3);
-        assert_eq!(result, (256u32.pow(2) * 30).into());
-        assert_eq!(rest.as_slice(), &REDSTONE_MARKER[..6]);
-
-        let (_, result): (_, u64) = test_trim_end(3);
-        assert_eq!(result, 256u64.pow(2) * 30);
-
-        let (_, result): (_, usize) = test_trim_end(3);
-        assert_eq!(result, 256usize.pow(2) * 30);
-
-        let (_, result): (_, Vec<u8>) = test_trim_end(3);
-        assert_eq!(result.as_slice(), &REDSTONE_MARKER[6..]);
-    }
-
-    #[test]
-    fn test_trim_end_number_null() {
-        let (rest, result): (_, U256) = test_trim_end(0);
-        assert_eq!(result, 0u32.into());
-        assert_eq!(rest.as_slice(), &REDSTONE_MARKER);
-
-        let (_, result): (_, u64) = test_trim_end(0);
-        assert_eq!(result, 0);
-
-        let (_, result): (_, usize) = test_trim_end(0);
-        assert_eq!(result, 0);
-
-        let (_, result): (_, Vec<u8>) = test_trim_end(0);
-        assert_eq!(result, Vec::<u8>::new());
-    }
-
-    #[test]
-    fn test_trim_end_whole() {
-        test_trim_end_whole_size(REDSTONE_MARKER_BS);
-        test_trim_end_whole_size(REDSTONE_MARKER_BS - 1);
-        test_trim_end_whole_size(REDSTONE_MARKER_BS - 2);
-        test_trim_end_whole_size(REDSTONE_MARKER_BS + 1);
-    }
-
-    fn test_trim_end_whole_size(size: usize) {
-        let (rest, result): (_, U256) = test_trim_end(size);
-        assert_eq!(result, MARKER_DECIMAL.into());
-        assert_eq!(
-            rest.as_slice().len(),
-            REDSTONE_MARKER_BS - size.min(REDSTONE_MARKER_BS)
-        );
-
-        let (_, result): (_, u64) = test_trim_end(size);
-        assert_eq!(result, MARKER_DECIMAL);
-
-        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));
-    }
-
-    #[test]
-    fn test_trim_end_u64() {
-        let mut bytes = vec![255, 255, 255, 255, 255, 255, 255, 255, 255];
-        let x: u64 = bytes.trim_end(8);
-
-        let expected_bytes = vec![255];
-
-        assert_eq!(bytes, expected_bytes);
-        assert_eq!(x, 18446744073709551615);
-    }
-
-    #[should_panic(expected = "Number overflow: 18591708106338011145")]
-    #[test]
-    fn test_trim_end_u64_overflow() {
-        let mut bytes = vec![1u8, 2, 3, 4, 5, 6, 7, 8, 9];
-
-        let _: u64 = bytes.trim_end(9);
-    }
-
-    #[allow(dead_code)]
-    trait TestTrimEnd<T>
-    where
-        Self: Sized,
-    {
-        fn test_trim_end(size: usize) -> (Self, T);
-    }
-
-    fn test_trim_end<T>(size: usize) -> (Vec<u8>, T)
-    where
-        Vec<u8>: Trim<T>,
-    {
-        let mut bytes = redstone_marker_bytes();
-        let rest = bytes.trim_end(size);
-        (bytes, rest)
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/utils/trim_zeros.rs.html b/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/utils/trim_zeros.rs.html deleted file mode 100644 index 0d223de1..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/src/redstone/utils/trim_zeros.rs.html +++ /dev/null @@ -1,91 +0,0 @@ -trim_zeros.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
-
pub trait TrimZeros {
-    fn trim_zeros(self) -> Self;
-}
-
-impl TrimZeros for Vec<u8> {
-    fn trim_zeros(self) -> Self {
-        let mut res = self.len();
-
-        for i in (0..self.len()).rev() {
-            if self[i] != 0 {
-                break;
-            }
-
-            res = i;
-        }
-
-        let (rest, _) = self.split_at(res);
-
-        rest.into()
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use crate::{protocol::constants::REDSTONE_MARKER, utils::trim_zeros::TrimZeros};
-
-    fn redstone_marker_bytes() -> Vec<u8> {
-        REDSTONE_MARKER.as_slice().into()
-    }
-
-    #[test]
-    fn test_trim_zeros() {
-        let trimmed = redstone_marker_bytes().trim_zeros();
-        assert_eq!(trimmed.as_slice(), &REDSTONE_MARKER[..7]);
-
-        let trimmed = trimmed.trim_zeros();
-        assert_eq!(trimmed.as_slice(), &REDSTONE_MARKER[..7]);
-    }
-
-    #[test]
-    fn test_trim_zeros_empty() {
-        let trimmed = Vec::<u8>::default().trim_zeros();
-        assert_eq!(trimmed, Vec::<u8>::default());
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/COPYRIGHT-23e9bde6c69aea69.txt b/static/rust/redstone/crypto_secp256k1,network_radix/static.files/COPYRIGHT-23e9bde6c69aea69.txt deleted file mode 100644 index 1447df79..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/COPYRIGHT-23e9bde6c69aea69.txt +++ /dev/null @@ -1,50 +0,0 @@ -# REUSE-IgnoreStart - -These documentation pages include resources by third parties. This copyright -file applies only to those resources. The following third party resources are -included, and carry their own copyright notices and license terms: - -* Fira Sans (FiraSans-Regular.woff2, FiraSans-Medium.woff2): - - Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ - with Reserved Font Name Fira Sans. - - Copyright (c) 2014, Telefonica S.A. - - Licensed under the SIL Open Font License, Version 1.1. - See FiraSans-LICENSE.txt. - -* rustdoc.css, main.js, and playpen.js: - - Copyright 2015 The Rust Developers. - Licensed under the Apache License, Version 2.0 (see LICENSE-APACHE.txt) or - the MIT license (LICENSE-MIT.txt) at your option. - -* normalize.css: - - Copyright (c) Nicolas Gallagher and Jonathan Neal. - Licensed under the MIT license (see LICENSE-MIT.txt). - -* Source Code Pro (SourceCodePro-Regular.ttf.woff2, - SourceCodePro-Semibold.ttf.woff2, SourceCodePro-It.ttf.woff2): - - Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), - with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark - of Adobe Systems Incorporated in the United States and/or other countries. - - Licensed under the SIL Open Font License, Version 1.1. - See SourceCodePro-LICENSE.txt. - -* Source Serif 4 (SourceSerif4-Regular.ttf.woff2, SourceSerif4-Bold.ttf.woff2, - SourceSerif4-It.ttf.woff2): - - Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name - 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United - States and/or other countries. - - Licensed under the SIL Open Font License, Version 1.1. - See SourceSerif4-LICENSE.md. - -This copyright file is intended to be distributed with rustdoc output. - -# REUSE-IgnoreEnd diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/FiraSans-LICENSE-db4b642586e02d97.txt b/static/rust/redstone/crypto_secp256k1,network_radix/static.files/FiraSans-LICENSE-db4b642586e02d97.txt deleted file mode 100644 index d7e9c149..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/FiraSans-LICENSE-db4b642586e02d97.txt +++ /dev/null @@ -1,98 +0,0 @@ -// REUSE-IgnoreStart - -Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. -with Reserved Font Name < Fira >, - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. - -// REUSE-IgnoreEnd diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 b/static/rust/redstone/crypto_secp256k1,network_radix/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 deleted file mode 100644 index 7a1e5fc5..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 b/static/rust/redstone/crypto_secp256k1,network_radix/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 deleted file mode 100644 index e766e06c..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt b/static/rust/redstone/crypto_secp256k1,network_radix/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt deleted file mode 100644 index 16fe87b0..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/LICENSE-MIT-65090b722b3f6c56.txt b/static/rust/redstone/crypto_secp256k1,network_radix/static.files/LICENSE-MIT-65090b722b3f6c56.txt deleted file mode 100644 index 31aa7938..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/LICENSE-MIT-65090b722b3f6c56.txt +++ /dev/null @@ -1,23 +0,0 @@ -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 b/static/rust/redstone/crypto_secp256k1,network_radix/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 deleted file mode 100644 index 1866ad4b..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt b/static/rust/redstone/crypto_secp256k1,network_radix/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt deleted file mode 100644 index 4b3edc29..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt +++ /dev/null @@ -1,103 +0,0 @@ -// REUSE-IgnoreStart - -Copyright (c) 2010, NAVER Corporation (https://www.navercorp.com/), - -with Reserved Font Name Nanum, Naver Nanum, NanumGothic, Naver NanumGothic, -NanumMyeongjo, Naver NanumMyeongjo, NanumBrush, Naver NanumBrush, NanumPen, -Naver NanumPen, Naver NanumGothicEco, NanumGothicEco, Naver NanumMyeongjoEco, -NanumMyeongjoEco, Naver NanumGothicLight, NanumGothicLight, NanumBarunGothic, -Naver NanumBarunGothic, NanumSquareRound, NanumBarunPen, MaruBuri - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. - -// REUSE-IgnoreEnd diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 b/static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 deleted file mode 100644 index 462c34ef..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt b/static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt deleted file mode 100644 index 0d2941e1..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt +++ /dev/null @@ -1,97 +0,0 @@ -// REUSE-IgnoreStart - -Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. - -This Font Software is licensed under the SIL Open Font License, Version 1.1. - -This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. - -// REUSE-IgnoreEnd diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 b/static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 deleted file mode 100644 index 10b558e0..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 b/static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 deleted file mode 100644 index 5ec64eef..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 b/static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 deleted file mode 100644 index 181a07f6..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 b/static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 deleted file mode 100644 index 2ae08a7b..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md b/static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md deleted file mode 100644 index 175fa4f4..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md +++ /dev/null @@ -1,98 +0,0 @@ - - -Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. -Copyright 2014 - 2023 Adobe (http://www.adobe.com/), with Reserved Font Name ‘Source’. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. - -This Font Software is licensed under the SIL Open Font License, Version 1.1. - -This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. - - diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 b/static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 deleted file mode 100644 index 0263fc30..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/favicon-2c020d218678b618.svg b/static/rust/redstone/crypto_secp256k1,network_radix/static.files/favicon-2c020d218678b618.svg deleted file mode 100644 index 8b34b511..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/favicon-2c020d218678b618.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/favicon-32x32-422f7d1d52889060.png b/static/rust/redstone/crypto_secp256k1,network_radix/static.files/favicon-32x32-422f7d1d52889060.png deleted file mode 100644 index 69b8613c..00000000 Binary files a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/favicon-32x32-422f7d1d52889060.png and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/main-20a3ad099b048cf2.js b/static/rust/redstone/crypto_secp256k1,network_radix/static.files/main-20a3ad099b048cf2.js deleted file mode 100644 index 133116e4..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/main-20a3ad099b048cf2.js +++ /dev/null @@ -1,11 +0,0 @@ -"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;if(path===current_page){link.className="current"}link.textContent=name;const li=document.createElement("li");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_secp256k1,network_radix/static.files/normalize-76eba96aa4d2e634.css deleted file mode 100644 index 469959f1..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/normalize-76eba96aa4d2e634.css +++ /dev/null @@ -1,2 +0,0 @@ - /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ -html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type="button"],[type="reset"],[type="submit"],button{-webkit-appearance:button}[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none} \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/noscript-df360f571f6edeae.css b/static/rust/redstone/crypto_secp256k1,network_radix/static.files/noscript-df360f571f6edeae.css deleted file mode 100644 index 4c310ae5..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/noscript-df360f571f6edeae.css +++ /dev/null @@ -1 +0,0 @@ - #main-content .attributes{margin-left:0 !important;}#copy-path,#sidebar-button,.sidebar-resizer{display:none !important;}nav.sub{display:none;}.src .sidebar{display:none;}.notable-traits{display:none;}:root,: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%);}@media (prefers-color-scheme:dark){:root,:root:not([data-theme]){--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;--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%);}} \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/rust-logo-151179464ae7ed46.svg b/static/rust/redstone/crypto_secp256k1,network_radix/static.files/rust-logo-151179464ae7ed46.svg deleted file mode 100644 index 62424d8f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/rust-logo-151179464ae7ed46.svg +++ /dev/null @@ -1,61 +0,0 @@ - - - diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/rustdoc-dd39b87e5fcfba68.css b/static/rust/redstone/crypto_secp256k1,network_radix/static.files/rustdoc-dd39b87e5fcfba68.css deleted file mode 100644 index 77f89832..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/rustdoc-dd39b87e5fcfba68.css +++ /dev/null @@ -1,46 +0,0 @@ - :root{--nav-sub-mobile-padding:8px;--search-typename-width:6.75rem;--desktop-sidebar-width:200px;--src-sidebar-width:300px;--desktop-sidebar-z-index:100;}@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-left:-0.25rem;margin-right:0.25rem;}.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:24px;}.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 -16px 0 -16px;text-align:center;}.sidebar-crate h2 a{display:block;margin:0 calc(-24px + 0.25rem) 0 -0.2rem;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);}}@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/scrape-examples-ef1e698c1d417c0c.js b/static/rust/redstone/crypto_secp256k1,network_radix/static.files/scrape-examples-ef1e698c1d417c0c.js deleted file mode 100644 index ba830e37..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/scrape-examples-ef1e698c1d417c0c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(function(){const DEFAULT_MAX_LINES=5;const HIDDEN_MAX_LINES=10;function scrollToLoc(elt,loc,isHidden){const lines=elt.querySelector(".src-line-numbers");let scrollOffset;const maxLines=isHidden?HIDDEN_MAX_LINES:DEFAULT_MAX_LINES;if(loc[1]-loc[0]>maxLines){const line=Math.max(0,loc[0]-1);scrollOffset=lines.children[line].offsetTop}else{const wrapper=elt.querySelector(".code-wrapper");const halfHeight=wrapper.offsetHeight/2;const offsetTop=lines.children[loc[0]].offsetTop;const lastLine=lines.children[loc[1]];const offsetBot=lastLine.offsetTop+lastLine.offsetHeight;const offsetMid=(offsetTop+offsetBot)/2;scrollOffset=offsetMid-halfHeight}lines.scrollTo(0,scrollOffset);elt.querySelector(".rust").scrollTo(0,scrollOffset)}function updateScrapedExample(example,isHidden){const locs=JSON.parse(example.attributes.getNamedItem("data-locs").textContent);let locIndex=0;const highlights=Array.prototype.slice.call(example.querySelectorAll(".highlight"));const link=example.querySelector(".scraped-example-title a");if(locs.length>1){const onChangeLoc=changeIndex=>{removeClass(highlights[locIndex],"focus");changeIndex();scrollToLoc(example,locs[locIndex][0],isHidden);addClass(highlights[locIndex],"focus");const url=locs[locIndex][1];const title=locs[locIndex][2];link.href=url;link.innerHTML=title};example.querySelector(".prev").addEventListener("click",()=>{onChangeLoc(()=>{locIndex=(locIndex-1+locs.length)%locs.length})});example.querySelector(".next").addEventListener("click",()=>{onChangeLoc(()=>{locIndex=(locIndex+1)%locs.length})})}const expandButton=example.querySelector(".expand");if(expandButton){expandButton.addEventListener("click",()=>{if(hasClass(example,"expanded")){removeClass(example,"expanded");scrollToLoc(example,locs[0][0],isHidden)}else{addClass(example,"expanded")}})}scrollToLoc(example,locs[0][0],isHidden)}const firstExamples=document.querySelectorAll(".scraped-example-list > .scraped-example");onEachLazy(firstExamples,el=>updateScrapedExample(el,false));onEachLazy(document.querySelectorAll(".more-examples-toggle"),toggle=>{onEachLazy(toggle.querySelectorAll(".toggle-line, .hide-more"),button=>{button.addEventListener("click",()=>{toggle.open=false})});const moreExamples=toggle.querySelectorAll(".scraped-example");toggle.querySelector("summary").addEventListener("click",()=>{setTimeout(()=>{onEachLazy(moreExamples,el=>updateScrapedExample(el,true))})},{once:true})})})() \ 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_secp256k1,network_radix/static.files/search-d52510db62a78183.js deleted file mode 100644 index a2824f29..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/search-d52510db62a78183.js +++ /dev/null @@ -1,5 +0,0 @@ -"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;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 isIdentCharacter(c){return(c==="_"||(c>="0"&&c<="9")||(c>="a"&&c<="z")||(c>="A"&&c<="Z"))}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){const start=parserState.pos;let end=parserState.pos;let foundExclamation=-1;while(parserState.pos0){throw["Unexpected ",c," after ",parserState.userQuery[parserState.pos-1]]}else{throw["Unexpected ",c]}}parserState.pos+=1;end=parserState.pos}if(foundExclamation!==-1&&foundExclamation!==start&&isIdentCharacter(parserState.userQuery[foundExclamation-1])){if(parserState.typeFilter===null){parserState.typeFilter="macro"}else if(parserState.typeFilter!=="macro"){throw["Invalid search type: macro ","!"," and ",parserState.typeFilter," both specified",]}end=foundExclamation}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();for(const c in query){if(!isIdentCharacter(query[c])){throw["Unexpected ",query[c]," 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,}}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{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(pushFunc);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){if(typeNameIdMap.has(elem.normalizedPathLast)&&(isAssocType||!typeNameIdMap.get(elem.normalizedPathLast).assocOnly)){elem.id=typeNameIdMap.get(elem.normalizedPathLast).id}else if(!parsedQuery.literalSearch){let match=null;let matchDist=maxEditDistance+1;let matchName="";for(const[name,{id,assocOnly}]of typeNameIdMap){const dist=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(){const cb="}".charCodeAt(0);let c=this.string.charCodeAt(this.offset);const ret=[];while(c!==cb){ret.push(this.decode());c=this.string.charCodeAt(this.offset)}this.offset+=1;return ret}decode(){const[ob,la]=["{","`"].map(c=>c.charCodeAt(0));let n=0;let c=this.string.charCodeAt(this.offset);if(c===ob){this.offset+=1;return this.decodeList()}while(c>1];this.offset+=1;return sign?-value:value}next(){const c=this.string.charCodeAt(this.offset);const[zero,ua,la]=["0","@","`"].map(c=>c.charCodeAt(0));if(c>=zero&&c16){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();const charA="A".charCodeAt(0);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)-charA,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/settings-4313503d2e1961c2.js b/static/rust/redstone/crypto_secp256k1,network_radix/static.files/settings-4313503d2e1961c2.js deleted file mode 100644 index ab425fe4..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/settings-4313503d2e1961c2.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict";(function(){const isSettingsPage=window.location.pathname.endsWith("/settings.html");function changeSetting(settingName,value){if(settingName==="theme"){const useSystem=value==="system preference"?"true":"false";updateLocalStorage("use-system-theme",useSystem)}updateLocalStorage(settingName,value);switch(settingName){case"theme":case"preferred-dark-theme":case"preferred-light-theme":updateTheme();updateLightAndDark();break;case"line-numbers":if(value===true){window.rustdoc_add_line_numbers_to_examples()}else{window.rustdoc_remove_line_numbers_from_examples()}break;case"hide-sidebar":if(value===true){addClass(document.documentElement,"hide-sidebar")}else{removeClass(document.documentElement,"hide-sidebar")}break}}function showLightAndDark(){removeClass(document.getElementById("preferred-light-theme"),"hidden");removeClass(document.getElementById("preferred-dark-theme"),"hidden")}function hideLightAndDark(){addClass(document.getElementById("preferred-light-theme"),"hidden");addClass(document.getElementById("preferred-dark-theme"),"hidden")}function updateLightAndDark(){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||(useSystem===null&&getSettingValue("theme")===null)){showLightAndDark()}else{hideLightAndDark()}}function setEvents(settingsElement){updateLightAndDark();onEachLazy(settingsElement.querySelectorAll("input[type=\"checkbox\"]"),toggle=>{const settingId=toggle.id;const settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=()=>{changeSetting(toggle.id,toggle.checked)}});onEachLazy(settingsElement.querySelectorAll("input[type=\"radio\"]"),elem=>{const settingId=elem.name;let settingValue=getSettingValue(settingId);if(settingId==="theme"){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||settingValue===null){settingValue=useSystem==="false"?"light":"system preference"}}if(settingValue!==null&&settingValue!=="null"){elem.checked=settingValue===elem.value}elem.addEventListener("change",ev=>{changeSetting(ev.target.name,ev.target.value)})})}function buildSettingsPageSections(settings){let output="";for(const setting of settings){const js_data_name=setting["js_name"];const setting_name=setting["name"];if(setting["options"]!==undefined){output+=`\ -
-
${setting_name}
-
`;onEach(setting["options"],option=>{const checked=option===setting["default"]?" checked":"";const full=`${js_data_name}-${option.replace(/ /g,"-")}`;output+=`\ - `});output+=`\ -
-
`}else{const checked=setting["default"]===true?" checked":"";output+=`\ -
\ - \ -
`}}return output}function buildSettingsPage(){const theme_names=getVar("themes").split(",").filter(t=>t);theme_names.push("light","dark","ayu");const settings=[{"name":"Theme","js_name":"theme","default":"system preference","options":theme_names.concat("system preference"),},{"name":"Preferred light theme","js_name":"preferred-light-theme","default":"light","options":theme_names,},{"name":"Preferred dark theme","js_name":"preferred-dark-theme","default":"dark","options":theme_names,},{"name":"Auto-hide item contents for large items","js_name":"auto-hide-large-items","default":true,},{"name":"Auto-hide item methods' documentation","js_name":"auto-hide-method-docs","default":false,},{"name":"Auto-hide trait implementation documentation","js_name":"auto-hide-trait-implementations","default":false,},{"name":"Directly go to item in search if there is only one result","js_name":"go-to-only-result","default":false,},{"name":"Show line numbers on code examples","js_name":"line-numbers","default":false,},{"name":"Hide persistent navigation bar","js_name":"hide-sidebar","default":false,},{"name":"Disable keyboard shortcuts","js_name":"disable-shortcuts","default":false,},];const elementKind=isSettingsPage?"section":"div";const innerHTML=`
${buildSettingsPageSections(settings)}
`;const el=document.createElement(elementKind);el.id="settings";if(!isSettingsPage){el.className="popover"}el.innerHTML=innerHTML;if(isSettingsPage){document.getElementById(MAIN_ID).appendChild(el)}else{el.setAttribute("tabindex","-1");getSettingsButton().appendChild(el)}return el}const settingsMenu=buildSettingsPage();function displaySettings(){settingsMenu.style.display="";onEachLazy(settingsMenu.querySelectorAll("input[type='checkbox']"),el=>{const val=getSettingValue(el.id);const checked=val==="true";if(checked!==el.checked&&val!==null){el.checked=checked}})}function settingsBlurHandler(event){blurHandler(event,getSettingsButton(),window.hidePopoverMenus)}if(isSettingsPage){getSettingsButton().onclick=event=>{event.preventDefault()}}else{const settingsButton=getSettingsButton();const settingsMenu=document.getElementById("settings");settingsButton.onclick=event=>{if(settingsMenu.contains(event.target)){return}event.preventDefault();const shouldDisplaySettings=settingsMenu.style.display==="none";window.hideAllModals();if(shouldDisplaySettings){displaySettings()}};settingsButton.onblur=settingsBlurHandler;settingsButton.querySelector("a").onblur=settingsBlurHandler;onEachLazy(settingsMenu.querySelectorAll("input"),el=>{el.onblur=settingsBlurHandler});settingsMenu.onblur=settingsBlurHandler}setTimeout(()=>{setEvents(settingsMenu);if(!isSettingsPage){displaySettings()}removeClass(getSettingsButton(),"rotate")},0)})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/src-script-e66d777a5a92e9b2.js b/static/rust/redstone/crypto_secp256k1,network_radix/static.files/src-script-e66d777a5a92e9b2.js deleted file mode 100644 index d0aebb85..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/src-script-e66d777a5a92e9b2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(function(){const rootPath=getVar("root-path");const NAME_OFFSET=0;const DIRS_OFFSET=1;const FILES_OFFSET=2;const RUSTDOC_MOBILE_BREAKPOINT=700;function closeSidebarIfMobile(){if(window.innerWidth{removeClass(document.documentElement,"src-sidebar-expanded");updateLocalStorage("source-sidebar-show","false")};window.rustdocShowSourceSidebar=()=>{addClass(document.documentElement,"src-sidebar-expanded");updateLocalStorage("source-sidebar-show","true")};window.rustdocToggleSrcSidebar=()=>{if(document.documentElement.classList.contains("src-sidebar-expanded")){window.rustdocCloseSourceSidebar()}else{window.rustdocShowSourceSidebar()}};function createSrcSidebar(){const container=document.querySelector("nav.sidebar");const sidebar=document.createElement("div");sidebar.id="src-sidebar";let hasFoundFile=false;for(const[key,source]of srcIndex){source[NAME_OFFSET]=key;hasFoundFile=createDirEntry(source,sidebar,"",hasFoundFile)}container.appendChild(sidebar);const selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}}function highlightSrcLines(){const match=window.location.hash.match(/^#?(\d+)(?:-(\d+))?$/);if(!match){return}let from=parseInt(match[1],10);let to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to{onEachLazy(e.getElementsByTagName("a"),i_e=>{removeClass(i_e,"line-highlighted")})});for(let i=from;i<=to;++i){elem=document.getElementById(i);if(!elem){break}addClass(elem,"line-highlighted")}}const handleSrcHighlight=(function(){let prev_line_id=0;const set_fragment=name=>{const x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSrcLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return ev=>{let cur_line_id=parseInt(ev.target.id,10);if(isNaN(cur_line_id)||ev.ctrlKey||ev.altKey||ev.metaKey){return}ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){const tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());window.addEventListener("hashchange",highlightSrcLines);onEachLazy(document.getElementsByClassName("src-line-numbers"),el=>{el.addEventListener("click",handleSrcHighlight)});highlightSrcLines();window.createSrcSidebar=createSrcSidebar})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/storage-118b08c4c78b968e.js b/static/rust/redstone/crypto_secp256k1,network_radix/static.files/storage-118b08c4c78b968e.js deleted file mode 100644 index 98189467..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/static.files/storage-118b08c4c78b968e.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict";const builtinThemes=["light","dark","ayu"];const darkThemes=["dark","ayu"];window.currentTheme=document.getElementById("themeStyle");const settingsDataset=(function(){const settingsElement=document.getElementById("default-settings");return settingsElement&&settingsElement.dataset?settingsElement.dataset:null})();function getSettingValue(settingName){const current=getCurrentValue(settingName);if(current===null&&settingsDataset!==null){const def=settingsDataset[settingName.replace(/-/g,"_")];if(def!==undefined){return def}}return current}const localStoredTheme=getSettingValue("theme");function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(elem&&elem.classList){elem.classList.add(className)}}function removeClass(elem,className){if(elem&&elem.classList){elem.classList.remove(className)}}function onEach(arr,func){for(const elem of arr){if(func(elem)){return true}}return false}function onEachLazy(lazyArray,func){return onEach(Array.prototype.slice.call(lazyArray),func)}function updateLocalStorage(name,value){try{window.localStorage.setItem("rustdoc-"+name,value)}catch(e){}}function getCurrentValue(name){try{return window.localStorage.getItem("rustdoc-"+name)}catch(e){return null}}const getVar=(function getVar(name){const el=document.querySelector("head > meta[name='rustdoc-vars']");return el?el.attributes["data-"+name].value:null});function switchTheme(newThemeName,saveTheme){const themeNames=getVar("themes").split(",").filter(t=>t);themeNames.push(...builtinThemes);if(themeNames.indexOf(newThemeName)===-1){return}if(saveTheme){updateLocalStorage("theme",newThemeName)}document.documentElement.setAttribute("data-theme",newThemeName);if(builtinThemes.indexOf(newThemeName)!==-1){if(window.currentTheme){window.currentTheme.parentNode.removeChild(window.currentTheme);window.currentTheme=null}}else{const newHref=getVar("root-path")+encodeURIComponent(newThemeName)+getVar("resource-suffix")+".css";if(!window.currentTheme){if(document.readyState==="loading"){document.write(``);window.currentTheme=document.getElementById("themeStyle")}else{window.currentTheme=document.createElement("link");window.currentTheme.rel="stylesheet";window.currentTheme.id="themeStyle";window.currentTheme.href=newHref;document.documentElement.appendChild(window.currentTheme)}}else if(newHref!==window.currentTheme.href){window.currentTheme.href=newHref}}}const updateTheme=(function(){const mql=window.matchMedia("(prefers-color-scheme: dark)");function updateTheme(){if(getSettingValue("use-system-theme")!=="false"){const lightTheme=getSettingValue("preferred-light-theme")||"light";const darkTheme=getSettingValue("preferred-dark-theme")||"dark";updateLocalStorage("use-system-theme","true");switchTheme(mql.matches?darkTheme:lightTheme,true)}else{switchTheme(getSettingValue("theme"),false)}}mql.addEventListener("change",updateTheme);return updateTheme})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("preferred-dark-theme",localStoredTheme)}}updateTheme();if(getSettingValue("source-sidebar-show")==="true"){addClass(document.documentElement,"src-sidebar-expanded")}if(getSettingValue("hide-sidebar")==="true"){addClass(document.documentElement,"hide-sidebar")}function updateSidebarWidth(){const desktopSidebarWidth=getSettingValue("desktop-sidebar-width");if(desktopSidebarWidth&&desktopSidebarWidth!=="null"){document.documentElement.style.setProperty("--desktop-sidebar-width",desktopSidebarWidth+"px",)}const srcSidebarWidth=getSettingValue("src-sidebar-width");if(srcSidebarWidth&&srcSidebarWidth!=="null"){document.documentElement.style.setProperty("--src-sidebar-width",srcSidebarWidth+"px",)}}updateSidebarWidth();window.addEventListener("pageshow",ev=>{if(ev.persisted){setTimeout(updateTheme,0);setTimeout(updateSidebarWidth,0)}});class RustdocSearchElement extends HTMLElement{constructor(){super()}connectedCallback(){const rootPath=getVar("root-path");const currentCrate=getVar("current-crate");this.innerHTML=``}}window.customElements.define("rustdoc-search",RustdocSearchElement) \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/clone/trait.Clone.js b/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/clone/trait.Clone.js deleted file mode 100644 index 270a1587..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/clone/trait.Clone.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"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_secp256k1,network_radix/trait.impl/core/cmp/trait.Eq.js deleted file mode 100644 index a573550b..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/cmp/trait.Eq.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"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_secp256k1,network_radix/trait.impl/core/cmp/trait.PartialEq.js deleted file mode 100644 index 695eda8f..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/cmp/trait.PartialEq.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"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_secp256k1,network_radix/trait.impl/core/convert/trait.From.js deleted file mode 100644 index 92afa7bb..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/convert/trait.From.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"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_secp256k1,network_radix/trait.impl/core/fmt/trait.Debug.js deleted file mode 100644 index f544c767..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/fmt/trait.Debug.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]] -};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_secp256k1,network_radix/trait.impl/core/fmt/trait.Display.js deleted file mode 100644 index 899cd7d8..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/fmt/trait.Display.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"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_secp256k1,network_radix/trait.impl/core/marker/trait.Freeze.js deleted file mode 100644 index 2ec0218e..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/marker/trait.Freeze.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]]] -};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_secp256k1,network_radix/trait.impl/core/marker/trait.Send.js deleted file mode 100644 index e17567a7..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/marker/trait.Send.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]]] -};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_secp256k1,network_radix/trait.impl/core/marker/trait.StructuralPartialEq.js deleted file mode 100644 index 19408b71..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/marker/trait.StructuralPartialEq.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"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_secp256k1,network_radix/trait.impl/core/marker/trait.Sync.js deleted file mode 100644 index 8fba0265..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/marker/trait.Sync.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]]] -};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_secp256k1,network_radix/trait.impl/core/marker/trait.Unpin.js deleted file mode 100644 index fdff3b25..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/marker/trait.Unpin.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]]] -};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_secp256k1,network_radix/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js deleted file mode 100644 index 8adf6221..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]]] -};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_secp256k1,network_radix/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js deleted file mode 100644 index a69fc799..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]]] -};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_secp256k1,network_radix/trait.impl/redstone/core/validator/trait.Validator.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/core/validator/trait.Validator.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/network/as_str/trait.AsAsciiStr.js b/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/network/as_str/trait.AsAsciiStr.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/network/as_str/trait.AsAsciiStr.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/network/as_str/trait.AsHexStr.js b/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/network/as_str/trait.AsHexStr.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/network/as_str/trait.AsHexStr.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/network/assert/trait.Assert.js b/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/network/assert/trait.Assert.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/network/assert/trait.Assert.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/network/assert/trait.Unwrap.js b/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/network/assert/trait.Unwrap.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/network/assert/trait.Unwrap.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/network/flattened/trait.Flattened.js b/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/network/flattened/trait.Flattened.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/network/flattened/trait.Flattened.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/network/from_bytes_repr/trait.FromBytesRepr.js b/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/network/from_bytes_repr/trait.FromBytesRepr.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/network/from_bytes_repr/trait.FromBytesRepr.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/network/from_bytes_repr/trait.Sanitized.js b/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/network/from_bytes_repr/trait.Sanitized.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/network/from_bytes_repr/trait.Sanitized.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/network/radix/u256_ext/trait.U256Ext.js b/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/network/radix/u256_ext/trait.U256Ext.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/network/radix/u256_ext/trait.U256Ext.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/network/specific/trait.NetworkSpecific.js b/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/network/specific/trait.NetworkSpecific.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/network/specific/trait.NetworkSpecific.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/utils/filter/trait.FilterSome.js b/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/utils/filter/trait.FilterSome.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/utils/filter/trait.FilterSome.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/utils/median/trait.Averageable.js b/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/utils/median/trait.Averageable.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/utils/median/trait.Averageable.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/utils/median/trait.Avg.js b/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/utils/median/trait.Avg.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/utils/median/trait.Avg.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/utils/median/trait.Median.js b/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/utils/median/trait.Median.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/utils/median/trait.Median.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/utils/trim/trait.Trim.js b/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/utils/trim/trait.Trim.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/utils/trim/trait.Trim.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/utils/trim_zeros/trait.TrimZeros.js b/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/utils/trim_zeros/trait.TrimZeros.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/trait.impl/redstone/utils/trim_zeros/trait.TrimZeros.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/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,network_radix/type.impl/redstone/network/casper/struct.Casper.js b/static/rust/redstone/crypto_secp256k1,network_radix/type.impl/redstone/network/casper/struct.Casper.js deleted file mode 100644 index cadcd6d3..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/type.impl/redstone/network/casper/struct.Casper.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var type_impls = { -"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_radix/type.impl/redstone/network/pure/struct.Std.js b/static/rust/redstone/crypto_secp256k1,network_radix/type.impl/redstone/network/pure/struct.Std.js deleted file mode 100644 index b85e8d1d..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/type.impl/redstone/network/pure/struct.Std.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]] -};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/radix/struct.Radix.js b/static/rust/redstone/crypto_secp256k1,network_radix/type.impl/redstone/network/radix/struct.Radix.js deleted file mode 100644 index f8bbe727..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/type.impl/redstone/network/radix/struct.Radix.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]] -};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_secp256k1,network_radix/type.impl/redstone/network/type._Network.js deleted file mode 100644 index 53f96772..00000000 --- a/static/rust/redstone/crypto_secp256k1,network_radix/type.impl/redstone/network/type._Network.js +++ /dev/null @@ -1,3 +0,0 @@ -(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/.lock b/static/rust/redstone/crypto_secp256k1/.lock deleted file mode 100755 index e69de29b..00000000 diff --git a/static/rust/redstone/crypto_secp256k1/crates.js b/static/rust/redstone/crypto_secp256k1/crates.js deleted file mode 100644 index 6d4f9bdc..00000000 --- a/static/rust/redstone/crypto_secp256k1/crates.js +++ /dev/null @@ -1 +0,0 @@ -window.ALL_CRATES = ["redstone"]; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/.lock b/static/rust/redstone/crypto_secp256k1/doc/.lock deleted file mode 100755 index e69de29b..00000000 diff --git a/static/rust/redstone/crypto_secp256k1/doc/crates.js b/static/rust/redstone/crypto_secp256k1/doc/crates.js deleted file mode 100644 index 6d4f9bdc..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/crates.js +++ /dev/null @@ -1 +0,0 @@ -window.ALL_CRATES = ["redstone"]; \ 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 deleted file mode 100644 index f173d86a..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/help.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index b5973a6f..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/all.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 0792edbc..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/aggregator/fn.aggregate_matrix.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 15726f8e..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/aggregator/fn.aggregate_values.html +++ /dev/null @@ -1,25 +0,0 @@ -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.

-

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 -an average of the values, selecting the median, or applying a custom algorithm defined within the -aggregate_matrix function.

-

The primary purpose of this function is to consolidate data from multiple sources into a coherent -and singular value set that adheres to the criteria specified in the Config.

-

§Arguments

-
    -
  • config - A Config instance containing settings and parameters used to guide the aggregation process.
  • -
  • data_packages - A vector of DataPackage instances, each representing a set of values and associated -metadata collected from various sources or signers.
  • -
-

§Returns

-

Returns a Vec<U256>, which is a vector of aggregated values resulting from applying the aggregation -logic to the input data packages as per the specified configuration. Each U256 value in the vector -represents an aggregated result derived from the corresponding data packages.

-

§Note

-

This function is internal to the crate (pub(crate)) and not exposed as part of the public API. It is -designed to be used by other components within the same crate that require value aggregation functionality.

-
\ No newline at end of file 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 deleted file mode 100644 index f3dc8819..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/aggregator/fn.make_value_signer_matrix.html +++ /dev/null @@ -1,4 +0,0 @@ -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 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 deleted file mode 100644 index 7aa39374..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/aggregator/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/doc/redstone/core/aggregator/sidebar-items.js deleted file mode 100644 index c13147cd..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/aggregator/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["aggregate_matrix","aggregate_values","make_value_signer_matrix"],"type":["Matrix"]}; \ 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 deleted file mode 100644 index 61c3f974..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/aggregator/type.Matrix.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 32a77abc..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/config/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/doc/redstone/core/config/sidebar-items.js deleted file mode 100644 index 4cadad77..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/config/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"struct":["Config"]}; \ 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 deleted file mode 100644 index 5f859175..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/config/struct.Config.html +++ /dev/null @@ -1,38 +0,0 @@ -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.

-

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.

-

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.

-

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.

-

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( - &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 - 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 deleted file mode 100644 index e427a2e8..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/index.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index d15046f1..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/processor/fn.make_processor_result.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index b1ad0b84..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/processor/fn.process_payload.html +++ /dev/null @@ -1,7 +0,0 @@ -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.
  • -
  • payload_bytes - Network-specific byte-list of the payload to be processed.
  • -
-
\ No newline at end of file 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 deleted file mode 100644 index ccd25006..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/processor/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/doc/redstone/core/processor/sidebar-items.js deleted file mode 100644 index e25cd4d1..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/processor/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["make_processor_result","process_payload"]}; \ 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 deleted file mode 100644 index 52eaf103..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/processor_result/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/doc/redstone/core/processor_result/sidebar-items.js deleted file mode 100644 index 04eabb0b..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/processor_result/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"struct":["ProcessorResult"]}; \ 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 deleted file mode 100644 index c095c115..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/processor_result/struct.ProcessorResult.html +++ /dev/null @@ -1,29 +0,0 @@ -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.

-

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.

-

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).

-

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/doc/redstone/core/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/doc/redstone/core/sidebar-items.js deleted file mode 100644 index ce8d7edb..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["aggregator","config","processor","processor_result","validator"]}; \ 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 deleted file mode 100644 index 141d82cd..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/validator/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/doc/redstone/core/validator/sidebar-items.js deleted file mode 100644 index a9b53ab7..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/validator/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["Validator"]}; \ 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 deleted file mode 100644 index ffbec709..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/core/validator/trait.Validator.html +++ /dev/null @@ -1,70 +0,0 @@ -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 validate_signer_count_threshold(
-        &self,
-        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.

-

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.

-
§Arguments
-
    -
  • feed_id: U256 - The unique identifier of the data feed.
  • -
-
§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.

-

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.

-
§Arguments
-
    -
  • signer: &[u8] - A byte slice representing the signer’s identifier.
  • -
-
§Returns
-
    -
  • Option<usize> - The index of the signer if found, or None if not found.
  • -
-
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.

-

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.

-
§Arguments
-
    -
  • index: usize - The index of the data value being validated.
  • -
  • values: &[Option<U256>] - A slice of optional U256 values associated with the data.
  • -
-
§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.

-

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.

-
§Arguments
-
    -
  • index: usize - The index of the data value whose timestamp is being validated.
  • -
  • timestamp: u64 - The timestamp to be validated.
  • -
-
§Returns
-
    -
  • u64 - The validated timestamp.
  • -
-

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/index.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/index.html deleted file mode 100644 index 541ea6ec..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/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/doc/redstone/crypto/keccak256/fn.keccak256.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/keccak256/fn.keccak256.html deleted file mode 100644 index 2665643a..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/keccak256/fn.keccak256.html +++ /dev/null @@ -1 +0,0 @@ -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 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 deleted file mode 100644 index 96fe770a..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/keccak256/index.html +++ /dev/null @@ -1 +0,0 @@ -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/keccak256/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/keccak256/sidebar-items.js deleted file mode 100644 index 1a5fc982..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/keccak256/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["keccak256"]}; \ 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 deleted file mode 100644 index ba2beac0..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/recover/crypto256/fn.recover_public_key.html +++ /dev/null @@ -1,5 +0,0 @@ -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 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 deleted file mode 100644 index b5563f5f..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/recover/crypto256/index.html +++ /dev/null @@ -1 +0,0 @@ -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/crypto256/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/recover/crypto256/sidebar-items.js deleted file mode 100644 index 57bd2c11..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/recover/crypto256/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["recover_public_key"]}; \ 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 deleted file mode 100644 index aba3bde0..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/recover/fn.recover_address.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index e7703e69..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/recover/index.html +++ /dev/null @@ -1 +0,0 @@ -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/recover/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/recover/sidebar-items.js deleted file mode 100644 index 40087146..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/crypto/recover/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["recover_address"],"mod":["crypto256"]}; \ 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 deleted file mode 100644 index 521fe7cb..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/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/doc/redstone/index.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/index.html deleted file mode 100644 index ea091ee8..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/index.html +++ /dev/null @@ -1,6 +0,0 @@ -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. -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/doc/redstone/macro.print_and_panic!.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/macro.print_and_panic!.html deleted file mode 100644 index 90775bac..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/macro.print_and_panic!.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to macro.print_and_panic.html...

- - - \ No newline at end of file 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 deleted file mode 100644 index b308eb68..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/macro.print_and_panic.html +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 2d4772f3..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/macro.print_debug!.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to macro.print_debug.html...

- - - \ 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 deleted file mode 100644 index 3cb863d6..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/macro.print_debug.html +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 9f63a8ad..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/as_str/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/as_str/sidebar-items.js deleted file mode 100644 index 01f900d2..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/as_str/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["AsAsciiStr","AsHexStr"]}; \ 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 deleted file mode 100644 index 094c2e3e..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/as_str/trait.AsAsciiStr.html +++ /dev/null @@ -1,4 +0,0 @@ -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 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 deleted file mode 100644 index 71d1669c..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/as_str/trait.AsHexStr.html +++ /dev/null @@ -1,4 +0,0 @@ -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 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 deleted file mode 100644 index 13078112..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/assert/fn.assert_or_revert.html +++ /dev/null @@ -1,7 +0,0 @@ -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 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 deleted file mode 100644 index 385fc71e..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/assert/fn.assert_or_revert_bool_with.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 680c61a9..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/assert/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/assert/sidebar-items.js deleted file mode 100644 index bd99c6f7..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/assert/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["assert_or_revert","assert_or_revert_bool_with"],"trait":["Assert","Unwrap"]}; \ 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 deleted file mode 100644 index e068a406..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/assert/trait.Assert.html +++ /dev/null @@ -1,6 +0,0 @@ -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 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 deleted file mode 100644 index db1ea7bc..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/assert/trait.Unwrap.html +++ /dev/null @@ -1,9 +0,0 @@ -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 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 deleted file mode 100644 index 9cb4c379..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/error/enum.Error.html +++ /dev/null @@ -1,65 +0,0 @@ -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),
-}
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.

-

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.

-

Used when operations on U256 numbers exceed their maximum value, potentially leading -to incorrect calculations or state.

-
§

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.

-

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.

-

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.

-

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.

-

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.

-

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.

-

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.

-

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.

-

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).

-

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 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 deleted file mode 100644 index e083b3b4..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/error/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/error/sidebar-items.js deleted file mode 100644 index 41603cd6..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/error/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"enum":["Error"],"trait":["ContractErrorContent"]}; \ 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 deleted file mode 100644 index 577c3a6f..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/error/trait.ContractErrorContent.html +++ /dev/null @@ -1,5 +0,0 @@ -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 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 deleted file mode 100644 index e62982d8..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/flattened/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/flattened/sidebar-items.js deleted file mode 100644 index 25ac6e97..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/flattened/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["Flattened"]}; \ 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 deleted file mode 100644 index 6e4f71a3..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/flattened/trait.Flattened.html +++ /dev/null @@ -1,4 +0,0 @@ -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 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 deleted file mode 100644 index 037b0f7e..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/from_bytes_repr/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/from_bytes_repr/sidebar-items.js deleted file mode 100644 index 9d06c298..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/from_bytes_repr/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["FromBytesRepr","Sanitized"]}; \ 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 deleted file mode 100644 index 54139e47..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/from_bytes_repr/trait.FromBytesRepr.html +++ /dev/null @@ -1,4 +0,0 @@ -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 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 deleted file mode 100644 index 79baf865..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/from_bytes_repr/trait.Sanitized.html +++ /dev/null @@ -1,4 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/index.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/index.html deleted file mode 100644 index a9fc43da..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/index.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index ac53c72e..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/print_debug/index.html +++ /dev/null @@ -1 +0,0 @@ -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/print_debug/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/print_debug/sidebar-items.js deleted file mode 100644 index 5244ce01..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/print_debug/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {}; \ 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 deleted file mode 100644 index f9f75a32..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/pure/from_bytes_repr/index.html +++ /dev/null @@ -1 +0,0 @@ -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/from_bytes_repr/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/pure/from_bytes_repr/sidebar-items.js deleted file mode 100644 index 5244ce01..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/pure/from_bytes_repr/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {}; \ 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 deleted file mode 100644 index fd752087..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/pure/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/pure/sidebar-items.js deleted file mode 100644 index c6bbc622..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/pure/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["from_bytes_repr"],"struct":["Std"]}; \ 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 deleted file mode 100644 index 3138ed4c..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/pure/struct.Std.html +++ /dev/null @@ -1,12 +0,0 @@ -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 - V: MultiLane<T>,

§

fn vzip(self) -> V

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/sidebar-items.js deleted file mode 100644 index 59ea5c75..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["as_str","assert","error","flattened","from_bytes_repr","print_debug","pure","specific"],"type":["_Network"]}; \ 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 deleted file mode 100644 index 2e47400c..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/constant.VALUE_SIZE.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 414a9953..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/fn.print.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 2e9edf89..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/fn.revert.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 1378d9dc..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/sidebar-items.js deleted file mode 100644 index 49355aaa..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"constant":["VALUE_SIZE"],"fn":["print","revert"],"trait":["NetworkSpecific"],"type":["Bytes","Network","U256"]}; \ 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 deleted file mode 100644 index 85367773..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/trait.NetworkSpecific.html +++ /dev/null @@ -1,11 +0,0 @@ -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;
-
-    // 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 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 deleted file mode 100644 index 04a40a5a..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/type.Bytes.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 40e404c9..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/type.Network.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index f3f9c595..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/specific/type.U256.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 72f68b07..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/network/type._Network.html +++ /dev/null @@ -1 +0,0 @@ -_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 deleted file mode 100644 index 72b04b86..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.DATA_FEED_ID_BS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index fed432b2..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.DATA_PACKAGES_COUNT_BS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index f25ed2f5..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.DATA_POINTS_COUNT_BS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 95f9c3d5..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.DATA_POINT_VALUE_BYTE_SIZE_BS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 160a69a6..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.MAX_TIMESTAMP_AHEAD_MS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 47c72d3b..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.MAX_TIMESTAMP_DELAY_MS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 07258216..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.REDSTONE_MARKER.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 21ea69ca..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.REDSTONE_MARKER_BS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 2a3a5b7f..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.SIGNATURE_BS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 1635207a..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.TIMESTAMP_BS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index a7ccdc60..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/constant.UNSIGNED_METADATA_BYTE_SIZE_BS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 0268cb89..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/index.html +++ /dev/null @@ -1 +0,0 @@ -redstone::protocol::constants - Rust
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/sidebar-items.js deleted file mode 100644 index 7fd4daab..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/constants/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"constant":["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"]}; \ 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 deleted file mode 100644 index f1456016..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_package/fn.trim_data_package.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 393e9998..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_package/fn.trim_data_packages.html +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 4f7ef4c4..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_package/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_package/sidebar-items.js deleted file mode 100644 index 4b17209f..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_package/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["trim_data_package","trim_data_packages"],"struct":["DataPackage"]}; \ 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 deleted file mode 100644 index b77c9d35..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_package/struct.DataPackage.html +++ /dev/null @@ -1,22 +0,0 @@ -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).

-

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 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 deleted file mode 100644 index 10a3aa68..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_point/fn.trim_data_point.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 4bc76a0f..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_point/fn.trim_data_points.html +++ /dev/null @@ -1,5 +0,0 @@ -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 deleted file mode 100644 index 6ab1baf0..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_point/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_point/sidebar-items.js deleted file mode 100644 index 2a5fa8f1..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_point/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["trim_data_point","trim_data_points"],"struct":["DataPoint"]}; \ 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 deleted file mode 100644 index 4cee4899..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/data_point/struct.DataPoint.html +++ /dev/null @@ -1,21 +0,0 @@ -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).

-

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 diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/index.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/index.html deleted file mode 100644 index d221f7b2..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/index.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index fb7c7144..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/marker/fn.trim_redstone_marker.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 9844daf7..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/marker/index.html +++ /dev/null @@ -1 +0,0 @@ -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/marker/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/marker/sidebar-items.js deleted file mode 100644 index 2d2958a1..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/marker/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["trim_redstone_marker"]}; \ 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 deleted file mode 100644 index b3e6350e..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/payload/fn.trim_metadata.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 9eae9fdd..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/payload/fn.trim_payload.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 7bedf304..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/payload/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/payload/sidebar-items.js deleted file mode 100644 index 0d79d818..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/payload/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["trim_metadata","trim_payload"],"struct":["Payload"]}; \ 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 deleted file mode 100644 index 9234341b..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/payload/struct.Payload.html +++ /dev/null @@ -1,18 +0,0 @@ -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).

-

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 diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/sidebar-items.js deleted file mode 100644 index 94e7fdb5..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/protocol/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["constants","data_package","data_point","marker","payload"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/doc/redstone/sidebar-items.js deleted file mode 100644 index f230d898..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"macro":["print_and_panic","print_debug"],"mod":["core","crypto","network","protocol","utils"]}; \ 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 deleted file mode 100644 index a153fc5f..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/filter/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/filter/sidebar-items.js deleted file mode 100644 index 9cc2f1a1..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/filter/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["FilterSome"]}; \ 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 deleted file mode 100644 index 69bc1f28..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/filter/trait.FilterSome.html +++ /dev/null @@ -1,4 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/index.html b/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/index.html deleted file mode 100644 index ef51ef17..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/index.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index ebb4b4a4..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/median/fn.maybe_pick_median.html +++ /dev/null @@ -1,2 +0,0 @@ -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 deleted file mode 100644 index 9a4952c3..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/median/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/median/sidebar-items.js deleted file mode 100644 index 092646ab..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/median/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["maybe_pick_median"],"trait":["Averageable","Avg","Median"]}; \ 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 deleted file mode 100644 index 3ef3b4b4..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/median/trait.Averageable.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 200d300b..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/median/trait.Avg.html +++ /dev/null @@ -1,5 +0,0 @@ -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 - 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 deleted file mode 100644 index 60047574..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/median/trait.Median.html +++ /dev/null @@ -1,7 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/sidebar-items.js deleted file mode 100644 index 2f4d851f..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["filter","median","trim","trim_zeros"]}; \ 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 deleted file mode 100644 index e7e6608a..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/trim/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/trim/sidebar-items.js deleted file mode 100644 index 076b36c3..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/trim/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["Trim"]}; \ 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 deleted file mode 100644 index 9e458a9e..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/trim/trait.Trim.html +++ /dev/null @@ -1,5 +0,0 @@ -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 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 deleted file mode 100644 index 2a2fd9e0..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/trim_zeros/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/trim_zeros/sidebar-items.js deleted file mode 100644 index eebab388..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/trim_zeros/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["TrimZeros"]}; \ 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 deleted file mode 100644 index f1299ca4..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/redstone/utils/trim_zeros/trait.TrimZeros.html +++ /dev/null @@ -1,4 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1/doc/search-index.js b/static/rust/redstone/crypto_secp256k1/doc/search-index.js deleted file mode 100644 index 09c72cca..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/search-index.js +++ /dev/null @@ -1,5 +0,0 @@ -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"}]\ -]')); -if (typeof exports !== 'undefined') exports.searchIndex = searchIndex; -else if (window.initSearch) window.initSearch(searchIndex); diff --git a/static/rust/redstone/crypto_secp256k1/doc/search.desc/redstone/redstone-desc-0-.js b/static/rust/redstone/crypto_secp256k1/doc/search.desc/redstone/redstone-desc-0-.js deleted file mode 100644 index 81611d2e..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/search.desc/redstone/redstone-desc-0-.js +++ /dev/null @@ -1 +0,0 @@ -searchState.loadedDescShard("redstone", 0, "RedStone\nAggregates values from a collection of data packages …\nConfiguration for a RedStone payload processor.\nThe current block time in timestamp format, used for …\nIdentifiers for the data feeds from which values are …\nReturns the argument unchanged.\nCalls U::from(self).\nThe minimum number of signers required validating the data.\nList of identifiers for signers authorized to sign the …\nThe main processor of the RedStone payload.\nRepresents the result of processing the RedStone payload.\nReturns the argument unchanged.\nCalls U::from(self).\nThe minimum timestamp encountered during processing.\nA collection of values processed during the operation.\nA trait defining validation operations for data feeds and …\nRetrieves the index of a given data feed.\nRetrieves the index of a given signer.\nValidates the signer count threshold for a given index …\nValidates the timestamp for a given index.\nUsed when an expected non-empty array or vector is found …\nRepresents errors that need to clone ContractErrorContent, …\nRepresents errors that arise from the contract itself.\nRepresents errors related to cryptographic operations.\nErrors that can be encountered in the …\nIndicates that the number of signers does not meet the …\nUsed when there is leftover data in a payload that should …\nIndicates an overflow error with U256 numbers.\nSignifies that an unsupported size was encountered.\nIndicates that a timestamp is further in the future than …\nUsed when a timestamp is older than allowed by the …\nIndicates that the marker bytes for RedStone are incorrect.\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).") \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/settings.html b/static/rust/redstone/crypto_secp256k1/doc/settings.html deleted file mode 100644 index 9631dcb2..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/settings.html +++ /dev/null @@ -1 +0,0 @@ -Settings

Rustdoc settings

Back
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/src-files.js b/static/rust/redstone/crypto_secp256k1/doc/src-files.js deleted file mode 100644 index c071512f..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/src-files.js +++ /dev/null @@ -1,4 +0,0 @@ -var srcIndex = new Map(JSON.parse('[\ -["redstone",["",[["core",[],["aggregator.rs","config.rs","mod.rs","processor.rs","processor_result.rs","validator.rs"]],["crypto",[],["keccak256.rs","mod.rs","recover.rs"]],["network",[["pure",[],["from_bytes_repr.rs","mod.rs"]]],["as_str.rs","assert.rs","error.rs","flattened.rs","from_bytes_repr.rs","mod.rs","print_debug.rs","specific.rs"]],["protocol",[],["constants.rs","data_package.rs","data_point.rs","marker.rs","mod.rs","payload.rs"]],["utils",[],["filter.rs","median.rs","mod.rs","trim.rs","trim_zeros.rs"]]],["lib.rs"]]]\ -]')); -createSrcSidebar(); 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 deleted file mode 100644 index e839b506..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/core/aggregator.rs.html +++ /dev/null @@ -1,583 +0,0 @@ -aggregator.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-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
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-287
-288
-289
-290
-291
-
use crate::{
-    core::{config::Config, validator::Validator},
-    network::specific::U256,
-    print_debug,
-    protocol::data_package::DataPackage,
-    utils::median::Median,
-};
-
-type Matrix = Vec<Vec<Option<U256>>>;
-
-/// 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
-/// an average of the values, selecting the median, or applying a custom algorithm defined within the
-/// `aggregate_matrix` function.
-///
-/// The primary purpose of this function is to consolidate data from multiple sources into a coherent
-/// and singular value set that adheres to the criteria specified in the `Config`.
-///
-/// # Arguments
-///
-/// * `config` - A `Config` instance containing settings and parameters used to guide the aggregation process.
-/// * `data_packages` - A vector of `DataPackage` instances, each representing a set of values and associated
-///   metadata collected from various sources or signers.
-///
-/// # Returns
-///
-/// Returns a `Vec<U256>`, which is a vector of aggregated values resulting from applying the aggregation
-/// logic to the input data packages as per the specified configuration. Each `U256` value in the vector
-/// represents an aggregated result derived from the corresponding data packages.
-///
-/// # Note
-///
-/// This function is internal to the crate (`pub(crate)`) and not exposed as part of the public API. It is
-/// designed to be used by other components within the same crate that require value aggregation functionality.
-pub(crate) fn aggregate_values(config: Config, data_packages: Vec<DataPackage>) -> Vec<U256> {
-    aggregate_matrix(make_value_signer_matrix(&config, data_packages), config)
-}
-
-fn aggregate_matrix(matrix: Matrix, config: Config) -> Vec<U256> {
-    matrix
-        .iter()
-        .enumerate()
-        .map(|(index, values)| {
-            config
-                .validate_signer_count_threshold(index, values)
-                .median()
-        })
-        .collect()
-}
-
-fn make_value_signer_matrix(config: &Config, data_packages: Vec<DataPackage>) -> Matrix {
-    let mut matrix = vec![vec![None; config.signers.len()]; config.feed_ids.len()];
-
-    data_packages.iter().for_each(|data_package| {
-        if let Some(signer_index) = config.signer_index(&data_package.signer_address) {
-            data_package.data_points.iter().for_each(|data_point| {
-                if let Some(feed_index) = config.feed_index(data_point.feed_id) {
-                    matrix[feed_index][signer_index] = data_point.value.into()
-                }
-            })
-        }
-    });
-
-    print_debug!("{:?}", matrix);
-
-    matrix
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod aggregate_matrix_tests {
-    use crate::{
-        core::{aggregator::aggregate_matrix, config::Config},
-        helpers::iter_into::{IterInto, IterIntoOpt, OptIterIntoOpt},
-    };
-
-    #[test]
-    fn test_aggregate_matrix() {
-        let matrix = vec![
-            vec![11u8, 13].iter_into_opt(),
-            vec![21u8, 23].iter_into_opt(),
-        ];
-
-        for signer_count_threshold in 0..Config::test().signers.len() + 1 {
-            let mut config = Config::test();
-            config.signer_count_threshold = signer_count_threshold as u8;
-
-            let result = aggregate_matrix(matrix.clone(), config);
-
-            assert_eq!(result, vec![12u8, 22].iter_into());
-        }
-    }
-
-    #[test]
-    fn test_aggregate_matrix_smaller_threshold_missing_one_value() {
-        let mut config = Config::test();
-        config.signer_count_threshold = 1;
-
-        let matrix = vec![
-            vec![11u8, 13].iter_into_opt(),
-            vec![21u8.into(), None].opt_iter_into_opt(),
-        ];
-
-        let result = aggregate_matrix(matrix, config);
-
-        assert_eq!(result, vec![12u8, 21].iter_into());
-    }
-
-    #[should_panic(expected = "Array is empty")]
-    #[test]
-    fn test_aggregate_matrix_smaller_threshold_missing_whole_feed() {
-        let mut config = Config::test();
-        config.signer_count_threshold = 0;
-
-        let matrix = vec![vec![11u8, 13].iter_into_opt(), vec![None; 2]];
-
-        aggregate_matrix(matrix, config);
-    }
-
-    #[should_panic(expected = "Insufficient signer count 1 for #0 (ETH)")]
-    #[test]
-    fn test_aggregate_matrix_missing_one_value() {
-        let matrix = vec![
-            vec![21u8.into(), None].opt_iter_into_opt(),
-            vec![11u8, 12].iter_into_opt(),
-        ];
-
-        aggregate_matrix(matrix, Config::test());
-    }
-
-    #[should_panic(expected = "Insufficient signer count 0 for #1 (BTC)")]
-    #[test]
-    fn test_aggregate_matrix_missing_whole_feed() {
-        let matrix = vec![vec![11u8, 13].iter_into_opt(), vec![None; 2]];
-
-        aggregate_matrix(matrix, Config::test());
-    }
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod make_value_signer_matrix {
-    use crate::{
-        core::{
-            aggregator::{make_value_signer_matrix, Matrix},
-            config::Config,
-            test_helpers::{AVAX, BTC, ETH, TEST_SIGNER_ADDRESS_1, TEST_SIGNER_ADDRESS_2},
-        },
-        helpers::iter_into::IterInto,
-        network::specific::U256,
-        protocol::data_package::DataPackage,
-    };
-
-    #[test]
-    fn test_make_value_signer_matrix_empty() {
-        let config = Config::test();
-
-        test_make_value_signer_matrix_of(
-            vec![],
-            vec![vec![None; config.signers.len()]; config.feed_ids.len()],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_exact() {
-        let data_packages = vec![
-            DataPackage::test(ETH, 11, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(ETH, 12, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(BTC, 22, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(BTC, 21, TEST_SIGNER_ADDRESS_1, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![11, 12].iter_into(), vec![21, 22].iter_into()],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_greater() {
-        let data_packages = vec![
-            DataPackage::test(ETH, 11, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(ETH, 12, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(BTC, 22, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(BTC, 21, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(AVAX, 31, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(AVAX, 32, TEST_SIGNER_ADDRESS_2, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![11, 12].iter_into(), vec![21, 22].iter_into()],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_smaller() {
-        let data_packages = vec![
-            DataPackage::test(ETH, 11, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(ETH, 12, TEST_SIGNER_ADDRESS_2, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![11, 12].iter_into(), vec![None; 2]],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_diagonal() {
-        let data_packages = vec![
-            DataPackage::test(BTC, 22, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(ETH, 11, TEST_SIGNER_ADDRESS_1, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![11.into(), None], vec![None, 22.into()]],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_repetitions() {
-        let data_packages = vec![
-            DataPackage::test(BTC, 21, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(BTC, 22, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(BTC, 202, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(ETH, 11, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(ETH, 101, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(ETH, 12, TEST_SIGNER_ADDRESS_2, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![101, 12].iter_into(), vec![21, 202].iter_into()],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_all_wrong() {
-        let config = Config::test();
-
-        let data_packages = vec![
-            DataPackage::test(AVAX, 32, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(AVAX, 31, TEST_SIGNER_ADDRESS_1, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![None; config.signers.len()]; config.feed_ids.len()],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_mix() {
-        let data_packages = vec![
-            DataPackage::test(ETH, 11, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(ETH, 12, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(AVAX, 32, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(AVAX, 31, TEST_SIGNER_ADDRESS_1, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![11, 12].iter_into(), vec![None; 2]],
-        );
-    }
-
-    fn test_make_value_signer_matrix_of(
-        data_packages: Vec<DataPackage>,
-        expected_values: Vec<Vec<Option<u128>>>,
-    ) {
-        let config = &Config::test();
-        let result = make_value_signer_matrix(config, data_packages);
-
-        let expected_matrix: Matrix = expected_values
-            .iter()
-            .map(|row| {
-                (row.iter()
-                    .map(|&value| value.map(U256::from))
-                    .collect::<Vec<_>>())
-                .iter_into() as Vec<Option<U256>>
-            })
-            .collect();
-
-        assert_eq!(result, expected_matrix)
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 0b9ca7f7..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/core/config.rs.html +++ /dev/null @@ -1,63 +0,0 @@ -config.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
-
use crate::network::specific::{Bytes, U256};
-
-/// 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.
-#[derive(Debug)]
-pub struct Config {
-    /// 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.
-    pub signer_count_threshold: u8,
-
-    /// 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.
-    pub signers: Vec<Bytes>,
-
-    /// Identifiers for the data feeds from which values are aggregated.
-    ///
-    /// Each data feed id is represented by the network-specific `U256` type.
-    pub feed_ids: Vec<U256>,
-
-    /// 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.
-    pub block_timestamp: u64,
-}
-
\ No newline at end of file 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 deleted file mode 100644 index f278fb16..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/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/doc/src/redstone/core/processor.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/core/processor.rs.html deleted file mode 100644 index 2e92e10d..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/core/processor.rs.html +++ /dev/null @@ -1,203 +0,0 @@ -processor.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-
use crate::{
-    core::{
-        aggregator::aggregate_values, config::Config, processor_result::ProcessorResult,
-        validator::Validator,
-    },
-    network::specific::Bytes,
-    print_debug,
-    protocol::payload::Payload,
-};
-
-/// The main processor of the RedStone payload.
-///
-///
-/// # Arguments
-///
-/// * `config` - Configuration of the payload processing.
-/// * `payload_bytes` - Network-specific byte-list of the payload to be processed.
-pub fn process_payload(config: Config, payload_bytes: Bytes) -> ProcessorResult {
-    #[allow(clippy::useless_conversion)]
-    let mut bytes: Vec<u8> = payload_bytes.into();
-    let payload = Payload::make(&mut bytes);
-    print_debug!("{:?}", payload);
-
-    make_processor_result(config, payload)
-}
-
-fn make_processor_result(config: Config, payload: Payload) -> ProcessorResult {
-    let min_timestamp = payload
-        .data_packages
-        .iter()
-        .enumerate()
-        .map(|(index, dp)| config.validate_timestamp(index, dp.timestamp))
-        .min()
-        .unwrap();
-
-    let values = aggregate_values(config, payload.data_packages);
-
-    print_debug!("{} {:?}", min_timestamp, values);
-
-    ProcessorResult {
-        values,
-        min_timestamp,
-    }
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        core::{
-            config::Config,
-            processor::make_processor_result,
-            processor_result::ProcessorResult,
-            test_helpers::{
-                BTC, ETH, TEST_BLOCK_TIMESTAMP, TEST_SIGNER_ADDRESS_1, TEST_SIGNER_ADDRESS_2,
-            },
-        },
-        helpers::iter_into::IterInto,
-        protocol::{data_package::DataPackage, payload::Payload},
-    };
-
-    #[test]
-    fn test_make_processor_result() {
-        let data_packages = vec![
-            DataPackage::test(
-                ETH,
-                11,
-                TEST_SIGNER_ADDRESS_1,
-                (TEST_BLOCK_TIMESTAMP + 5).into(),
-            ),
-            DataPackage::test(
-                ETH,
-                13,
-                TEST_SIGNER_ADDRESS_2,
-                (TEST_BLOCK_TIMESTAMP + 3).into(),
-            ),
-            DataPackage::test(
-                BTC,
-                32,
-                TEST_SIGNER_ADDRESS_2,
-                (TEST_BLOCK_TIMESTAMP - 2).into(),
-            ),
-            DataPackage::test(
-                BTC,
-                31,
-                TEST_SIGNER_ADDRESS_1,
-                (TEST_BLOCK_TIMESTAMP + 400).into(),
-            ),
-        ];
-
-        let result = make_processor_result(Config::test(), Payload { data_packages });
-
-        assert_eq!(
-            result,
-            ProcessorResult {
-                min_timestamp: TEST_BLOCK_TIMESTAMP - 2,
-                values: vec![12u8, 31].iter_into()
-            }
-        );
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index ecdffb37..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/core/processor_result.rs.html +++ /dev/null @@ -1,53 +0,0 @@ -processor_result.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
-
use crate::network::specific::U256;
-
-/// 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`.
-#[derive(Debug, Eq, PartialEq)]
-pub struct ProcessorResult {
-    /// 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.
-    pub min_timestamp: u64,
-
-    /// 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`.
-    pub values: Vec<U256>,
-}
-
-impl From<ProcessorResult> for (u64, Vec<U256>) {
-    fn from(result: ProcessorResult) -> Self {
-        (result.min_timestamp, result.values)
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 1fed8ca0..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/core/validator.rs.html +++ /dev/null @@ -1,573 +0,0 @@ -validator.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-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
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-
use crate::{
-    core::config::Config,
-    network::{
-        assert::Assert,
-        error::Error::{InsufficientSignerCount, TimestampTooFuture, TimestampTooOld},
-        specific::U256,
-    },
-    protocol::constants::{MAX_TIMESTAMP_AHEAD_MS, MAX_TIMESTAMP_DELAY_MS},
-    utils::filter::FilterSome,
-};
-
-/// 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.
-pub(crate) trait Validator {
-    /// 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.
-    ///
-    /// # Arguments
-    ///
-    /// * `feed_id`: `U256` - The unique identifier of the data feed.
-    ///
-    /// # Returns
-    ///
-    /// * `Option<usize>` - The index of the feed if it exists, or `None` if it does not.
-    fn feed_index(&self, feed_id: U256) -> 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.
-    ///
-    /// # Arguments
-    ///
-    /// * `signer`: `&[u8]` - A byte slice representing the signer's identifier.
-    ///
-    /// # Returns
-    ///
-    /// * `Option<usize>` - The index of the signer if found, or `None` if not found.
-    fn signer_index(&self, signer: &[u8]) -> Option<usize>;
-
-    /// 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.
-    ///
-    /// # Arguments
-    ///
-    /// * `index`: `usize` - The index of the data value being validated.
-    /// * `values`: `&[Option<U256>]` - A slice of optional `U256` values associated with the data.
-    ///
-    /// # Returns
-    ///
-    /// * `Vec<U256>` - A vector of `U256` values that meet the validation criteria.
-    fn validate_signer_count_threshold(&self, index: usize, values: &[Option<U256>]) -> Vec<U256>;
-
-    /// 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.
-    ///
-    /// # Arguments
-    ///
-    /// * `index`: `usize` - The index of the data value whose timestamp is being validated.
-    /// * `timestamp`: `u64` - The timestamp to be validated.
-    ///
-    /// # Returns
-    ///
-    /// * `u64` - The validated timestamp.
-    fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64;
-}
-
-impl Validator for Config {
-    #[inline]
-    fn feed_index(&self, feed_id: U256) -> Option<usize> {
-        self.feed_ids.iter().position(|&elt| elt == feed_id)
-    }
-
-    #[inline]
-    fn signer_index(&self, signer: &[u8]) -> Option<usize> {
-        self.signers
-            .iter()
-            .position(|elt| elt.to_ascii_lowercase() == signer.to_ascii_lowercase())
-    }
-
-    #[inline]
-    fn validate_signer_count_threshold(&self, index: usize, values: &[Option<U256>]) -> Vec<U256> {
-        values.filter_some().assert_or_revert(
-            |x| (*x).len() >= self.signer_count_threshold.into(),
-            #[allow(clippy::useless_conversion)]
-            |val| InsufficientSignerCount(index, val.len(), self.feed_ids[index]),
-        )
-    }
-
-    #[inline]
-    fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64 {
-        timestamp.assert_or_revert(
-            |&x| x + MAX_TIMESTAMP_DELAY_MS >= self.block_timestamp,
-            |timestamp| TimestampTooOld(index, *timestamp),
-        );
-
-        timestamp.assert_or_revert(
-            |&x| x <= self.block_timestamp + MAX_TIMESTAMP_AHEAD_MS,
-            |timestamp| TimestampTooFuture(index, *timestamp),
-        )
-    }
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        core::{
-            config::Config,
-            test_helpers::{
-                AVAX, BTC, ETH, TEST_BLOCK_TIMESTAMP, TEST_SIGNER_ADDRESS_1, TEST_SIGNER_ADDRESS_2,
-            },
-            validator::Validator,
-        },
-        helpers::{
-            hex::{hex_to_bytes, make_feed_id},
-            iter_into::{IterInto, IterIntoOpt, OptIterIntoOpt},
-        },
-        network::specific::U256,
-        protocol::constants::{MAX_TIMESTAMP_AHEAD_MS, MAX_TIMESTAMP_DELAY_MS},
-    };
-    use itertools::Itertools;
-
-    #[test]
-    fn test_feed_index() {
-        let config = Config::test();
-
-        let eth_index = config.feed_index(make_feed_id(ETH));
-        assert_eq!(eth_index, 0.into());
-
-        let eth_index = config.feed_index(make_feed_id("778680")); //eth
-        assert_eq!(eth_index, None);
-
-        let btc_index = config.feed_index(make_feed_id(BTC));
-        assert_eq!(btc_index, 1.into());
-
-        let avax_index = config.feed_index(make_feed_id(AVAX));
-        assert_eq!(avax_index, None);
-    }
-
-    #[test]
-    fn test_signer_index() {
-        let config = Config::test();
-        let index = config.signer_index(&hex_to_bytes(TEST_SIGNER_ADDRESS_1.into()));
-        assert_eq!(index, 0.into());
-
-        let index = config.signer_index(&hex_to_bytes(TEST_SIGNER_ADDRESS_1.to_uppercase()));
-        assert_eq!(index, 0.into());
-
-        let index = config.signer_index(&hex_to_bytes(TEST_SIGNER_ADDRESS_2.into()));
-        assert_eq!(index, 1.into());
-
-        let index = config.signer_index(&hex_to_bytes(TEST_SIGNER_ADDRESS_2.replace('0', "1")));
-        assert_eq!(index, None);
-    }
-
-    #[test]
-    fn test_validate_timestamp() {
-        let config = Config::test();
-
-        config.validate_timestamp(0, TEST_BLOCK_TIMESTAMP);
-        config.validate_timestamp(1, TEST_BLOCK_TIMESTAMP + 60000);
-        config.validate_timestamp(2, TEST_BLOCK_TIMESTAMP + MAX_TIMESTAMP_AHEAD_MS);
-        config.validate_timestamp(3, TEST_BLOCK_TIMESTAMP - MAX_TIMESTAMP_DELAY_MS);
-        config.validate_timestamp(4, TEST_BLOCK_TIMESTAMP - 60000);
-    }
-
-    #[should_panic(expected = "Timestamp 2000000180001 is too future for #0")]
-    #[test]
-    fn test_validate_timestamp_too_future() {
-        Config::test().validate_timestamp(0, TEST_BLOCK_TIMESTAMP + MAX_TIMESTAMP_AHEAD_MS + 1);
-    }
-
-    #[should_panic(expected = "Timestamp 1999999099999 is too old for #1")]
-    #[test]
-    fn test_validate_timestamp_too_old() {
-        Config::test().validate_timestamp(1, TEST_BLOCK_TIMESTAMP - MAX_TIMESTAMP_DELAY_MS - 1);
-    }
-
-    #[should_panic(expected = "Timestamp 0 is too old for #2")]
-    #[test]
-    fn test_validate_timestamp_zero() {
-        Config::test().validate_timestamp(2, 0);
-    }
-
-    #[should_panic(expected = "Timestamp 4000000000000 is too future for #3")]
-    #[test]
-    fn test_validate_timestamp_big() {
-        Config::test().validate_timestamp(3, TEST_BLOCK_TIMESTAMP + TEST_BLOCK_TIMESTAMP);
-    }
-
-    #[should_panic(expected = "Timestamp 2000000000000 is too future for #4")]
-    #[test]
-    fn test_validate_timestamp_no_block_timestamp() {
-        let mut config = Config::test();
-
-        config.block_timestamp = 0;
-        config.validate_timestamp(4, TEST_BLOCK_TIMESTAMP);
-    }
-
-    #[should_panic(expected = "Insufficient signer count 0 for #0 (ETH)")]
-    #[test]
-    fn test_validate_signer_count_threshold_empty_list() {
-        Config::test().validate_signer_count_threshold(0, vec![].as_slice());
-    }
-
-    #[should_panic(expected = "Insufficient signer count 1 for #1 (BTC)")]
-    #[test]
-    fn test_validate_signer_count_threshold_shorter_list() {
-        Config::test().validate_signer_count_threshold(1, vec![1u8].iter_into_opt().as_slice());
-    }
-
-    #[should_panic(expected = "Insufficient signer count 1 for #1 (BTC)")]
-    #[test]
-    fn test_validate_signer_count_threshold_list_with_nones() {
-        Config::test().validate_signer_count_threshold(
-            1,
-            vec![None, 1u8.into(), None].opt_iter_into_opt().as_slice(),
-        );
-    }
-
-    #[test]
-    fn test_validate_signer_count_threshold_with_exact_size() {
-        validate_with_all_permutations(vec![1u8, 2].iter_into_opt(), vec![1u8, 2].iter_into());
-    }
-
-    #[test]
-    fn test_validate_signer_count_threshold_with_exact_signer_count() {
-        validate_with_all_permutations(
-            vec![None, 1u8.into(), None, 2.into()].opt_iter_into_opt(),
-            vec![1u8, 2].iter_into(),
-        );
-    }
-
-    #[test]
-    fn test_validate_signer_count_threshold_with_larger_size() {
-        validate_with_all_permutations(
-            vec![
-                1u8.into(),
-                None,
-                None,
-                2.into(),
-                3.into(),
-                None,
-                4.into(),
-                None,
-            ]
-            .opt_iter_into_opt(),
-            vec![1u8, 2, 3, 4].iter_into(),
-        );
-    }
-
-    fn validate_with_all_permutations(numbers: Vec<Option<U256>>, expected_value: Vec<U256>) {
-        let perms: Vec<Vec<_>> = numbers.iter().permutations(numbers.len()).collect();
-        let mut config = Config::test();
-
-        let result = config.validate_signer_count_threshold(0, &numbers);
-        assert_eq!(result, expected_value);
-
-        for threshold in 0..expected_value.len() + 1 {
-            config.signer_count_threshold = threshold as u8;
-
-            for (index, perm) in perms.iter().enumerate() {
-                let p: Vec<_> = perm.iter().map(|&&v| v).collect();
-
-                let result =
-                    config.validate_signer_count_threshold(index % config.feed_ids.len(), &p);
-                assert_eq!(result.len(), expected_value.len());
-            }
-        }
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 7e62e207..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/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/doc/src/redstone/crypto/mod.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/crypto/mod.rs.html deleted file mode 100644 index fa282223..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/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/doc/src/redstone/crypto/recover.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/crypto/recover.rs.html deleted file mode 100644 index f03e84b0..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/crypto/recover.rs.html +++ /dev/null @@ -1,267 +0,0 @@ -recover.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-
use crate::crypto::{keccak256, recover::crypto256::recover_public_key};
-
-pub fn recover_address(message: Vec<u8>, signature: Vec<u8>) -> Vec<u8> {
-    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],
-        recovery_byte - (if recovery_byte >= 27 { 27 } else { 0 }),
-    );
-    let key_hash = keccak256::keccak256(&key[1..]); // skip first uncompressed-key byte
-
-    key_hash[12..].into() // last 20 bytes
-}
-
-#[cfg(feature = "crypto_secp256k1")]
-pub(crate) mod crypto256 {
-    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],
-        recovery_byte: u8,
-    ) -> Box<[u8]> {
-        let msg = Message::from_digest_slice(message_hash.as_ref())
-            .unwrap_or_revert(|_| Error::CryptographicError(message_hash.len()));
-
-        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)
-                .unwrap_or_revert(|_| Error::CryptographicError(signature_bytes.len()));
-
-        let public_key = Secp256k1Curve::new().recover_ecdsa(&msg, &sig);
-
-        public_key.unwrap().serialize_uncompressed().into()
-    }
-}
-
-#[cfg(feature = "crypto_k256")]
-pub(crate) mod crypto256 {
-    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],
-        recovery_byte: u8,
-    ) -> Box<[u8]> {
-        let recovery_id = RecoveryId::from_byte(recovery_byte)
-            .unwrap_or_revert(|_| Error::CryptographicError(recovery_byte.into()));
-
-        let signature = Signature::try_from(signature_bytes)
-            .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());
-
-        recovered_key.unwrap()
-    }
-}
-
-#[cfg(all(not(feature = "crypto_k256"), not(feature = "crypto_secp256k1")))]
-pub(crate) mod crypto256 {
-    pub(crate) fn recover_public_key(
-        _message_hash: Box<[u8]>,
-        _signature_bytes: &[u8],
-        _recovery_byte: u8,
-    ) -> Box<[u8]> {
-        panic!("Not implemented!")
-    }
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        crypto::recover::{crypto256::recover_public_key, recover_address},
-        helpers::hex::hex_to_bytes,
-    };
-
-    const MESSAGE: &str = "415641580000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d394303d018d79bf0ba000000020000001";
-    const MESSAGE_HASH: &str = "f0805644755393876d0e917e553f0c206f8bc68b7ebfe73a79d2a9e7f5a4cea6";
-    const SIG_V27: &str = "475195641dae43318e194c3d9e5fc308773d6fdf5e197e02644dfd9ca3d19e3e2bd7d8656428f7f02e658a16b8f83722169c57126cc50bec8fad188b1bac6d19";
-    const SIG_V28: &str = "c88242d22d88252c845b946c9957dbf3c7d59a3b69ecba2898198869f9f146ff268c3e47a11dbb05cc5198aadd659881817a59ee37e088d3253f4695927428c1";
-    const PUBLIC_KEY_V27: &str =
-        "04f5f035588502146774d0ccfd62ee5bf1d7f1dbb96aae33a79765c636b8ec75a36f5121931b5cc37215a7d4280c5700ca92daaaf93c32b06ca9f98b1f4ece624e";
-    const PUBLIC_KEY_V28: &str =
-        "04626f2ad2cfb0b41a24276d78de8959bcf45fc5e80804416e660aab2089d15e98206526e639ee19d17c8f9ae0ce3a6ff1a8ea4ab773d0fb4214e08aad7ba978c8";
-    const ADDRESS_V27: &str = "2c59617248994D12816EE1Fa77CE0a64eEB456BF";
-    const ADDRESS_V28: &str = "12470f7aBA85c8b81D63137DD5925D6EE114952b";
-
-    #[test]
-    fn test_recover_public_key_v27() {
-        let public_key = recover_public_key(u8_box(MESSAGE_HASH), &u8_box(SIG_V27), 0);
-
-        assert_eq!(u8_box(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);
-
-        assert_eq!(u8_box(PUBLIC_KEY_V28), public_key);
-    }
-
-    #[test]
-    fn test_recover_address_1b() {
-        let address = recover_address(
-            hex_to_bytes(MESSAGE.into()),
-            hex_to_bytes(SIG_V27.to_owned() + "1b"),
-        );
-
-        assert_eq!(hex_to_bytes(ADDRESS_V27.into()), address);
-    }
-
-    #[test]
-    fn test_recover_address_1c() {
-        let address = recover_address(
-            hex_to_bytes(MESSAGE.into()),
-            hex_to_bytes(SIG_V28.to_owned() + "1c"),
-        );
-
-        assert_eq!(hex_to_bytes(ADDRESS_V28.into()), address);
-    }
-
-    fn u8_box(str: &str) -> Box<[u8]> {
-        hex_to_bytes(str.into()).as_slice().into()
-    }
-}
-
\ 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 deleted file mode 100644 index a1f164bf..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/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/doc/src/redstone/network/as_str.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/as_str.rs.html deleted file mode 100644 index f0b58bfb..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/as_str.rs.html +++ /dev/null @@ -1,235 +0,0 @@ -as_str.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-
extern crate alloc;
-
-use crate::network::specific::U256;
-use alloc::{format, string::String};
-
-pub trait AsHexStr {
-    fn as_hex_str(&self) -> String;
-}
-
-impl AsHexStr for &[u8] {
-    #[allow(clippy::format_collect)]
-    fn as_hex_str(&self) -> String {
-        self.iter().map(|byte| format!("{:02x}", byte)).collect()
-    }
-}
-
-#[cfg(feature = "network_casper")]
-impl AsHexStr for casper_types::bytesrepr::Bytes {
-    fn as_hex_str(&self) -> String {
-        self.as_slice().as_hex_str()
-    }
-}
-
-#[cfg(not(feature = "network_radix"))]
-impl AsHexStr for U256 {
-    fn as_hex_str(&self) -> String {
-        format!("{:X}", self)
-    }
-}
-
-#[cfg(feature = "network_radix")]
-impl AsHexStr for U256 {
-    fn as_hex_str(&self) -> String {
-        let digits = self.to_digits();
-        let mut result = String::new();
-        for &part in &digits {
-            if result.is_empty() || part != 0u64 {
-                result.push_str(&format!("{:02X}", part));
-            }
-        }
-        result
-    }
-}
-
-impl AsHexStr for Vec<u8> {
-    fn as_hex_str(&self) -> String {
-        self.as_slice().as_hex_str()
-    }
-}
-
-impl AsHexStr for Box<[u8]> {
-    fn as_hex_str(&self) -> String {
-        self.as_ref().as_hex_str()
-    }
-}
-
-pub trait AsAsciiStr {
-    fn as_ascii_str(&self) -> String;
-}
-
-impl AsAsciiStr for &[u8] {
-    fn as_ascii_str(&self) -> String {
-        self.iter().map(|&code| code as char).collect()
-    }
-}
-
-impl AsAsciiStr for Vec<u8> {
-    fn as_ascii_str(&self) -> String {
-        self.as_slice().as_ascii_str()
-    }
-}
-
-#[cfg(feature = "network_casper")]
-impl AsAsciiStr for casper_types::bytesrepr::Bytes {
-    fn as_ascii_str(&self) -> String {
-        self.as_slice().as_ascii_str()
-    }
-}
-
-impl AsAsciiStr for U256 {
-    fn as_ascii_str(&self) -> String {
-        let hex_string = self.as_hex_str();
-        let bytes = (0..hex_string.len())
-            .step_by(2)
-            .map(|i| u8::from_str_radix(&hex_string[i..i + 2], 16))
-            .collect::<Result<Vec<u8>, _>>()
-            .unwrap();
-
-        bytes.as_ascii_str()
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use crate::network::{
-        as_str::{AsAsciiStr, AsHexStr},
-        specific::U256,
-    };
-
-    const ETH: u32 = 4543560u32;
-
-    #[test]
-    fn test_as_hex_str() {
-        let u256 = U256::from(ETH);
-        let result = u256.as_hex_str();
-
-        assert_eq!(result, "455448");
-    }
-
-    #[test]
-    fn test_as_ascii_str() {
-        let u256 = U256::from(ETH);
-        let result = u256.as_ascii_str();
-
-        assert_eq!(result, "ETH");
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index cfd43818..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/assert.rs.html +++ /dev/null @@ -1,273 +0,0 @@ -assert.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-
use crate::{
-    network::{error::Error, specific::revert},
-    print_debug,
-};
-use std::fmt::Debug;
-
-pub trait Assert<F> {
-    fn assert_or_revert<E: Fn(&Self) -> Error>(self, check: F, error: E) -> Self;
-}
-
-impl<T, F> Assert<F> for T
-where
-    T: Debug,
-    F: Fn(&Self) -> bool,
-{
-    fn assert_or_revert<E: FnOnce(&Self) -> Error>(self, check: F, error: E) -> Self {
-        assert_or_revert(self, check, error)
-    }
-}
-
-#[inline]
-fn assert_or_revert<F, T, E: FnOnce(&T) -> Error>(arg: T, check: F, error: E) -> T
-where
-    F: Fn(&T) -> bool,
-    T: Debug,
-{
-    assert_or_revert_bool_with(check(&arg), || error(&arg));
-
-    arg
-}
-
-#[inline]
-fn assert_or_revert_bool_with<E: FnOnce() -> Error>(check: bool, error: E) {
-    if check {
-        return;
-    }
-
-    let error = error();
-    print_debug!("REVERT({}) - {}!", &error.code(), error);
-    revert(error);
-}
-
-pub trait Unwrap<R> {
-    type ErrorArg;
-
-    fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> R;
-}
-
-impl<T> Unwrap<T> for Option<T>
-where
-    T: Debug,
-{
-    type ErrorArg = ();
-
-    fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> T {
-        assert_or_revert(self, |arg| arg.is_some(), |_| error(&())).unwrap()
-    }
-}
-
-impl<T, Err> Unwrap<T> for Result<T, Err>
-where
-    T: Debug,
-    Err: Debug,
-{
-    type ErrorArg = Err;
-
-    fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> T {
-        assert_or_revert(
-            self,
-            |arg| arg.is_ok(),
-            |e| error(e.as_ref().err().unwrap()),
-        )
-        .unwrap()
-    }
-}
-
-#[cfg(test)]
-mod assert_or_revert_tests {
-    use crate::network::{
-        assert::{assert_or_revert_bool_with, Assert},
-        error::Error,
-    };
-
-    #[test]
-    fn test_assert_or_revert_bool_with_true() {
-        assert_or_revert_bool_with(true, || Error::ArrayIsEmpty);
-    }
-
-    #[should_panic(expected = "Array is empty")]
-    #[test]
-    fn test_assert_or_revert_bool_with_false() {
-        assert_or_revert_bool_with(false, || Error::ArrayIsEmpty);
-    }
-
-    #[test]
-    fn test_assert_or_revert_correct() {
-        5.assert_or_revert(|&x| x == 5, |&size| Error::SizeNotSupported(size));
-    }
-
-    #[should_panic(expected = "Size not supported: 5")]
-    #[test]
-    fn test_assert_or_revert_wrong() {
-        5.assert_or_revert(|&x| x < 5, |&size| Error::SizeNotSupported(size));
-    }
-}
-
-#[cfg(test)]
-mod unwrap_or_revert_tests {
-    use crate::network::{assert::Unwrap, error::Error};
-
-    #[test]
-    fn test_unwrap_or_revert_some() {
-        let result = Some(543).unwrap_or_revert(|_| Error::CryptographicError(333));
-
-        assert_eq!(result, 543);
-    }
-
-    #[should_panic(expected = "Cryptographic Error: 333")]
-    #[test]
-    fn test_unwrap_or_revert_none() {
-        (Option::<u64>::None).unwrap_or_revert(|_| Error::CryptographicError(333));
-    }
-
-    #[test]
-    fn test_unwrap_or_revert_ok() {
-        let result = Ok(256).unwrap_or_revert(|_: &Error| Error::CryptographicError(333));
-
-        assert_eq!(result, 256);
-    }
-
-    #[should_panic(expected = "Cryptographic Error: 567")]
-    #[test]
-    fn test_unwrap_or_revert_err() {
-        Result::<&[u8], Error>::Err(Error::CryptographicError(567)).unwrap_or_revert(|e| e.clone());
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/casper/error.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/casper/error.rs.html deleted file mode 100644 index 53deca0d..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/casper/error.rs.html +++ /dev/null @@ -1,17 +0,0 @@ -error.rs - source
1
-2
-3
-4
-5
-6
-7
-8
-
use crate::network::error::Error;
-use casper_types::ApiError;
-
-impl From<Error> for ApiError {
-    fn from(error: Error) -> Self {
-        ApiError::User(error.code())
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/casper/from_bytes_repr.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/casper/from_bytes_repr.rs.html deleted file mode 100644 index 7d4c10ab..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/casper/from_bytes_repr.rs.html +++ /dev/null @@ -1,21 +0,0 @@ -from_bytes_repr.rs - source
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-
use crate::network::{
-    from_bytes_repr::{FromBytesRepr, Sanitized},
-    specific::U256,
-};
-
-impl FromBytesRepr<Vec<u8>> for U256 {
-    fn from_bytes_repr(bytes: Vec<u8>) -> Self {
-        bytes.sanitized().as_slice().into()
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/casper/mod.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/casper/mod.rs.html deleted file mode 100644 index 8df66718..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/casper/mod.rs.html +++ /dev/null @@ -1,77 +0,0 @@ -mod.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
-
use crate::network::{error::Error, specific::NetworkSpecific};
-
-mod error;
-mod from_bytes_repr;
-
-pub struct Casper;
-
-impl NetworkSpecific for Casper {
-    type BytesRepr = casper_types::bytesrepr::Bytes;
-    type ValueRepr = casper_types::U256;
-    type _Self = Self;
-
-    const VALUE_SIZE: usize = 32;
-
-    fn print(_text: String) {
-        #[cfg(all(not(test), feature = "print_debug"))]
-        {
-            casper_contract::contract_api::runtime::print(&_text);
-        }
-
-        #[cfg(test)]
-        {
-            println!("{}", _text);
-        }
-    }
-
-    fn revert(error: Error) -> ! {
-        #[cfg(not(test))]
-        {
-            casper_contract::contract_api::runtime::revert(error)
-        }
-
-        #[cfg(test)]
-        {
-            panic!("{}", error)
-        }
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 4c0588a6..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/error.rs.html +++ /dev/null @@ -1,351 +0,0 @@ -error.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-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
-175
-
use crate::network::{
-    as_str::{AsAsciiStr, AsHexStr},
-    specific::U256,
-};
-use std::fmt::{Debug, Display, Formatter};
-
-pub trait ContractErrorContent: Debug {
-    fn code(&self) -> u8;
-    fn message(&self) -> String;
-}
-
-/// 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.
-#[derive(Debug)]
-pub enum Error {
-    /// 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.
-    ContractError(Box<dyn ContractErrorContent>),
-
-    /// Indicates an overflow error with `U256` numbers.
-    ///
-    /// Used when operations on `U256` numbers exceed their maximum value, potentially leading
-    /// to incorrect calculations or state.
-    NumberOverflow(U256),
-
-    /// 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.
-    ArrayIsEmpty,
-
-    /// 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.
-    CryptographicError(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.
-    SizeNotSupported(usize),
-
-    /// 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.
-    WrongRedStoneMarker(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.
-    NonEmptyPayloadRemainder(Vec<u8>),
-
-    /// 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.
-    InsufficientSignerCount(usize, usize, U256),
-
-    /// 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.
-    TimestampTooOld(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.
-    TimestampTooFuture(usize, u64),
-
-    /// 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.
-    ClonedContractError(u8, String),
-}
-
-impl Error {
-    pub fn contract_error<T: ContractErrorContent + 'static>(value: T) -> Error {
-        Error::ContractError(Box::new(value))
-    }
-
-    pub(crate) fn code(&self) -> u16 {
-        match self {
-            Error::ContractError(boxed) => boxed.code() as u16,
-            Error::NumberOverflow(_) => 509,
-            Error::ArrayIsEmpty => 510,
-            Error::WrongRedStoneMarker(_) => 511,
-            Error::NonEmptyPayloadRemainder(_) => 512,
-            Error::InsufficientSignerCount(data_package_index, value, _) => {
-                (2000 + data_package_index * 10 + value) as u16
-            }
-            Error::SizeNotSupported(size) => 600 + *size as u16,
-            Error::CryptographicError(size) => 700 + *size as u16,
-            Error::TimestampTooOld(data_package_index, _) => 1000 + *data_package_index as u16,
-            Error::TimestampTooFuture(data_package_index, _) => 1050 + *data_package_index as u16,
-            Error::ClonedContractError(code, _) => *code as u16,
-        }
-    }
-}
-
-impl Display for Error {
-    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
-        match self {
-            Error::ContractError(boxed) => write!(f, "Contract error: {}", boxed.message()),
-            Error::NumberOverflow(number) => write!(f, "Number overflow: {}", number),
-            Error::ArrayIsEmpty => write!(f, "Array is empty"),
-            Error::CryptographicError(size) => write!(f, "Cryptographic Error: {}", size),
-            Error::SizeNotSupported(size) => write!(f, "Size not supported: {}", size),
-            Error::WrongRedStoneMarker(bytes) => {
-                write!(f, "Wrong RedStone marker: {}", bytes.as_hex_str())
-            }
-            Error::NonEmptyPayloadRemainder(bytes) => {
-                write!(f, "Non empty payload remainder: {}", bytes.as_hex_str())
-            }
-            Error::InsufficientSignerCount(data_package_index, value, feed_id) => write!(
-                f,
-                "Insufficient signer count {} for #{} ({})",
-                value,
-                data_package_index,
-                feed_id.as_ascii_str()
-            ),
-            Error::TimestampTooOld(data_package_index, value) => {
-                write!(
-                    f,
-                    "Timestamp {} is too old for #{}",
-                    value, data_package_index
-                )
-            }
-            Error::TimestampTooFuture(data_package_index, value) => write!(
-                f,
-                "Timestamp {} is too future for #{}",
-                value, data_package_index
-            ),
-            Error::ClonedContractError(_, message) => {
-                write!(f, "(Cloned) Contract error: {}", message)
-            }
-        }
-    }
-}
-
-impl Clone for Error {
-    fn clone(&self) -> Self {
-        match self {
-            Error::ContractError(content) => {
-                Error::ClonedContractError(content.code(), content.message())
-            }
-            Error::NumberOverflow(value) => Error::NumberOverflow(*value),
-            Error::ArrayIsEmpty => Error::ArrayIsEmpty,
-            Error::CryptographicError(size) => Error::CryptographicError(*size),
-            Error::SizeNotSupported(size) => Error::SizeNotSupported(*size),
-            Error::WrongRedStoneMarker(bytes) => Error::WrongRedStoneMarker(bytes.clone()),
-            Error::NonEmptyPayloadRemainder(bytes) => {
-                Error::NonEmptyPayloadRemainder(bytes.clone())
-            }
-            Error::InsufficientSignerCount(count, needed, bytes) => {
-                Error::InsufficientSignerCount(*count, *needed, *bytes)
-            }
-            Error::TimestampTooOld(index, timestamp) => Error::TimestampTooOld(*index, *timestamp),
-            Error::TimestampTooFuture(index, timestamp) => {
-                Error::TimestampTooFuture(*index, *timestamp)
-            }
-            Error::ClonedContractError(code, message) => {
-                Error::ClonedContractError(*code, message.as_str().into())
-            }
-        }
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index f8226f69..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/flattened.rs.html +++ /dev/null @@ -1,71 +0,0 @@ -flattened.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
-
use crate::network::specific::Bytes;
-
-pub trait Flattened<T> {
-    fn flattened(&self) -> T;
-}
-
-impl Flattened<Bytes> for Vec<Bytes> {
-    fn flattened(&self) -> Bytes {
-        #[allow(clippy::useless_conversion)]
-        self.iter().flatten().copied().collect::<Vec<_>>().into()
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use crate::network::{flattened::Flattened, specific::Bytes};
-
-    #[test]
-    fn test_bytes_flattened() {
-        #[allow(clippy::useless_conversion)]
-        let bytes: Vec<Bytes> = vec![
-            vec![1u8, 2, 3].into(),
-            vec![4u8].into(),
-            vec![].into(),
-            vec![5, 6, 7].into(),
-        ];
-
-        let result: Bytes = bytes.flattened();
-
-        #[allow(clippy::useless_conversion)]
-        let expected_result: Bytes = vec![1u8, 2, 3, 4, 5, 6, 7].into();
-
-        assert_eq!(result, expected_result);
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 0c7663c5..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/from_bytes_repr.rs.html +++ /dev/null @@ -1,257 +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
-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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-
use crate::network::specific::VALUE_SIZE;
-
-pub trait FromBytesRepr<T> {
-    fn from_bytes_repr(bytes: T) -> Self;
-}
-
-pub trait Sanitized {
-    fn sanitized(self) -> Self;
-}
-
-impl Sanitized for Vec<u8> {
-    fn sanitized(self) -> Self {
-        if self.len() <= VALUE_SIZE {
-            return self;
-        }
-
-        let index = self.len().max(VALUE_SIZE) - VALUE_SIZE;
-        let remainder = &self[0..index];
-
-        if remainder != vec![0; index] {
-            panic!("Number to big: {:?} digits", self.len())
-        }
-
-        self[index..].into()
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use crate::network::{
-        from_bytes_repr::FromBytesRepr,
-        specific::{U256, VALUE_SIZE},
-    };
-
-    #[cfg(feature = "network_radix")]
-    use crate::network::radix::u256_ext::U256Ext;
-
-    #[test]
-    fn test_from_bytes_repr_single() {
-        let vec = vec![1];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(1u32));
-    }
-
-    #[test]
-    fn test_from_bytes_repr_double() {
-        let vec = vec![1, 2];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(258u32));
-    }
-
-    #[test]
-    fn test_from_bytes_repr_simple() {
-        let vec = vec![1, 2, 3];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(66051u32));
-    }
-
-    #[test]
-    fn test_from_bytes_repr_bigger() {
-        let vec = vec![101, 202, 255];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(6671103u32));
-    }
-
-    #[test]
-    fn test_from_bytes_repr_empty() {
-        let result = U256::from_bytes_repr(Vec::new());
-
-        assert_eq!(result, U256::from(0u8));
-    }
-
-    #[test]
-    fn test_from_bytes_repr_trailing_zeroes() {
-        let vec = vec![1, 2, 3, 0];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(16909056u32));
-    }
-
-    #[test]
-    fn test_from_bytes_repr_leading_zeroes() {
-        let vec = vec![0, 1, 2, 3];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(66051u32));
-    }
-
-    #[allow(clippy::legacy_numeric_constants)]
-    #[test]
-    fn test_from_bytes_repr_max() {
-        let vec = vec![255; VALUE_SIZE];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::max_value());
-    }
-
-    #[test]
-    fn test_from_bytes_repr_min() {
-        let vec = vec![0; VALUE_SIZE];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(0u8));
-    }
-
-    #[should_panic(expected = "Number to big")]
-    #[test]
-    fn test_from_bytes_repr_too_long() {
-        let x = VALUE_SIZE as u8 + 1;
-        let vec = (1..=x).collect();
-
-        U256::from_bytes_repr(vec);
-    }
-
-    #[allow(clippy::legacy_numeric_constants)]
-    #[test]
-    fn test_from_bytes_repr_too_long_but_zeroes() {
-        let mut vec = vec![255; VALUE_SIZE + 1];
-        vec[0] = 0;
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::max_value());
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index f79fb758..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/mod.rs.html +++ /dev/null @@ -1,51 +0,0 @@ -mod.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
-
pub mod as_str;
-pub mod assert;
-pub mod error;
-pub mod from_bytes_repr;
-pub mod print_debug;
-pub mod specific;
-
-#[cfg(feature = "network_casper")]
-pub mod casper;
-
-#[cfg(feature = "network_casper")]
-pub type _Network = casper::Casper;
-
-#[cfg(feature = "network_radix")]
-pub mod radix;
-
-#[cfg(feature = "network_radix")]
-pub type _Network = radix::Radix;
-
-pub mod flattened;
-#[cfg(all(not(feature = "network_casper"), not(feature = "network_radix")))]
-mod pure;
-
-#[cfg(all(not(feature = "network_casper"), not(feature = "network_radix")))]
-pub type _Network = pure::Std;
-
\ No newline at end of file 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 deleted file mode 100644 index 1fca4faf..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/print_debug.rs.html +++ /dev/null @@ -1,47 +0,0 @@ -print_debug.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
-
extern crate alloc;
-
-#[macro_export]
-macro_rules! print_debug {
-    ($fmt:expr) => {
-        $crate::network::specific::print(format!($fmt))
-    };
-    ($fmt:expr, $($args:tt)*) => {
-        $crate::network::specific::print(format!($fmt, $($args)*))
-    };
-}
-
-#[macro_export]
-macro_rules! print_and_panic {
-    ($fmt:expr) => {{
-        $crate::print_debug!($fmt);
-        panic!($fmt)
-    }};
-    ($fmt:expr, $($args:tt)*) => {{
-        $crate::print_debug!($fmt, $($args)*);
-        panic!($fmt, $($args)*)
-    }};
-}
-
\ No newline at end of file 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 deleted file mode 100644 index dfb1ae60..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/pure/from_bytes_repr.rs.html +++ /dev/null @@ -1,21 +0,0 @@ -from_bytes_repr.rs - source
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-
use crate::network::{
-    from_bytes_repr::{FromBytesRepr, Sanitized},
-    specific::U256,
-};
-
-impl FromBytesRepr<Vec<u8>> for U256 {
-    fn from_bytes_repr(bytes: Vec<u8>) -> Self {
-        Self::from_big_endian(bytes.sanitized().as_slice())
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 36cc7a10..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/pure/mod.rs.html +++ /dev/null @@ -1,47 +0,0 @@ -mod.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
-
use crate::network::{error::Error, specific::NetworkSpecific};
-use primitive_types::U256;
-use std::eprintln;
-
-mod from_bytes_repr;
-
-pub struct Std;
-
-impl NetworkSpecific for Std {
-    type BytesRepr = Vec<u8>;
-    type ValueRepr = U256;
-    type _Self = Std;
-
-    const VALUE_SIZE: usize = 32;
-
-    fn print(text: String) {
-        eprintln!("{}", text)
-    }
-
-    fn revert(error: Error) -> ! {
-        panic!("{}", error)
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/radix/from_bytes_repr.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/radix/from_bytes_repr.rs.html deleted file mode 100644 index cae6ae57..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/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/doc/src/redstone/network/radix/mod.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/radix/mod.rs.html deleted file mode 100644 index 63716f28..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/radix/mod.rs.html +++ /dev/null @@ -1,77 +0,0 @@ -mod.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
-
use crate::network::{error::Error, specific::NetworkSpecific};
-
-mod from_bytes_repr;
-pub mod u256_ext;
-
-pub struct Radix;
-
-impl NetworkSpecific for Radix {
-    type BytesRepr = Vec<u8>;
-    type ValueRepr = radix_common::math::bnum_integer::U256;
-    type _Self = Self;
-
-    const VALUE_SIZE: usize = 32;
-
-    fn print(_text: String) {
-        #[cfg(all(not(test), feature = "print_debug"))]
-        {
-            scrypto::prelude::info!("{}", _text);
-        }
-
-        #[cfg(test)]
-        {
-            println!("{}", _text);
-        }
-    }
-
-    fn revert(error: Error) -> ! {
-        #[cfg(not(test))]
-        {
-            scrypto::prelude::Runtime::panic(error.to_string())
-        }
-
-        #[cfg(test)]
-        {
-            panic!("{}", error)
-        }
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/radix/u256_ext.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/radix/u256_ext.rs.html deleted file mode 100644 index f834b2d9..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/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/doc/src/redstone/network/specific.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/specific.rs.html deleted file mode 100644 index 8d698709..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/network/specific.rs.html +++ /dev/null @@ -1,51 +0,0 @@ -specific.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
-
use crate::network::{_Network, error::Error, from_bytes_repr::FromBytesRepr};
-
-pub trait NetworkSpecific {
-    type BytesRepr: From<Vec<u8>> + Into<Vec<u8>>;
-    type ValueRepr: FromBytesRepr<Vec<u8>>;
-    type _Self;
-
-    const VALUE_SIZE: usize;
-
-    fn print(_text: String);
-    fn revert(error: Error) -> !;
-}
-
-pub(crate) type Network = <_Network as NetworkSpecific>::_Self;
-pub type Bytes = <_Network as NetworkSpecific>::BytesRepr;
-pub type U256 = <_Network as NetworkSpecific>::ValueRepr;
-pub const VALUE_SIZE: usize = <_Network as NetworkSpecific>::VALUE_SIZE;
-
-pub fn print(_text: String) {
-    Network::print(_text)
-}
-
-pub fn revert(error: Error) -> ! {
-    Network::revert(error)
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 3e2f4fd5..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/protocol/constants.rs.html +++ /dev/null @@ -1,23 +0,0 @@ -constants.rs - source
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-
pub(crate) const UNSIGNED_METADATA_BYTE_SIZE_BS: usize = 3;
-pub(crate) const DATA_PACKAGES_COUNT_BS: usize = 2;
-pub(crate) const DATA_POINTS_COUNT_BS: usize = 3;
-pub(crate) const SIGNATURE_BS: usize = 65;
-pub(crate) const DATA_POINT_VALUE_BYTE_SIZE_BS: usize = 4;
-pub(crate) const DATA_FEED_ID_BS: usize = 32;
-pub(crate) const TIMESTAMP_BS: usize = 6;
-pub(crate) const MAX_TIMESTAMP_DELAY_MS: u64 = 15 * 60 * 1000; // 15 minutes in milliseconds
-pub(crate) const MAX_TIMESTAMP_AHEAD_MS: u64 = 3 * 60 * 1000; // 3 minutes in milliseconds
-pub(crate) const REDSTONE_MARKER_BS: usize = 9;
-pub(crate) const REDSTONE_MARKER: [u8; 9] = [0, 0, 2, 237, 87, 1, 30, 0, 0]; // 0x000002ed57011e0000
-
\ No newline at end of file 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 deleted file mode 100644 index a1d603e6..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/protocol/data_package.rs.html +++ /dev/null @@ -1,431 +0,0 @@ -data_package.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-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
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-
use crate::{
-    crypto::recover::recover_address,
-    network::as_str::AsHexStr,
-    protocol::{
-        constants::{
-            DATA_FEED_ID_BS, DATA_POINTS_COUNT_BS, DATA_POINT_VALUE_BYTE_SIZE_BS, SIGNATURE_BS,
-            TIMESTAMP_BS,
-        },
-        data_point::{trim_data_points, DataPoint},
-    },
-    utils::trim::Trim,
-};
-use std::fmt::{Debug, Formatter};
-
-#[derive(Clone, PartialEq, Eq)]
-pub(crate) struct DataPackage {
-    pub(crate) signer_address: Vec<u8>,
-    pub(crate) timestamp: u64,
-    pub(crate) data_points: Vec<DataPoint>,
-}
-
-pub(crate) fn trim_data_packages(payload: &mut Vec<u8>, count: usize) -> Vec<DataPackage> {
-    let mut data_packages = Vec::new();
-
-    for _ in 0..count {
-        let data_package = trim_data_package(payload);
-        data_packages.push(data_package);
-    }
-
-    data_packages
-}
-
-fn trim_data_package(payload: &mut Vec<u8>) -> DataPackage {
-    let signature = payload.trim_end(SIGNATURE_BS);
-    let mut tmp = payload.clone();
-
-    let data_point_count = payload.trim_end(DATA_POINTS_COUNT_BS);
-    let value_size = payload.trim_end(DATA_POINT_VALUE_BYTE_SIZE_BS);
-    let timestamp = payload.trim_end(TIMESTAMP_BS);
-    let size = data_point_count * (value_size + DATA_FEED_ID_BS)
-        + DATA_POINT_VALUE_BYTE_SIZE_BS
-        + TIMESTAMP_BS
-        + DATA_POINTS_COUNT_BS;
-
-    let signable_bytes = tmp.trim_end(size);
-    let signer_address = recover_address(signable_bytes, signature);
-
-    let data_points = trim_data_points(payload, data_point_count, value_size);
-
-    DataPackage {
-        data_points,
-        timestamp,
-        signer_address,
-    }
-}
-
-impl Debug for DataPackage {
-    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
-        write!(
-            f,
-            "DataPackage {{\n   signer_address: 0x{}, timestamp: {},\n   data_points: {:?}\n}}",
-            self.signer_address.as_hex_str(),
-            self.timestamp,
-            self.data_points
-        )
-    }
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        helpers::hex::hex_to_bytes,
-        network::{from_bytes_repr::FromBytesRepr, specific::U256},
-        protocol::{
-            constants::{
-                DATA_FEED_ID_BS, DATA_POINTS_COUNT_BS, DATA_POINT_VALUE_BYTE_SIZE_BS, SIGNATURE_BS,
-                TIMESTAMP_BS,
-            },
-            data_package::{trim_data_package, trim_data_packages, DataPackage},
-            data_point::DataPoint,
-        },
-    };
-
-    const DATA_PACKAGE_BYTES_1: &str = "4554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000360cafc94e018d79bf0ba00000002000000151afa8c5c3caf6004b42c0fb17723e524f993b9ecbad3b9bce5ec74930fa436a3660e8edef10e96ee5f222de7ef5787c02ca467c0ec18daa2907b43ac20c63c11c";
-    const DATA_PACKAGE_BYTES_2: &str = "4554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000360cdd851e018d79bf0ba000000020000001473fd9dc72e6814a7de719b403cf4c9eba08934a643fd0666c433b806b31e69904f2226ffd3c8ef75861b11b5e32a1fda4b1458e0da4605a772dfba2a812f3ee1b";
-
-    const SIGNER_ADDRESS_1: &str = "1ea62d73edf8ac05dfcea1a34b9796e937a29eff";
-    const SIGNER_ADDRESS_2: &str = "109b4a318a4f5ddcbca6349b45f881b4137deafb";
-
-    const VALUE_1: u128 = 232141080910;
-    const VALUE_2: u128 = 232144078110;
-
-    const DATA_PACKAGE_SIZE: usize = 32
-        + DATA_FEED_ID_BS
-        + DATA_POINT_VALUE_BYTE_SIZE_BS
-        + TIMESTAMP_BS
-        + SIGNATURE_BS
-        + DATA_POINTS_COUNT_BS;
-
-    #[test]
-    fn test_trim_data_packages() {
-        test_trim_data_packages_of(2, "");
-        test_trim_data_packages_of(0, "");
-        test_trim_data_packages_of(1, "");
-    }
-
-    #[test]
-    fn test_trim_data_packages_with_prefix() {
-        let prefix = "da4687f1914a1c";
-
-        test_trim_data_packages_of(2, prefix);
-    }
-
-    #[test]
-    fn test_trim_data_packages_single() {
-        let mut bytes = hex_to_bytes(DATA_PACKAGE_BYTES_1.into());
-        let data_packages = trim_data_packages(&mut bytes, 1);
-        assert_eq!(data_packages.len(), 1);
-        assert_eq!(bytes, Vec::<u8>::new());
-
-        verify_data_package(data_packages[0].clone(), VALUE_1, SIGNER_ADDRESS_1);
-    }
-
-    fn test_trim_data_packages_of(count: usize, prefix: &str) {
-        let input: Vec<u8> =
-            hex_to_bytes((prefix.to_owned() + DATA_PACKAGE_BYTES_1) + DATA_PACKAGE_BYTES_2);
-        let mut bytes = input.clone();
-        let data_packages = trim_data_packages(&mut bytes, count);
-
-        assert_eq!(data_packages.len(), count);
-        assert_eq!(
-            bytes.as_slice(),
-            &input[..input.len() - count * DATA_PACKAGE_SIZE]
-        );
-
-        let values = &[VALUE_2, VALUE_1];
-        let signers = &[SIGNER_ADDRESS_2, SIGNER_ADDRESS_1];
-
-        for i in 0..count {
-            verify_data_package(data_packages[i].clone(), values[i], signers[i]);
-        }
-    }
-
-    #[should_panic(expected = "index out of bounds")]
-    #[test]
-    fn test_trim_data_packages_bigger_number() {
-        test_trim_data_packages_of(3, "");
-    }
-
-    #[test]
-    fn test_trim_data_package() {
-        test_trim_data_package_of(DATA_PACKAGE_BYTES_1, VALUE_1, SIGNER_ADDRESS_1);
-        test_trim_data_package_of(DATA_PACKAGE_BYTES_2, VALUE_2, SIGNER_ADDRESS_2);
-    }
-
-    #[test]
-    fn test_trim_data_package_with_prefix() {
-        test_trim_data_package_of(
-            &("da4687f1914a1c".to_owned() + DATA_PACKAGE_BYTES_1),
-            VALUE_1,
-            SIGNER_ADDRESS_1,
-        );
-        test_trim_data_package_of(
-            &("da4687f1914a1c".to_owned() + DATA_PACKAGE_BYTES_2),
-            VALUE_2,
-            SIGNER_ADDRESS_2,
-        );
-    }
-
-    #[should_panic]
-    #[test]
-    fn test_trim_data_package_signature_only() {
-        test_trim_data_package_of(
-            &DATA_PACKAGE_BYTES_1[(DATA_PACKAGE_BYTES_1.len() - 2 * SIGNATURE_BS)..],
-            0,
-            "",
-        );
-    }
-
-    #[should_panic]
-    #[test]
-    fn test_trim_data_package_shorter() {
-        test_trim_data_package_of(
-            &DATA_PACKAGE_BYTES_1
-                [(DATA_PACKAGE_BYTES_1.len() - 2 * (SIGNATURE_BS + DATA_POINTS_COUNT_BS))..],
-            0,
-            "",
-        );
-    }
-
-    fn test_trim_data_package_of(bytes_str: &str, expected_value: u128, signer_address: &str) {
-        let mut bytes: Vec<u8> = hex_to_bytes(bytes_str.into());
-        let result = trim_data_package(&mut bytes);
-        assert_eq!(
-            bytes,
-            hex_to_bytes(bytes_str[..bytes_str.len() - 2 * (DATA_PACKAGE_SIZE)].into())
-        );
-
-        verify_data_package(result, expected_value, signer_address);
-    }
-
-    fn verify_data_package(result: DataPackage, expected_value: u128, signer_address: &str) {
-        let data_package = DataPackage {
-            data_points: vec![DataPoint {
-                feed_id: U256::from_bytes_repr(hex_to_bytes(DATA_PACKAGE_BYTES_1[..6].into())),
-                value: U256::from(expected_value),
-            }],
-            timestamp: 1707144580000,
-            signer_address: hex_to_bytes(signer_address.into()),
-        };
-
-        assert_eq!(result, data_package);
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index e643085a..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/protocol/data_point.rs.html +++ /dev/null @@ -1,315 +0,0 @@ -data_point.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-
use crate::{
-    network::{
-        as_str::{AsAsciiStr, AsHexStr},
-        assert::Assert,
-        error::Error,
-        from_bytes_repr::FromBytesRepr,
-        specific::U256,
-    },
-    protocol::constants::DATA_FEED_ID_BS,
-    utils::{trim::Trim, trim_zeros::TrimZeros},
-};
-use std::fmt::{Debug, Formatter};
-
-#[derive(Clone, PartialEq, Eq)]
-pub(crate) struct DataPoint {
-    pub(crate) feed_id: U256,
-    pub(crate) value: U256,
-}
-
-pub(crate) fn trim_data_points(
-    payload: &mut Vec<u8>,
-    count: usize,
-    value_size: usize,
-) -> Vec<DataPoint> {
-    count.assert_or_revert(|&count| count == 1, |&count| Error::SizeNotSupported(count));
-
-    let mut data_points = Vec::new();
-
-    for _ in 0..count {
-        let data_point = trim_data_point(payload, value_size);
-        data_points.push(data_point);
-    }
-
-    data_points
-}
-
-fn trim_data_point(payload: &mut Vec<u8>, value_size: usize) -> DataPoint {
-    let value = payload.trim_end(value_size);
-    let feed_id: Vec<u8> = payload.trim_end(DATA_FEED_ID_BS);
-
-    DataPoint {
-        value,
-        feed_id: U256::from_bytes_repr(feed_id.trim_zeros()),
-    }
-}
-
-impl Debug for DataPoint {
-    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
-        write!(
-            f,
-            "DataPoint {{\n      feed_id: {:?} (0x{}), value: {}\n   }}",
-            self.feed_id.as_ascii_str(),
-            self.feed_id.as_hex_str(),
-            self.value,
-        )
-    }
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        helpers::hex::hex_to_bytes,
-        network::{
-            from_bytes_repr::FromBytesRepr,
-            specific::{U256, VALUE_SIZE},
-        },
-        protocol::{
-            constants::DATA_FEED_ID_BS,
-            data_point::{trim_data_point, trim_data_points, DataPoint},
-        },
-    };
-    use std::ops::Shr;
-
-    const DATA_POINT_BYTES_TAIL: &str = "4554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000360cafc94e";
-    const VALUE: u128 = 232141080910;
-
-    #[test]
-    fn test_trim_data_points() {
-        let mut bytes = hex_to_bytes(DATA_POINT_BYTES_TAIL.into());
-        let result = trim_data_points(&mut bytes, 1, 32);
-
-        assert_eq!(result.len(), 1);
-
-        verify_rest_and_result(
-            DATA_POINT_BYTES_TAIL,
-            32,
-            VALUE.into(),
-            bytes,
-            result[0].clone(),
-        )
-    }
-
-    #[should_panic(expected = "Size not supported: 0")]
-    #[test]
-    fn test_trim_zero_data_points() {
-        trim_data_points(&mut hex_to_bytes(DATA_POINT_BYTES_TAIL.into()), 0, 32);
-    }
-
-    #[should_panic(expected = "Size not supported: 2")]
-    #[test]
-    fn test_trim_two_data_points() {
-        trim_data_points(&mut hex_to_bytes(DATA_POINT_BYTES_TAIL.into()), 2, 32);
-    }
-
-    #[test]
-    fn test_trim_data_point() {
-        test_trim_data_point_of(DATA_POINT_BYTES_TAIL, 32, VALUE.into());
-    }
-
-    #[test]
-    fn test_trim_data_point_with_prefix() {
-        test_trim_data_point_of(
-            &("a2a812f3ee1b".to_owned() + DATA_POINT_BYTES_TAIL),
-            32,
-            VALUE.into(),
-        );
-    }
-
-    #[test]
-    fn test_trim_data_point_other_lengths() {
-        for i in 1..VALUE_SIZE {
-            test_trim_data_point_of(
-                &DATA_POINT_BYTES_TAIL[..DATA_POINT_BYTES_TAIL.len() - 2 * i],
-                32 - i,
-                U256::from(VALUE).shr(8 * i as u32),
-            );
-        }
-    }
-
-    fn test_trim_data_point_of(value: &str, size: usize, expected_value: U256) {
-        let mut bytes = hex_to_bytes(value.into());
-        let result = trim_data_point(&mut bytes, size);
-
-        verify_rest_and_result(value, size, expected_value, bytes, result);
-    }
-
-    fn verify_rest_and_result(
-        value: &str,
-        size: usize,
-        expected_value: U256,
-        rest: Vec<u8>,
-        result: DataPoint,
-    ) {
-        assert_eq!(
-            rest,
-            hex_to_bytes(value[..value.len() - 2 * (size + DATA_FEED_ID_BS)].into())
-        );
-
-        let data_point = DataPoint {
-            value: expected_value,
-            feed_id: U256::from_bytes_repr(hex_to_bytes(DATA_POINT_BYTES_TAIL[..6].to_string())),
-        };
-
-        assert_eq!(result, data_point);
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 15b31817..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/protocol/marker.rs.html +++ /dev/null @@ -1,133 +0,0 @@ -marker.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-
use crate::{
-    network::{assert::Assert, error::Error},
-    protocol::constants::{REDSTONE_MARKER, REDSTONE_MARKER_BS},
-    utils::trim::Trim,
-};
-
-pub fn trim_redstone_marker(payload: &mut Vec<u8>) {
-    let marker: Vec<u8> = payload.trim_end(REDSTONE_MARKER_BS);
-
-    marker.as_slice().assert_or_revert(
-        |&marker| marker == REDSTONE_MARKER,
-        |&val| Error::WrongRedStoneMarker(val.into()),
-    );
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        helpers::hex::hex_to_bytes,
-        protocol::{constants::REDSTONE_MARKER_BS, marker::trim_redstone_marker},
-    };
-
-    const PAYLOAD_TAIL: &str = "1c000f000000000002ed57011e0000";
-
-    #[test]
-    fn test_trim_redstone_marker() {
-        let mut bytes = hex_to_bytes(PAYLOAD_TAIL.into());
-        trim_redstone_marker(&mut bytes);
-
-        assert_eq!(
-            bytes,
-            hex_to_bytes(PAYLOAD_TAIL[..PAYLOAD_TAIL.len() - 2 * REDSTONE_MARKER_BS].into())
-        );
-    }
-
-    #[should_panic(expected = "Wrong RedStone marker: 000002ed57022e0000")]
-    #[test]
-    fn test_trim_redstone_marker_wrong() {
-        trim_redstone_marker(&mut hex_to_bytes(PAYLOAD_TAIL.replace('1', "2")));
-    }
-
-    #[should_panic(expected = "Wrong RedStone marker: 00000002ed57011e00")]
-    #[test]
-    fn test_trim_redstone_marker_wrong_ending() {
-        trim_redstone_marker(&mut hex_to_bytes(
-            PAYLOAD_TAIL[..PAYLOAD_TAIL.len() - 2].into(),
-        ));
-    }
-
-    #[should_panic(expected = "Wrong RedStone marker: 100002ed57011e0000")]
-    #[test]
-    fn test_trim_redstone_marker_wrong_beginning() {
-        trim_redstone_marker(&mut hex_to_bytes(
-            PAYLOAD_TAIL.replace("0000000", "1111111"),
-        ));
-    }
-
-    #[should_panic(expected = "Wrong RedStone marker: 0002ed57011e0000")]
-    #[test]
-    fn test_trim_redstone_marker_too_short() {
-        trim_redstone_marker(&mut hex_to_bytes(
-            PAYLOAD_TAIL[PAYLOAD_TAIL.len() - 2 * (REDSTONE_MARKER_BS - 1)..].into(),
-        ));
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index fbd60f5b..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/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/doc/src/redstone/protocol/payload.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/protocol/payload.rs.html deleted file mode 100644 index 1cd14131..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/protocol/payload.rs.html +++ /dev/null @@ -1,209 +0,0 @@ -payload.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-
use crate::{
-    network::{assert::Assert, error::Error},
-    protocol::{
-        constants::{DATA_PACKAGES_COUNT_BS, UNSIGNED_METADATA_BYTE_SIZE_BS},
-        data_package::{trim_data_packages, DataPackage},
-        marker,
-    },
-    utils::trim::Trim,
-};
-
-#[derive(Clone, Debug)]
-pub(crate) struct Payload {
-    pub(crate) data_packages: Vec<DataPackage>,
-}
-
-impl Payload {
-    pub(crate) fn make(payload_bytes: &mut Vec<u8>) -> Payload {
-        marker::trim_redstone_marker(payload_bytes);
-        let payload = trim_payload(payload_bytes);
-
-        payload_bytes.assert_or_revert(
-            |bytes| bytes.is_empty(),
-            |bytes| Error::NonEmptyPayloadRemainder(bytes.as_slice().into()),
-        );
-
-        payload
-    }
-}
-
-fn trim_payload(payload: &mut Vec<u8>) -> Payload {
-    let data_package_count = trim_metadata(payload);
-    let data_packages = trim_data_packages(payload, data_package_count);
-
-    Payload { data_packages }
-}
-
-fn trim_metadata(payload: &mut Vec<u8>) -> usize {
-    let unsigned_metadata_size = payload.trim_end(UNSIGNED_METADATA_BYTE_SIZE_BS);
-    let _: Vec<u8> = payload.trim_end(unsigned_metadata_size);
-
-    payload.trim_end(DATA_PACKAGES_COUNT_BS)
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        helpers::hex::{hex_to_bytes, read_payload_bytes, read_payload_hex},
-        protocol::{
-            constants::REDSTONE_MARKER_BS,
-            payload::{trim_metadata, trim_payload, Payload},
-        },
-    };
-
-    const PAYLOAD_METADATA_BYTES: &str = "000f000000";
-    const PAYLOAD_METADATA_WITH_UNSIGNED_BYTE: &str = "000f55000001";
-    const PAYLOAD_METADATA_WITH_UNSIGNED_BYTES: &str = "000f11223344556677889900aabbccddeeff000010";
-
-    #[test]
-    fn test_trim_metadata() {
-        let prefix = "9e0294371c";
-
-        for &bytes_str in &[
-            PAYLOAD_METADATA_BYTES,
-            PAYLOAD_METADATA_WITH_UNSIGNED_BYTE,
-            PAYLOAD_METADATA_WITH_UNSIGNED_BYTES,
-        ] {
-            let mut bytes = hex_to_bytes(prefix.to_owned() + bytes_str);
-            let result = trim_metadata(&mut bytes);
-
-            assert_eq!(bytes, hex_to_bytes(prefix.into()));
-            assert_eq!(result, 15);
-        }
-    }
-
-    #[test]
-    fn test_trim_payload() {
-        let payload_hex = read_payload_bytes("./sample-data/payload.hex");
-
-        let mut bytes = payload_hex[..payload_hex.len() - REDSTONE_MARKER_BS].into();
-        let payload = trim_payload(&mut bytes);
-
-        assert_eq!(bytes, Vec::<u8>::new());
-        assert_eq!(payload.data_packages.len(), 15);
-    }
-
-    #[test]
-    fn test_make_payload() {
-        let mut payload_hex = read_payload_bytes("./sample-data/payload.hex");
-        let payload = Payload::make(&mut payload_hex);
-
-        assert_eq!(payload.data_packages.len(), 15);
-    }
-
-    #[should_panic(expected = "Non empty payload remainder: 12")]
-    #[test]
-    fn test_make_payload_with_prefix() {
-        let payload_hex = read_payload_hex("./sample-data/payload.hex");
-        let mut bytes = hex_to_bytes("12".to_owned() + &payload_hex);
-        let payload = Payload::make(&mut bytes);
-
-        assert_eq!(payload.data_packages.len(), 15);
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index f28b29ef..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/utils/filter.rs.html +++ /dev/null @@ -1,43 +0,0 @@ -filter.rs - source
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-
pub(crate) trait FilterSome<Output> {
-    fn filter_some(&self) -> Output;
-}
-
-impl<T: Copy> FilterSome<Vec<T>> for [Option<T>] {
-    fn filter_some(&self) -> Vec<T> {
-        self.iter().filter_map(|&opt| opt).collect()
-    }
-}
-
-#[cfg(test)]
-mod filter_some_tests {
-    use crate::utils::filter::FilterSome;
-
-    #[test]
-    fn test_filter_some() {
-        let values = [None, Some(23u64), None, Some(12), Some(12), None, Some(23)];
-
-        assert_eq!(values.filter_some(), vec![23, 12, 12, 23])
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index c329ff3b..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/utils/median.rs.html +++ /dev/null @@ -1,375 +0,0 @@ -median.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-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
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-
use crate::network::{assert::Assert, error::Error::ArrayIsEmpty, specific::U256};
-use std::ops::{Add, Rem, Shr};
-
-pub(crate) trait Median {
-    type Item;
-
-    fn median(self) -> Self::Item;
-}
-
-trait Avg {
-    fn avg(self, other: Self) -> Self;
-}
-
-trait Averageable:
-    Add<Output = Self> + Shr<Output = Self> + From<u8> + Rem<Output = Self> + Copy
-{
-}
-
-impl Averageable for i32 {}
-
-#[cfg(feature = "network_radix")]
-impl Avg for U256 {
-    fn avg(self, other: Self) -> Self {
-        let one = 1u32;
-        let two = U256::from(2u8);
-
-        self.shr(one) + other.shr(one) + (self % two + other % two).shr(one)
-    }
-}
-
-#[cfg(not(feature = "network_radix"))]
-impl Averageable for U256 {}
-
-impl<T> Avg for T
-where
-    T: Averageable,
-{
-    fn avg(self, other: Self) -> Self {
-        let one = T::from(1);
-        let two = T::from(2);
-
-        self.shr(one) + other.shr(one) + (self % two + other % two).shr(one)
-    }
-}
-
-impl<T> Median for Vec<T>
-where
-    T: Copy + Ord + Avg,
-{
-    type Item = T;
-
-    fn median(self) -> Self::Item {
-        let len = self.len();
-
-        match len.assert_or_revert(|x| *x > 0, |_| ArrayIsEmpty) {
-            1 => self[0],
-            2 => self[0].avg(self[1]),
-            3 => maybe_pick_median(self[0], self[1], self[2]).unwrap_or_else(|| {
-                maybe_pick_median(self[1], self[0], self[2])
-                    .unwrap_or_else(|| maybe_pick_median(self[1], self[2], self[0]).unwrap())
-            }),
-            _ => {
-                let mut values = self;
-                values.sort();
-
-                let mid = len / 2;
-
-                if len % 2 == 0 {
-                    values[mid - 1].avg(values[mid])
-                } else {
-                    values[mid]
-                }
-            }
-        }
-    }
-}
-
-#[inline]
-fn maybe_pick_median<T>(a: T, b: T, c: T) -> Option<T>
-where
-    T: PartialOrd,
-{
-    if (b >= a && b <= c) || (b >= c && b <= a) {
-        Some(b)
-    } else {
-        None
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use super::{Avg, Median};
-    use crate::network::specific::U256;
-    use itertools::Itertools;
-    use std::fmt::Debug;
-
-    #[cfg(feature = "network_radix")]
-    use crate::network::radix::u256_ext::U256Ext;
-
-    #[allow(clippy::legacy_numeric_constants)]
-    #[test]
-    fn test_avg() {
-        let u256 = U256::max_value(); // 115792089237316195423570985008687907853269984665640564039457584007913129639935
-        let u256_max_sub_1 = u256 - U256::from(1u32);
-        let u256max_div_2 = u256 / U256::from(2u32);
-
-        assert_eq!(u256.avg(U256::from(0u8)), u256max_div_2);
-        assert_eq!(u256.avg(U256::from(1u8)), u256max_div_2 + U256::from(1u8));
-        assert_eq!(u256.avg(u256_max_sub_1), u256_max_sub_1);
-        assert_eq!(u256.avg(u256), u256);
-
-        assert_eq!((u256_max_sub_1).avg(U256::from(0u8)), u256max_div_2);
-        assert_eq!((u256_max_sub_1).avg(U256::from(1u8)), u256max_div_2);
-        assert_eq!((u256_max_sub_1).avg(u256_max_sub_1), u256_max_sub_1);
-        assert_eq!((u256_max_sub_1).avg(u256), u256_max_sub_1);
-    }
-
-    #[test]
-    #[should_panic(expected = "Array is empty")]
-    fn test_median_empty_vector() {
-        let vec: Vec<i32> = vec![];
-
-        vec.median();
-    }
-
-    #[test]
-    fn test_median_single_element() {
-        assert_eq!(vec![1].median(), 1);
-    }
-
-    #[test]
-    fn test_median_two_elements() {
-        test_all_permutations(vec![1, 3], 2);
-        test_all_permutations(vec![1, 2], 1);
-        test_all_permutations(vec![1, 1], 1);
-    }
-
-    #[test]
-    fn test_median_three_elements() {
-        test_all_permutations(vec![1, 2, 3], 2);
-        test_all_permutations(vec![1, 1, 2], 1);
-        test_all_permutations(vec![1, 2, 2], 2);
-        test_all_permutations(vec![1, 1, 1], 1);
-    }
-
-    #[test]
-    fn test_median_even_number_of_elements() {
-        test_all_permutations(vec![1, 2, 3, 4], 2);
-        test_all_permutations(vec![1, 2, 4, 4], 3);
-        test_all_permutations(vec![1, 1, 3, 3], 2);
-        test_all_permutations(vec![1, 1, 3, 4], 2);
-        test_all_permutations(vec![1, 1, 1, 3], 1);
-        test_all_permutations(vec![1, 3, 3, 3], 3);
-        test_all_permutations(vec![1, 1, 1, 1], 1);
-        test_all_permutations(vec![1, 2, 3, 4, 5, 6], 3);
-    }
-
-    #[test]
-    fn test_median_odd_number_of_elements() {
-        test_all_permutations(vec![1, 2, 3, 4, 5], 3);
-        test_all_permutations(vec![1, 1, 3, 4, 5], 3);
-        test_all_permutations(vec![1, 1, 1, 4, 5], 1);
-        test_all_permutations(vec![1, 1, 1, 3, 3], 1);
-        test_all_permutations(vec![1, 1, 3, 3, 5], 3);
-
-        test_all_permutations(vec![1, 2, 3, 5, 5], 3);
-        test_all_permutations(vec![1, 2, 5, 5, 5], 5);
-        test_all_permutations(vec![1, 1, 3, 3, 3], 3);
-        test_all_permutations(vec![1, 3, 3, 5, 5], 3);
-
-        test_all_permutations(vec![1, 2, 2, 2, 2], 2);
-        test_all_permutations(vec![1, 1, 1, 1, 2], 1);
-        test_all_permutations(vec![1, 1, 1, 1, 1], 1);
-
-        test_all_permutations(vec![1, 2, 3, 4, 5, 6, 7], 4);
-    }
-
-    fn test_all_permutations<T: Copy + Ord + Avg + Debug>(numbers: Vec<T>, expected_value: T) {
-        let perms: Vec<Vec<_>> = numbers.iter().permutations(numbers.len()).collect();
-
-        for perm in perms {
-            let p: Vec<_> = perm.iter().map(|&&v| v).collect();
-
-            assert_eq!(p.median(), expected_value);
-        }
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 44258e67..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/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/doc/src/redstone/utils/trim.rs.html b/static/rust/redstone/crypto_secp256k1/doc/src/redstone/utils/trim.rs.html deleted file mode 100644 index 551a41a8..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/utils/trim.rs.html +++ /dev/null @@ -1,299 +0,0 @@ -trim.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-
use crate::network::{
-    assert::Unwrap, error::Error, from_bytes_repr::FromBytesRepr, specific::U256,
-};
-
-pub trait Trim<T>
-where
-    Self: Sized,
-{
-    fn trim_end(&mut self, len: usize) -> T;
-}
-
-impl Trim<Vec<u8>> for Vec<u8> {
-    fn trim_end(&mut self, len: usize) -> Self {
-        if len >= self.len() {
-            std::mem::take(self)
-        } else {
-            self.split_off(self.len() - len)
-        }
-    }
-}
-
-impl Trim<U256> for Vec<u8> {
-    fn trim_end(&mut self, len: usize) -> U256 {
-        U256::from_bytes_repr(self.trim_end(len))
-    }
-}
-
-impl Trim<usize> for Vec<u8> {
-    fn trim_end(&mut self, len: usize) -> usize {
-        let y: U256 = self.trim_end(len);
-        y.try_into().unwrap_or_revert(|_| Error::NumberOverflow(y))
-    }
-}
-
-impl Trim<u64> for Vec<u8> {
-    fn trim_end(&mut self, len: usize) -> u64 {
-        let y: U256 = self.trim_end(len);
-        y.try_into().unwrap_or_revert(|_| Error::NumberOverflow(y))
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use crate::{
-        network::specific::U256,
-        protocol::constants::{REDSTONE_MARKER, REDSTONE_MARKER_BS},
-        utils::trim::Trim,
-    };
-
-    const MARKER_DECIMAL: u64 = 823907890102272;
-
-    fn redstone_marker_bytes() -> Vec<u8> {
-        REDSTONE_MARKER.into()
-    }
-
-    #[test]
-    fn test_trim_end_number() {
-        let (rest, result): (_, U256) = test_trim_end(3);
-        assert_eq!(result, (256u32.pow(2) * 30).into());
-        assert_eq!(rest.as_slice(), &REDSTONE_MARKER[..6]);
-
-        let (_, result): (_, u64) = test_trim_end(3);
-        assert_eq!(result, 256u64.pow(2) * 30);
-
-        let (_, result): (_, usize) = test_trim_end(3);
-        assert_eq!(result, 256usize.pow(2) * 30);
-
-        let (_, result): (_, Vec<u8>) = test_trim_end(3);
-        assert_eq!(result.as_slice(), &REDSTONE_MARKER[6..]);
-    }
-
-    #[test]
-    fn test_trim_end_number_null() {
-        let (rest, result): (_, U256) = test_trim_end(0);
-        assert_eq!(result, 0u32.into());
-        assert_eq!(rest.as_slice(), &REDSTONE_MARKER);
-
-        let (_, result): (_, u64) = test_trim_end(0);
-        assert_eq!(result, 0);
-
-        let (_, result): (_, usize) = test_trim_end(0);
-        assert_eq!(result, 0);
-
-        let (_, result): (_, Vec<u8>) = test_trim_end(0);
-        assert_eq!(result, Vec::<u8>::new());
-    }
-
-    #[test]
-    fn test_trim_end_whole() {
-        test_trim_end_whole_size(REDSTONE_MARKER_BS);
-        test_trim_end_whole_size(REDSTONE_MARKER_BS - 1);
-        test_trim_end_whole_size(REDSTONE_MARKER_BS - 2);
-        test_trim_end_whole_size(REDSTONE_MARKER_BS + 1);
-    }
-
-    fn test_trim_end_whole_size(size: usize) {
-        let (rest, result): (_, U256) = test_trim_end(size);
-        assert_eq!(result, MARKER_DECIMAL.into());
-        assert_eq!(
-            rest.as_slice().len(),
-            REDSTONE_MARKER_BS - size.min(REDSTONE_MARKER_BS)
-        );
-
-        let (_, result): (_, u64) = test_trim_end(size);
-        assert_eq!(result, MARKER_DECIMAL);
-
-        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));
-    }
-
-    #[test]
-    fn test_trim_end_u64() {
-        let mut bytes = vec![255, 255, 255, 255, 255, 255, 255, 255, 255];
-        let x: u64 = bytes.trim_end(8);
-
-        let expected_bytes = vec![255];
-
-        assert_eq!(bytes, expected_bytes);
-        assert_eq!(x, 18446744073709551615);
-    }
-
-    #[should_panic(expected = "Number overflow: 18591708106338011145")]
-    #[test]
-    fn test_trim_end_u64_overflow() {
-        let mut bytes = vec![1u8, 2, 3, 4, 5, 6, 7, 8, 9];
-
-        let _: u64 = bytes.trim_end(9);
-    }
-
-    #[allow(dead_code)]
-    trait TestTrimEnd<T>
-    where
-        Self: Sized,
-    {
-        fn test_trim_end(size: usize) -> (Self, T);
-    }
-
-    fn test_trim_end<T>(size: usize) -> (Vec<u8>, T)
-    where
-        Vec<u8>: Trim<T>,
-    {
-        let mut bytes = redstone_marker_bytes();
-        let rest = bytes.trim_end(size);
-        (bytes, rest)
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 0d223de1..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/src/redstone/utils/trim_zeros.rs.html +++ /dev/null @@ -1,91 +0,0 @@ -trim_zeros.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
-
pub trait TrimZeros {
-    fn trim_zeros(self) -> Self;
-}
-
-impl TrimZeros for Vec<u8> {
-    fn trim_zeros(self) -> Self {
-        let mut res = self.len();
-
-        for i in (0..self.len()).rev() {
-            if self[i] != 0 {
-                break;
-            }
-
-            res = i;
-        }
-
-        let (rest, _) = self.split_at(res);
-
-        rest.into()
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use crate::{protocol::constants::REDSTONE_MARKER, utils::trim_zeros::TrimZeros};
-
-    fn redstone_marker_bytes() -> Vec<u8> {
-        REDSTONE_MARKER.as_slice().into()
-    }
-
-    #[test]
-    fn test_trim_zeros() {
-        let trimmed = redstone_marker_bytes().trim_zeros();
-        assert_eq!(trimmed.as_slice(), &REDSTONE_MARKER[..7]);
-
-        let trimmed = trimmed.trim_zeros();
-        assert_eq!(trimmed.as_slice(), &REDSTONE_MARKER[..7]);
-    }
-
-    #[test]
-    fn test_trim_zeros_empty() {
-        let trimmed = Vec::<u8>::default().trim_zeros();
-        assert_eq!(trimmed, Vec::<u8>::default());
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/static.files/COPYRIGHT-23e9bde6c69aea69.txt b/static/rust/redstone/crypto_secp256k1/doc/static.files/COPYRIGHT-23e9bde6c69aea69.txt deleted file mode 100644 index 1447df79..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/static.files/COPYRIGHT-23e9bde6c69aea69.txt +++ /dev/null @@ -1,50 +0,0 @@ -# REUSE-IgnoreStart - -These documentation pages include resources by third parties. This copyright -file applies only to those resources. The following third party resources are -included, and carry their own copyright notices and license terms: - -* Fira Sans (FiraSans-Regular.woff2, FiraSans-Medium.woff2): - - Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ - with Reserved Font Name Fira Sans. - - Copyright (c) 2014, Telefonica S.A. - - Licensed under the SIL Open Font License, Version 1.1. - See FiraSans-LICENSE.txt. - -* rustdoc.css, main.js, and playpen.js: - - Copyright 2015 The Rust Developers. - Licensed under the Apache License, Version 2.0 (see LICENSE-APACHE.txt) or - the MIT license (LICENSE-MIT.txt) at your option. - -* normalize.css: - - Copyright (c) Nicolas Gallagher and Jonathan Neal. - Licensed under the MIT license (see LICENSE-MIT.txt). - -* Source Code Pro (SourceCodePro-Regular.ttf.woff2, - SourceCodePro-Semibold.ttf.woff2, SourceCodePro-It.ttf.woff2): - - Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), - with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark - of Adobe Systems Incorporated in the United States and/or other countries. - - Licensed under the SIL Open Font License, Version 1.1. - See SourceCodePro-LICENSE.txt. - -* Source Serif 4 (SourceSerif4-Regular.ttf.woff2, SourceSerif4-Bold.ttf.woff2, - SourceSerif4-It.ttf.woff2): - - Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name - 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United - States and/or other countries. - - Licensed under the SIL Open Font License, Version 1.1. - See SourceSerif4-LICENSE.md. - -This copyright file is intended to be distributed with rustdoc output. - -# REUSE-IgnoreEnd diff --git a/static/rust/redstone/crypto_secp256k1/doc/static.files/FiraSans-LICENSE-db4b642586e02d97.txt b/static/rust/redstone/crypto_secp256k1/doc/static.files/FiraSans-LICENSE-db4b642586e02d97.txt deleted file mode 100644 index d7e9c149..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/static.files/FiraSans-LICENSE-db4b642586e02d97.txt +++ /dev/null @@ -1,98 +0,0 @@ -// REUSE-IgnoreStart - -Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. -with Reserved Font Name < Fira >, - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. - -// REUSE-IgnoreEnd diff --git a/static/rust/redstone/crypto_secp256k1/doc/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 b/static/rust/redstone/crypto_secp256k1/doc/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 deleted file mode 100644 index 7a1e5fc5..00000000 Binary files a/static/rust/redstone/crypto_secp256k1/doc/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1/doc/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 b/static/rust/redstone/crypto_secp256k1/doc/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 deleted file mode 100644 index e766e06c..00000000 Binary files a/static/rust/redstone/crypto_secp256k1/doc/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1/doc/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt b/static/rust/redstone/crypto_secp256k1/doc/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt deleted file mode 100644 index 16fe87b0..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/static/rust/redstone/crypto_secp256k1/doc/static.files/LICENSE-MIT-65090b722b3f6c56.txt b/static/rust/redstone/crypto_secp256k1/doc/static.files/LICENSE-MIT-65090b722b3f6c56.txt deleted file mode 100644 index 31aa7938..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/static.files/LICENSE-MIT-65090b722b3f6c56.txt +++ /dev/null @@ -1,23 +0,0 @@ -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/static/rust/redstone/crypto_secp256k1/doc/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 b/static/rust/redstone/crypto_secp256k1/doc/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 deleted file mode 100644 index 1866ad4b..00000000 Binary files a/static/rust/redstone/crypto_secp256k1/doc/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1/doc/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt b/static/rust/redstone/crypto_secp256k1/doc/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt deleted file mode 100644 index 4b3edc29..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt +++ /dev/null @@ -1,103 +0,0 @@ -// REUSE-IgnoreStart - -Copyright (c) 2010, NAVER Corporation (https://www.navercorp.com/), - -with Reserved Font Name Nanum, Naver Nanum, NanumGothic, Naver NanumGothic, -NanumMyeongjo, Naver NanumMyeongjo, NanumBrush, Naver NanumBrush, NanumPen, -Naver NanumPen, Naver NanumGothicEco, NanumGothicEco, Naver NanumMyeongjoEco, -NanumMyeongjoEco, Naver NanumGothicLight, NanumGothicLight, NanumBarunGothic, -Naver NanumBarunGothic, NanumSquareRound, NanumBarunPen, MaruBuri - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. - -// REUSE-IgnoreEnd diff --git a/static/rust/redstone/crypto_secp256k1/doc/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 b/static/rust/redstone/crypto_secp256k1/doc/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 deleted file mode 100644 index 462c34ef..00000000 Binary files a/static/rust/redstone/crypto_secp256k1/doc/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1/doc/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt b/static/rust/redstone/crypto_secp256k1/doc/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt deleted file mode 100644 index 0d2941e1..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt +++ /dev/null @@ -1,97 +0,0 @@ -// REUSE-IgnoreStart - -Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. - -This Font Software is licensed under the SIL Open Font License, Version 1.1. - -This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. - -// REUSE-IgnoreEnd diff --git a/static/rust/redstone/crypto_secp256k1/doc/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 b/static/rust/redstone/crypto_secp256k1/doc/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 deleted file mode 100644 index 10b558e0..00000000 Binary files a/static/rust/redstone/crypto_secp256k1/doc/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1/doc/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 b/static/rust/redstone/crypto_secp256k1/doc/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 deleted file mode 100644 index 5ec64eef..00000000 Binary files a/static/rust/redstone/crypto_secp256k1/doc/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1/doc/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 b/static/rust/redstone/crypto_secp256k1/doc/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 deleted file mode 100644 index 181a07f6..00000000 Binary files a/static/rust/redstone/crypto_secp256k1/doc/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1/doc/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 b/static/rust/redstone/crypto_secp256k1/doc/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 deleted file mode 100644 index 2ae08a7b..00000000 Binary files a/static/rust/redstone/crypto_secp256k1/doc/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1/doc/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md b/static/rust/redstone/crypto_secp256k1/doc/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md deleted file mode 100644 index 175fa4f4..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md +++ /dev/null @@ -1,98 +0,0 @@ - - -Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. -Copyright 2014 - 2023 Adobe (http://www.adobe.com/), with Reserved Font Name ‘Source’. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. - -This Font Software is licensed under the SIL Open Font License, Version 1.1. - -This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. - - diff --git a/static/rust/redstone/crypto_secp256k1/doc/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 b/static/rust/redstone/crypto_secp256k1/doc/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 deleted file mode 100644 index 0263fc30..00000000 Binary files a/static/rust/redstone/crypto_secp256k1/doc/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1/doc/static.files/favicon-2c020d218678b618.svg b/static/rust/redstone/crypto_secp256k1/doc/static.files/favicon-2c020d218678b618.svg deleted file mode 100644 index 8b34b511..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/static.files/favicon-2c020d218678b618.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/static/rust/redstone/crypto_secp256k1/doc/static.files/favicon-32x32-422f7d1d52889060.png b/static/rust/redstone/crypto_secp256k1/doc/static.files/favicon-32x32-422f7d1d52889060.png deleted file mode 100644 index 69b8613c..00000000 Binary files a/static/rust/redstone/crypto_secp256k1/doc/static.files/favicon-32x32-422f7d1d52889060.png and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1/doc/static.files/main-20a3ad099b048cf2.js b/static/rust/redstone/crypto_secp256k1/doc/static.files/main-20a3ad099b048cf2.js deleted file mode 100644 index 133116e4..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/static.files/main-20a3ad099b048cf2.js +++ /dev/null @@ -1,11 +0,0 @@ -"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;if(path===current_page){link.className="current"}link.textContent=name;const li=document.createElement("li");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/normalize-76eba96aa4d2e634.css b/static/rust/redstone/crypto_secp256k1/doc/static.files/normalize-76eba96aa4d2e634.css deleted file mode 100644 index 469959f1..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/static.files/normalize-76eba96aa4d2e634.css +++ /dev/null @@ -1,2 +0,0 @@ - /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ -html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type="button"],[type="reset"],[type="submit"],button{-webkit-appearance:button}[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none} \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/static.files/noscript-df360f571f6edeae.css b/static/rust/redstone/crypto_secp256k1/doc/static.files/noscript-df360f571f6edeae.css deleted file mode 100644 index 4c310ae5..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/static.files/noscript-df360f571f6edeae.css +++ /dev/null @@ -1 +0,0 @@ - #main-content .attributes{margin-left:0 !important;}#copy-path,#sidebar-button,.sidebar-resizer{display:none !important;}nav.sub{display:none;}.src .sidebar{display:none;}.notable-traits{display:none;}:root,: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%);}@media (prefers-color-scheme:dark){:root,:root:not([data-theme]){--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;--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%);}} \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/static.files/rust-logo-151179464ae7ed46.svg b/static/rust/redstone/crypto_secp256k1/doc/static.files/rust-logo-151179464ae7ed46.svg deleted file mode 100644 index 62424d8f..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/static.files/rust-logo-151179464ae7ed46.svg +++ /dev/null @@ -1,61 +0,0 @@ - - - diff --git a/static/rust/redstone/crypto_secp256k1/doc/static.files/rustdoc-dd39b87e5fcfba68.css b/static/rust/redstone/crypto_secp256k1/doc/static.files/rustdoc-dd39b87e5fcfba68.css deleted file mode 100644 index 77f89832..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/static.files/rustdoc-dd39b87e5fcfba68.css +++ /dev/null @@ -1,46 +0,0 @@ - :root{--nav-sub-mobile-padding:8px;--search-typename-width:6.75rem;--desktop-sidebar-width:200px;--src-sidebar-width:300px;--desktop-sidebar-z-index:100;}@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-left:-0.25rem;margin-right:0.25rem;}.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:24px;}.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 -16px 0 -16px;text-align:center;}.sidebar-crate h2 a{display:block;margin:0 calc(-24px + 0.25rem) 0 -0.2rem;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);}}@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/scrape-examples-ef1e698c1d417c0c.js b/static/rust/redstone/crypto_secp256k1/doc/static.files/scrape-examples-ef1e698c1d417c0c.js deleted file mode 100644 index ba830e37..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/static.files/scrape-examples-ef1e698c1d417c0c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(function(){const DEFAULT_MAX_LINES=5;const HIDDEN_MAX_LINES=10;function scrollToLoc(elt,loc,isHidden){const lines=elt.querySelector(".src-line-numbers");let scrollOffset;const maxLines=isHidden?HIDDEN_MAX_LINES:DEFAULT_MAX_LINES;if(loc[1]-loc[0]>maxLines){const line=Math.max(0,loc[0]-1);scrollOffset=lines.children[line].offsetTop}else{const wrapper=elt.querySelector(".code-wrapper");const halfHeight=wrapper.offsetHeight/2;const offsetTop=lines.children[loc[0]].offsetTop;const lastLine=lines.children[loc[1]];const offsetBot=lastLine.offsetTop+lastLine.offsetHeight;const offsetMid=(offsetTop+offsetBot)/2;scrollOffset=offsetMid-halfHeight}lines.scrollTo(0,scrollOffset);elt.querySelector(".rust").scrollTo(0,scrollOffset)}function updateScrapedExample(example,isHidden){const locs=JSON.parse(example.attributes.getNamedItem("data-locs").textContent);let locIndex=0;const highlights=Array.prototype.slice.call(example.querySelectorAll(".highlight"));const link=example.querySelector(".scraped-example-title a");if(locs.length>1){const onChangeLoc=changeIndex=>{removeClass(highlights[locIndex],"focus");changeIndex();scrollToLoc(example,locs[locIndex][0],isHidden);addClass(highlights[locIndex],"focus");const url=locs[locIndex][1];const title=locs[locIndex][2];link.href=url;link.innerHTML=title};example.querySelector(".prev").addEventListener("click",()=>{onChangeLoc(()=>{locIndex=(locIndex-1+locs.length)%locs.length})});example.querySelector(".next").addEventListener("click",()=>{onChangeLoc(()=>{locIndex=(locIndex+1)%locs.length})})}const expandButton=example.querySelector(".expand");if(expandButton){expandButton.addEventListener("click",()=>{if(hasClass(example,"expanded")){removeClass(example,"expanded");scrollToLoc(example,locs[0][0],isHidden)}else{addClass(example,"expanded")}})}scrollToLoc(example,locs[0][0],isHidden)}const firstExamples=document.querySelectorAll(".scraped-example-list > .scraped-example");onEachLazy(firstExamples,el=>updateScrapedExample(el,false));onEachLazy(document.querySelectorAll(".more-examples-toggle"),toggle=>{onEachLazy(toggle.querySelectorAll(".toggle-line, .hide-more"),button=>{button.addEventListener("click",()=>{toggle.open=false})});const moreExamples=toggle.querySelectorAll(".scraped-example");toggle.querySelector("summary").addEventListener("click",()=>{setTimeout(()=>{onEachLazy(moreExamples,el=>updateScrapedExample(el,true))})},{once:true})})})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/static.files/search-d52510db62a78183.js b/static/rust/redstone/crypto_secp256k1/doc/static.files/search-d52510db62a78183.js deleted file mode 100644 index a2824f29..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/static.files/search-d52510db62a78183.js +++ /dev/null @@ -1,5 +0,0 @@ -"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;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 isIdentCharacter(c){return(c==="_"||(c>="0"&&c<="9")||(c>="a"&&c<="z")||(c>="A"&&c<="Z"))}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){const start=parserState.pos;let end=parserState.pos;let foundExclamation=-1;while(parserState.pos0){throw["Unexpected ",c," after ",parserState.userQuery[parserState.pos-1]]}else{throw["Unexpected ",c]}}parserState.pos+=1;end=parserState.pos}if(foundExclamation!==-1&&foundExclamation!==start&&isIdentCharacter(parserState.userQuery[foundExclamation-1])){if(parserState.typeFilter===null){parserState.typeFilter="macro"}else if(parserState.typeFilter!=="macro"){throw["Invalid search type: macro ","!"," and ",parserState.typeFilter," both specified",]}end=foundExclamation}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();for(const c in query){if(!isIdentCharacter(query[c])){throw["Unexpected ",query[c]," 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,}}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{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(pushFunc);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){if(typeNameIdMap.has(elem.normalizedPathLast)&&(isAssocType||!typeNameIdMap.get(elem.normalizedPathLast).assocOnly)){elem.id=typeNameIdMap.get(elem.normalizedPathLast).id}else if(!parsedQuery.literalSearch){let match=null;let matchDist=maxEditDistance+1;let matchName="";for(const[name,{id,assocOnly}]of typeNameIdMap){const dist=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(){const cb="}".charCodeAt(0);let c=this.string.charCodeAt(this.offset);const ret=[];while(c!==cb){ret.push(this.decode());c=this.string.charCodeAt(this.offset)}this.offset+=1;return ret}decode(){const[ob,la]=["{","`"].map(c=>c.charCodeAt(0));let n=0;let c=this.string.charCodeAt(this.offset);if(c===ob){this.offset+=1;return this.decodeList()}while(c>1];this.offset+=1;return sign?-value:value}next(){const c=this.string.charCodeAt(this.offset);const[zero,ua,la]=["0","@","`"].map(c=>c.charCodeAt(0));if(c>=zero&&c16){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();const charA="A".charCodeAt(0);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)-charA,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/static.files/settings-4313503d2e1961c2.js b/static/rust/redstone/crypto_secp256k1/doc/static.files/settings-4313503d2e1961c2.js deleted file mode 100644 index ab425fe4..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/static.files/settings-4313503d2e1961c2.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict";(function(){const isSettingsPage=window.location.pathname.endsWith("/settings.html");function changeSetting(settingName,value){if(settingName==="theme"){const useSystem=value==="system preference"?"true":"false";updateLocalStorage("use-system-theme",useSystem)}updateLocalStorage(settingName,value);switch(settingName){case"theme":case"preferred-dark-theme":case"preferred-light-theme":updateTheme();updateLightAndDark();break;case"line-numbers":if(value===true){window.rustdoc_add_line_numbers_to_examples()}else{window.rustdoc_remove_line_numbers_from_examples()}break;case"hide-sidebar":if(value===true){addClass(document.documentElement,"hide-sidebar")}else{removeClass(document.documentElement,"hide-sidebar")}break}}function showLightAndDark(){removeClass(document.getElementById("preferred-light-theme"),"hidden");removeClass(document.getElementById("preferred-dark-theme"),"hidden")}function hideLightAndDark(){addClass(document.getElementById("preferred-light-theme"),"hidden");addClass(document.getElementById("preferred-dark-theme"),"hidden")}function updateLightAndDark(){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||(useSystem===null&&getSettingValue("theme")===null)){showLightAndDark()}else{hideLightAndDark()}}function setEvents(settingsElement){updateLightAndDark();onEachLazy(settingsElement.querySelectorAll("input[type=\"checkbox\"]"),toggle=>{const settingId=toggle.id;const settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=()=>{changeSetting(toggle.id,toggle.checked)}});onEachLazy(settingsElement.querySelectorAll("input[type=\"radio\"]"),elem=>{const settingId=elem.name;let settingValue=getSettingValue(settingId);if(settingId==="theme"){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||settingValue===null){settingValue=useSystem==="false"?"light":"system preference"}}if(settingValue!==null&&settingValue!=="null"){elem.checked=settingValue===elem.value}elem.addEventListener("change",ev=>{changeSetting(ev.target.name,ev.target.value)})})}function buildSettingsPageSections(settings){let output="";for(const setting of settings){const js_data_name=setting["js_name"];const setting_name=setting["name"];if(setting["options"]!==undefined){output+=`\ -
-
${setting_name}
-
`;onEach(setting["options"],option=>{const checked=option===setting["default"]?" checked":"";const full=`${js_data_name}-${option.replace(/ /g,"-")}`;output+=`\ - `});output+=`\ -
-
`}else{const checked=setting["default"]===true?" checked":"";output+=`\ -
\ - \ -
`}}return output}function buildSettingsPage(){const theme_names=getVar("themes").split(",").filter(t=>t);theme_names.push("light","dark","ayu");const settings=[{"name":"Theme","js_name":"theme","default":"system preference","options":theme_names.concat("system preference"),},{"name":"Preferred light theme","js_name":"preferred-light-theme","default":"light","options":theme_names,},{"name":"Preferred dark theme","js_name":"preferred-dark-theme","default":"dark","options":theme_names,},{"name":"Auto-hide item contents for large items","js_name":"auto-hide-large-items","default":true,},{"name":"Auto-hide item methods' documentation","js_name":"auto-hide-method-docs","default":false,},{"name":"Auto-hide trait implementation documentation","js_name":"auto-hide-trait-implementations","default":false,},{"name":"Directly go to item in search if there is only one result","js_name":"go-to-only-result","default":false,},{"name":"Show line numbers on code examples","js_name":"line-numbers","default":false,},{"name":"Hide persistent navigation bar","js_name":"hide-sidebar","default":false,},{"name":"Disable keyboard shortcuts","js_name":"disable-shortcuts","default":false,},];const elementKind=isSettingsPage?"section":"div";const innerHTML=`
${buildSettingsPageSections(settings)}
`;const el=document.createElement(elementKind);el.id="settings";if(!isSettingsPage){el.className="popover"}el.innerHTML=innerHTML;if(isSettingsPage){document.getElementById(MAIN_ID).appendChild(el)}else{el.setAttribute("tabindex","-1");getSettingsButton().appendChild(el)}return el}const settingsMenu=buildSettingsPage();function displaySettings(){settingsMenu.style.display="";onEachLazy(settingsMenu.querySelectorAll("input[type='checkbox']"),el=>{const val=getSettingValue(el.id);const checked=val==="true";if(checked!==el.checked&&val!==null){el.checked=checked}})}function settingsBlurHandler(event){blurHandler(event,getSettingsButton(),window.hidePopoverMenus)}if(isSettingsPage){getSettingsButton().onclick=event=>{event.preventDefault()}}else{const settingsButton=getSettingsButton();const settingsMenu=document.getElementById("settings");settingsButton.onclick=event=>{if(settingsMenu.contains(event.target)){return}event.preventDefault();const shouldDisplaySettings=settingsMenu.style.display==="none";window.hideAllModals();if(shouldDisplaySettings){displaySettings()}};settingsButton.onblur=settingsBlurHandler;settingsButton.querySelector("a").onblur=settingsBlurHandler;onEachLazy(settingsMenu.querySelectorAll("input"),el=>{el.onblur=settingsBlurHandler});settingsMenu.onblur=settingsBlurHandler}setTimeout(()=>{setEvents(settingsMenu);if(!isSettingsPage){displaySettings()}removeClass(getSettingsButton(),"rotate")},0)})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/static.files/src-script-e66d777a5a92e9b2.js b/static/rust/redstone/crypto_secp256k1/doc/static.files/src-script-e66d777a5a92e9b2.js deleted file mode 100644 index d0aebb85..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/static.files/src-script-e66d777a5a92e9b2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(function(){const rootPath=getVar("root-path");const NAME_OFFSET=0;const DIRS_OFFSET=1;const FILES_OFFSET=2;const RUSTDOC_MOBILE_BREAKPOINT=700;function closeSidebarIfMobile(){if(window.innerWidth{removeClass(document.documentElement,"src-sidebar-expanded");updateLocalStorage("source-sidebar-show","false")};window.rustdocShowSourceSidebar=()=>{addClass(document.documentElement,"src-sidebar-expanded");updateLocalStorage("source-sidebar-show","true")};window.rustdocToggleSrcSidebar=()=>{if(document.documentElement.classList.contains("src-sidebar-expanded")){window.rustdocCloseSourceSidebar()}else{window.rustdocShowSourceSidebar()}};function createSrcSidebar(){const container=document.querySelector("nav.sidebar");const sidebar=document.createElement("div");sidebar.id="src-sidebar";let hasFoundFile=false;for(const[key,source]of srcIndex){source[NAME_OFFSET]=key;hasFoundFile=createDirEntry(source,sidebar,"",hasFoundFile)}container.appendChild(sidebar);const selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}}function highlightSrcLines(){const match=window.location.hash.match(/^#?(\d+)(?:-(\d+))?$/);if(!match){return}let from=parseInt(match[1],10);let to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to{onEachLazy(e.getElementsByTagName("a"),i_e=>{removeClass(i_e,"line-highlighted")})});for(let i=from;i<=to;++i){elem=document.getElementById(i);if(!elem){break}addClass(elem,"line-highlighted")}}const handleSrcHighlight=(function(){let prev_line_id=0;const set_fragment=name=>{const x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSrcLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return ev=>{let cur_line_id=parseInt(ev.target.id,10);if(isNaN(cur_line_id)||ev.ctrlKey||ev.altKey||ev.metaKey){return}ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){const tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());window.addEventListener("hashchange",highlightSrcLines);onEachLazy(document.getElementsByClassName("src-line-numbers"),el=>{el.addEventListener("click",handleSrcHighlight)});highlightSrcLines();window.createSrcSidebar=createSrcSidebar})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/doc/static.files/storage-118b08c4c78b968e.js b/static/rust/redstone/crypto_secp256k1/doc/static.files/storage-118b08c4c78b968e.js deleted file mode 100644 index 98189467..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/static.files/storage-118b08c4c78b968e.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict";const builtinThemes=["light","dark","ayu"];const darkThemes=["dark","ayu"];window.currentTheme=document.getElementById("themeStyle");const settingsDataset=(function(){const settingsElement=document.getElementById("default-settings");return settingsElement&&settingsElement.dataset?settingsElement.dataset:null})();function getSettingValue(settingName){const current=getCurrentValue(settingName);if(current===null&&settingsDataset!==null){const def=settingsDataset[settingName.replace(/-/g,"_")];if(def!==undefined){return def}}return current}const localStoredTheme=getSettingValue("theme");function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(elem&&elem.classList){elem.classList.add(className)}}function removeClass(elem,className){if(elem&&elem.classList){elem.classList.remove(className)}}function onEach(arr,func){for(const elem of arr){if(func(elem)){return true}}return false}function onEachLazy(lazyArray,func){return onEach(Array.prototype.slice.call(lazyArray),func)}function updateLocalStorage(name,value){try{window.localStorage.setItem("rustdoc-"+name,value)}catch(e){}}function getCurrentValue(name){try{return window.localStorage.getItem("rustdoc-"+name)}catch(e){return null}}const getVar=(function getVar(name){const el=document.querySelector("head > meta[name='rustdoc-vars']");return el?el.attributes["data-"+name].value:null});function switchTheme(newThemeName,saveTheme){const themeNames=getVar("themes").split(",").filter(t=>t);themeNames.push(...builtinThemes);if(themeNames.indexOf(newThemeName)===-1){return}if(saveTheme){updateLocalStorage("theme",newThemeName)}document.documentElement.setAttribute("data-theme",newThemeName);if(builtinThemes.indexOf(newThemeName)!==-1){if(window.currentTheme){window.currentTheme.parentNode.removeChild(window.currentTheme);window.currentTheme=null}}else{const newHref=getVar("root-path")+encodeURIComponent(newThemeName)+getVar("resource-suffix")+".css";if(!window.currentTheme){if(document.readyState==="loading"){document.write(``);window.currentTheme=document.getElementById("themeStyle")}else{window.currentTheme=document.createElement("link");window.currentTheme.rel="stylesheet";window.currentTheme.id="themeStyle";window.currentTheme.href=newHref;document.documentElement.appendChild(window.currentTheme)}}else if(newHref!==window.currentTheme.href){window.currentTheme.href=newHref}}}const updateTheme=(function(){const mql=window.matchMedia("(prefers-color-scheme: dark)");function updateTheme(){if(getSettingValue("use-system-theme")!=="false"){const lightTheme=getSettingValue("preferred-light-theme")||"light";const darkTheme=getSettingValue("preferred-dark-theme")||"dark";updateLocalStorage("use-system-theme","true");switchTheme(mql.matches?darkTheme:lightTheme,true)}else{switchTheme(getSettingValue("theme"),false)}}mql.addEventListener("change",updateTheme);return updateTheme})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("preferred-dark-theme",localStoredTheme)}}updateTheme();if(getSettingValue("source-sidebar-show")==="true"){addClass(document.documentElement,"src-sidebar-expanded")}if(getSettingValue("hide-sidebar")==="true"){addClass(document.documentElement,"hide-sidebar")}function updateSidebarWidth(){const desktopSidebarWidth=getSettingValue("desktop-sidebar-width");if(desktopSidebarWidth&&desktopSidebarWidth!=="null"){document.documentElement.style.setProperty("--desktop-sidebar-width",desktopSidebarWidth+"px",)}const srcSidebarWidth=getSettingValue("src-sidebar-width");if(srcSidebarWidth&&srcSidebarWidth!=="null"){document.documentElement.style.setProperty("--src-sidebar-width",srcSidebarWidth+"px",)}}updateSidebarWidth();window.addEventListener("pageshow",ev=>{if(ev.persisted){setTimeout(updateTheme,0);setTimeout(updateSidebarWidth,0)}});class RustdocSearchElement extends HTMLElement{constructor(){super()}connectedCallback(){const rootPath=getVar("root-path");const currentCrate=getVar("current-crate");this.innerHTML=``}}window.customElements.define("rustdoc-search",RustdocSearchElement) \ 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 deleted file mode 100644 index 270a1587..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/clone/trait.Clone.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"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 deleted file mode 100644 index a573550b..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/cmp/trait.Eq.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"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 deleted file mode 100644 index 695eda8f..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/cmp/trait.PartialEq.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"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 deleted file mode 100644 index 92afa7bb..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/convert/trait.From.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"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 deleted file mode 100644 index f544c767..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/fmt/trait.Debug.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]] -};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 deleted file mode 100644 index 899cd7d8..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/fmt/trait.Display.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"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 deleted file mode 100644 index 9ef439fb..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/marker/trait.Freeze.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]]] -};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 deleted file mode 100644 index 5c6a47bd..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/marker/trait.Send.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]]] -};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 deleted file mode 100644 index 19408b71..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/marker/trait.StructuralPartialEq.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"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 deleted file mode 100644 index 38836f03..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/marker/trait.Sync.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]]] -};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 deleted file mode 100644 index 05a367f3..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/marker/trait.Unpin.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]]] -};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 deleted file mode 100644 index 5dbcd460..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]]] -};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 deleted file mode 100644 index 850af1de..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]]] -};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/redstone/core/validator/trait.Validator.js b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/redstone/core/validator/trait.Validator.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/redstone/core/validator/trait.Validator.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/network/as_str/trait.AsAsciiStr.js b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/redstone/network/as_str/trait.AsAsciiStr.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/redstone/network/as_str/trait.AsAsciiStr.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/network/as_str/trait.AsHexStr.js b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/redstone/network/as_str/trait.AsHexStr.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/redstone/network/as_str/trait.AsHexStr.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/network/assert/trait.Assert.js b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/redstone/network/assert/trait.Assert.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/redstone/network/assert/trait.Assert.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/network/assert/trait.Unwrap.js b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/redstone/network/assert/trait.Unwrap.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/redstone/network/assert/trait.Unwrap.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/network/flattened/trait.Flattened.js b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/redstone/network/flattened/trait.Flattened.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/redstone/network/flattened/trait.Flattened.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/network/from_bytes_repr/trait.FromBytesRepr.js b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/redstone/network/from_bytes_repr/trait.FromBytesRepr.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/redstone/network/from_bytes_repr/trait.FromBytesRepr.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/network/from_bytes_repr/trait.Sanitized.js b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/redstone/network/from_bytes_repr/trait.Sanitized.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/redstone/network/from_bytes_repr/trait.Sanitized.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/network/radix/u256_ext/trait.U256Ext.js b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/redstone/network/radix/u256_ext/trait.U256Ext.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/redstone/network/radix/u256_ext/trait.U256Ext.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/network/specific/trait.NetworkSpecific.js b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/redstone/network/specific/trait.NetworkSpecific.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/redstone/network/specific/trait.NetworkSpecific.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/utils/filter/trait.FilterSome.js b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/redstone/utils/filter/trait.FilterSome.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/redstone/utils/filter/trait.FilterSome.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/utils/median/trait.Averageable.js b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/redstone/utils/median/trait.Averageable.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/redstone/utils/median/trait.Averageable.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/utils/median/trait.Avg.js b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/redstone/utils/median/trait.Avg.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/redstone/utils/median/trait.Avg.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/utils/median/trait.Median.js b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/redstone/utils/median/trait.Median.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/redstone/utils/median/trait.Median.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/utils/trim/trait.Trim.js b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/redstone/utils/trim/trait.Trim.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/redstone/utils/trim/trait.Trim.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/utils/trim_zeros/trait.TrimZeros.js b/static/rust/redstone/crypto_secp256k1/doc/trait.impl/redstone/utils/trim_zeros/trait.TrimZeros.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/trait.impl/redstone/utils/trim_zeros/trait.TrimZeros.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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 deleted file mode 100644 index 02ba4b44..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/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"],["
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/casper/struct.Casper.js b/static/rust/redstone/crypto_secp256k1/doc/type.impl/redstone/network/casper/struct.Casper.js deleted file mode 100644 index cadcd6d3..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/type.impl/redstone/network/casper/struct.Casper.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var type_impls = { -"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/doc/type.impl/redstone/network/pure/struct.Std.js b/static/rust/redstone/crypto_secp256k1/doc/type.impl/redstone/network/pure/struct.Std.js deleted file mode 100644 index b85e8d1d..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/type.impl/redstone/network/pure/struct.Std.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]] -};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/radix/struct.Radix.js b/static/rust/redstone/crypto_secp256k1/doc/type.impl/redstone/network/radix/struct.Radix.js deleted file mode 100644 index f8bbe727..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/type.impl/redstone/network/radix/struct.Radix.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]] -};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/type._Network.js b/static/rust/redstone/crypto_secp256k1/doc/type.impl/redstone/network/type._Network.js deleted file mode 100644 index 53f96772..00000000 --- a/static/rust/redstone/crypto_secp256k1/doc/type.impl/redstone/network/type._Network.js +++ /dev/null @@ -1,3 +0,0 @@ -(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 deleted file mode 100644 index f173d86a..00000000 --- a/static/rust/redstone/crypto_secp256k1/help.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index b5973a6f..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/all.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 0792edbc..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/core/aggregator/fn.aggregate_matrix.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 15726f8e..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/core/aggregator/fn.aggregate_values.html +++ /dev/null @@ -1,25 +0,0 @@ -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.

-

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 -an average of the values, selecting the median, or applying a custom algorithm defined within the -aggregate_matrix function.

-

The primary purpose of this function is to consolidate data from multiple sources into a coherent -and singular value set that adheres to the criteria specified in the Config.

-

§Arguments

-
    -
  • config - A Config instance containing settings and parameters used to guide the aggregation process.
  • -
  • data_packages - A vector of DataPackage instances, each representing a set of values and associated -metadata collected from various sources or signers.
  • -
-

§Returns

-

Returns a Vec<U256>, which is a vector of aggregated values resulting from applying the aggregation -logic to the input data packages as per the specified configuration. Each U256 value in the vector -represents an aggregated result derived from the corresponding data packages.

-

§Note

-

This function is internal to the crate (pub(crate)) and not exposed as part of the public API. It is -designed to be used by other components within the same crate that require value aggregation functionality.

-
\ No newline at end of file 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 deleted file mode 100644 index f3dc8819..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/core/aggregator/fn.make_value_signer_matrix.html +++ /dev/null @@ -1,4 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1/redstone/core/aggregator/index.html b/static/rust/redstone/crypto_secp256k1/redstone/core/aggregator/index.html deleted file mode 100644 index 7aa39374..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/core/aggregator/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/redstone/core/aggregator/sidebar-items.js deleted file mode 100644 index c13147cd..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/core/aggregator/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["aggregate_matrix","aggregate_values","make_value_signer_matrix"],"type":["Matrix"]}; \ 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 deleted file mode 100644 index 61c3f974..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/core/aggregator/type.Matrix.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 32a77abc..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/core/config/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/redstone/core/config/sidebar-items.js deleted file mode 100644 index 4cadad77..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/core/config/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"struct":["Config"]}; \ 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 deleted file mode 100644 index 5f859175..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/core/config/struct.Config.html +++ /dev/null @@ -1,38 +0,0 @@ -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.

-

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.

-

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.

-

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.

-

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( - &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 - 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 deleted file mode 100644 index e427a2e8..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/core/index.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index d15046f1..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/core/processor/fn.make_processor_result.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index b1ad0b84..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/core/processor/fn.process_payload.html +++ /dev/null @@ -1,7 +0,0 @@ -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.
  • -
  • payload_bytes - Network-specific byte-list of the payload to be processed.
  • -
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/core/processor/index.html b/static/rust/redstone/crypto_secp256k1/redstone/core/processor/index.html deleted file mode 100644 index ccd25006..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/core/processor/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/redstone/core/processor/sidebar-items.js deleted file mode 100644 index e25cd4d1..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/core/processor/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["make_processor_result","process_payload"]}; \ 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 deleted file mode 100644 index 52eaf103..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/core/processor_result/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/redstone/core/processor_result/sidebar-items.js deleted file mode 100644 index 04eabb0b..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/core/processor_result/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"struct":["ProcessorResult"]}; \ 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 deleted file mode 100644 index c095c115..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/core/processor_result/struct.ProcessorResult.html +++ /dev/null @@ -1,29 +0,0 @@ -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.

-

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.

-

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).

-

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/redstone/core/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/redstone/core/sidebar-items.js deleted file mode 100644 index ce8d7edb..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/core/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["aggregator","config","processor","processor_result","validator"]}; \ 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 deleted file mode 100644 index 141d82cd..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/core/validator/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/redstone/core/validator/sidebar-items.js deleted file mode 100644 index a9b53ab7..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/core/validator/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["Validator"]}; \ 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 deleted file mode 100644 index ffbec709..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/core/validator/trait.Validator.html +++ /dev/null @@ -1,70 +0,0 @@ -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 validate_signer_count_threshold(
-        &self,
-        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.

-

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.

-
§Arguments
-
    -
  • feed_id: U256 - The unique identifier of the data feed.
  • -
-
§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.

-

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.

-
§Arguments
-
    -
  • signer: &[u8] - A byte slice representing the signer’s identifier.
  • -
-
§Returns
-
    -
  • Option<usize> - The index of the signer if found, or None if not found.
  • -
-
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.

-

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.

-
§Arguments
-
    -
  • index: usize - The index of the data value being validated.
  • -
  • values: &[Option<U256>] - A slice of optional U256 values associated with the data.
  • -
-
§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.

-

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.

-
§Arguments
-
    -
  • index: usize - The index of the data value whose timestamp is being validated.
  • -
  • timestamp: u64 - The timestamp to be validated.
  • -
-
§Returns
-
    -
  • u64 - The validated timestamp.
  • -
-

Implementors§

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/crypto/index.html b/static/rust/redstone/crypto_secp256k1/redstone/crypto/index.html deleted file mode 100644 index 541ea6ec..00000000 --- a/static/rust/redstone/crypto_secp256k1/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/redstone/crypto/keccak256/fn.keccak256.html b/static/rust/redstone/crypto_secp256k1/redstone/crypto/keccak256/fn.keccak256.html deleted file mode 100644 index 2665643a..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/crypto/keccak256/fn.keccak256.html +++ /dev/null @@ -1 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1/redstone/crypto/keccak256/index.html b/static/rust/redstone/crypto_secp256k1/redstone/crypto/keccak256/index.html deleted file mode 100644 index 96fe770a..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/crypto/keccak256/index.html +++ /dev/null @@ -1 +0,0 @@ -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/keccak256/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/redstone/crypto/keccak256/sidebar-items.js deleted file mode 100644 index 1a5fc982..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/crypto/keccak256/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["keccak256"]}; \ 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 deleted file mode 100644 index ba2beac0..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/crypto/recover/crypto256/fn.recover_public_key.html +++ /dev/null @@ -1,5 +0,0 @@ -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 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 deleted file mode 100644 index b5563f5f..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/crypto/recover/crypto256/index.html +++ /dev/null @@ -1 +0,0 @@ -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/crypto256/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/redstone/crypto/recover/crypto256/sidebar-items.js deleted file mode 100644 index 57bd2c11..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/crypto/recover/crypto256/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["recover_public_key"]}; \ 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 deleted file mode 100644 index aba3bde0..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/crypto/recover/fn.recover_address.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index e7703e69..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/crypto/recover/index.html +++ /dev/null @@ -1 +0,0 @@ -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/recover/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/redstone/crypto/recover/sidebar-items.js deleted file mode 100644 index 40087146..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/crypto/recover/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["recover_address"],"mod":["crypto256"]}; \ 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 deleted file mode 100644 index 521fe7cb..00000000 --- a/static/rust/redstone/crypto_secp256k1/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/redstone/index.html b/static/rust/redstone/crypto_secp256k1/redstone/index.html deleted file mode 100644 index ea091ee8..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/index.html +++ /dev/null @@ -1,6 +0,0 @@ -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. -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/redstone/macro.print_and_panic!.html b/static/rust/redstone/crypto_secp256k1/redstone/macro.print_and_panic!.html deleted file mode 100644 index 90775bac..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/macro.print_and_panic!.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to macro.print_and_panic.html...

- - - \ No newline at end of file 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 deleted file mode 100644 index b308eb68..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/macro.print_and_panic.html +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 2d4772f3..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/macro.print_debug!.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to macro.print_debug.html...

- - - \ 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 deleted file mode 100644 index 3cb863d6..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/macro.print_debug.html +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 9f63a8ad..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/as_str/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/redstone/network/as_str/sidebar-items.js deleted file mode 100644 index 01f900d2..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/as_str/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["AsAsciiStr","AsHexStr"]}; \ 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 deleted file mode 100644 index 094c2e3e..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/as_str/trait.AsAsciiStr.html +++ /dev/null @@ -1,4 +0,0 @@ -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 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 deleted file mode 100644 index 71d1669c..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/as_str/trait.AsHexStr.html +++ /dev/null @@ -1,4 +0,0 @@ -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 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 deleted file mode 100644 index 13078112..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/assert/fn.assert_or_revert.html +++ /dev/null @@ -1,7 +0,0 @@ -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 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 deleted file mode 100644 index 385fc71e..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/assert/fn.assert_or_revert_bool_with.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 680c61a9..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/assert/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/redstone/network/assert/sidebar-items.js deleted file mode 100644 index bd99c6f7..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/assert/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["assert_or_revert","assert_or_revert_bool_with"],"trait":["Assert","Unwrap"]}; \ 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 deleted file mode 100644 index e068a406..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/assert/trait.Assert.html +++ /dev/null @@ -1,6 +0,0 @@ -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 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 deleted file mode 100644 index db1ea7bc..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/assert/trait.Unwrap.html +++ /dev/null @@ -1,9 +0,0 @@ -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 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 deleted file mode 100644 index 9cb4c379..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/error/enum.Error.html +++ /dev/null @@ -1,65 +0,0 @@ -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),
-}
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.

-

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.

-

Used when operations on U256 numbers exceed their maximum value, potentially leading -to incorrect calculations or state.

-
§

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.

-

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.

-

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.

-

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.

-

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.

-

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.

-

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.

-

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.

-

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).

-

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 diff --git a/static/rust/redstone/crypto_secp256k1/redstone/network/error/index.html b/static/rust/redstone/crypto_secp256k1/redstone/network/error/index.html deleted file mode 100644 index e083b3b4..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/error/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/redstone/network/error/sidebar-items.js deleted file mode 100644 index 41603cd6..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/error/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"enum":["Error"],"trait":["ContractErrorContent"]}; \ 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 deleted file mode 100644 index 577c3a6f..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/error/trait.ContractErrorContent.html +++ /dev/null @@ -1,5 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1/redstone/network/flattened/index.html b/static/rust/redstone/crypto_secp256k1/redstone/network/flattened/index.html deleted file mode 100644 index e62982d8..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/flattened/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/redstone/network/flattened/sidebar-items.js deleted file mode 100644 index 25ac6e97..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/flattened/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["Flattened"]}; \ 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 deleted file mode 100644 index 6e4f71a3..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/flattened/trait.Flattened.html +++ /dev/null @@ -1,4 +0,0 @@ -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 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 deleted file mode 100644 index 037b0f7e..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/from_bytes_repr/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/redstone/network/from_bytes_repr/sidebar-items.js deleted file mode 100644 index 9d06c298..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/from_bytes_repr/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["FromBytesRepr","Sanitized"]}; \ 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 deleted file mode 100644 index 54139e47..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/from_bytes_repr/trait.FromBytesRepr.html +++ /dev/null @@ -1,4 +0,0 @@ -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 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 deleted file mode 100644 index 79baf865..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/from_bytes_repr/trait.Sanitized.html +++ /dev/null @@ -1,4 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1/redstone/network/index.html b/static/rust/redstone/crypto_secp256k1/redstone/network/index.html deleted file mode 100644 index a9fc43da..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/index.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index ac53c72e..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/print_debug/index.html +++ /dev/null @@ -1 +0,0 @@ -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/print_debug/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/redstone/network/print_debug/sidebar-items.js deleted file mode 100644 index 5244ce01..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/print_debug/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {}; \ 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 deleted file mode 100644 index f9f75a32..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/pure/from_bytes_repr/index.html +++ /dev/null @@ -1 +0,0 @@ -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/from_bytes_repr/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/redstone/network/pure/from_bytes_repr/sidebar-items.js deleted file mode 100644 index 5244ce01..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/pure/from_bytes_repr/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {}; \ 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 deleted file mode 100644 index fd752087..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/pure/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/redstone/network/pure/sidebar-items.js deleted file mode 100644 index c6bbc622..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/pure/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["from_bytes_repr"],"struct":["Std"]}; \ 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 deleted file mode 100644 index 3138ed4c..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/pure/struct.Std.html +++ /dev/null @@ -1,12 +0,0 @@ -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 - V: MultiLane<T>,

§

fn vzip(self) -> V

\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/network/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/redstone/network/sidebar-items.js deleted file mode 100644 index 59ea5c75..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["as_str","assert","error","flattened","from_bytes_repr","print_debug","pure","specific"],"type":["_Network"]}; \ 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 deleted file mode 100644 index 2e47400c..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/specific/constant.VALUE_SIZE.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 414a9953..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/specific/fn.print.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 2e9edf89..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/specific/fn.revert.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 1378d9dc..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/specific/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/redstone/network/specific/sidebar-items.js deleted file mode 100644 index 49355aaa..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/specific/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"constant":["VALUE_SIZE"],"fn":["print","revert"],"trait":["NetworkSpecific"],"type":["Bytes","Network","U256"]}; \ 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 deleted file mode 100644 index 85367773..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/specific/trait.NetworkSpecific.html +++ /dev/null @@ -1,11 +0,0 @@ -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;
-
-    // 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 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 deleted file mode 100644 index 04a40a5a..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/specific/type.Bytes.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 40e404c9..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/specific/type.Network.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index f3f9c595..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/specific/type.U256.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 72f68b07..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/network/type._Network.html +++ /dev/null @@ -1 +0,0 @@ -_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 deleted file mode 100644 index 72b04b86..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.DATA_FEED_ID_BS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index fed432b2..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.DATA_PACKAGES_COUNT_BS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index f25ed2f5..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.DATA_POINTS_COUNT_BS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 95f9c3d5..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.DATA_POINT_VALUE_BYTE_SIZE_BS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 160a69a6..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.MAX_TIMESTAMP_AHEAD_MS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 47c72d3b..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.MAX_TIMESTAMP_DELAY_MS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 07258216..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.REDSTONE_MARKER.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 21ea69ca..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.REDSTONE_MARKER_BS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 2a3a5b7f..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.SIGNATURE_BS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 1635207a..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.TIMESTAMP_BS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index a7ccdc60..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/constant.UNSIGNED_METADATA_BYTE_SIZE_BS.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 0268cb89..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/index.html +++ /dev/null @@ -1 +0,0 @@ -redstone::protocol::constants - Rust
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/sidebar-items.js deleted file mode 100644 index 7fd4daab..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/constants/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"constant":["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"]}; \ 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 deleted file mode 100644 index f1456016..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_package/fn.trim_data_package.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 393e9998..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_package/fn.trim_data_packages.html +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 4f7ef4c4..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_package/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_package/sidebar-items.js deleted file mode 100644 index 4b17209f..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_package/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["trim_data_package","trim_data_packages"],"struct":["DataPackage"]}; \ 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 deleted file mode 100644 index b77c9d35..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_package/struct.DataPackage.html +++ /dev/null @@ -1,22 +0,0 @@ -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).

-

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 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 deleted file mode 100644 index 10a3aa68..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_point/fn.trim_data_point.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 4bc76a0f..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_point/fn.trim_data_points.html +++ /dev/null @@ -1,5 +0,0 @@ -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 deleted file mode 100644 index 6ab1baf0..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_point/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_point/sidebar-items.js deleted file mode 100644 index 2a5fa8f1..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_point/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["trim_data_point","trim_data_points"],"struct":["DataPoint"]}; \ 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 deleted file mode 100644 index 4cee4899..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/data_point/struct.DataPoint.html +++ /dev/null @@ -1,21 +0,0 @@ -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).

-

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 diff --git a/static/rust/redstone/crypto_secp256k1/redstone/protocol/index.html b/static/rust/redstone/crypto_secp256k1/redstone/protocol/index.html deleted file mode 100644 index d221f7b2..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/index.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index fb7c7144..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/marker/fn.trim_redstone_marker.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 9844daf7..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/marker/index.html +++ /dev/null @@ -1 +0,0 @@ -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/marker/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/redstone/protocol/marker/sidebar-items.js deleted file mode 100644 index 2d2958a1..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/marker/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["trim_redstone_marker"]}; \ 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 deleted file mode 100644 index b3e6350e..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/payload/fn.trim_metadata.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 9eae9fdd..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/payload/fn.trim_payload.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 7bedf304..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/payload/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/redstone/protocol/payload/sidebar-items.js deleted file mode 100644 index 0d79d818..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/payload/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["trim_metadata","trim_payload"],"struct":["Payload"]}; \ 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 deleted file mode 100644 index 9234341b..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/payload/struct.Payload.html +++ /dev/null @@ -1,18 +0,0 @@ -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).

-

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 diff --git a/static/rust/redstone/crypto_secp256k1/redstone/protocol/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/redstone/protocol/sidebar-items.js deleted file mode 100644 index 94e7fdb5..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/protocol/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["constants","data_package","data_point","marker","payload"]}; \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/redstone/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/redstone/sidebar-items.js deleted file mode 100644 index f230d898..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"macro":["print_and_panic","print_debug"],"mod":["core","crypto","network","protocol","utils"]}; \ 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 deleted file mode 100644 index a153fc5f..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/utils/filter/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/redstone/utils/filter/sidebar-items.js deleted file mode 100644 index 9cc2f1a1..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/utils/filter/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["FilterSome"]}; \ 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 deleted file mode 100644 index 69bc1f28..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/utils/filter/trait.FilterSome.html +++ /dev/null @@ -1,4 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1/redstone/utils/index.html b/static/rust/redstone/crypto_secp256k1/redstone/utils/index.html deleted file mode 100644 index ef51ef17..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/utils/index.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index ebb4b4a4..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/utils/median/fn.maybe_pick_median.html +++ /dev/null @@ -1,2 +0,0 @@ -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 deleted file mode 100644 index 9a4952c3..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/utils/median/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/redstone/utils/median/sidebar-items.js deleted file mode 100644 index 092646ab..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/utils/median/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["maybe_pick_median"],"trait":["Averageable","Avg","Median"]}; \ 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 deleted file mode 100644 index 3ef3b4b4..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/utils/median/trait.Averageable.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 200d300b..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/utils/median/trait.Avg.html +++ /dev/null @@ -1,5 +0,0 @@ -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 - 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 deleted file mode 100644 index 60047574..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/utils/median/trait.Median.html +++ /dev/null @@ -1,7 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1/redstone/utils/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/redstone/utils/sidebar-items.js deleted file mode 100644 index 2f4d851f..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/utils/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["filter","median","trim","trim_zeros"]}; \ 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 deleted file mode 100644 index e7e6608a..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/utils/trim/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/redstone/utils/trim/sidebar-items.js deleted file mode 100644 index 076b36c3..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/utils/trim/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["Trim"]}; \ 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 deleted file mode 100644 index 9e458a9e..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/utils/trim/trait.Trim.html +++ /dev/null @@ -1,5 +0,0 @@ -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 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 deleted file mode 100644 index 2a2fd9e0..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/utils/trim_zeros/index.html +++ /dev/null @@ -1 +0,0 @@ -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/sidebar-items.js b/static/rust/redstone/crypto_secp256k1/redstone/utils/trim_zeros/sidebar-items.js deleted file mode 100644 index eebab388..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/utils/trim_zeros/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"trait":["TrimZeros"]}; \ 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 deleted file mode 100644 index f1299ca4..00000000 --- a/static/rust/redstone/crypto_secp256k1/redstone/utils/trim_zeros/trait.TrimZeros.html +++ /dev/null @@ -1,4 +0,0 @@ -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 diff --git a/static/rust/redstone/crypto_secp256k1/search-index.js b/static/rust/redstone/crypto_secp256k1/search-index.js deleted file mode 100644 index 09c72cca..00000000 --- a/static/rust/redstone/crypto_secp256k1/search-index.js +++ /dev/null @@ -1,5 +0,0 @@ -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"}]\ -]')); -if (typeof exports !== 'undefined') exports.searchIndex = searchIndex; -else if (window.initSearch) window.initSearch(searchIndex); diff --git a/static/rust/redstone/crypto_secp256k1/search.desc/redstone/redstone-desc-0-.js b/static/rust/redstone/crypto_secp256k1/search.desc/redstone/redstone-desc-0-.js deleted file mode 100644 index 81611d2e..00000000 --- a/static/rust/redstone/crypto_secp256k1/search.desc/redstone/redstone-desc-0-.js +++ /dev/null @@ -1 +0,0 @@ -searchState.loadedDescShard("redstone", 0, "RedStone\nAggregates values from a collection of data packages …\nConfiguration for a RedStone payload processor.\nThe current block time in timestamp format, used for …\nIdentifiers for the data feeds from which values are …\nReturns the argument unchanged.\nCalls U::from(self).\nThe minimum number of signers required validating the data.\nList of identifiers for signers authorized to sign the …\nThe main processor of the RedStone payload.\nRepresents the result of processing the RedStone payload.\nReturns the argument unchanged.\nCalls U::from(self).\nThe minimum timestamp encountered during processing.\nA collection of values processed during the operation.\nA trait defining validation operations for data feeds and …\nRetrieves the index of a given data feed.\nRetrieves the index of a given signer.\nValidates the signer count threshold for a given index …\nValidates the timestamp for a given index.\nUsed when an expected non-empty array or vector is found …\nRepresents errors that need to clone ContractErrorContent, …\nRepresents errors that arise from the contract itself.\nRepresents errors related to cryptographic operations.\nErrors that can be encountered in the …\nIndicates that the number of signers does not meet the …\nUsed when there is leftover data in a payload that should …\nIndicates an overflow error with U256 numbers.\nSignifies that an unsupported size was encountered.\nIndicates that a timestamp is further in the future than …\nUsed when a timestamp is older than allowed by the …\nIndicates that the marker bytes for RedStone are incorrect.\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).") \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/settings.html b/static/rust/redstone/crypto_secp256k1/settings.html deleted file mode 100644 index 9631dcb2..00000000 --- a/static/rust/redstone/crypto_secp256k1/settings.html +++ /dev/null @@ -1 +0,0 @@ -Settings

Rustdoc settings

Back
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/src-files.js b/static/rust/redstone/crypto_secp256k1/src-files.js deleted file mode 100644 index c071512f..00000000 --- a/static/rust/redstone/crypto_secp256k1/src-files.js +++ /dev/null @@ -1,4 +0,0 @@ -var srcIndex = new Map(JSON.parse('[\ -["redstone",["",[["core",[],["aggregator.rs","config.rs","mod.rs","processor.rs","processor_result.rs","validator.rs"]],["crypto",[],["keccak256.rs","mod.rs","recover.rs"]],["network",[["pure",[],["from_bytes_repr.rs","mod.rs"]]],["as_str.rs","assert.rs","error.rs","flattened.rs","from_bytes_repr.rs","mod.rs","print_debug.rs","specific.rs"]],["protocol",[],["constants.rs","data_package.rs","data_point.rs","marker.rs","mod.rs","payload.rs"]],["utils",[],["filter.rs","median.rs","mod.rs","trim.rs","trim_zeros.rs"]]],["lib.rs"]]]\ -]')); -createSrcSidebar(); 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 deleted file mode 100644 index e839b506..00000000 --- a/static/rust/redstone/crypto_secp256k1/src/redstone/core/aggregator.rs.html +++ /dev/null @@ -1,583 +0,0 @@ -aggregator.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-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
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-287
-288
-289
-290
-291
-
use crate::{
-    core::{config::Config, validator::Validator},
-    network::specific::U256,
-    print_debug,
-    protocol::data_package::DataPackage,
-    utils::median::Median,
-};
-
-type Matrix = Vec<Vec<Option<U256>>>;
-
-/// 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
-/// an average of the values, selecting the median, or applying a custom algorithm defined within the
-/// `aggregate_matrix` function.
-///
-/// The primary purpose of this function is to consolidate data from multiple sources into a coherent
-/// and singular value set that adheres to the criteria specified in the `Config`.
-///
-/// # Arguments
-///
-/// * `config` - A `Config` instance containing settings and parameters used to guide the aggregation process.
-/// * `data_packages` - A vector of `DataPackage` instances, each representing a set of values and associated
-///   metadata collected from various sources or signers.
-///
-/// # Returns
-///
-/// Returns a `Vec<U256>`, which is a vector of aggregated values resulting from applying the aggregation
-/// logic to the input data packages as per the specified configuration. Each `U256` value in the vector
-/// represents an aggregated result derived from the corresponding data packages.
-///
-/// # Note
-///
-/// This function is internal to the crate (`pub(crate)`) and not exposed as part of the public API. It is
-/// designed to be used by other components within the same crate that require value aggregation functionality.
-pub(crate) fn aggregate_values(config: Config, data_packages: Vec<DataPackage>) -> Vec<U256> {
-    aggregate_matrix(make_value_signer_matrix(&config, data_packages), config)
-}
-
-fn aggregate_matrix(matrix: Matrix, config: Config) -> Vec<U256> {
-    matrix
-        .iter()
-        .enumerate()
-        .map(|(index, values)| {
-            config
-                .validate_signer_count_threshold(index, values)
-                .median()
-        })
-        .collect()
-}
-
-fn make_value_signer_matrix(config: &Config, data_packages: Vec<DataPackage>) -> Matrix {
-    let mut matrix = vec![vec![None; config.signers.len()]; config.feed_ids.len()];
-
-    data_packages.iter().for_each(|data_package| {
-        if let Some(signer_index) = config.signer_index(&data_package.signer_address) {
-            data_package.data_points.iter().for_each(|data_point| {
-                if let Some(feed_index) = config.feed_index(data_point.feed_id) {
-                    matrix[feed_index][signer_index] = data_point.value.into()
-                }
-            })
-        }
-    });
-
-    print_debug!("{:?}", matrix);
-
-    matrix
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod aggregate_matrix_tests {
-    use crate::{
-        core::{aggregator::aggregate_matrix, config::Config},
-        helpers::iter_into::{IterInto, IterIntoOpt, OptIterIntoOpt},
-    };
-
-    #[test]
-    fn test_aggregate_matrix() {
-        let matrix = vec![
-            vec![11u8, 13].iter_into_opt(),
-            vec![21u8, 23].iter_into_opt(),
-        ];
-
-        for signer_count_threshold in 0..Config::test().signers.len() + 1 {
-            let mut config = Config::test();
-            config.signer_count_threshold = signer_count_threshold as u8;
-
-            let result = aggregate_matrix(matrix.clone(), config);
-
-            assert_eq!(result, vec![12u8, 22].iter_into());
-        }
-    }
-
-    #[test]
-    fn test_aggregate_matrix_smaller_threshold_missing_one_value() {
-        let mut config = Config::test();
-        config.signer_count_threshold = 1;
-
-        let matrix = vec![
-            vec![11u8, 13].iter_into_opt(),
-            vec![21u8.into(), None].opt_iter_into_opt(),
-        ];
-
-        let result = aggregate_matrix(matrix, config);
-
-        assert_eq!(result, vec![12u8, 21].iter_into());
-    }
-
-    #[should_panic(expected = "Array is empty")]
-    #[test]
-    fn test_aggregate_matrix_smaller_threshold_missing_whole_feed() {
-        let mut config = Config::test();
-        config.signer_count_threshold = 0;
-
-        let matrix = vec![vec![11u8, 13].iter_into_opt(), vec![None; 2]];
-
-        aggregate_matrix(matrix, config);
-    }
-
-    #[should_panic(expected = "Insufficient signer count 1 for #0 (ETH)")]
-    #[test]
-    fn test_aggregate_matrix_missing_one_value() {
-        let matrix = vec![
-            vec![21u8.into(), None].opt_iter_into_opt(),
-            vec![11u8, 12].iter_into_opt(),
-        ];
-
-        aggregate_matrix(matrix, Config::test());
-    }
-
-    #[should_panic(expected = "Insufficient signer count 0 for #1 (BTC)")]
-    #[test]
-    fn test_aggregate_matrix_missing_whole_feed() {
-        let matrix = vec![vec![11u8, 13].iter_into_opt(), vec![None; 2]];
-
-        aggregate_matrix(matrix, Config::test());
-    }
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod make_value_signer_matrix {
-    use crate::{
-        core::{
-            aggregator::{make_value_signer_matrix, Matrix},
-            config::Config,
-            test_helpers::{AVAX, BTC, ETH, TEST_SIGNER_ADDRESS_1, TEST_SIGNER_ADDRESS_2},
-        },
-        helpers::iter_into::IterInto,
-        network::specific::U256,
-        protocol::data_package::DataPackage,
-    };
-
-    #[test]
-    fn test_make_value_signer_matrix_empty() {
-        let config = Config::test();
-
-        test_make_value_signer_matrix_of(
-            vec![],
-            vec![vec![None; config.signers.len()]; config.feed_ids.len()],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_exact() {
-        let data_packages = vec![
-            DataPackage::test(ETH, 11, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(ETH, 12, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(BTC, 22, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(BTC, 21, TEST_SIGNER_ADDRESS_1, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![11, 12].iter_into(), vec![21, 22].iter_into()],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_greater() {
-        let data_packages = vec![
-            DataPackage::test(ETH, 11, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(ETH, 12, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(BTC, 22, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(BTC, 21, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(AVAX, 31, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(AVAX, 32, TEST_SIGNER_ADDRESS_2, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![11, 12].iter_into(), vec![21, 22].iter_into()],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_smaller() {
-        let data_packages = vec![
-            DataPackage::test(ETH, 11, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(ETH, 12, TEST_SIGNER_ADDRESS_2, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![11, 12].iter_into(), vec![None; 2]],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_diagonal() {
-        let data_packages = vec![
-            DataPackage::test(BTC, 22, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(ETH, 11, TEST_SIGNER_ADDRESS_1, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![11.into(), None], vec![None, 22.into()]],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_repetitions() {
-        let data_packages = vec![
-            DataPackage::test(BTC, 21, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(BTC, 22, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(BTC, 202, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(ETH, 11, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(ETH, 101, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(ETH, 12, TEST_SIGNER_ADDRESS_2, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![101, 12].iter_into(), vec![21, 202].iter_into()],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_all_wrong() {
-        let config = Config::test();
-
-        let data_packages = vec![
-            DataPackage::test(AVAX, 32, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(AVAX, 31, TEST_SIGNER_ADDRESS_1, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![None; config.signers.len()]; config.feed_ids.len()],
-        );
-    }
-
-    #[test]
-    fn test_make_value_signer_matrix_mix() {
-        let data_packages = vec![
-            DataPackage::test(ETH, 11, TEST_SIGNER_ADDRESS_1, None),
-            DataPackage::test(ETH, 12, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(AVAX, 32, TEST_SIGNER_ADDRESS_2, None),
-            DataPackage::test(AVAX, 31, TEST_SIGNER_ADDRESS_1, None),
-        ];
-
-        test_make_value_signer_matrix_of(
-            data_packages,
-            vec![vec![11, 12].iter_into(), vec![None; 2]],
-        );
-    }
-
-    fn test_make_value_signer_matrix_of(
-        data_packages: Vec<DataPackage>,
-        expected_values: Vec<Vec<Option<u128>>>,
-    ) {
-        let config = &Config::test();
-        let result = make_value_signer_matrix(config, data_packages);
-
-        let expected_matrix: Matrix = expected_values
-            .iter()
-            .map(|row| {
-                (row.iter()
-                    .map(|&value| value.map(U256::from))
-                    .collect::<Vec<_>>())
-                .iter_into() as Vec<Option<U256>>
-            })
-            .collect();
-
-        assert_eq!(result, expected_matrix)
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 0b9ca7f7..00000000 --- a/static/rust/redstone/crypto_secp256k1/src/redstone/core/config.rs.html +++ /dev/null @@ -1,63 +0,0 @@ -config.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
-
use crate::network::specific::{Bytes, U256};
-
-/// 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.
-#[derive(Debug)]
-pub struct Config {
-    /// 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.
-    pub signer_count_threshold: u8,
-
-    /// 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.
-    pub signers: Vec<Bytes>,
-
-    /// Identifiers for the data feeds from which values are aggregated.
-    ///
-    /// Each data feed id is represented by the network-specific `U256` type.
-    pub feed_ids: Vec<U256>,
-
-    /// 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.
-    pub block_timestamp: u64,
-}
-
\ No newline at end of file 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 deleted file mode 100644 index f278fb16..00000000 --- a/static/rust/redstone/crypto_secp256k1/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/src/redstone/core/processor.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/core/processor.rs.html deleted file mode 100644 index 2e92e10d..00000000 --- a/static/rust/redstone/crypto_secp256k1/src/redstone/core/processor.rs.html +++ /dev/null @@ -1,203 +0,0 @@ -processor.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-
use crate::{
-    core::{
-        aggregator::aggregate_values, config::Config, processor_result::ProcessorResult,
-        validator::Validator,
-    },
-    network::specific::Bytes,
-    print_debug,
-    protocol::payload::Payload,
-};
-
-/// The main processor of the RedStone payload.
-///
-///
-/// # Arguments
-///
-/// * `config` - Configuration of the payload processing.
-/// * `payload_bytes` - Network-specific byte-list of the payload to be processed.
-pub fn process_payload(config: Config, payload_bytes: Bytes) -> ProcessorResult {
-    #[allow(clippy::useless_conversion)]
-    let mut bytes: Vec<u8> = payload_bytes.into();
-    let payload = Payload::make(&mut bytes);
-    print_debug!("{:?}", payload);
-
-    make_processor_result(config, payload)
-}
-
-fn make_processor_result(config: Config, payload: Payload) -> ProcessorResult {
-    let min_timestamp = payload
-        .data_packages
-        .iter()
-        .enumerate()
-        .map(|(index, dp)| config.validate_timestamp(index, dp.timestamp))
-        .min()
-        .unwrap();
-
-    let values = aggregate_values(config, payload.data_packages);
-
-    print_debug!("{} {:?}", min_timestamp, values);
-
-    ProcessorResult {
-        values,
-        min_timestamp,
-    }
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        core::{
-            config::Config,
-            processor::make_processor_result,
-            processor_result::ProcessorResult,
-            test_helpers::{
-                BTC, ETH, TEST_BLOCK_TIMESTAMP, TEST_SIGNER_ADDRESS_1, TEST_SIGNER_ADDRESS_2,
-            },
-        },
-        helpers::iter_into::IterInto,
-        protocol::{data_package::DataPackage, payload::Payload},
-    };
-
-    #[test]
-    fn test_make_processor_result() {
-        let data_packages = vec![
-            DataPackage::test(
-                ETH,
-                11,
-                TEST_SIGNER_ADDRESS_1,
-                (TEST_BLOCK_TIMESTAMP + 5).into(),
-            ),
-            DataPackage::test(
-                ETH,
-                13,
-                TEST_SIGNER_ADDRESS_2,
-                (TEST_BLOCK_TIMESTAMP + 3).into(),
-            ),
-            DataPackage::test(
-                BTC,
-                32,
-                TEST_SIGNER_ADDRESS_2,
-                (TEST_BLOCK_TIMESTAMP - 2).into(),
-            ),
-            DataPackage::test(
-                BTC,
-                31,
-                TEST_SIGNER_ADDRESS_1,
-                (TEST_BLOCK_TIMESTAMP + 400).into(),
-            ),
-        ];
-
-        let result = make_processor_result(Config::test(), Payload { data_packages });
-
-        assert_eq!(
-            result,
-            ProcessorResult {
-                min_timestamp: TEST_BLOCK_TIMESTAMP - 2,
-                values: vec![12u8, 31].iter_into()
-            }
-        );
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index ecdffb37..00000000 --- a/static/rust/redstone/crypto_secp256k1/src/redstone/core/processor_result.rs.html +++ /dev/null @@ -1,53 +0,0 @@ -processor_result.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
-
use crate::network::specific::U256;
-
-/// 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`.
-#[derive(Debug, Eq, PartialEq)]
-pub struct ProcessorResult {
-    /// 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.
-    pub min_timestamp: u64,
-
-    /// 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`.
-    pub values: Vec<U256>,
-}
-
-impl From<ProcessorResult> for (u64, Vec<U256>) {
-    fn from(result: ProcessorResult) -> Self {
-        (result.min_timestamp, result.values)
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 1fed8ca0..00000000 --- a/static/rust/redstone/crypto_secp256k1/src/redstone/core/validator.rs.html +++ /dev/null @@ -1,573 +0,0 @@ -validator.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-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
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-
use crate::{
-    core::config::Config,
-    network::{
-        assert::Assert,
-        error::Error::{InsufficientSignerCount, TimestampTooFuture, TimestampTooOld},
-        specific::U256,
-    },
-    protocol::constants::{MAX_TIMESTAMP_AHEAD_MS, MAX_TIMESTAMP_DELAY_MS},
-    utils::filter::FilterSome,
-};
-
-/// 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.
-pub(crate) trait Validator {
-    /// 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.
-    ///
-    /// # Arguments
-    ///
-    /// * `feed_id`: `U256` - The unique identifier of the data feed.
-    ///
-    /// # Returns
-    ///
-    /// * `Option<usize>` - The index of the feed if it exists, or `None` if it does not.
-    fn feed_index(&self, feed_id: U256) -> 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.
-    ///
-    /// # Arguments
-    ///
-    /// * `signer`: `&[u8]` - A byte slice representing the signer's identifier.
-    ///
-    /// # Returns
-    ///
-    /// * `Option<usize>` - The index of the signer if found, or `None` if not found.
-    fn signer_index(&self, signer: &[u8]) -> Option<usize>;
-
-    /// 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.
-    ///
-    /// # Arguments
-    ///
-    /// * `index`: `usize` - The index of the data value being validated.
-    /// * `values`: `&[Option<U256>]` - A slice of optional `U256` values associated with the data.
-    ///
-    /// # Returns
-    ///
-    /// * `Vec<U256>` - A vector of `U256` values that meet the validation criteria.
-    fn validate_signer_count_threshold(&self, index: usize, values: &[Option<U256>]) -> Vec<U256>;
-
-    /// 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.
-    ///
-    /// # Arguments
-    ///
-    /// * `index`: `usize` - The index of the data value whose timestamp is being validated.
-    /// * `timestamp`: `u64` - The timestamp to be validated.
-    ///
-    /// # Returns
-    ///
-    /// * `u64` - The validated timestamp.
-    fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64;
-}
-
-impl Validator for Config {
-    #[inline]
-    fn feed_index(&self, feed_id: U256) -> Option<usize> {
-        self.feed_ids.iter().position(|&elt| elt == feed_id)
-    }
-
-    #[inline]
-    fn signer_index(&self, signer: &[u8]) -> Option<usize> {
-        self.signers
-            .iter()
-            .position(|elt| elt.to_ascii_lowercase() == signer.to_ascii_lowercase())
-    }
-
-    #[inline]
-    fn validate_signer_count_threshold(&self, index: usize, values: &[Option<U256>]) -> Vec<U256> {
-        values.filter_some().assert_or_revert(
-            |x| (*x).len() >= self.signer_count_threshold.into(),
-            #[allow(clippy::useless_conversion)]
-            |val| InsufficientSignerCount(index, val.len(), self.feed_ids[index]),
-        )
-    }
-
-    #[inline]
-    fn validate_timestamp(&self, index: usize, timestamp: u64) -> u64 {
-        timestamp.assert_or_revert(
-            |&x| x + MAX_TIMESTAMP_DELAY_MS >= self.block_timestamp,
-            |timestamp| TimestampTooOld(index, *timestamp),
-        );
-
-        timestamp.assert_or_revert(
-            |&x| x <= self.block_timestamp + MAX_TIMESTAMP_AHEAD_MS,
-            |timestamp| TimestampTooFuture(index, *timestamp),
-        )
-    }
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        core::{
-            config::Config,
-            test_helpers::{
-                AVAX, BTC, ETH, TEST_BLOCK_TIMESTAMP, TEST_SIGNER_ADDRESS_1, TEST_SIGNER_ADDRESS_2,
-            },
-            validator::Validator,
-        },
-        helpers::{
-            hex::{hex_to_bytes, make_feed_id},
-            iter_into::{IterInto, IterIntoOpt, OptIterIntoOpt},
-        },
-        network::specific::U256,
-        protocol::constants::{MAX_TIMESTAMP_AHEAD_MS, MAX_TIMESTAMP_DELAY_MS},
-    };
-    use itertools::Itertools;
-
-    #[test]
-    fn test_feed_index() {
-        let config = Config::test();
-
-        let eth_index = config.feed_index(make_feed_id(ETH));
-        assert_eq!(eth_index, 0.into());
-
-        let eth_index = config.feed_index(make_feed_id("778680")); //eth
-        assert_eq!(eth_index, None);
-
-        let btc_index = config.feed_index(make_feed_id(BTC));
-        assert_eq!(btc_index, 1.into());
-
-        let avax_index = config.feed_index(make_feed_id(AVAX));
-        assert_eq!(avax_index, None);
-    }
-
-    #[test]
-    fn test_signer_index() {
-        let config = Config::test();
-        let index = config.signer_index(&hex_to_bytes(TEST_SIGNER_ADDRESS_1.into()));
-        assert_eq!(index, 0.into());
-
-        let index = config.signer_index(&hex_to_bytes(TEST_SIGNER_ADDRESS_1.to_uppercase()));
-        assert_eq!(index, 0.into());
-
-        let index = config.signer_index(&hex_to_bytes(TEST_SIGNER_ADDRESS_2.into()));
-        assert_eq!(index, 1.into());
-
-        let index = config.signer_index(&hex_to_bytes(TEST_SIGNER_ADDRESS_2.replace('0', "1")));
-        assert_eq!(index, None);
-    }
-
-    #[test]
-    fn test_validate_timestamp() {
-        let config = Config::test();
-
-        config.validate_timestamp(0, TEST_BLOCK_TIMESTAMP);
-        config.validate_timestamp(1, TEST_BLOCK_TIMESTAMP + 60000);
-        config.validate_timestamp(2, TEST_BLOCK_TIMESTAMP + MAX_TIMESTAMP_AHEAD_MS);
-        config.validate_timestamp(3, TEST_BLOCK_TIMESTAMP - MAX_TIMESTAMP_DELAY_MS);
-        config.validate_timestamp(4, TEST_BLOCK_TIMESTAMP - 60000);
-    }
-
-    #[should_panic(expected = "Timestamp 2000000180001 is too future for #0")]
-    #[test]
-    fn test_validate_timestamp_too_future() {
-        Config::test().validate_timestamp(0, TEST_BLOCK_TIMESTAMP + MAX_TIMESTAMP_AHEAD_MS + 1);
-    }
-
-    #[should_panic(expected = "Timestamp 1999999099999 is too old for #1")]
-    #[test]
-    fn test_validate_timestamp_too_old() {
-        Config::test().validate_timestamp(1, TEST_BLOCK_TIMESTAMP - MAX_TIMESTAMP_DELAY_MS - 1);
-    }
-
-    #[should_panic(expected = "Timestamp 0 is too old for #2")]
-    #[test]
-    fn test_validate_timestamp_zero() {
-        Config::test().validate_timestamp(2, 0);
-    }
-
-    #[should_panic(expected = "Timestamp 4000000000000 is too future for #3")]
-    #[test]
-    fn test_validate_timestamp_big() {
-        Config::test().validate_timestamp(3, TEST_BLOCK_TIMESTAMP + TEST_BLOCK_TIMESTAMP);
-    }
-
-    #[should_panic(expected = "Timestamp 2000000000000 is too future for #4")]
-    #[test]
-    fn test_validate_timestamp_no_block_timestamp() {
-        let mut config = Config::test();
-
-        config.block_timestamp = 0;
-        config.validate_timestamp(4, TEST_BLOCK_TIMESTAMP);
-    }
-
-    #[should_panic(expected = "Insufficient signer count 0 for #0 (ETH)")]
-    #[test]
-    fn test_validate_signer_count_threshold_empty_list() {
-        Config::test().validate_signer_count_threshold(0, vec![].as_slice());
-    }
-
-    #[should_panic(expected = "Insufficient signer count 1 for #1 (BTC)")]
-    #[test]
-    fn test_validate_signer_count_threshold_shorter_list() {
-        Config::test().validate_signer_count_threshold(1, vec![1u8].iter_into_opt().as_slice());
-    }
-
-    #[should_panic(expected = "Insufficient signer count 1 for #1 (BTC)")]
-    #[test]
-    fn test_validate_signer_count_threshold_list_with_nones() {
-        Config::test().validate_signer_count_threshold(
-            1,
-            vec![None, 1u8.into(), None].opt_iter_into_opt().as_slice(),
-        );
-    }
-
-    #[test]
-    fn test_validate_signer_count_threshold_with_exact_size() {
-        validate_with_all_permutations(vec![1u8, 2].iter_into_opt(), vec![1u8, 2].iter_into());
-    }
-
-    #[test]
-    fn test_validate_signer_count_threshold_with_exact_signer_count() {
-        validate_with_all_permutations(
-            vec![None, 1u8.into(), None, 2.into()].opt_iter_into_opt(),
-            vec![1u8, 2].iter_into(),
-        );
-    }
-
-    #[test]
-    fn test_validate_signer_count_threshold_with_larger_size() {
-        validate_with_all_permutations(
-            vec![
-                1u8.into(),
-                None,
-                None,
-                2.into(),
-                3.into(),
-                None,
-                4.into(),
-                None,
-            ]
-            .opt_iter_into_opt(),
-            vec![1u8, 2, 3, 4].iter_into(),
-        );
-    }
-
-    fn validate_with_all_permutations(numbers: Vec<Option<U256>>, expected_value: Vec<U256>) {
-        let perms: Vec<Vec<_>> = numbers.iter().permutations(numbers.len()).collect();
-        let mut config = Config::test();
-
-        let result = config.validate_signer_count_threshold(0, &numbers);
-        assert_eq!(result, expected_value);
-
-        for threshold in 0..expected_value.len() + 1 {
-            config.signer_count_threshold = threshold as u8;
-
-            for (index, perm) in perms.iter().enumerate() {
-                let p: Vec<_> = perm.iter().map(|&&v| v).collect();
-
-                let result =
-                    config.validate_signer_count_threshold(index % config.feed_ids.len(), &p);
-                assert_eq!(result.len(), expected_value.len());
-            }
-        }
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 7e62e207..00000000 --- a/static/rust/redstone/crypto_secp256k1/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/src/redstone/crypto/mod.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/crypto/mod.rs.html deleted file mode 100644 index fa282223..00000000 --- a/static/rust/redstone/crypto_secp256k1/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/src/redstone/crypto/recover.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/crypto/recover.rs.html deleted file mode 100644 index f03e84b0..00000000 --- a/static/rust/redstone/crypto_secp256k1/src/redstone/crypto/recover.rs.html +++ /dev/null @@ -1,267 +0,0 @@ -recover.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-
use crate::crypto::{keccak256, recover::crypto256::recover_public_key};
-
-pub fn recover_address(message: Vec<u8>, signature: Vec<u8>) -> Vec<u8> {
-    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],
-        recovery_byte - (if recovery_byte >= 27 { 27 } else { 0 }),
-    );
-    let key_hash = keccak256::keccak256(&key[1..]); // skip first uncompressed-key byte
-
-    key_hash[12..].into() // last 20 bytes
-}
-
-#[cfg(feature = "crypto_secp256k1")]
-pub(crate) mod crypto256 {
-    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],
-        recovery_byte: u8,
-    ) -> Box<[u8]> {
-        let msg = Message::from_digest_slice(message_hash.as_ref())
-            .unwrap_or_revert(|_| Error::CryptographicError(message_hash.len()));
-
-        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)
-                .unwrap_or_revert(|_| Error::CryptographicError(signature_bytes.len()));
-
-        let public_key = Secp256k1Curve::new().recover_ecdsa(&msg, &sig);
-
-        public_key.unwrap().serialize_uncompressed().into()
-    }
-}
-
-#[cfg(feature = "crypto_k256")]
-pub(crate) mod crypto256 {
-    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],
-        recovery_byte: u8,
-    ) -> Box<[u8]> {
-        let recovery_id = RecoveryId::from_byte(recovery_byte)
-            .unwrap_or_revert(|_| Error::CryptographicError(recovery_byte.into()));
-
-        let signature = Signature::try_from(signature_bytes)
-            .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());
-
-        recovered_key.unwrap()
-    }
-}
-
-#[cfg(all(not(feature = "crypto_k256"), not(feature = "crypto_secp256k1")))]
-pub(crate) mod crypto256 {
-    pub(crate) fn recover_public_key(
-        _message_hash: Box<[u8]>,
-        _signature_bytes: &[u8],
-        _recovery_byte: u8,
-    ) -> Box<[u8]> {
-        panic!("Not implemented!")
-    }
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        crypto::recover::{crypto256::recover_public_key, recover_address},
-        helpers::hex::hex_to_bytes,
-    };
-
-    const MESSAGE: &str = "415641580000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d394303d018d79bf0ba000000020000001";
-    const MESSAGE_HASH: &str = "f0805644755393876d0e917e553f0c206f8bc68b7ebfe73a79d2a9e7f5a4cea6";
-    const SIG_V27: &str = "475195641dae43318e194c3d9e5fc308773d6fdf5e197e02644dfd9ca3d19e3e2bd7d8656428f7f02e658a16b8f83722169c57126cc50bec8fad188b1bac6d19";
-    const SIG_V28: &str = "c88242d22d88252c845b946c9957dbf3c7d59a3b69ecba2898198869f9f146ff268c3e47a11dbb05cc5198aadd659881817a59ee37e088d3253f4695927428c1";
-    const PUBLIC_KEY_V27: &str =
-        "04f5f035588502146774d0ccfd62ee5bf1d7f1dbb96aae33a79765c636b8ec75a36f5121931b5cc37215a7d4280c5700ca92daaaf93c32b06ca9f98b1f4ece624e";
-    const PUBLIC_KEY_V28: &str =
-        "04626f2ad2cfb0b41a24276d78de8959bcf45fc5e80804416e660aab2089d15e98206526e639ee19d17c8f9ae0ce3a6ff1a8ea4ab773d0fb4214e08aad7ba978c8";
-    const ADDRESS_V27: &str = "2c59617248994D12816EE1Fa77CE0a64eEB456BF";
-    const ADDRESS_V28: &str = "12470f7aBA85c8b81D63137DD5925D6EE114952b";
-
-    #[test]
-    fn test_recover_public_key_v27() {
-        let public_key = recover_public_key(u8_box(MESSAGE_HASH), &u8_box(SIG_V27), 0);
-
-        assert_eq!(u8_box(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);
-
-        assert_eq!(u8_box(PUBLIC_KEY_V28), public_key);
-    }
-
-    #[test]
-    fn test_recover_address_1b() {
-        let address = recover_address(
-            hex_to_bytes(MESSAGE.into()),
-            hex_to_bytes(SIG_V27.to_owned() + "1b"),
-        );
-
-        assert_eq!(hex_to_bytes(ADDRESS_V27.into()), address);
-    }
-
-    #[test]
-    fn test_recover_address_1c() {
-        let address = recover_address(
-            hex_to_bytes(MESSAGE.into()),
-            hex_to_bytes(SIG_V28.to_owned() + "1c"),
-        );
-
-        assert_eq!(hex_to_bytes(ADDRESS_V28.into()), address);
-    }
-
-    fn u8_box(str: &str) -> Box<[u8]> {
-        hex_to_bytes(str.into()).as_slice().into()
-    }
-}
-
\ 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 deleted file mode 100644 index a1f164bf..00000000 --- a/static/rust/redstone/crypto_secp256k1/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/src/redstone/network/as_str.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/network/as_str.rs.html deleted file mode 100644 index f0b58bfb..00000000 --- a/static/rust/redstone/crypto_secp256k1/src/redstone/network/as_str.rs.html +++ /dev/null @@ -1,235 +0,0 @@ -as_str.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-
extern crate alloc;
-
-use crate::network::specific::U256;
-use alloc::{format, string::String};
-
-pub trait AsHexStr {
-    fn as_hex_str(&self) -> String;
-}
-
-impl AsHexStr for &[u8] {
-    #[allow(clippy::format_collect)]
-    fn as_hex_str(&self) -> String {
-        self.iter().map(|byte| format!("{:02x}", byte)).collect()
-    }
-}
-
-#[cfg(feature = "network_casper")]
-impl AsHexStr for casper_types::bytesrepr::Bytes {
-    fn as_hex_str(&self) -> String {
-        self.as_slice().as_hex_str()
-    }
-}
-
-#[cfg(not(feature = "network_radix"))]
-impl AsHexStr for U256 {
-    fn as_hex_str(&self) -> String {
-        format!("{:X}", self)
-    }
-}
-
-#[cfg(feature = "network_radix")]
-impl AsHexStr for U256 {
-    fn as_hex_str(&self) -> String {
-        let digits = self.to_digits();
-        let mut result = String::new();
-        for &part in &digits {
-            if result.is_empty() || part != 0u64 {
-                result.push_str(&format!("{:02X}", part));
-            }
-        }
-        result
-    }
-}
-
-impl AsHexStr for Vec<u8> {
-    fn as_hex_str(&self) -> String {
-        self.as_slice().as_hex_str()
-    }
-}
-
-impl AsHexStr for Box<[u8]> {
-    fn as_hex_str(&self) -> String {
-        self.as_ref().as_hex_str()
-    }
-}
-
-pub trait AsAsciiStr {
-    fn as_ascii_str(&self) -> String;
-}
-
-impl AsAsciiStr for &[u8] {
-    fn as_ascii_str(&self) -> String {
-        self.iter().map(|&code| code as char).collect()
-    }
-}
-
-impl AsAsciiStr for Vec<u8> {
-    fn as_ascii_str(&self) -> String {
-        self.as_slice().as_ascii_str()
-    }
-}
-
-#[cfg(feature = "network_casper")]
-impl AsAsciiStr for casper_types::bytesrepr::Bytes {
-    fn as_ascii_str(&self) -> String {
-        self.as_slice().as_ascii_str()
-    }
-}
-
-impl AsAsciiStr for U256 {
-    fn as_ascii_str(&self) -> String {
-        let hex_string = self.as_hex_str();
-        let bytes = (0..hex_string.len())
-            .step_by(2)
-            .map(|i| u8::from_str_radix(&hex_string[i..i + 2], 16))
-            .collect::<Result<Vec<u8>, _>>()
-            .unwrap();
-
-        bytes.as_ascii_str()
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use crate::network::{
-        as_str::{AsAsciiStr, AsHexStr},
-        specific::U256,
-    };
-
-    const ETH: u32 = 4543560u32;
-
-    #[test]
-    fn test_as_hex_str() {
-        let u256 = U256::from(ETH);
-        let result = u256.as_hex_str();
-
-        assert_eq!(result, "455448");
-    }
-
-    #[test]
-    fn test_as_ascii_str() {
-        let u256 = U256::from(ETH);
-        let result = u256.as_ascii_str();
-
-        assert_eq!(result, "ETH");
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index cfd43818..00000000 --- a/static/rust/redstone/crypto_secp256k1/src/redstone/network/assert.rs.html +++ /dev/null @@ -1,273 +0,0 @@ -assert.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-
use crate::{
-    network::{error::Error, specific::revert},
-    print_debug,
-};
-use std::fmt::Debug;
-
-pub trait Assert<F> {
-    fn assert_or_revert<E: Fn(&Self) -> Error>(self, check: F, error: E) -> Self;
-}
-
-impl<T, F> Assert<F> for T
-where
-    T: Debug,
-    F: Fn(&Self) -> bool,
-{
-    fn assert_or_revert<E: FnOnce(&Self) -> Error>(self, check: F, error: E) -> Self {
-        assert_or_revert(self, check, error)
-    }
-}
-
-#[inline]
-fn assert_or_revert<F, T, E: FnOnce(&T) -> Error>(arg: T, check: F, error: E) -> T
-where
-    F: Fn(&T) -> bool,
-    T: Debug,
-{
-    assert_or_revert_bool_with(check(&arg), || error(&arg));
-
-    arg
-}
-
-#[inline]
-fn assert_or_revert_bool_with<E: FnOnce() -> Error>(check: bool, error: E) {
-    if check {
-        return;
-    }
-
-    let error = error();
-    print_debug!("REVERT({}) - {}!", &error.code(), error);
-    revert(error);
-}
-
-pub trait Unwrap<R> {
-    type ErrorArg;
-
-    fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> R;
-}
-
-impl<T> Unwrap<T> for Option<T>
-where
-    T: Debug,
-{
-    type ErrorArg = ();
-
-    fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> T {
-        assert_or_revert(self, |arg| arg.is_some(), |_| error(&())).unwrap()
-    }
-}
-
-impl<T, Err> Unwrap<T> for Result<T, Err>
-where
-    T: Debug,
-    Err: Debug,
-{
-    type ErrorArg = Err;
-
-    fn unwrap_or_revert<E: Fn(&Self::ErrorArg) -> Error>(self, error: E) -> T {
-        assert_or_revert(
-            self,
-            |arg| arg.is_ok(),
-            |e| error(e.as_ref().err().unwrap()),
-        )
-        .unwrap()
-    }
-}
-
-#[cfg(test)]
-mod assert_or_revert_tests {
-    use crate::network::{
-        assert::{assert_or_revert_bool_with, Assert},
-        error::Error,
-    };
-
-    #[test]
-    fn test_assert_or_revert_bool_with_true() {
-        assert_or_revert_bool_with(true, || Error::ArrayIsEmpty);
-    }
-
-    #[should_panic(expected = "Array is empty")]
-    #[test]
-    fn test_assert_or_revert_bool_with_false() {
-        assert_or_revert_bool_with(false, || Error::ArrayIsEmpty);
-    }
-
-    #[test]
-    fn test_assert_or_revert_correct() {
-        5.assert_or_revert(|&x| x == 5, |&size| Error::SizeNotSupported(size));
-    }
-
-    #[should_panic(expected = "Size not supported: 5")]
-    #[test]
-    fn test_assert_or_revert_wrong() {
-        5.assert_or_revert(|&x| x < 5, |&size| Error::SizeNotSupported(size));
-    }
-}
-
-#[cfg(test)]
-mod unwrap_or_revert_tests {
-    use crate::network::{assert::Unwrap, error::Error};
-
-    #[test]
-    fn test_unwrap_or_revert_some() {
-        let result = Some(543).unwrap_or_revert(|_| Error::CryptographicError(333));
-
-        assert_eq!(result, 543);
-    }
-
-    #[should_panic(expected = "Cryptographic Error: 333")]
-    #[test]
-    fn test_unwrap_or_revert_none() {
-        (Option::<u64>::None).unwrap_or_revert(|_| Error::CryptographicError(333));
-    }
-
-    #[test]
-    fn test_unwrap_or_revert_ok() {
-        let result = Ok(256).unwrap_or_revert(|_: &Error| Error::CryptographicError(333));
-
-        assert_eq!(result, 256);
-    }
-
-    #[should_panic(expected = "Cryptographic Error: 567")]
-    #[test]
-    fn test_unwrap_or_revert_err() {
-        Result::<&[u8], Error>::Err(Error::CryptographicError(567)).unwrap_or_revert(|e| e.clone());
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/src/redstone/network/casper/error.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/network/casper/error.rs.html deleted file mode 100644 index 53deca0d..00000000 --- a/static/rust/redstone/crypto_secp256k1/src/redstone/network/casper/error.rs.html +++ /dev/null @@ -1,17 +0,0 @@ -error.rs - source
1
-2
-3
-4
-5
-6
-7
-8
-
use crate::network::error::Error;
-use casper_types::ApiError;
-
-impl From<Error> for ApiError {
-    fn from(error: Error) -> Self {
-        ApiError::User(error.code())
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/src/redstone/network/casper/from_bytes_repr.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/network/casper/from_bytes_repr.rs.html deleted file mode 100644 index 7d4c10ab..00000000 --- a/static/rust/redstone/crypto_secp256k1/src/redstone/network/casper/from_bytes_repr.rs.html +++ /dev/null @@ -1,21 +0,0 @@ -from_bytes_repr.rs - source
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-
use crate::network::{
-    from_bytes_repr::{FromBytesRepr, Sanitized},
-    specific::U256,
-};
-
-impl FromBytesRepr<Vec<u8>> for U256 {
-    fn from_bytes_repr(bytes: Vec<u8>) -> Self {
-        bytes.sanitized().as_slice().into()
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/src/redstone/network/casper/mod.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/network/casper/mod.rs.html deleted file mode 100644 index 8df66718..00000000 --- a/static/rust/redstone/crypto_secp256k1/src/redstone/network/casper/mod.rs.html +++ /dev/null @@ -1,77 +0,0 @@ -mod.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
-
use crate::network::{error::Error, specific::NetworkSpecific};
-
-mod error;
-mod from_bytes_repr;
-
-pub struct Casper;
-
-impl NetworkSpecific for Casper {
-    type BytesRepr = casper_types::bytesrepr::Bytes;
-    type ValueRepr = casper_types::U256;
-    type _Self = Self;
-
-    const VALUE_SIZE: usize = 32;
-
-    fn print(_text: String) {
-        #[cfg(all(not(test), feature = "print_debug"))]
-        {
-            casper_contract::contract_api::runtime::print(&_text);
-        }
-
-        #[cfg(test)]
-        {
-            println!("{}", _text);
-        }
-    }
-
-    fn revert(error: Error) -> ! {
-        #[cfg(not(test))]
-        {
-            casper_contract::contract_api::runtime::revert(error)
-        }
-
-        #[cfg(test)]
-        {
-            panic!("{}", error)
-        }
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 4c0588a6..00000000 --- a/static/rust/redstone/crypto_secp256k1/src/redstone/network/error.rs.html +++ /dev/null @@ -1,351 +0,0 @@ -error.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-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
-175
-
use crate::network::{
-    as_str::{AsAsciiStr, AsHexStr},
-    specific::U256,
-};
-use std::fmt::{Debug, Display, Formatter};
-
-pub trait ContractErrorContent: Debug {
-    fn code(&self) -> u8;
-    fn message(&self) -> String;
-}
-
-/// 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.
-#[derive(Debug)]
-pub enum Error {
-    /// 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.
-    ContractError(Box<dyn ContractErrorContent>),
-
-    /// Indicates an overflow error with `U256` numbers.
-    ///
-    /// Used when operations on `U256` numbers exceed their maximum value, potentially leading
-    /// to incorrect calculations or state.
-    NumberOverflow(U256),
-
-    /// 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.
-    ArrayIsEmpty,
-
-    /// 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.
-    CryptographicError(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.
-    SizeNotSupported(usize),
-
-    /// 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.
-    WrongRedStoneMarker(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.
-    NonEmptyPayloadRemainder(Vec<u8>),
-
-    /// 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.
-    InsufficientSignerCount(usize, usize, U256),
-
-    /// 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.
-    TimestampTooOld(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.
-    TimestampTooFuture(usize, u64),
-
-    /// 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.
-    ClonedContractError(u8, String),
-}
-
-impl Error {
-    pub fn contract_error<T: ContractErrorContent + 'static>(value: T) -> Error {
-        Error::ContractError(Box::new(value))
-    }
-
-    pub(crate) fn code(&self) -> u16 {
-        match self {
-            Error::ContractError(boxed) => boxed.code() as u16,
-            Error::NumberOverflow(_) => 509,
-            Error::ArrayIsEmpty => 510,
-            Error::WrongRedStoneMarker(_) => 511,
-            Error::NonEmptyPayloadRemainder(_) => 512,
-            Error::InsufficientSignerCount(data_package_index, value, _) => {
-                (2000 + data_package_index * 10 + value) as u16
-            }
-            Error::SizeNotSupported(size) => 600 + *size as u16,
-            Error::CryptographicError(size) => 700 + *size as u16,
-            Error::TimestampTooOld(data_package_index, _) => 1000 + *data_package_index as u16,
-            Error::TimestampTooFuture(data_package_index, _) => 1050 + *data_package_index as u16,
-            Error::ClonedContractError(code, _) => *code as u16,
-        }
-    }
-}
-
-impl Display for Error {
-    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
-        match self {
-            Error::ContractError(boxed) => write!(f, "Contract error: {}", boxed.message()),
-            Error::NumberOverflow(number) => write!(f, "Number overflow: {}", number),
-            Error::ArrayIsEmpty => write!(f, "Array is empty"),
-            Error::CryptographicError(size) => write!(f, "Cryptographic Error: {}", size),
-            Error::SizeNotSupported(size) => write!(f, "Size not supported: {}", size),
-            Error::WrongRedStoneMarker(bytes) => {
-                write!(f, "Wrong RedStone marker: {}", bytes.as_hex_str())
-            }
-            Error::NonEmptyPayloadRemainder(bytes) => {
-                write!(f, "Non empty payload remainder: {}", bytes.as_hex_str())
-            }
-            Error::InsufficientSignerCount(data_package_index, value, feed_id) => write!(
-                f,
-                "Insufficient signer count {} for #{} ({})",
-                value,
-                data_package_index,
-                feed_id.as_ascii_str()
-            ),
-            Error::TimestampTooOld(data_package_index, value) => {
-                write!(
-                    f,
-                    "Timestamp {} is too old for #{}",
-                    value, data_package_index
-                )
-            }
-            Error::TimestampTooFuture(data_package_index, value) => write!(
-                f,
-                "Timestamp {} is too future for #{}",
-                value, data_package_index
-            ),
-            Error::ClonedContractError(_, message) => {
-                write!(f, "(Cloned) Contract error: {}", message)
-            }
-        }
-    }
-}
-
-impl Clone for Error {
-    fn clone(&self) -> Self {
-        match self {
-            Error::ContractError(content) => {
-                Error::ClonedContractError(content.code(), content.message())
-            }
-            Error::NumberOverflow(value) => Error::NumberOverflow(*value),
-            Error::ArrayIsEmpty => Error::ArrayIsEmpty,
-            Error::CryptographicError(size) => Error::CryptographicError(*size),
-            Error::SizeNotSupported(size) => Error::SizeNotSupported(*size),
-            Error::WrongRedStoneMarker(bytes) => Error::WrongRedStoneMarker(bytes.clone()),
-            Error::NonEmptyPayloadRemainder(bytes) => {
-                Error::NonEmptyPayloadRemainder(bytes.clone())
-            }
-            Error::InsufficientSignerCount(count, needed, bytes) => {
-                Error::InsufficientSignerCount(*count, *needed, *bytes)
-            }
-            Error::TimestampTooOld(index, timestamp) => Error::TimestampTooOld(*index, *timestamp),
-            Error::TimestampTooFuture(index, timestamp) => {
-                Error::TimestampTooFuture(*index, *timestamp)
-            }
-            Error::ClonedContractError(code, message) => {
-                Error::ClonedContractError(*code, message.as_str().into())
-            }
-        }
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index f8226f69..00000000 --- a/static/rust/redstone/crypto_secp256k1/src/redstone/network/flattened.rs.html +++ /dev/null @@ -1,71 +0,0 @@ -flattened.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
-
use crate::network::specific::Bytes;
-
-pub trait Flattened<T> {
-    fn flattened(&self) -> T;
-}
-
-impl Flattened<Bytes> for Vec<Bytes> {
-    fn flattened(&self) -> Bytes {
-        #[allow(clippy::useless_conversion)]
-        self.iter().flatten().copied().collect::<Vec<_>>().into()
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use crate::network::{flattened::Flattened, specific::Bytes};
-
-    #[test]
-    fn test_bytes_flattened() {
-        #[allow(clippy::useless_conversion)]
-        let bytes: Vec<Bytes> = vec![
-            vec![1u8, 2, 3].into(),
-            vec![4u8].into(),
-            vec![].into(),
-            vec![5, 6, 7].into(),
-        ];
-
-        let result: Bytes = bytes.flattened();
-
-        #[allow(clippy::useless_conversion)]
-        let expected_result: Bytes = vec![1u8, 2, 3, 4, 5, 6, 7].into();
-
-        assert_eq!(result, expected_result);
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 0c7663c5..00000000 --- a/static/rust/redstone/crypto_secp256k1/src/redstone/network/from_bytes_repr.rs.html +++ /dev/null @@ -1,257 +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
-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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-
use crate::network::specific::VALUE_SIZE;
-
-pub trait FromBytesRepr<T> {
-    fn from_bytes_repr(bytes: T) -> Self;
-}
-
-pub trait Sanitized {
-    fn sanitized(self) -> Self;
-}
-
-impl Sanitized for Vec<u8> {
-    fn sanitized(self) -> Self {
-        if self.len() <= VALUE_SIZE {
-            return self;
-        }
-
-        let index = self.len().max(VALUE_SIZE) - VALUE_SIZE;
-        let remainder = &self[0..index];
-
-        if remainder != vec![0; index] {
-            panic!("Number to big: {:?} digits", self.len())
-        }
-
-        self[index..].into()
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use crate::network::{
-        from_bytes_repr::FromBytesRepr,
-        specific::{U256, VALUE_SIZE},
-    };
-
-    #[cfg(feature = "network_radix")]
-    use crate::network::radix::u256_ext::U256Ext;
-
-    #[test]
-    fn test_from_bytes_repr_single() {
-        let vec = vec![1];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(1u32));
-    }
-
-    #[test]
-    fn test_from_bytes_repr_double() {
-        let vec = vec![1, 2];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(258u32));
-    }
-
-    #[test]
-    fn test_from_bytes_repr_simple() {
-        let vec = vec![1, 2, 3];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(66051u32));
-    }
-
-    #[test]
-    fn test_from_bytes_repr_bigger() {
-        let vec = vec![101, 202, 255];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(6671103u32));
-    }
-
-    #[test]
-    fn test_from_bytes_repr_empty() {
-        let result = U256::from_bytes_repr(Vec::new());
-
-        assert_eq!(result, U256::from(0u8));
-    }
-
-    #[test]
-    fn test_from_bytes_repr_trailing_zeroes() {
-        let vec = vec![1, 2, 3, 0];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(16909056u32));
-    }
-
-    #[test]
-    fn test_from_bytes_repr_leading_zeroes() {
-        let vec = vec![0, 1, 2, 3];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(66051u32));
-    }
-
-    #[allow(clippy::legacy_numeric_constants)]
-    #[test]
-    fn test_from_bytes_repr_max() {
-        let vec = vec![255; VALUE_SIZE];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::max_value());
-    }
-
-    #[test]
-    fn test_from_bytes_repr_min() {
-        let vec = vec![0; VALUE_SIZE];
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::from(0u8));
-    }
-
-    #[should_panic(expected = "Number to big")]
-    #[test]
-    fn test_from_bytes_repr_too_long() {
-        let x = VALUE_SIZE as u8 + 1;
-        let vec = (1..=x).collect();
-
-        U256::from_bytes_repr(vec);
-    }
-
-    #[allow(clippy::legacy_numeric_constants)]
-    #[test]
-    fn test_from_bytes_repr_too_long_but_zeroes() {
-        let mut vec = vec![255; VALUE_SIZE + 1];
-        vec[0] = 0;
-        let result = U256::from_bytes_repr(vec);
-
-        assert_eq!(result, U256::max_value());
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index f79fb758..00000000 --- a/static/rust/redstone/crypto_secp256k1/src/redstone/network/mod.rs.html +++ /dev/null @@ -1,51 +0,0 @@ -mod.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
-
pub mod as_str;
-pub mod assert;
-pub mod error;
-pub mod from_bytes_repr;
-pub mod print_debug;
-pub mod specific;
-
-#[cfg(feature = "network_casper")]
-pub mod casper;
-
-#[cfg(feature = "network_casper")]
-pub type _Network = casper::Casper;
-
-#[cfg(feature = "network_radix")]
-pub mod radix;
-
-#[cfg(feature = "network_radix")]
-pub type _Network = radix::Radix;
-
-pub mod flattened;
-#[cfg(all(not(feature = "network_casper"), not(feature = "network_radix")))]
-mod pure;
-
-#[cfg(all(not(feature = "network_casper"), not(feature = "network_radix")))]
-pub type _Network = pure::Std;
-
\ No newline at end of file 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 deleted file mode 100644 index 1fca4faf..00000000 --- a/static/rust/redstone/crypto_secp256k1/src/redstone/network/print_debug.rs.html +++ /dev/null @@ -1,47 +0,0 @@ -print_debug.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
-
extern crate alloc;
-
-#[macro_export]
-macro_rules! print_debug {
-    ($fmt:expr) => {
-        $crate::network::specific::print(format!($fmt))
-    };
-    ($fmt:expr, $($args:tt)*) => {
-        $crate::network::specific::print(format!($fmt, $($args)*))
-    };
-}
-
-#[macro_export]
-macro_rules! print_and_panic {
-    ($fmt:expr) => {{
-        $crate::print_debug!($fmt);
-        panic!($fmt)
-    }};
-    ($fmt:expr, $($args:tt)*) => {{
-        $crate::print_debug!($fmt, $($args)*);
-        panic!($fmt, $($args)*)
-    }};
-}
-
\ No newline at end of file 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 deleted file mode 100644 index dfb1ae60..00000000 --- a/static/rust/redstone/crypto_secp256k1/src/redstone/network/pure/from_bytes_repr.rs.html +++ /dev/null @@ -1,21 +0,0 @@ -from_bytes_repr.rs - source
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-
use crate::network::{
-    from_bytes_repr::{FromBytesRepr, Sanitized},
-    specific::U256,
-};
-
-impl FromBytesRepr<Vec<u8>> for U256 {
-    fn from_bytes_repr(bytes: Vec<u8>) -> Self {
-        Self::from_big_endian(bytes.sanitized().as_slice())
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 36cc7a10..00000000 --- a/static/rust/redstone/crypto_secp256k1/src/redstone/network/pure/mod.rs.html +++ /dev/null @@ -1,47 +0,0 @@ -mod.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
-
use crate::network::{error::Error, specific::NetworkSpecific};
-use primitive_types::U256;
-use std::eprintln;
-
-mod from_bytes_repr;
-
-pub struct Std;
-
-impl NetworkSpecific for Std {
-    type BytesRepr = Vec<u8>;
-    type ValueRepr = U256;
-    type _Self = Std;
-
-    const VALUE_SIZE: usize = 32;
-
-    fn print(text: String) {
-        eprintln!("{}", text)
-    }
-
-    fn revert(error: Error) -> ! {
-        panic!("{}", error)
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 8d698709..00000000 --- a/static/rust/redstone/crypto_secp256k1/src/redstone/network/specific.rs.html +++ /dev/null @@ -1,51 +0,0 @@ -specific.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
-
use crate::network::{_Network, error::Error, from_bytes_repr::FromBytesRepr};
-
-pub trait NetworkSpecific {
-    type BytesRepr: From<Vec<u8>> + Into<Vec<u8>>;
-    type ValueRepr: FromBytesRepr<Vec<u8>>;
-    type _Self;
-
-    const VALUE_SIZE: usize;
-
-    fn print(_text: String);
-    fn revert(error: Error) -> !;
-}
-
-pub(crate) type Network = <_Network as NetworkSpecific>::_Self;
-pub type Bytes = <_Network as NetworkSpecific>::BytesRepr;
-pub type U256 = <_Network as NetworkSpecific>::ValueRepr;
-pub const VALUE_SIZE: usize = <_Network as NetworkSpecific>::VALUE_SIZE;
-
-pub fn print(_text: String) {
-    Network::print(_text)
-}
-
-pub fn revert(error: Error) -> ! {
-    Network::revert(error)
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 3e2f4fd5..00000000 --- a/static/rust/redstone/crypto_secp256k1/src/redstone/protocol/constants.rs.html +++ /dev/null @@ -1,23 +0,0 @@ -constants.rs - source
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-
pub(crate) const UNSIGNED_METADATA_BYTE_SIZE_BS: usize = 3;
-pub(crate) const DATA_PACKAGES_COUNT_BS: usize = 2;
-pub(crate) const DATA_POINTS_COUNT_BS: usize = 3;
-pub(crate) const SIGNATURE_BS: usize = 65;
-pub(crate) const DATA_POINT_VALUE_BYTE_SIZE_BS: usize = 4;
-pub(crate) const DATA_FEED_ID_BS: usize = 32;
-pub(crate) const TIMESTAMP_BS: usize = 6;
-pub(crate) const MAX_TIMESTAMP_DELAY_MS: u64 = 15 * 60 * 1000; // 15 minutes in milliseconds
-pub(crate) const MAX_TIMESTAMP_AHEAD_MS: u64 = 3 * 60 * 1000; // 3 minutes in milliseconds
-pub(crate) const REDSTONE_MARKER_BS: usize = 9;
-pub(crate) const REDSTONE_MARKER: [u8; 9] = [0, 0, 2, 237, 87, 1, 30, 0, 0]; // 0x000002ed57011e0000
-
\ No newline at end of file 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 deleted file mode 100644 index a1d603e6..00000000 --- a/static/rust/redstone/crypto_secp256k1/src/redstone/protocol/data_package.rs.html +++ /dev/null @@ -1,431 +0,0 @@ -data_package.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-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
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-
use crate::{
-    crypto::recover::recover_address,
-    network::as_str::AsHexStr,
-    protocol::{
-        constants::{
-            DATA_FEED_ID_BS, DATA_POINTS_COUNT_BS, DATA_POINT_VALUE_BYTE_SIZE_BS, SIGNATURE_BS,
-            TIMESTAMP_BS,
-        },
-        data_point::{trim_data_points, DataPoint},
-    },
-    utils::trim::Trim,
-};
-use std::fmt::{Debug, Formatter};
-
-#[derive(Clone, PartialEq, Eq)]
-pub(crate) struct DataPackage {
-    pub(crate) signer_address: Vec<u8>,
-    pub(crate) timestamp: u64,
-    pub(crate) data_points: Vec<DataPoint>,
-}
-
-pub(crate) fn trim_data_packages(payload: &mut Vec<u8>, count: usize) -> Vec<DataPackage> {
-    let mut data_packages = Vec::new();
-
-    for _ in 0..count {
-        let data_package = trim_data_package(payload);
-        data_packages.push(data_package);
-    }
-
-    data_packages
-}
-
-fn trim_data_package(payload: &mut Vec<u8>) -> DataPackage {
-    let signature = payload.trim_end(SIGNATURE_BS);
-    let mut tmp = payload.clone();
-
-    let data_point_count = payload.trim_end(DATA_POINTS_COUNT_BS);
-    let value_size = payload.trim_end(DATA_POINT_VALUE_BYTE_SIZE_BS);
-    let timestamp = payload.trim_end(TIMESTAMP_BS);
-    let size = data_point_count * (value_size + DATA_FEED_ID_BS)
-        + DATA_POINT_VALUE_BYTE_SIZE_BS
-        + TIMESTAMP_BS
-        + DATA_POINTS_COUNT_BS;
-
-    let signable_bytes = tmp.trim_end(size);
-    let signer_address = recover_address(signable_bytes, signature);
-
-    let data_points = trim_data_points(payload, data_point_count, value_size);
-
-    DataPackage {
-        data_points,
-        timestamp,
-        signer_address,
-    }
-}
-
-impl Debug for DataPackage {
-    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
-        write!(
-            f,
-            "DataPackage {{\n   signer_address: 0x{}, timestamp: {},\n   data_points: {:?}\n}}",
-            self.signer_address.as_hex_str(),
-            self.timestamp,
-            self.data_points
-        )
-    }
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        helpers::hex::hex_to_bytes,
-        network::{from_bytes_repr::FromBytesRepr, specific::U256},
-        protocol::{
-            constants::{
-                DATA_FEED_ID_BS, DATA_POINTS_COUNT_BS, DATA_POINT_VALUE_BYTE_SIZE_BS, SIGNATURE_BS,
-                TIMESTAMP_BS,
-            },
-            data_package::{trim_data_package, trim_data_packages, DataPackage},
-            data_point::DataPoint,
-        },
-    };
-
-    const DATA_PACKAGE_BYTES_1: &str = "4554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000360cafc94e018d79bf0ba00000002000000151afa8c5c3caf6004b42c0fb17723e524f993b9ecbad3b9bce5ec74930fa436a3660e8edef10e96ee5f222de7ef5787c02ca467c0ec18daa2907b43ac20c63c11c";
-    const DATA_PACKAGE_BYTES_2: &str = "4554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000360cdd851e018d79bf0ba000000020000001473fd9dc72e6814a7de719b403cf4c9eba08934a643fd0666c433b806b31e69904f2226ffd3c8ef75861b11b5e32a1fda4b1458e0da4605a772dfba2a812f3ee1b";
-
-    const SIGNER_ADDRESS_1: &str = "1ea62d73edf8ac05dfcea1a34b9796e937a29eff";
-    const SIGNER_ADDRESS_2: &str = "109b4a318a4f5ddcbca6349b45f881b4137deafb";
-
-    const VALUE_1: u128 = 232141080910;
-    const VALUE_2: u128 = 232144078110;
-
-    const DATA_PACKAGE_SIZE: usize = 32
-        + DATA_FEED_ID_BS
-        + DATA_POINT_VALUE_BYTE_SIZE_BS
-        + TIMESTAMP_BS
-        + SIGNATURE_BS
-        + DATA_POINTS_COUNT_BS;
-
-    #[test]
-    fn test_trim_data_packages() {
-        test_trim_data_packages_of(2, "");
-        test_trim_data_packages_of(0, "");
-        test_trim_data_packages_of(1, "");
-    }
-
-    #[test]
-    fn test_trim_data_packages_with_prefix() {
-        let prefix = "da4687f1914a1c";
-
-        test_trim_data_packages_of(2, prefix);
-    }
-
-    #[test]
-    fn test_trim_data_packages_single() {
-        let mut bytes = hex_to_bytes(DATA_PACKAGE_BYTES_1.into());
-        let data_packages = trim_data_packages(&mut bytes, 1);
-        assert_eq!(data_packages.len(), 1);
-        assert_eq!(bytes, Vec::<u8>::new());
-
-        verify_data_package(data_packages[0].clone(), VALUE_1, SIGNER_ADDRESS_1);
-    }
-
-    fn test_trim_data_packages_of(count: usize, prefix: &str) {
-        let input: Vec<u8> =
-            hex_to_bytes((prefix.to_owned() + DATA_PACKAGE_BYTES_1) + DATA_PACKAGE_BYTES_2);
-        let mut bytes = input.clone();
-        let data_packages = trim_data_packages(&mut bytes, count);
-
-        assert_eq!(data_packages.len(), count);
-        assert_eq!(
-            bytes.as_slice(),
-            &input[..input.len() - count * DATA_PACKAGE_SIZE]
-        );
-
-        let values = &[VALUE_2, VALUE_1];
-        let signers = &[SIGNER_ADDRESS_2, SIGNER_ADDRESS_1];
-
-        for i in 0..count {
-            verify_data_package(data_packages[i].clone(), values[i], signers[i]);
-        }
-    }
-
-    #[should_panic(expected = "index out of bounds")]
-    #[test]
-    fn test_trim_data_packages_bigger_number() {
-        test_trim_data_packages_of(3, "");
-    }
-
-    #[test]
-    fn test_trim_data_package() {
-        test_trim_data_package_of(DATA_PACKAGE_BYTES_1, VALUE_1, SIGNER_ADDRESS_1);
-        test_trim_data_package_of(DATA_PACKAGE_BYTES_2, VALUE_2, SIGNER_ADDRESS_2);
-    }
-
-    #[test]
-    fn test_trim_data_package_with_prefix() {
-        test_trim_data_package_of(
-            &("da4687f1914a1c".to_owned() + DATA_PACKAGE_BYTES_1),
-            VALUE_1,
-            SIGNER_ADDRESS_1,
-        );
-        test_trim_data_package_of(
-            &("da4687f1914a1c".to_owned() + DATA_PACKAGE_BYTES_2),
-            VALUE_2,
-            SIGNER_ADDRESS_2,
-        );
-    }
-
-    #[should_panic]
-    #[test]
-    fn test_trim_data_package_signature_only() {
-        test_trim_data_package_of(
-            &DATA_PACKAGE_BYTES_1[(DATA_PACKAGE_BYTES_1.len() - 2 * SIGNATURE_BS)..],
-            0,
-            "",
-        );
-    }
-
-    #[should_panic]
-    #[test]
-    fn test_trim_data_package_shorter() {
-        test_trim_data_package_of(
-            &DATA_PACKAGE_BYTES_1
-                [(DATA_PACKAGE_BYTES_1.len() - 2 * (SIGNATURE_BS + DATA_POINTS_COUNT_BS))..],
-            0,
-            "",
-        );
-    }
-
-    fn test_trim_data_package_of(bytes_str: &str, expected_value: u128, signer_address: &str) {
-        let mut bytes: Vec<u8> = hex_to_bytes(bytes_str.into());
-        let result = trim_data_package(&mut bytes);
-        assert_eq!(
-            bytes,
-            hex_to_bytes(bytes_str[..bytes_str.len() - 2 * (DATA_PACKAGE_SIZE)].into())
-        );
-
-        verify_data_package(result, expected_value, signer_address);
-    }
-
-    fn verify_data_package(result: DataPackage, expected_value: u128, signer_address: &str) {
-        let data_package = DataPackage {
-            data_points: vec![DataPoint {
-                feed_id: U256::from_bytes_repr(hex_to_bytes(DATA_PACKAGE_BYTES_1[..6].into())),
-                value: U256::from(expected_value),
-            }],
-            timestamp: 1707144580000,
-            signer_address: hex_to_bytes(signer_address.into()),
-        };
-
-        assert_eq!(result, data_package);
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index e643085a..00000000 --- a/static/rust/redstone/crypto_secp256k1/src/redstone/protocol/data_point.rs.html +++ /dev/null @@ -1,315 +0,0 @@ -data_point.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-
use crate::{
-    network::{
-        as_str::{AsAsciiStr, AsHexStr},
-        assert::Assert,
-        error::Error,
-        from_bytes_repr::FromBytesRepr,
-        specific::U256,
-    },
-    protocol::constants::DATA_FEED_ID_BS,
-    utils::{trim::Trim, trim_zeros::TrimZeros},
-};
-use std::fmt::{Debug, Formatter};
-
-#[derive(Clone, PartialEq, Eq)]
-pub(crate) struct DataPoint {
-    pub(crate) feed_id: U256,
-    pub(crate) value: U256,
-}
-
-pub(crate) fn trim_data_points(
-    payload: &mut Vec<u8>,
-    count: usize,
-    value_size: usize,
-) -> Vec<DataPoint> {
-    count.assert_or_revert(|&count| count == 1, |&count| Error::SizeNotSupported(count));
-
-    let mut data_points = Vec::new();
-
-    for _ in 0..count {
-        let data_point = trim_data_point(payload, value_size);
-        data_points.push(data_point);
-    }
-
-    data_points
-}
-
-fn trim_data_point(payload: &mut Vec<u8>, value_size: usize) -> DataPoint {
-    let value = payload.trim_end(value_size);
-    let feed_id: Vec<u8> = payload.trim_end(DATA_FEED_ID_BS);
-
-    DataPoint {
-        value,
-        feed_id: U256::from_bytes_repr(feed_id.trim_zeros()),
-    }
-}
-
-impl Debug for DataPoint {
-    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
-        write!(
-            f,
-            "DataPoint {{\n      feed_id: {:?} (0x{}), value: {}\n   }}",
-            self.feed_id.as_ascii_str(),
-            self.feed_id.as_hex_str(),
-            self.value,
-        )
-    }
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        helpers::hex::hex_to_bytes,
-        network::{
-            from_bytes_repr::FromBytesRepr,
-            specific::{U256, VALUE_SIZE},
-        },
-        protocol::{
-            constants::DATA_FEED_ID_BS,
-            data_point::{trim_data_point, trim_data_points, DataPoint},
-        },
-    };
-    use std::ops::Shr;
-
-    const DATA_POINT_BYTES_TAIL: &str = "4554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000360cafc94e";
-    const VALUE: u128 = 232141080910;
-
-    #[test]
-    fn test_trim_data_points() {
-        let mut bytes = hex_to_bytes(DATA_POINT_BYTES_TAIL.into());
-        let result = trim_data_points(&mut bytes, 1, 32);
-
-        assert_eq!(result.len(), 1);
-
-        verify_rest_and_result(
-            DATA_POINT_BYTES_TAIL,
-            32,
-            VALUE.into(),
-            bytes,
-            result[0].clone(),
-        )
-    }
-
-    #[should_panic(expected = "Size not supported: 0")]
-    #[test]
-    fn test_trim_zero_data_points() {
-        trim_data_points(&mut hex_to_bytes(DATA_POINT_BYTES_TAIL.into()), 0, 32);
-    }
-
-    #[should_panic(expected = "Size not supported: 2")]
-    #[test]
-    fn test_trim_two_data_points() {
-        trim_data_points(&mut hex_to_bytes(DATA_POINT_BYTES_TAIL.into()), 2, 32);
-    }
-
-    #[test]
-    fn test_trim_data_point() {
-        test_trim_data_point_of(DATA_POINT_BYTES_TAIL, 32, VALUE.into());
-    }
-
-    #[test]
-    fn test_trim_data_point_with_prefix() {
-        test_trim_data_point_of(
-            &("a2a812f3ee1b".to_owned() + DATA_POINT_BYTES_TAIL),
-            32,
-            VALUE.into(),
-        );
-    }
-
-    #[test]
-    fn test_trim_data_point_other_lengths() {
-        for i in 1..VALUE_SIZE {
-            test_trim_data_point_of(
-                &DATA_POINT_BYTES_TAIL[..DATA_POINT_BYTES_TAIL.len() - 2 * i],
-                32 - i,
-                U256::from(VALUE).shr(8 * i as u32),
-            );
-        }
-    }
-
-    fn test_trim_data_point_of(value: &str, size: usize, expected_value: U256) {
-        let mut bytes = hex_to_bytes(value.into());
-        let result = trim_data_point(&mut bytes, size);
-
-        verify_rest_and_result(value, size, expected_value, bytes, result);
-    }
-
-    fn verify_rest_and_result(
-        value: &str,
-        size: usize,
-        expected_value: U256,
-        rest: Vec<u8>,
-        result: DataPoint,
-    ) {
-        assert_eq!(
-            rest,
-            hex_to_bytes(value[..value.len() - 2 * (size + DATA_FEED_ID_BS)].into())
-        );
-
-        let data_point = DataPoint {
-            value: expected_value,
-            feed_id: U256::from_bytes_repr(hex_to_bytes(DATA_POINT_BYTES_TAIL[..6].to_string())),
-        };
-
-        assert_eq!(result, data_point);
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 15b31817..00000000 --- a/static/rust/redstone/crypto_secp256k1/src/redstone/protocol/marker.rs.html +++ /dev/null @@ -1,133 +0,0 @@ -marker.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-
use crate::{
-    network::{assert::Assert, error::Error},
-    protocol::constants::{REDSTONE_MARKER, REDSTONE_MARKER_BS},
-    utils::trim::Trim,
-};
-
-pub fn trim_redstone_marker(payload: &mut Vec<u8>) {
-    let marker: Vec<u8> = payload.trim_end(REDSTONE_MARKER_BS);
-
-    marker.as_slice().assert_or_revert(
-        |&marker| marker == REDSTONE_MARKER,
-        |&val| Error::WrongRedStoneMarker(val.into()),
-    );
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        helpers::hex::hex_to_bytes,
-        protocol::{constants::REDSTONE_MARKER_BS, marker::trim_redstone_marker},
-    };
-
-    const PAYLOAD_TAIL: &str = "1c000f000000000002ed57011e0000";
-
-    #[test]
-    fn test_trim_redstone_marker() {
-        let mut bytes = hex_to_bytes(PAYLOAD_TAIL.into());
-        trim_redstone_marker(&mut bytes);
-
-        assert_eq!(
-            bytes,
-            hex_to_bytes(PAYLOAD_TAIL[..PAYLOAD_TAIL.len() - 2 * REDSTONE_MARKER_BS].into())
-        );
-    }
-
-    #[should_panic(expected = "Wrong RedStone marker: 000002ed57022e0000")]
-    #[test]
-    fn test_trim_redstone_marker_wrong() {
-        trim_redstone_marker(&mut hex_to_bytes(PAYLOAD_TAIL.replace('1', "2")));
-    }
-
-    #[should_panic(expected = "Wrong RedStone marker: 00000002ed57011e00")]
-    #[test]
-    fn test_trim_redstone_marker_wrong_ending() {
-        trim_redstone_marker(&mut hex_to_bytes(
-            PAYLOAD_TAIL[..PAYLOAD_TAIL.len() - 2].into(),
-        ));
-    }
-
-    #[should_panic(expected = "Wrong RedStone marker: 100002ed57011e0000")]
-    #[test]
-    fn test_trim_redstone_marker_wrong_beginning() {
-        trim_redstone_marker(&mut hex_to_bytes(
-            PAYLOAD_TAIL.replace("0000000", "1111111"),
-        ));
-    }
-
-    #[should_panic(expected = "Wrong RedStone marker: 0002ed57011e0000")]
-    #[test]
-    fn test_trim_redstone_marker_too_short() {
-        trim_redstone_marker(&mut hex_to_bytes(
-            PAYLOAD_TAIL[PAYLOAD_TAIL.len() - 2 * (REDSTONE_MARKER_BS - 1)..].into(),
-        ));
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index fbd60f5b..00000000 --- a/static/rust/redstone/crypto_secp256k1/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/src/redstone/protocol/payload.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/protocol/payload.rs.html deleted file mode 100644 index 1cd14131..00000000 --- a/static/rust/redstone/crypto_secp256k1/src/redstone/protocol/payload.rs.html +++ /dev/null @@ -1,209 +0,0 @@ -payload.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-
use crate::{
-    network::{assert::Assert, error::Error},
-    protocol::{
-        constants::{DATA_PACKAGES_COUNT_BS, UNSIGNED_METADATA_BYTE_SIZE_BS},
-        data_package::{trim_data_packages, DataPackage},
-        marker,
-    },
-    utils::trim::Trim,
-};
-
-#[derive(Clone, Debug)]
-pub(crate) struct Payload {
-    pub(crate) data_packages: Vec<DataPackage>,
-}
-
-impl Payload {
-    pub(crate) fn make(payload_bytes: &mut Vec<u8>) -> Payload {
-        marker::trim_redstone_marker(payload_bytes);
-        let payload = trim_payload(payload_bytes);
-
-        payload_bytes.assert_or_revert(
-            |bytes| bytes.is_empty(),
-            |bytes| Error::NonEmptyPayloadRemainder(bytes.as_slice().into()),
-        );
-
-        payload
-    }
-}
-
-fn trim_payload(payload: &mut Vec<u8>) -> Payload {
-    let data_package_count = trim_metadata(payload);
-    let data_packages = trim_data_packages(payload, data_package_count);
-
-    Payload { data_packages }
-}
-
-fn trim_metadata(payload: &mut Vec<u8>) -> usize {
-    let unsigned_metadata_size = payload.trim_end(UNSIGNED_METADATA_BYTE_SIZE_BS);
-    let _: Vec<u8> = payload.trim_end(unsigned_metadata_size);
-
-    payload.trim_end(DATA_PACKAGES_COUNT_BS)
-}
-
-#[cfg(feature = "helpers")]
-#[cfg(test)]
-mod tests {
-    use crate::{
-        helpers::hex::{hex_to_bytes, read_payload_bytes, read_payload_hex},
-        protocol::{
-            constants::REDSTONE_MARKER_BS,
-            payload::{trim_metadata, trim_payload, Payload},
-        },
-    };
-
-    const PAYLOAD_METADATA_BYTES: &str = "000f000000";
-    const PAYLOAD_METADATA_WITH_UNSIGNED_BYTE: &str = "000f55000001";
-    const PAYLOAD_METADATA_WITH_UNSIGNED_BYTES: &str = "000f11223344556677889900aabbccddeeff000010";
-
-    #[test]
-    fn test_trim_metadata() {
-        let prefix = "9e0294371c";
-
-        for &bytes_str in &[
-            PAYLOAD_METADATA_BYTES,
-            PAYLOAD_METADATA_WITH_UNSIGNED_BYTE,
-            PAYLOAD_METADATA_WITH_UNSIGNED_BYTES,
-        ] {
-            let mut bytes = hex_to_bytes(prefix.to_owned() + bytes_str);
-            let result = trim_metadata(&mut bytes);
-
-            assert_eq!(bytes, hex_to_bytes(prefix.into()));
-            assert_eq!(result, 15);
-        }
-    }
-
-    #[test]
-    fn test_trim_payload() {
-        let payload_hex = read_payload_bytes("./sample-data/payload.hex");
-
-        let mut bytes = payload_hex[..payload_hex.len() - REDSTONE_MARKER_BS].into();
-        let payload = trim_payload(&mut bytes);
-
-        assert_eq!(bytes, Vec::<u8>::new());
-        assert_eq!(payload.data_packages.len(), 15);
-    }
-
-    #[test]
-    fn test_make_payload() {
-        let mut payload_hex = read_payload_bytes("./sample-data/payload.hex");
-        let payload = Payload::make(&mut payload_hex);
-
-        assert_eq!(payload.data_packages.len(), 15);
-    }
-
-    #[should_panic(expected = "Non empty payload remainder: 12")]
-    #[test]
-    fn test_make_payload_with_prefix() {
-        let payload_hex = read_payload_hex("./sample-data/payload.hex");
-        let mut bytes = hex_to_bytes("12".to_owned() + &payload_hex);
-        let payload = Payload::make(&mut bytes);
-
-        assert_eq!(payload.data_packages.len(), 15);
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index f28b29ef..00000000 --- a/static/rust/redstone/crypto_secp256k1/src/redstone/utils/filter.rs.html +++ /dev/null @@ -1,43 +0,0 @@ -filter.rs - source
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-
pub(crate) trait FilterSome<Output> {
-    fn filter_some(&self) -> Output;
-}
-
-impl<T: Copy> FilterSome<Vec<T>> for [Option<T>] {
-    fn filter_some(&self) -> Vec<T> {
-        self.iter().filter_map(|&opt| opt).collect()
-    }
-}
-
-#[cfg(test)]
-mod filter_some_tests {
-    use crate::utils::filter::FilterSome;
-
-    #[test]
-    fn test_filter_some() {
-        let values = [None, Some(23u64), None, Some(12), Some(12), None, Some(23)];
-
-        assert_eq!(values.filter_some(), vec![23, 12, 12, 23])
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index c329ff3b..00000000 --- a/static/rust/redstone/crypto_secp256k1/src/redstone/utils/median.rs.html +++ /dev/null @@ -1,375 +0,0 @@ -median.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-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
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-
use crate::network::{assert::Assert, error::Error::ArrayIsEmpty, specific::U256};
-use std::ops::{Add, Rem, Shr};
-
-pub(crate) trait Median {
-    type Item;
-
-    fn median(self) -> Self::Item;
-}
-
-trait Avg {
-    fn avg(self, other: Self) -> Self;
-}
-
-trait Averageable:
-    Add<Output = Self> + Shr<Output = Self> + From<u8> + Rem<Output = Self> + Copy
-{
-}
-
-impl Averageable for i32 {}
-
-#[cfg(feature = "network_radix")]
-impl Avg for U256 {
-    fn avg(self, other: Self) -> Self {
-        let one = 1u32;
-        let two = U256::from(2u8);
-
-        self.shr(one) + other.shr(one) + (self % two + other % two).shr(one)
-    }
-}
-
-#[cfg(not(feature = "network_radix"))]
-impl Averageable for U256 {}
-
-impl<T> Avg for T
-where
-    T: Averageable,
-{
-    fn avg(self, other: Self) -> Self {
-        let one = T::from(1);
-        let two = T::from(2);
-
-        self.shr(one) + other.shr(one) + (self % two + other % two).shr(one)
-    }
-}
-
-impl<T> Median for Vec<T>
-where
-    T: Copy + Ord + Avg,
-{
-    type Item = T;
-
-    fn median(self) -> Self::Item {
-        let len = self.len();
-
-        match len.assert_or_revert(|x| *x > 0, |_| ArrayIsEmpty) {
-            1 => self[0],
-            2 => self[0].avg(self[1]),
-            3 => maybe_pick_median(self[0], self[1], self[2]).unwrap_or_else(|| {
-                maybe_pick_median(self[1], self[0], self[2])
-                    .unwrap_or_else(|| maybe_pick_median(self[1], self[2], self[0]).unwrap())
-            }),
-            _ => {
-                let mut values = self;
-                values.sort();
-
-                let mid = len / 2;
-
-                if len % 2 == 0 {
-                    values[mid - 1].avg(values[mid])
-                } else {
-                    values[mid]
-                }
-            }
-        }
-    }
-}
-
-#[inline]
-fn maybe_pick_median<T>(a: T, b: T, c: T) -> Option<T>
-where
-    T: PartialOrd,
-{
-    if (b >= a && b <= c) || (b >= c && b <= a) {
-        Some(b)
-    } else {
-        None
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use super::{Avg, Median};
-    use crate::network::specific::U256;
-    use itertools::Itertools;
-    use std::fmt::Debug;
-
-    #[cfg(feature = "network_radix")]
-    use crate::network::radix::u256_ext::U256Ext;
-
-    #[allow(clippy::legacy_numeric_constants)]
-    #[test]
-    fn test_avg() {
-        let u256 = U256::max_value(); // 115792089237316195423570985008687907853269984665640564039457584007913129639935
-        let u256_max_sub_1 = u256 - U256::from(1u32);
-        let u256max_div_2 = u256 / U256::from(2u32);
-
-        assert_eq!(u256.avg(U256::from(0u8)), u256max_div_2);
-        assert_eq!(u256.avg(U256::from(1u8)), u256max_div_2 + U256::from(1u8));
-        assert_eq!(u256.avg(u256_max_sub_1), u256_max_sub_1);
-        assert_eq!(u256.avg(u256), u256);
-
-        assert_eq!((u256_max_sub_1).avg(U256::from(0u8)), u256max_div_2);
-        assert_eq!((u256_max_sub_1).avg(U256::from(1u8)), u256max_div_2);
-        assert_eq!((u256_max_sub_1).avg(u256_max_sub_1), u256_max_sub_1);
-        assert_eq!((u256_max_sub_1).avg(u256), u256_max_sub_1);
-    }
-
-    #[test]
-    #[should_panic(expected = "Array is empty")]
-    fn test_median_empty_vector() {
-        let vec: Vec<i32> = vec![];
-
-        vec.median();
-    }
-
-    #[test]
-    fn test_median_single_element() {
-        assert_eq!(vec![1].median(), 1);
-    }
-
-    #[test]
-    fn test_median_two_elements() {
-        test_all_permutations(vec![1, 3], 2);
-        test_all_permutations(vec![1, 2], 1);
-        test_all_permutations(vec![1, 1], 1);
-    }
-
-    #[test]
-    fn test_median_three_elements() {
-        test_all_permutations(vec![1, 2, 3], 2);
-        test_all_permutations(vec![1, 1, 2], 1);
-        test_all_permutations(vec![1, 2, 2], 2);
-        test_all_permutations(vec![1, 1, 1], 1);
-    }
-
-    #[test]
-    fn test_median_even_number_of_elements() {
-        test_all_permutations(vec![1, 2, 3, 4], 2);
-        test_all_permutations(vec![1, 2, 4, 4], 3);
-        test_all_permutations(vec![1, 1, 3, 3], 2);
-        test_all_permutations(vec![1, 1, 3, 4], 2);
-        test_all_permutations(vec![1, 1, 1, 3], 1);
-        test_all_permutations(vec![1, 3, 3, 3], 3);
-        test_all_permutations(vec![1, 1, 1, 1], 1);
-        test_all_permutations(vec![1, 2, 3, 4, 5, 6], 3);
-    }
-
-    #[test]
-    fn test_median_odd_number_of_elements() {
-        test_all_permutations(vec![1, 2, 3, 4, 5], 3);
-        test_all_permutations(vec![1, 1, 3, 4, 5], 3);
-        test_all_permutations(vec![1, 1, 1, 4, 5], 1);
-        test_all_permutations(vec![1, 1, 1, 3, 3], 1);
-        test_all_permutations(vec![1, 1, 3, 3, 5], 3);
-
-        test_all_permutations(vec![1, 2, 3, 5, 5], 3);
-        test_all_permutations(vec![1, 2, 5, 5, 5], 5);
-        test_all_permutations(vec![1, 1, 3, 3, 3], 3);
-        test_all_permutations(vec![1, 3, 3, 5, 5], 3);
-
-        test_all_permutations(vec![1, 2, 2, 2, 2], 2);
-        test_all_permutations(vec![1, 1, 1, 1, 2], 1);
-        test_all_permutations(vec![1, 1, 1, 1, 1], 1);
-
-        test_all_permutations(vec![1, 2, 3, 4, 5, 6, 7], 4);
-    }
-
-    fn test_all_permutations<T: Copy + Ord + Avg + Debug>(numbers: Vec<T>, expected_value: T) {
-        let perms: Vec<Vec<_>> = numbers.iter().permutations(numbers.len()).collect();
-
-        for perm in perms {
-            let p: Vec<_> = perm.iter().map(|&&v| v).collect();
-
-            assert_eq!(p.median(), expected_value);
-        }
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 44258e67..00000000 --- a/static/rust/redstone/crypto_secp256k1/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/src/redstone/utils/trim.rs.html b/static/rust/redstone/crypto_secp256k1/src/redstone/utils/trim.rs.html deleted file mode 100644 index 551a41a8..00000000 --- a/static/rust/redstone/crypto_secp256k1/src/redstone/utils/trim.rs.html +++ /dev/null @@ -1,299 +0,0 @@ -trim.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
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-
use crate::network::{
-    assert::Unwrap, error::Error, from_bytes_repr::FromBytesRepr, specific::U256,
-};
-
-pub trait Trim<T>
-where
-    Self: Sized,
-{
-    fn trim_end(&mut self, len: usize) -> T;
-}
-
-impl Trim<Vec<u8>> for Vec<u8> {
-    fn trim_end(&mut self, len: usize) -> Self {
-        if len >= self.len() {
-            std::mem::take(self)
-        } else {
-            self.split_off(self.len() - len)
-        }
-    }
-}
-
-impl Trim<U256> for Vec<u8> {
-    fn trim_end(&mut self, len: usize) -> U256 {
-        U256::from_bytes_repr(self.trim_end(len))
-    }
-}
-
-impl Trim<usize> for Vec<u8> {
-    fn trim_end(&mut self, len: usize) -> usize {
-        let y: U256 = self.trim_end(len);
-        y.try_into().unwrap_or_revert(|_| Error::NumberOverflow(y))
-    }
-}
-
-impl Trim<u64> for Vec<u8> {
-    fn trim_end(&mut self, len: usize) -> u64 {
-        let y: U256 = self.trim_end(len);
-        y.try_into().unwrap_or_revert(|_| Error::NumberOverflow(y))
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use crate::{
-        network::specific::U256,
-        protocol::constants::{REDSTONE_MARKER, REDSTONE_MARKER_BS},
-        utils::trim::Trim,
-    };
-
-    const MARKER_DECIMAL: u64 = 823907890102272;
-
-    fn redstone_marker_bytes() -> Vec<u8> {
-        REDSTONE_MARKER.into()
-    }
-
-    #[test]
-    fn test_trim_end_number() {
-        let (rest, result): (_, U256) = test_trim_end(3);
-        assert_eq!(result, (256u32.pow(2) * 30).into());
-        assert_eq!(rest.as_slice(), &REDSTONE_MARKER[..6]);
-
-        let (_, result): (_, u64) = test_trim_end(3);
-        assert_eq!(result, 256u64.pow(2) * 30);
-
-        let (_, result): (_, usize) = test_trim_end(3);
-        assert_eq!(result, 256usize.pow(2) * 30);
-
-        let (_, result): (_, Vec<u8>) = test_trim_end(3);
-        assert_eq!(result.as_slice(), &REDSTONE_MARKER[6..]);
-    }
-
-    #[test]
-    fn test_trim_end_number_null() {
-        let (rest, result): (_, U256) = test_trim_end(0);
-        assert_eq!(result, 0u32.into());
-        assert_eq!(rest.as_slice(), &REDSTONE_MARKER);
-
-        let (_, result): (_, u64) = test_trim_end(0);
-        assert_eq!(result, 0);
-
-        let (_, result): (_, usize) = test_trim_end(0);
-        assert_eq!(result, 0);
-
-        let (_, result): (_, Vec<u8>) = test_trim_end(0);
-        assert_eq!(result, Vec::<u8>::new());
-    }
-
-    #[test]
-    fn test_trim_end_whole() {
-        test_trim_end_whole_size(REDSTONE_MARKER_BS);
-        test_trim_end_whole_size(REDSTONE_MARKER_BS - 1);
-        test_trim_end_whole_size(REDSTONE_MARKER_BS - 2);
-        test_trim_end_whole_size(REDSTONE_MARKER_BS + 1);
-    }
-
-    fn test_trim_end_whole_size(size: usize) {
-        let (rest, result): (_, U256) = test_trim_end(size);
-        assert_eq!(result, MARKER_DECIMAL.into());
-        assert_eq!(
-            rest.as_slice().len(),
-            REDSTONE_MARKER_BS - size.min(REDSTONE_MARKER_BS)
-        );
-
-        let (_, result): (_, u64) = test_trim_end(size);
-        assert_eq!(result, MARKER_DECIMAL);
-
-        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));
-    }
-
-    #[test]
-    fn test_trim_end_u64() {
-        let mut bytes = vec![255, 255, 255, 255, 255, 255, 255, 255, 255];
-        let x: u64 = bytes.trim_end(8);
-
-        let expected_bytes = vec![255];
-
-        assert_eq!(bytes, expected_bytes);
-        assert_eq!(x, 18446744073709551615);
-    }
-
-    #[should_panic(expected = "Number overflow: 18591708106338011145")]
-    #[test]
-    fn test_trim_end_u64_overflow() {
-        let mut bytes = vec![1u8, 2, 3, 4, 5, 6, 7, 8, 9];
-
-        let _: u64 = bytes.trim_end(9);
-    }
-
-    #[allow(dead_code)]
-    trait TestTrimEnd<T>
-    where
-        Self: Sized,
-    {
-        fn test_trim_end(size: usize) -> (Self, T);
-    }
-
-    fn test_trim_end<T>(size: usize) -> (Vec<u8>, T)
-    where
-        Vec<u8>: Trim<T>,
-    {
-        let mut bytes = redstone_marker_bytes();
-        let rest = bytes.trim_end(size);
-        (bytes, rest)
-    }
-}
-
\ No newline at end of file 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 deleted file mode 100644 index 0d223de1..00000000 --- a/static/rust/redstone/crypto_secp256k1/src/redstone/utils/trim_zeros.rs.html +++ /dev/null @@ -1,91 +0,0 @@ -trim_zeros.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
-
pub trait TrimZeros {
-    fn trim_zeros(self) -> Self;
-}
-
-impl TrimZeros for Vec<u8> {
-    fn trim_zeros(self) -> Self {
-        let mut res = self.len();
-
-        for i in (0..self.len()).rev() {
-            if self[i] != 0 {
-                break;
-            }
-
-            res = i;
-        }
-
-        let (rest, _) = self.split_at(res);
-
-        rest.into()
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use crate::{protocol::constants::REDSTONE_MARKER, utils::trim_zeros::TrimZeros};
-
-    fn redstone_marker_bytes() -> Vec<u8> {
-        REDSTONE_MARKER.as_slice().into()
-    }
-
-    #[test]
-    fn test_trim_zeros() {
-        let trimmed = redstone_marker_bytes().trim_zeros();
-        assert_eq!(trimmed.as_slice(), &REDSTONE_MARKER[..7]);
-
-        let trimmed = trimmed.trim_zeros();
-        assert_eq!(trimmed.as_slice(), &REDSTONE_MARKER[..7]);
-    }
-
-    #[test]
-    fn test_trim_zeros_empty() {
-        let trimmed = Vec::<u8>::default().trim_zeros();
-        assert_eq!(trimmed, Vec::<u8>::default());
-    }
-}
-
\ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/static.files/COPYRIGHT-23e9bde6c69aea69.txt b/static/rust/redstone/crypto_secp256k1/static.files/COPYRIGHT-23e9bde6c69aea69.txt deleted file mode 100644 index 1447df79..00000000 --- a/static/rust/redstone/crypto_secp256k1/static.files/COPYRIGHT-23e9bde6c69aea69.txt +++ /dev/null @@ -1,50 +0,0 @@ -# REUSE-IgnoreStart - -These documentation pages include resources by third parties. This copyright -file applies only to those resources. The following third party resources are -included, and carry their own copyright notices and license terms: - -* Fira Sans (FiraSans-Regular.woff2, FiraSans-Medium.woff2): - - Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ - with Reserved Font Name Fira Sans. - - Copyright (c) 2014, Telefonica S.A. - - Licensed under the SIL Open Font License, Version 1.1. - See FiraSans-LICENSE.txt. - -* rustdoc.css, main.js, and playpen.js: - - Copyright 2015 The Rust Developers. - Licensed under the Apache License, Version 2.0 (see LICENSE-APACHE.txt) or - the MIT license (LICENSE-MIT.txt) at your option. - -* normalize.css: - - Copyright (c) Nicolas Gallagher and Jonathan Neal. - Licensed under the MIT license (see LICENSE-MIT.txt). - -* Source Code Pro (SourceCodePro-Regular.ttf.woff2, - SourceCodePro-Semibold.ttf.woff2, SourceCodePro-It.ttf.woff2): - - Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), - with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark - of Adobe Systems Incorporated in the United States and/or other countries. - - Licensed under the SIL Open Font License, Version 1.1. - See SourceCodePro-LICENSE.txt. - -* Source Serif 4 (SourceSerif4-Regular.ttf.woff2, SourceSerif4-Bold.ttf.woff2, - SourceSerif4-It.ttf.woff2): - - Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name - 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United - States and/or other countries. - - Licensed under the SIL Open Font License, Version 1.1. - See SourceSerif4-LICENSE.md. - -This copyright file is intended to be distributed with rustdoc output. - -# REUSE-IgnoreEnd diff --git a/static/rust/redstone/crypto_secp256k1/static.files/FiraSans-LICENSE-db4b642586e02d97.txt b/static/rust/redstone/crypto_secp256k1/static.files/FiraSans-LICENSE-db4b642586e02d97.txt deleted file mode 100644 index d7e9c149..00000000 --- a/static/rust/redstone/crypto_secp256k1/static.files/FiraSans-LICENSE-db4b642586e02d97.txt +++ /dev/null @@ -1,98 +0,0 @@ -// REUSE-IgnoreStart - -Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. -with Reserved Font Name < Fira >, - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. - -// REUSE-IgnoreEnd diff --git a/static/rust/redstone/crypto_secp256k1/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 b/static/rust/redstone/crypto_secp256k1/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 deleted file mode 100644 index 7a1e5fc5..00000000 Binary files a/static/rust/redstone/crypto_secp256k1/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 b/static/rust/redstone/crypto_secp256k1/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 deleted file mode 100644 index e766e06c..00000000 Binary files a/static/rust/redstone/crypto_secp256k1/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt b/static/rust/redstone/crypto_secp256k1/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt deleted file mode 100644 index 16fe87b0..00000000 --- a/static/rust/redstone/crypto_secp256k1/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/static/rust/redstone/crypto_secp256k1/static.files/LICENSE-MIT-65090b722b3f6c56.txt b/static/rust/redstone/crypto_secp256k1/static.files/LICENSE-MIT-65090b722b3f6c56.txt deleted file mode 100644 index 31aa7938..00000000 --- a/static/rust/redstone/crypto_secp256k1/static.files/LICENSE-MIT-65090b722b3f6c56.txt +++ /dev/null @@ -1,23 +0,0 @@ -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/static/rust/redstone/crypto_secp256k1/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 b/static/rust/redstone/crypto_secp256k1/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 deleted file mode 100644 index 1866ad4b..00000000 Binary files a/static/rust/redstone/crypto_secp256k1/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt b/static/rust/redstone/crypto_secp256k1/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt deleted file mode 100644 index 4b3edc29..00000000 --- a/static/rust/redstone/crypto_secp256k1/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt +++ /dev/null @@ -1,103 +0,0 @@ -// REUSE-IgnoreStart - -Copyright (c) 2010, NAVER Corporation (https://www.navercorp.com/), - -with Reserved Font Name Nanum, Naver Nanum, NanumGothic, Naver NanumGothic, -NanumMyeongjo, Naver NanumMyeongjo, NanumBrush, Naver NanumBrush, NanumPen, -Naver NanumPen, Naver NanumGothicEco, NanumGothicEco, Naver NanumMyeongjoEco, -NanumMyeongjoEco, Naver NanumGothicLight, NanumGothicLight, NanumBarunGothic, -Naver NanumBarunGothic, NanumSquareRound, NanumBarunPen, MaruBuri - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. - -// REUSE-IgnoreEnd diff --git a/static/rust/redstone/crypto_secp256k1/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 b/static/rust/redstone/crypto_secp256k1/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 deleted file mode 100644 index 462c34ef..00000000 Binary files a/static/rust/redstone/crypto_secp256k1/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt b/static/rust/redstone/crypto_secp256k1/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt deleted file mode 100644 index 0d2941e1..00000000 --- a/static/rust/redstone/crypto_secp256k1/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt +++ /dev/null @@ -1,97 +0,0 @@ -// REUSE-IgnoreStart - -Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. - -This Font Software is licensed under the SIL Open Font License, Version 1.1. - -This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. - -// REUSE-IgnoreEnd diff --git a/static/rust/redstone/crypto_secp256k1/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 b/static/rust/redstone/crypto_secp256k1/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 deleted file mode 100644 index 10b558e0..00000000 Binary files a/static/rust/redstone/crypto_secp256k1/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 b/static/rust/redstone/crypto_secp256k1/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 deleted file mode 100644 index 5ec64eef..00000000 Binary files a/static/rust/redstone/crypto_secp256k1/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 b/static/rust/redstone/crypto_secp256k1/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 deleted file mode 100644 index 181a07f6..00000000 Binary files a/static/rust/redstone/crypto_secp256k1/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 b/static/rust/redstone/crypto_secp256k1/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 deleted file mode 100644 index 2ae08a7b..00000000 Binary files a/static/rust/redstone/crypto_secp256k1/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md b/static/rust/redstone/crypto_secp256k1/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md deleted file mode 100644 index 175fa4f4..00000000 --- a/static/rust/redstone/crypto_secp256k1/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md +++ /dev/null @@ -1,98 +0,0 @@ - - -Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. -Copyright 2014 - 2023 Adobe (http://www.adobe.com/), with Reserved Font Name ‘Source’. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. - -This Font Software is licensed under the SIL Open Font License, Version 1.1. - -This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. - - diff --git a/static/rust/redstone/crypto_secp256k1/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 b/static/rust/redstone/crypto_secp256k1/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 deleted file mode 100644 index 0263fc30..00000000 Binary files a/static/rust/redstone/crypto_secp256k1/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1/static.files/favicon-2c020d218678b618.svg b/static/rust/redstone/crypto_secp256k1/static.files/favicon-2c020d218678b618.svg deleted file mode 100644 index 8b34b511..00000000 --- a/static/rust/redstone/crypto_secp256k1/static.files/favicon-2c020d218678b618.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/static/rust/redstone/crypto_secp256k1/static.files/favicon-32x32-422f7d1d52889060.png b/static/rust/redstone/crypto_secp256k1/static.files/favicon-32x32-422f7d1d52889060.png deleted file mode 100644 index 69b8613c..00000000 Binary files a/static/rust/redstone/crypto_secp256k1/static.files/favicon-32x32-422f7d1d52889060.png and /dev/null differ diff --git a/static/rust/redstone/crypto_secp256k1/static.files/main-20a3ad099b048cf2.js b/static/rust/redstone/crypto_secp256k1/static.files/main-20a3ad099b048cf2.js deleted file mode 100644 index 133116e4..00000000 --- a/static/rust/redstone/crypto_secp256k1/static.files/main-20a3ad099b048cf2.js +++ /dev/null @@ -1,11 +0,0 @@ -"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;if(path===current_page){link.className="current"}link.textContent=name;const li=document.createElement("li");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/normalize-76eba96aa4d2e634.css b/static/rust/redstone/crypto_secp256k1/static.files/normalize-76eba96aa4d2e634.css deleted file mode 100644 index 469959f1..00000000 --- a/static/rust/redstone/crypto_secp256k1/static.files/normalize-76eba96aa4d2e634.css +++ /dev/null @@ -1,2 +0,0 @@ - /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ -html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type="button"],[type="reset"],[type="submit"],button{-webkit-appearance:button}[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none} \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/static.files/noscript-df360f571f6edeae.css b/static/rust/redstone/crypto_secp256k1/static.files/noscript-df360f571f6edeae.css deleted file mode 100644 index 4c310ae5..00000000 --- a/static/rust/redstone/crypto_secp256k1/static.files/noscript-df360f571f6edeae.css +++ /dev/null @@ -1 +0,0 @@ - #main-content .attributes{margin-left:0 !important;}#copy-path,#sidebar-button,.sidebar-resizer{display:none !important;}nav.sub{display:none;}.src .sidebar{display:none;}.notable-traits{display:none;}:root,: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%);}@media (prefers-color-scheme:dark){:root,:root:not([data-theme]){--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;--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%);}} \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/static.files/rust-logo-151179464ae7ed46.svg b/static/rust/redstone/crypto_secp256k1/static.files/rust-logo-151179464ae7ed46.svg deleted file mode 100644 index 62424d8f..00000000 --- a/static/rust/redstone/crypto_secp256k1/static.files/rust-logo-151179464ae7ed46.svg +++ /dev/null @@ -1,61 +0,0 @@ - - - diff --git a/static/rust/redstone/crypto_secp256k1/static.files/rustdoc-dd39b87e5fcfba68.css b/static/rust/redstone/crypto_secp256k1/static.files/rustdoc-dd39b87e5fcfba68.css deleted file mode 100644 index 77f89832..00000000 --- a/static/rust/redstone/crypto_secp256k1/static.files/rustdoc-dd39b87e5fcfba68.css +++ /dev/null @@ -1,46 +0,0 @@ - :root{--nav-sub-mobile-padding:8px;--search-typename-width:6.75rem;--desktop-sidebar-width:200px;--src-sidebar-width:300px;--desktop-sidebar-z-index:100;}@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-left:-0.25rem;margin-right:0.25rem;}.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:24px;}.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 -16px 0 -16px;text-align:center;}.sidebar-crate h2 a{display:block;margin:0 calc(-24px + 0.25rem) 0 -0.2rem;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);}}@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/scrape-examples-ef1e698c1d417c0c.js b/static/rust/redstone/crypto_secp256k1/static.files/scrape-examples-ef1e698c1d417c0c.js deleted file mode 100644 index ba830e37..00000000 --- a/static/rust/redstone/crypto_secp256k1/static.files/scrape-examples-ef1e698c1d417c0c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(function(){const DEFAULT_MAX_LINES=5;const HIDDEN_MAX_LINES=10;function scrollToLoc(elt,loc,isHidden){const lines=elt.querySelector(".src-line-numbers");let scrollOffset;const maxLines=isHidden?HIDDEN_MAX_LINES:DEFAULT_MAX_LINES;if(loc[1]-loc[0]>maxLines){const line=Math.max(0,loc[0]-1);scrollOffset=lines.children[line].offsetTop}else{const wrapper=elt.querySelector(".code-wrapper");const halfHeight=wrapper.offsetHeight/2;const offsetTop=lines.children[loc[0]].offsetTop;const lastLine=lines.children[loc[1]];const offsetBot=lastLine.offsetTop+lastLine.offsetHeight;const offsetMid=(offsetTop+offsetBot)/2;scrollOffset=offsetMid-halfHeight}lines.scrollTo(0,scrollOffset);elt.querySelector(".rust").scrollTo(0,scrollOffset)}function updateScrapedExample(example,isHidden){const locs=JSON.parse(example.attributes.getNamedItem("data-locs").textContent);let locIndex=0;const highlights=Array.prototype.slice.call(example.querySelectorAll(".highlight"));const link=example.querySelector(".scraped-example-title a");if(locs.length>1){const onChangeLoc=changeIndex=>{removeClass(highlights[locIndex],"focus");changeIndex();scrollToLoc(example,locs[locIndex][0],isHidden);addClass(highlights[locIndex],"focus");const url=locs[locIndex][1];const title=locs[locIndex][2];link.href=url;link.innerHTML=title};example.querySelector(".prev").addEventListener("click",()=>{onChangeLoc(()=>{locIndex=(locIndex-1+locs.length)%locs.length})});example.querySelector(".next").addEventListener("click",()=>{onChangeLoc(()=>{locIndex=(locIndex+1)%locs.length})})}const expandButton=example.querySelector(".expand");if(expandButton){expandButton.addEventListener("click",()=>{if(hasClass(example,"expanded")){removeClass(example,"expanded");scrollToLoc(example,locs[0][0],isHidden)}else{addClass(example,"expanded")}})}scrollToLoc(example,locs[0][0],isHidden)}const firstExamples=document.querySelectorAll(".scraped-example-list > .scraped-example");onEachLazy(firstExamples,el=>updateScrapedExample(el,false));onEachLazy(document.querySelectorAll(".more-examples-toggle"),toggle=>{onEachLazy(toggle.querySelectorAll(".toggle-line, .hide-more"),button=>{button.addEventListener("click",()=>{toggle.open=false})});const moreExamples=toggle.querySelectorAll(".scraped-example");toggle.querySelector("summary").addEventListener("click",()=>{setTimeout(()=>{onEachLazy(moreExamples,el=>updateScrapedExample(el,true))})},{once:true})})})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/static.files/search-d52510db62a78183.js b/static/rust/redstone/crypto_secp256k1/static.files/search-d52510db62a78183.js deleted file mode 100644 index a2824f29..00000000 --- a/static/rust/redstone/crypto_secp256k1/static.files/search-d52510db62a78183.js +++ /dev/null @@ -1,5 +0,0 @@ -"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;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 isIdentCharacter(c){return(c==="_"||(c>="0"&&c<="9")||(c>="a"&&c<="z")||(c>="A"&&c<="Z"))}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){const start=parserState.pos;let end=parserState.pos;let foundExclamation=-1;while(parserState.pos0){throw["Unexpected ",c," after ",parserState.userQuery[parserState.pos-1]]}else{throw["Unexpected ",c]}}parserState.pos+=1;end=parserState.pos}if(foundExclamation!==-1&&foundExclamation!==start&&isIdentCharacter(parserState.userQuery[foundExclamation-1])){if(parserState.typeFilter===null){parserState.typeFilter="macro"}else if(parserState.typeFilter!=="macro"){throw["Invalid search type: macro ","!"," and ",parserState.typeFilter," both specified",]}end=foundExclamation}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();for(const c in query){if(!isIdentCharacter(query[c])){throw["Unexpected ",query[c]," 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,}}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{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(pushFunc);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){if(typeNameIdMap.has(elem.normalizedPathLast)&&(isAssocType||!typeNameIdMap.get(elem.normalizedPathLast).assocOnly)){elem.id=typeNameIdMap.get(elem.normalizedPathLast).id}else if(!parsedQuery.literalSearch){let match=null;let matchDist=maxEditDistance+1;let matchName="";for(const[name,{id,assocOnly}]of typeNameIdMap){const dist=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(){const cb="}".charCodeAt(0);let c=this.string.charCodeAt(this.offset);const ret=[];while(c!==cb){ret.push(this.decode());c=this.string.charCodeAt(this.offset)}this.offset+=1;return ret}decode(){const[ob,la]=["{","`"].map(c=>c.charCodeAt(0));let n=0;let c=this.string.charCodeAt(this.offset);if(c===ob){this.offset+=1;return this.decodeList()}while(c>1];this.offset+=1;return sign?-value:value}next(){const c=this.string.charCodeAt(this.offset);const[zero,ua,la]=["0","@","`"].map(c=>c.charCodeAt(0));if(c>=zero&&c16){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();const charA="A".charCodeAt(0);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)-charA,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/static.files/settings-4313503d2e1961c2.js b/static/rust/redstone/crypto_secp256k1/static.files/settings-4313503d2e1961c2.js deleted file mode 100644 index ab425fe4..00000000 --- a/static/rust/redstone/crypto_secp256k1/static.files/settings-4313503d2e1961c2.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict";(function(){const isSettingsPage=window.location.pathname.endsWith("/settings.html");function changeSetting(settingName,value){if(settingName==="theme"){const useSystem=value==="system preference"?"true":"false";updateLocalStorage("use-system-theme",useSystem)}updateLocalStorage(settingName,value);switch(settingName){case"theme":case"preferred-dark-theme":case"preferred-light-theme":updateTheme();updateLightAndDark();break;case"line-numbers":if(value===true){window.rustdoc_add_line_numbers_to_examples()}else{window.rustdoc_remove_line_numbers_from_examples()}break;case"hide-sidebar":if(value===true){addClass(document.documentElement,"hide-sidebar")}else{removeClass(document.documentElement,"hide-sidebar")}break}}function showLightAndDark(){removeClass(document.getElementById("preferred-light-theme"),"hidden");removeClass(document.getElementById("preferred-dark-theme"),"hidden")}function hideLightAndDark(){addClass(document.getElementById("preferred-light-theme"),"hidden");addClass(document.getElementById("preferred-dark-theme"),"hidden")}function updateLightAndDark(){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||(useSystem===null&&getSettingValue("theme")===null)){showLightAndDark()}else{hideLightAndDark()}}function setEvents(settingsElement){updateLightAndDark();onEachLazy(settingsElement.querySelectorAll("input[type=\"checkbox\"]"),toggle=>{const settingId=toggle.id;const settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=()=>{changeSetting(toggle.id,toggle.checked)}});onEachLazy(settingsElement.querySelectorAll("input[type=\"radio\"]"),elem=>{const settingId=elem.name;let settingValue=getSettingValue(settingId);if(settingId==="theme"){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||settingValue===null){settingValue=useSystem==="false"?"light":"system preference"}}if(settingValue!==null&&settingValue!=="null"){elem.checked=settingValue===elem.value}elem.addEventListener("change",ev=>{changeSetting(ev.target.name,ev.target.value)})})}function buildSettingsPageSections(settings){let output="";for(const setting of settings){const js_data_name=setting["js_name"];const setting_name=setting["name"];if(setting["options"]!==undefined){output+=`\ -
-
${setting_name}
-
`;onEach(setting["options"],option=>{const checked=option===setting["default"]?" checked":"";const full=`${js_data_name}-${option.replace(/ /g,"-")}`;output+=`\ - `});output+=`\ -
-
`}else{const checked=setting["default"]===true?" checked":"";output+=`\ -
\ - \ -
`}}return output}function buildSettingsPage(){const theme_names=getVar("themes").split(",").filter(t=>t);theme_names.push("light","dark","ayu");const settings=[{"name":"Theme","js_name":"theme","default":"system preference","options":theme_names.concat("system preference"),},{"name":"Preferred light theme","js_name":"preferred-light-theme","default":"light","options":theme_names,},{"name":"Preferred dark theme","js_name":"preferred-dark-theme","default":"dark","options":theme_names,},{"name":"Auto-hide item contents for large items","js_name":"auto-hide-large-items","default":true,},{"name":"Auto-hide item methods' documentation","js_name":"auto-hide-method-docs","default":false,},{"name":"Auto-hide trait implementation documentation","js_name":"auto-hide-trait-implementations","default":false,},{"name":"Directly go to item in search if there is only one result","js_name":"go-to-only-result","default":false,},{"name":"Show line numbers on code examples","js_name":"line-numbers","default":false,},{"name":"Hide persistent navigation bar","js_name":"hide-sidebar","default":false,},{"name":"Disable keyboard shortcuts","js_name":"disable-shortcuts","default":false,},];const elementKind=isSettingsPage?"section":"div";const innerHTML=`
${buildSettingsPageSections(settings)}
`;const el=document.createElement(elementKind);el.id="settings";if(!isSettingsPage){el.className="popover"}el.innerHTML=innerHTML;if(isSettingsPage){document.getElementById(MAIN_ID).appendChild(el)}else{el.setAttribute("tabindex","-1");getSettingsButton().appendChild(el)}return el}const settingsMenu=buildSettingsPage();function displaySettings(){settingsMenu.style.display="";onEachLazy(settingsMenu.querySelectorAll("input[type='checkbox']"),el=>{const val=getSettingValue(el.id);const checked=val==="true";if(checked!==el.checked&&val!==null){el.checked=checked}})}function settingsBlurHandler(event){blurHandler(event,getSettingsButton(),window.hidePopoverMenus)}if(isSettingsPage){getSettingsButton().onclick=event=>{event.preventDefault()}}else{const settingsButton=getSettingsButton();const settingsMenu=document.getElementById("settings");settingsButton.onclick=event=>{if(settingsMenu.contains(event.target)){return}event.preventDefault();const shouldDisplaySettings=settingsMenu.style.display==="none";window.hideAllModals();if(shouldDisplaySettings){displaySettings()}};settingsButton.onblur=settingsBlurHandler;settingsButton.querySelector("a").onblur=settingsBlurHandler;onEachLazy(settingsMenu.querySelectorAll("input"),el=>{el.onblur=settingsBlurHandler});settingsMenu.onblur=settingsBlurHandler}setTimeout(()=>{setEvents(settingsMenu);if(!isSettingsPage){displaySettings()}removeClass(getSettingsButton(),"rotate")},0)})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/static.files/src-script-e66d777a5a92e9b2.js b/static/rust/redstone/crypto_secp256k1/static.files/src-script-e66d777a5a92e9b2.js deleted file mode 100644 index d0aebb85..00000000 --- a/static/rust/redstone/crypto_secp256k1/static.files/src-script-e66d777a5a92e9b2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(function(){const rootPath=getVar("root-path");const NAME_OFFSET=0;const DIRS_OFFSET=1;const FILES_OFFSET=2;const RUSTDOC_MOBILE_BREAKPOINT=700;function closeSidebarIfMobile(){if(window.innerWidth{removeClass(document.documentElement,"src-sidebar-expanded");updateLocalStorage("source-sidebar-show","false")};window.rustdocShowSourceSidebar=()=>{addClass(document.documentElement,"src-sidebar-expanded");updateLocalStorage("source-sidebar-show","true")};window.rustdocToggleSrcSidebar=()=>{if(document.documentElement.classList.contains("src-sidebar-expanded")){window.rustdocCloseSourceSidebar()}else{window.rustdocShowSourceSidebar()}};function createSrcSidebar(){const container=document.querySelector("nav.sidebar");const sidebar=document.createElement("div");sidebar.id="src-sidebar";let hasFoundFile=false;for(const[key,source]of srcIndex){source[NAME_OFFSET]=key;hasFoundFile=createDirEntry(source,sidebar,"",hasFoundFile)}container.appendChild(sidebar);const selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}}function highlightSrcLines(){const match=window.location.hash.match(/^#?(\d+)(?:-(\d+))?$/);if(!match){return}let from=parseInt(match[1],10);let to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to{onEachLazy(e.getElementsByTagName("a"),i_e=>{removeClass(i_e,"line-highlighted")})});for(let i=from;i<=to;++i){elem=document.getElementById(i);if(!elem){break}addClass(elem,"line-highlighted")}}const handleSrcHighlight=(function(){let prev_line_id=0;const set_fragment=name=>{const x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSrcLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return ev=>{let cur_line_id=parseInt(ev.target.id,10);if(isNaN(cur_line_id)||ev.ctrlKey||ev.altKey||ev.metaKey){return}ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){const tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());window.addEventListener("hashchange",highlightSrcLines);onEachLazy(document.getElementsByClassName("src-line-numbers"),el=>{el.addEventListener("click",handleSrcHighlight)});highlightSrcLines();window.createSrcSidebar=createSrcSidebar})() \ No newline at end of file diff --git a/static/rust/redstone/crypto_secp256k1/static.files/storage-118b08c4c78b968e.js b/static/rust/redstone/crypto_secp256k1/static.files/storage-118b08c4c78b968e.js deleted file mode 100644 index 98189467..00000000 --- a/static/rust/redstone/crypto_secp256k1/static.files/storage-118b08c4c78b968e.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict";const builtinThemes=["light","dark","ayu"];const darkThemes=["dark","ayu"];window.currentTheme=document.getElementById("themeStyle");const settingsDataset=(function(){const settingsElement=document.getElementById("default-settings");return settingsElement&&settingsElement.dataset?settingsElement.dataset:null})();function getSettingValue(settingName){const current=getCurrentValue(settingName);if(current===null&&settingsDataset!==null){const def=settingsDataset[settingName.replace(/-/g,"_")];if(def!==undefined){return def}}return current}const localStoredTheme=getSettingValue("theme");function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(elem&&elem.classList){elem.classList.add(className)}}function removeClass(elem,className){if(elem&&elem.classList){elem.classList.remove(className)}}function onEach(arr,func){for(const elem of arr){if(func(elem)){return true}}return false}function onEachLazy(lazyArray,func){return onEach(Array.prototype.slice.call(lazyArray),func)}function updateLocalStorage(name,value){try{window.localStorage.setItem("rustdoc-"+name,value)}catch(e){}}function getCurrentValue(name){try{return window.localStorage.getItem("rustdoc-"+name)}catch(e){return null}}const getVar=(function getVar(name){const el=document.querySelector("head > meta[name='rustdoc-vars']");return el?el.attributes["data-"+name].value:null});function switchTheme(newThemeName,saveTheme){const themeNames=getVar("themes").split(",").filter(t=>t);themeNames.push(...builtinThemes);if(themeNames.indexOf(newThemeName)===-1){return}if(saveTheme){updateLocalStorage("theme",newThemeName)}document.documentElement.setAttribute("data-theme",newThemeName);if(builtinThemes.indexOf(newThemeName)!==-1){if(window.currentTheme){window.currentTheme.parentNode.removeChild(window.currentTheme);window.currentTheme=null}}else{const newHref=getVar("root-path")+encodeURIComponent(newThemeName)+getVar("resource-suffix")+".css";if(!window.currentTheme){if(document.readyState==="loading"){document.write(``);window.currentTheme=document.getElementById("themeStyle")}else{window.currentTheme=document.createElement("link");window.currentTheme.rel="stylesheet";window.currentTheme.id="themeStyle";window.currentTheme.href=newHref;document.documentElement.appendChild(window.currentTheme)}}else if(newHref!==window.currentTheme.href){window.currentTheme.href=newHref}}}const updateTheme=(function(){const mql=window.matchMedia("(prefers-color-scheme: dark)");function updateTheme(){if(getSettingValue("use-system-theme")!=="false"){const lightTheme=getSettingValue("preferred-light-theme")||"light";const darkTheme=getSettingValue("preferred-dark-theme")||"dark";updateLocalStorage("use-system-theme","true");switchTheme(mql.matches?darkTheme:lightTheme,true)}else{switchTheme(getSettingValue("theme"),false)}}mql.addEventListener("change",updateTheme);return updateTheme})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("preferred-dark-theme",localStoredTheme)}}updateTheme();if(getSettingValue("source-sidebar-show")==="true"){addClass(document.documentElement,"src-sidebar-expanded")}if(getSettingValue("hide-sidebar")==="true"){addClass(document.documentElement,"hide-sidebar")}function updateSidebarWidth(){const desktopSidebarWidth=getSettingValue("desktop-sidebar-width");if(desktopSidebarWidth&&desktopSidebarWidth!=="null"){document.documentElement.style.setProperty("--desktop-sidebar-width",desktopSidebarWidth+"px",)}const srcSidebarWidth=getSettingValue("src-sidebar-width");if(srcSidebarWidth&&srcSidebarWidth!=="null"){document.documentElement.style.setProperty("--src-sidebar-width",srcSidebarWidth+"px",)}}updateSidebarWidth();window.addEventListener("pageshow",ev=>{if(ev.persisted){setTimeout(updateTheme,0);setTimeout(updateSidebarWidth,0)}});class RustdocSearchElement extends HTMLElement{constructor(){super()}connectedCallback(){const rootPath=getVar("root-path");const currentCrate=getVar("current-crate");this.innerHTML=``}}window.customElements.define("rustdoc-search",RustdocSearchElement) \ 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 deleted file mode 100644 index 270a1587..00000000 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/core/clone/trait.Clone.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"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 deleted file mode 100644 index a573550b..00000000 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/core/cmp/trait.Eq.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"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 deleted file mode 100644 index 695eda8f..00000000 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/core/cmp/trait.PartialEq.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"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 deleted file mode 100644 index 92afa7bb..00000000 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/core/convert/trait.From.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"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 deleted file mode 100644 index f544c767..00000000 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/core/fmt/trait.Debug.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]] -};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 deleted file mode 100644 index 899cd7d8..00000000 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/core/fmt/trait.Display.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"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 deleted file mode 100644 index 9ef439fb..00000000 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/core/marker/trait.Freeze.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]]] -};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 deleted file mode 100644 index 5c6a47bd..00000000 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/core/marker/trait.Send.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]]] -};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 deleted file mode 100644 index 19408b71..00000000 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/core/marker/trait.StructuralPartialEq.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"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 deleted file mode 100644 index 38836f03..00000000 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/core/marker/trait.Sync.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]]] -};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 deleted file mode 100644 index 05a367f3..00000000 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/core/marker/trait.Unpin.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]]] -};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 deleted file mode 100644 index 5dbcd460..00000000 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]]] -};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 deleted file mode 100644 index 850af1de..00000000 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]]] -};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/redstone/core/validator/trait.Validator.js b/static/rust/redstone/crypto_secp256k1/trait.impl/redstone/core/validator/trait.Validator.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/redstone/core/validator/trait.Validator.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/network/as_str/trait.AsAsciiStr.js b/static/rust/redstone/crypto_secp256k1/trait.impl/redstone/network/as_str/trait.AsAsciiStr.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/redstone/network/as_str/trait.AsAsciiStr.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/network/as_str/trait.AsHexStr.js b/static/rust/redstone/crypto_secp256k1/trait.impl/redstone/network/as_str/trait.AsHexStr.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/redstone/network/as_str/trait.AsHexStr.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/network/assert/trait.Assert.js b/static/rust/redstone/crypto_secp256k1/trait.impl/redstone/network/assert/trait.Assert.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/redstone/network/assert/trait.Assert.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/network/assert/trait.Unwrap.js b/static/rust/redstone/crypto_secp256k1/trait.impl/redstone/network/assert/trait.Unwrap.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/redstone/network/assert/trait.Unwrap.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/network/flattened/trait.Flattened.js b/static/rust/redstone/crypto_secp256k1/trait.impl/redstone/network/flattened/trait.Flattened.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/redstone/network/flattened/trait.Flattened.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/network/from_bytes_repr/trait.FromBytesRepr.js b/static/rust/redstone/crypto_secp256k1/trait.impl/redstone/network/from_bytes_repr/trait.FromBytesRepr.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/redstone/network/from_bytes_repr/trait.FromBytesRepr.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/network/from_bytes_repr/trait.Sanitized.js b/static/rust/redstone/crypto_secp256k1/trait.impl/redstone/network/from_bytes_repr/trait.Sanitized.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/redstone/network/from_bytes_repr/trait.Sanitized.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/network/specific/trait.NetworkSpecific.js b/static/rust/redstone/crypto_secp256k1/trait.impl/redstone/network/specific/trait.NetworkSpecific.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/redstone/network/specific/trait.NetworkSpecific.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/utils/filter/trait.FilterSome.js b/static/rust/redstone/crypto_secp256k1/trait.impl/redstone/utils/filter/trait.FilterSome.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/redstone/utils/filter/trait.FilterSome.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/utils/median/trait.Averageable.js b/static/rust/redstone/crypto_secp256k1/trait.impl/redstone/utils/median/trait.Averageable.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/redstone/utils/median/trait.Averageable.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/utils/median/trait.Avg.js b/static/rust/redstone/crypto_secp256k1/trait.impl/redstone/utils/median/trait.Avg.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/redstone/utils/median/trait.Avg.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/utils/median/trait.Median.js b/static/rust/redstone/crypto_secp256k1/trait.impl/redstone/utils/median/trait.Median.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/redstone/utils/median/trait.Median.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/utils/trim/trait.Trim.js b/static/rust/redstone/crypto_secp256k1/trait.impl/redstone/utils/trim/trait.Trim.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/redstone/utils/trim/trait.Trim.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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/redstone/utils/trim_zeros/trait.TrimZeros.js b/static/rust/redstone/crypto_secp256k1/trait.impl/redstone/utils/trim_zeros/trait.TrimZeros.js deleted file mode 100644 index 99a282de..00000000 --- a/static/rust/redstone/crypto_secp256k1/trait.impl/redstone/utils/trim_zeros/trait.TrimZeros.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"redstone":[] -};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 deleted file mode 100644 index 02ba4b44..00000000 --- a/static/rust/redstone/crypto_secp256k1/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"],["
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/casper/struct.Casper.js b/static/rust/redstone/crypto_secp256k1/type.impl/redstone/network/casper/struct.Casper.js deleted file mode 100644 index cadcd6d3..00000000 --- a/static/rust/redstone/crypto_secp256k1/type.impl/redstone/network/casper/struct.Casper.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var type_impls = { -"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/type.impl/redstone/network/pure/struct.Std.js b/static/rust/redstone/crypto_secp256k1/type.impl/redstone/network/pure/struct.Std.js deleted file mode 100644 index b85e8d1d..00000000 --- a/static/rust/redstone/crypto_secp256k1/type.impl/redstone/network/pure/struct.Std.js +++ /dev/null @@ -1,3 +0,0 @@ -(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"]] -};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/type._Network.js b/static/rust/redstone/crypto_secp256k1/type.impl/redstone/network/type._Network.js deleted file mode 100644 index 53f96772..00000000 --- a/static/rust/redstone/crypto_secp256k1/type.impl/redstone/network/type._Network.js +++ /dev/null @@ -1,3 +0,0 @@ -(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/rust_sdk_2/redstone/core/processor/index.html b/static/rust/redstone/rust_sdk_2/redstone/core/processor/index.html index a26bc44b..305b82fd 100644 --- a/static/rust/redstone/rust_sdk_2/redstone/core/processor/index.html +++ b/static/rust/redstone/rust_sdk_2/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/rust_sdk_2/redstone/core/processor_result/struct.ValidatedPayload.html b/static/rust/redstone/rust_sdk_2/redstone/core/processor_result/struct.ValidatedPayload.html index f108bc2f..48aea521 100644 --- a/static/rust/redstone/rust_sdk_2/redstone/core/processor_result/struct.ValidatedPayload.html +++ b/static/rust/redstone/rust_sdk_2/redstone/core/processor_result/struct.ValidatedPayload.html @@ -1,11 +1,11 @@ -ValidatedPayload in redstone::core::processor_result - Rust

Struct redstone::core::processor_result::ValidatedPayload

source ·
pub struct ValidatedPayload {
-    pub min_timestamp: TimestampMillis,
+ValidatedPayload in redstone::core::processor_result - Rust

Struct redstone::core::processor_result::ValidatedPayload

source ·
pub struct ValidatedPayload {
+    pub timestamp: TimestampMillis,
     pub values: Vec<Value>,
 }
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: TimestampMillis

The minimum timestamp encountered during processing.

-

This field captures the earliest time point (in milliseconds since the Unix epoch) +

Fields§

§timestamp: TimestampMillis

The timestamp encountered during processing.

+

This field captures the 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<Value>

A collection of values processed during the operation.

Each element in this vector represents a processed value corresponding diff --git a/static/rust/redstone/rust_sdk_2/redstone/enum.CryptoError.html b/static/rust/redstone/rust_sdk_2/redstone/enum.CryptoError.html index ddaa7ad3..b9949813 100644 --- a/static/rust/redstone/rust_sdk_2/redstone/enum.CryptoError.html +++ b/static/rust/redstone/rust_sdk_2/redstone/enum.CryptoError.html @@ -2,7 +2,7 @@ RecoveryByte(u8), Signature(Vec<u8>), RecoverPreHash, -}

Variants§

§

RecoveryByte(u8)

§

Signature(Vec<u8>)

§

RecoverPreHash

Implementations§

source§

impl CryptoError

source

pub fn code(&self) -> u16

Trait Implementations§

source§

impl Clone for CryptoError

source§

fn clone(&self) -> CryptoError

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 CryptoError

source§

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

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

impl From<CryptoError> for Error

source§

fn from(value: CryptoError) -> Self

Converts to this type from the input type.
source§

impl PartialEq for CryptoError

source§

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

This method tests for self and other values to be equal, and is used +}

Variants§

§

RecoveryByte(u8)

§

Signature(Vec<u8>)

§

RecoverPreHash

Implementations§

source§

impl CryptoError

source

pub fn code(&self) -> u16

Trait Implementations§

source§

impl Clone for CryptoError

source§

fn clone(&self) -> CryptoError

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 CryptoError

source§

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

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

impl From<CryptoError> for Error

source§

fn from(value: CryptoError) -> Self

Converts to this type from the input type.
source§

impl PartialEq for CryptoError

source§

fn eq(&self, other: &CryptoError) -> 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 CryptoError

source§

impl StructuralPartialEq for CryptoError

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 diff --git a/static/rust/redstone/rust_sdk_2/redstone/network/error/enum.Error.html b/static/rust/redstone/rust_sdk_2/redstone/network/error/enum.Error.html index d11ca314..32151647 100644 --- a/static/rust/redstone/rust_sdk_2/redstone/network/error/enum.Error.html +++ b/static/rust/redstone/rust_sdk_2/redstone/network/error/enum.Error.html @@ -1,5 +1,5 @@ -Error in redstone::network::error - Rust

Enum redstone::network::error::Error

source ·
pub enum Error {
-
Show 18 variants ContractError(ContractErrorContent), +Error in redstone::network::error - Rust

Enum redstone::network::error::Error

source ·
pub enum Error {
+
Show 19 variants ContractError(ContractErrorContent), NumberOverflow(Value), ArrayIsEmpty, CryptographicError(CryptoError), @@ -15,6 +15,7 @@ ConfigReocuringSigner(SignerAddress), ConfigEmptyFeedIds, ConfigReocuringFeedId(FeedId), + TimestampDifferentThanOthers(TimestampMillis, TimestampMillis), DataTimestampMustBeGreaterThanBefore(TimestampMillis, TimestampMillis), CurrentTimestampMustBeGreaterThanLatestUpdateTimestamp(TimestampMillis, TimestampMillis),
}
Expand description

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

@@ -62,6 +63,8 @@
§

ConfigEmptyFeedIds

Indicates that list doesn’t contain FeedIds.

§

ConfigReocuringFeedId(FeedId)

Indicates that a FeedId is reocuring on config feed_ids list.

Includes FeedId that is reocuring.

+
§

TimestampDifferentThanOthers(TimestampMillis, TimestampMillis)

Indicates that payload timestamps are not equal.

+

Contains the first timestamp and the one that is not equal to the first one.

§

DataTimestampMustBeGreaterThanBefore(TimestampMillis, TimestampMillis)

Indicates that the provided data timestamp is not greater than a previously written package timestamp.

For the price adapter to accept a new price update, the associated timestamp must be strictly greater than the timestamp of the last update. This error is raised if a new @@ -73,7 +76,7 @@ is not outdated or stale compared to the existing records, thereby maintaining the chronological integrity and consistency of the updates.

Includes the value of a current update timestamp and the last update timestamp.

-

Implementations§

source§

impl Error

source

pub fn code(&self) -> u16

Trait Implementations§

source§

impl Clone for Error

source§

fn clone(&self) -> Error

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<CryptoError> for Error

source§

fn from(value: CryptoError) -> Self

Converts to this type from the input type.
source§

impl From<Error> for Error

source§

fn from(value: Error) -> Self

Converts to this type from the input type.
source§

impl PartialEq for Error

source§

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

This method tests for self and other values to be equal, and is used +

Implementations§

source§

impl Error

source

pub fn code(&self) -> u16

Trait Implementations§

source§

impl Clone for Error

source§

fn clone(&self) -> Error

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<CryptoError> for Error

source§

fn from(value: CryptoError) -> Self

Converts to this type from the input type.
source§

impl From<Error> for Error

source§

fn from(value: Error) -> Self

Converts to this type from the input type.
source§

impl PartialEq for Error

source§

fn eq(&self, other: &Error) -> 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 Error

source§

impl StructuralPartialEq for Error

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 diff --git a/static/rust/redstone/rust_sdk_2/redstone/network/error/index.html b/static/rust/redstone/rust_sdk_2/redstone/network/error/index.html index bf85daf6..ab4f0790 100644 --- a/static/rust/redstone/rust_sdk_2/redstone/network/error/index.html +++ b/static/rust/redstone/rust_sdk_2/redstone/network/error/index.html @@ -1 +1 @@ -redstone::network::error - Rust

Module redstone::network::error

source ·

Structs§

Enums§

  • Errors that can be encountered in the deserializing&decrypting the RedStone payload or just contract execution process.
\ No newline at end of file +redstone::network::error - Rust

Module redstone::network::error

source ·

Structs§

Enums§

  • Errors that can be encountered in the deserializing&decrypting the RedStone payload or just contract execution process.
\ No newline at end of file diff --git a/static/rust/redstone/rust_sdk_2/search-index.js b/static/rust/redstone/rust_sdk_2/search-index.js index b51cc221..de072010 100644 --- a/static/rust/redstone/rust_sdk_2/search-index.js +++ b/static/rust/redstone/rust_sdk_2/search-index.js @@ -1,5 +1,5 @@ var searchIndex = new Map(JSON.parse('[\ -["redstone",{"t":"FKRGRFRPPKFPFFFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNCCNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNMNNNNNNNNCNNNNCNNMNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNICPPGNNNNNNNNNNNNHHNHHHNECECCCFNNNNNNNNNNNNNNNNNNNNNNNNHPPIFNNNNNNNNNNNNNONNNNONKMMMMFINNNNNNNNNNNNNNCCHHHHHHHKKKMMMKFNCNNNCNNNMNNNNNNKKMMPPPPPPPFPPPGPPPPPPPPNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNFFINNNNNNNNNNNNNNNNNNNNNNNNNCNNGIINNNNNNNNNNNNNN","n":["Bytes","Crypto","Crypto","CryptoError","Environment","FeedId","KeccakOutput","RecoverPreHash","RecoveryByte","RedStoneConfig","RedStoneConfigImpl","Signature","SignerAddress","TimestampMillis","Value","add","add_all_dependencies","add_all_dependencies","add_all_dependencies","as_","as_","as_","as_","as_","as_","as_","as_ascii_str","as_be_bytes","as_hex_str","as_hex_str","as_millis","as_ref","as_ref","as_ref","base32_len","base32_len","base32_len","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","casper","check_base32","check_base32","check_base32","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_to_uninit","clone_to_uninit","clone_to_uninit","clone_to_uninit","clone_to_uninit","clone_to_uninit","clone_to_uninit","clone_to_uninit","clone_to_uninit","clone_to_uninit","cmp","cmp","cmp","code","compare","compare","compare","config","config","contextual_try_into","contextual_try_into","contextual_try_into","contextual_try_into","contextual_try_into","contextual_try_into","contextual_try_into","contract","core","decode_body_with_value_kind","decode_body_with_value_kind","decode_body_with_value_kind","default","default_ext","encode_body","encode_body","encode_body","encode_hex","encode_hex","encode_hex","encode_hex_upper","encode_hex_upper","encode_hex_upper","encode_value_kind","encode_value_kind","encode_value_kind","eq","eq","eq","eq","eq","eq","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_millis","from_u256","get_length","get_length","get_length","hash","helpers","into","into","into","into","into","into","into","is_same_or_after","is_same_or_before","keccak256","labelled_resolve","labelled_resolve","labelled_resolve","labelled_resolve","labelled_resolve","labelled_resolve","labelled_resolve","le_bytes","network","new","partial_cmp","partial_cmp","partial_cmp","radix","recover_address","recover_address","recover_public_key","resolve","resolve","resolve","resolve","resolve","resolve","resolve","solana","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_u256","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_data","type_data","type_data","type_id","type_id","type_id","type_id","type_id","type_id","type_id","value_kind","value_kind","value_kind","vzip","vzip","vzip","vzip","vzip","vzip","vzip","write_base32","write_base32","write_base32","CasperRedStoneConfig","verification","Trusted","Untrusted","UpdateTimestampVerifier","as_","borrow","borrow_mut","contextual_try_into","from","into","labelled_resolve","resolve","try_from","try_into","type_id","verifier","verify_package_timestamp","verify_signers_config","verify_timestamp","verify_trusted_update","verify_untrusted_update","verify_write_timestamp","vzip","ProcessorResult","config","process_payload","processor","processor_result","validator","Config","as_","block_timestamp","borrow","borrow_mut","contextual_try_into","feed_ids","feed_index","fmt","from","into","labelled_resolve","max_timestamp_ahead_ms","max_timestamp_delay_ms","resolve","signer_count_threshold","signer_index","signers","try_from","try_into","try_new","type_id","validate_signer_count_threshold","validate_timestamp","vzip","process_payload","Err","Ok","ProcessorResult","ValidatedPayload","as_","borrow","borrow_mut","contextual_try_into","eq","equivalent","equivalent","equivalent","equivalent","fmt","from","into","labelled_resolve","min_timestamp","resolve","try_from","try_into","type_id","values","vzip","Validator","feed_index","signer_index","validate_signer_count_threshold","validate_timestamp","DefaultCrypto","StdRedStoneConfig","as_","borrow","borrow_mut","contextual_try_into","from","into","keccak256","labelled_resolve","recover_public_key","resolve","try_from","try_into","type_id","vzip","hex","iter_into","hex_from","hex_to_bytes","make_bytes","make_feed_id","make_signer_address","sample_payload_bytes","sample_payload_hex","IterInto","IterIntoOpt","OptIterIntoOpt","iter_into","iter_into_opt","opt_iter_into_opt","Environment","StdEnv","as_","as_str","borrow","borrow_mut","contextual_try_into","error","from","into","labelled_resolve","print","print","resolve","try_from","try_into","type_id","vzip","AsAsciiStr","AsHexStr","as_ascii_str","as_hex_str","ArrayIsEmpty","ConfigEmptyFeedIds","ConfigExceededSignerCount","ConfigInsufficientSignerCount","ConfigReocuringFeedId","ConfigReocuringSigner","ContractError","ContractErrorContent","CryptographicError","CurrentTimestampMustBeGreaterThanLatestUpdateTimestamp","DataTimestampMustBeGreaterThanBefore","Error","InsufficientSignerCount","NonEmptyPayloadRemainder","NumberOverflow","ReocuringFeedId","SizeNotSupported","TimestampTooFuture","TimestampTooOld","WrongRedStoneMarker","as_","as_","borrow","borrow","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","clone_to_uninit","clone_to_uninit","code","code","contextual_try_into","contextual_try_into","eq","eq","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","fmt","fmt","fmt","from","from","from","into","into","labelled_resolve","labelled_resolve","msg","resolve","resolve","to_owned","to_owned","to_string","try_from","try_from","try_into","try_into","type_id","type_id","vzip","vzip","RadixCrypto","RadixEnv","RadixRedStoneConfig","as_","as_","borrow","borrow","borrow_mut","borrow_mut","contextual_try_into","contextual_try_into","from","from","into","into","keccak256","labelled_resolve","labelled_resolve","print","recover_public_key","resolve","resolve","try_from","try_from","try_into","try_into","type_id","type_id","value_ext","vzip","vzip","SolanaCrypto","SolanaEnv","SolanaRedStoneConfig","as_","borrow","borrow_mut","contextual_try_into","from","into","keccak256","labelled_resolve","recover_public_key","resolve","try_from","try_into","type_id","vzip"],"q":[[0,"redstone"],[254,"redstone::casper"],[255,"redstone::contract"],[256,"redstone::contract::verification"],[278,"redstone::core"],[284,"redstone::core::config"],[309,"redstone::core::processor"],[310,"redstone::core::processor_result"],[334,"redstone::core::validator"],[339,"redstone::default_ext"],[355,"redstone::helpers"],[357,"redstone::helpers::hex"],[364,"redstone::helpers::iter_into"],[370,"redstone::network"],[388,"redstone::network::as_str"],[392,"redstone::network::error"],[462,"redstone::radix"],[493,"redstone::solana"],[510,"redstone::types::timestamp_millis"],[511,"core::convert"],[512,"radix_common::data::scrypto::custom_schema"],[513,"sbor::schema::type_aggregator"],[514,"bnum::cast"],[515,"redstone::types::feed_id"],[516,"alloc::string"],[517,"redstone::types::value"],[518,"redstone::types::signer_address"],[519,"redstone::types::bytes"],[520,"bech32"],[521,"alloc::vec"],[522,"core::result"],[523,"redstone::crypto"],[524,"core::cmp"],[525,"radix_common::data::scrypto::custom_value_kind"],[526,"sbor::value_kind"],[527,"sbor::decoder"],[528,"sbor::encoder"],[529,"core::iter::traits::collect"],[530,"core::fmt"],[531,"casper_types::bytesrepr::bytes"],[532,"primitive_types"],[533,"core::hash"],[534,"radix_rust::resolve"],[535,"core::option"],[536,"sbor::schema::type_link"],[537,"sbor::schema::type_data"],[538,"core::any"],[539,"core::ops::function"]],"i":[0,0,26,0,26,0,28,21,21,0,0,21,0,0,0,1,9,14,11,30,21,16,9,14,1,11,9,11,9,14,1,16,9,14,16,9,14,30,21,16,9,14,1,11,30,21,16,9,14,1,11,0,16,9,14,21,16,9,14,1,11,21,16,9,14,1,11,21,16,9,9,14,14,1,1,11,11,9,14,1,21,9,14,1,26,30,30,21,16,9,14,1,11,0,0,9,14,11,16,0,9,14,11,16,9,14,16,9,14,9,14,11,21,16,9,14,1,11,21,21,21,21,16,16,16,16,9,9,9,9,14,14,14,14,1,1,1,1,11,11,11,11,21,16,9,14,1,11,30,30,21,16,16,16,9,9,9,14,14,1,1,11,11,11,11,11,11,11,1,11,9,14,11,9,0,30,21,16,9,14,1,11,1,1,28,30,21,16,9,14,1,11,11,0,14,9,14,1,0,28,28,28,30,21,16,9,14,1,11,0,21,16,9,14,1,11,11,30,21,16,9,14,1,11,30,21,16,9,14,1,11,9,14,11,30,21,16,9,14,1,11,9,14,11,30,21,16,9,14,1,11,16,9,14,0,0,55,55,0,55,55,55,55,55,55,55,55,55,55,55,55,0,0,55,0,0,0,55,0,0,0,0,0,0,0,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,0,58,58,0,0,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,0,60,60,60,60,0,0,71,71,71,71,71,71,71,71,71,71,71,71,71,71,0,0,0,0,0,0,0,0,0,0,0,0,64,65,66,0,0,72,0,72,72,72,0,72,72,72,29,72,72,72,72,72,72,0,0,68,69,57,57,57,57,57,57,57,0,57,57,57,0,57,57,57,57,57,57,57,57,70,57,70,57,70,57,70,57,70,57,70,57,57,70,70,57,70,57,70,70,70,70,57,57,57,57,70,57,57,70,57,57,70,57,70,57,70,70,57,70,57,57,70,57,70,57,70,57,70,57,0,0,0,73,74,73,74,73,74,73,74,73,74,73,74,73,73,74,74,73,73,74,73,74,73,74,73,74,0,73,74,0,0,0,75,75,75,75,75,75,75,75,75,75,75,75,75,75],"f":"```````````````{{{d{b}}c}b{{f{b}}}}{{{d{h{l{j}}}}}n}00{cg{}{}{{A`{e}}}}000000{{{d{Ab}}}Ad}{{{d{Af}}}{{d{{Aj{Ah}}}}}}1{{{d{Al}}}Ad}{{{d{b}}}An}{{{d{B`}}}{{d{{Aj{Ah}}}}}}{{{d{Ab}}}{{d{{Aj{Ah}}}}}}{{{d{Al}}}{{d{{Aj{Ah}}}}}}{{{d{c}}}Bb{}}00{{{d{c}}}{{d{e}}}{}{}}000000{{{d{hc}}}{{d{he}}}{}{}}000000`{c{{Bh{{Bf{Bd}}}}}{}}00{{{d{Bj}}}Bj}{{{d{B`}}}B`}{{{d{Ab}}}Ab}{{{d{Al}}}Al}{{{d{b}}}b}{{{d{Af}}}Af}{{{d{c}}{d{he}}}n{}{}}00000{{{d{c}}}n{}}000000000{{{d{Ab}}{d{Ab}}}Bl}{{{d{Al}}{d{Al}}}Bl}{{{d{b}}{d{b}}}Bl}{{{d{Bj}}}Bn}{{{d{c}}{d{e}}}Bl{}{}}00{{{d{{Cd{}{{C`{c}}{Cb{e}}}}}}}{{d{Cf}}}ChCj}{{{d{{Cl{ce}}}}}{{d{Cf}}}ChCj}{{cd}{{Bh{e}}}{}{}}000000``{{{d{hc}}{D`{Cn}}}{{Bh{AbDb}}}{{Dd{Cn}}}}{{{d{hc}}{D`{Cn}}}{{Bh{AlDb}}}{{Dd{Cn}}}}{{{d{hc}}{D`{Cn}}}{{Bh{AfDb}}}{{Dd{Cn}}}}{{}B`}`{{{d{Ab}}{d{hc}}}{{Bh{nDf}}}{{Dh{Cn}}}}{{{d{Al}}{d{hc}}}{{Bh{nDf}}}{{Dh{Cn}}}}{{{d{Af}}{d{hc}}}{{Bh{nDf}}}{{Dh{Cn}}}}{{{d{c}}}e{}{{Dl{Dj}}}}00000321{{{d{Bj}}{d{Bj}}}Dn}{{{d{B`}}{d{B`}}}Dn}{{{d{Ab}}{d{Ab}}}Dn}{{{d{Al}}{d{Al}}}Dn}{{{d{b}}{d{b}}}Dn}{{{d{Af}}{d{Af}}}Dn}{{{d{c}}{d{e}}}Dn{}{}}00000000000000000000000{{{d{Bj}}{d{hE`}}}Eb}{{{d{B`}}{d{hE`}}}Eb}{{{d{Ab}}{d{hE`}}}Eb}{{{d{Al}}{d{hE`}}}Eb}{{{d{b}}{d{hE`}}}Eb}{{{d{Af}}{d{hE`}}}Eb}{Cf{{Cl{ce}}}{}{}}{cc{}}00{{{Bf{Ah}}}B`}{EdB`}{{{Bf{Ah}}}Ab}{{{Ef{Ah}}}Ab}44{{{Bf{Ah}}}Al}5{Anb}{EhAf}{BnAf}{EjAf}{AnAf}{AhAf}{{{Bf{Ah}}}Af}<6{ElAf}{{{d{Ab}}}Bb}{{{d{Al}}}Bb}{{{d{Af}}}Bb}{{{d{Ab}}{d{hc}}}nEn}`{ce{}{}}000000{{{d{b}}b}Dn}0{ce{{F`{{Aj{Ah}}}}}{}}{{c{d{e}}}g{}Fb{}}000000{{{d{Af}}}{{Ef{Ah}}}}`{{{Ef{Ah}}}Al}{{{d{Ab}}{d{Ab}}}{{Fd{Bl}}}}{{{d{Al}}{d{Al}}}{{Fd{Bl}}}}{{{d{b}}{d{b}}}{{Fd{Bl}}}}`{{ce}{{Bh{AlBj}}}{{F`{{Aj{Ah}}}}}{{F`{{Aj{Ah}}}}}}0{{Ahce}{{Bh{B`Bj}}}{{F`{{Aj{Ah}}}}}{}}:::::::`{{{d{c}}}e{}{}}00000{AfEl}{c{{Bh{e}}}{}{}}0000000000000{{}{{Fh{jFf}}}}00{{{d{c}}}Fj{}}000000{{}{{D`{Cn}}}}00{ce{}{}}000000{{{d{c}}{d{he}}}{{Bh{n}}}{}Fl}00`````{cg{}{}{{A`{e}}}}{{{d{c}}}{{d{e}}}{}{}}{{{d{hc}}}{{d{he}}}{}{}}{{cd}{{Bh{e}}}{}{}}{cc{}}6{{c{d{e}}}g{}Fb{}}7;;9{{{d{c}}{d{{Aj{c}}}}}FnG`}{{bb}{{Bh{nGb}}}}{{{d{{Aj{Al}}}}Ah}{{Bh{nGb}}}}{{{d{Fn}}b{Fd{b}}bbb}{{Bh{nGb}}}}{{b{Fd{b}}bb}{{Bh{nGb}}}}{{b{Fd{b}}bbb}{{Bh{nGb}}}}{{b{Fd{b}}b}{{Bh{nGb}}}}>```````<{{{d{Cf}}}{{d{b}}}}<;:{{{d{Cf}}}{{d{{Bf{Ab}}}}}}{{{d{Cf}}Ab}{{Fd{Bb}}}}{{{d{Cf}}{d{hE`}}}Eb}<{ce{}{}}<440{{{d{Cf}}}{{d{Ah}}}}{{{d{Cf}}{d{Al}}}{{Fd{Bb}}}}{{{d{Cf}}}{{d{{Bf{Al}}}}}}{c{{Bh{e}}}{}{}}0{{Ah{Bf{Al}}{Bf{Ab}}b{Fd{b}}{Fd{b}}}{{Bh{CfGb}}}}{{{d{c}}}Fj{}}{{{d{Cf}}Bb{d{{Aj{{Fd{Af}}}}}}}{{Bh{{Bf{Af}}Gb}}}}{{{d{Cf}}Bbb}{{Bh{bGb}}}}8{{{d{c}}e}GdCd{{f{B`}}}}````{cg{}{}{{A`{e}}}}{{{d{c}}}{{d{e}}}{}{}}{{{d{hc}}}{{d{he}}}{}{}}{{cd}{{Bh{e}}}{}{}}{{{d{Gf}}{d{Gf}}}Dn}{{{d{c}}{d{e}}}Dn{}{}}000{{{d{Gf}}{d{hE`}}}Eb}{cc{}}{ce{}{}}{{c{d{e}}}g{}Fb{}}`1??=`1`{{{d{Gh}}Ab}{{Fd{Bb}}}}{{{d{Gh}}{d{Al}}}{{Fd{Bb}}}}{{{d{Gh}}Bb{d{{Aj{{Fd{Af}}}}}}}{{Bh{{Bf{Af}}Gb}}}}{{{d{Gh}}Bbb}{{Bh{bGb}}}}``=<;:65{ce{{F`{{Aj{Ah}}}}}{}}5{{Ahce}{{Bh{B`Bj}}}{{F`{{Aj{Ah}}}}}{}}7{c{{Bh{e}}}{}{}}0{{{d{c}}}Fj{}}9``{cAd{{F`{{Aj{Ah}}}}}}{Ad{{Bf{Ah}}}}{{{Bf{{d{Gj}}}}{Gn{{d{Gj}}}{{Gl{Ad}}}}}{{Bf{B`}}}}{{{d{Gj}}}Ab}{{{d{Gj}}}Al}{{}{{Bf{Ah}}}}{{}Ad}```{{{d{H`}}}c{}}{{{d{Hb}}}c{}}{{{d{Hd}}}c{}}``{cg{}{}{{A`{e}}}}`{{{d{c}}}{{d{e}}}{}{}}{{{d{hc}}}{{d{he}}}{}{}}{{cd}{{Bh{e}}}{}{}}`{cc{}}{ce{}{}}{{c{d{e}}}g{}Fb{}}{cn{{Hf{}{{Gl{Ad}}}}}}02{c{{Bh{e}}}{}{}}0{{{d{c}}}Fj{}}4``{{{d{Hh}}}Ad}{{{d{Hj}}}Ad}````````````````````;;::99{{{d{Hl}}}Hl}{{{d{Gb}}}Gb}{{{d{c}}{d{he}}}n{}{}}0{{{d{c}}}n{}}0{{{d{Gb}}}Bn}`=={{{d{Hl}}{d{Hl}}}Dn}{{{d{Gb}}{d{Gb}}}Dn}{{{d{c}}{d{e}}}Dn{}{}}0000000{{{d{Hl}}{d{hE`}}}Eb}{{{d{Gb}}{d{hE`}}}Eb}0{cc{}}0{BjGb}{ce{}{}}0{{c{d{e}}}g{}Fb{}}0`11{{{d{c}}}e{}{}}0{{{d{c}}}Ad{}}{c{{Bh{e}}}{}{}}000{{{d{c}}}Fj{}}055```{cg{}{}{{A`{e}}}}0{{{d{c}}}{{d{e}}}{}{}}0{{{d{hc}}}{{d{he}}}{}{}}0{{cd}{{Bh{e}}}{}{}}0;;99{ce{{F`{{Aj{Ah}}}}}{}}99{cn{{Hf{}{{Gl{Ad}}}}}}{{Ahce}{{Bh{B`Bj}}}{{F`{{Aj{Ah}}}}}{}}<<888877`<<```6543><2;0<887<","D":"Ll","p":[[5,"TimestampMillis",0,510],[1,"reference"],[10,"Into",511],[0,"mut"],[6,"ScryptoCustomTypeKind",512],[5,"TypeAggregator",513],[1,"unit"],[10,"CastFrom",514],[5,"FeedId",0,515],[5,"String",516],[5,"Value",0,517],[1,"u8"],[1,"slice"],[5,"SignerAddress",0,518],[1,"u64"],[5,"Bytes",0,519],[1,"usize"],[5,"u5",520],[5,"Vec",521],[6,"Result",522],[6,"CryptoError",0,523],[6,"Ordering",524],[1,"u16"],[17,"Crypto"],[17,"Environment"],[10,"RedStoneConfig",0],[5,"Config",284],[10,"Crypto",0,523],[10,"Environment",370],[5,"RedStoneConfigImpl",0],[6,"ScryptoCustomValueKind",525],[6,"ValueKind",526],[6,"DecodeError",527],[10,"Decoder",527],[6,"EncodeError",528],[10,"Encoder",528],[1,"char"],[10,"FromIterator",529],[1,"bool"],[5,"Formatter",530],[8,"Result",530],[5,"Bytes",531],[1,"array"],[1,"u32"],[1,"u128"],[5,"U256",532],[10,"Hasher",533],[10,"AsRef",511],[10,"LabelResolver",534],[6,"Option",535],[6,"RustTypeId",536],[5,"TypeData",537],[5,"TypeId",538],[10,"WriteBase32",520],[6,"UpdateTimestampVerifier",256],[10,"PartialEq",524],[6,"Error",392],[8,"ProcessorResult",310],[5,"ValidatedPayload",310],[10,"Validator",334],[1,"str"],[17,"Output"],[1,"fn"],[10,"IterInto",364],[10,"IterIntoOpt",364],[10,"OptIterIntoOpt",364],[10,"FnOnce",539],[10,"AsAsciiStr",388],[10,"AsHexStr",388],[5,"ContractErrorContent",392],[5,"DefaultCrypto",339],[5,"StdEnv",370],[5,"RadixCrypto",462],[5,"RadixEnv",462],[6,"SolanaCrypto",493]],"r":[[0,519],[1,523],[3,523],[5,515],[12,518],[13,510],[14,517],[278,310],[280,309]],"b":[[152,"impl-From%3CVec%3Cu8%3E%3E-for-Bytes"],[153,"impl-From%3CBytes%3E-for-Bytes"],[154,"impl-From%3CVec%3Cu8%3E%3E-for-FeedId"],[155,"impl-From%3C%5Bu8;+VALUE_SIZE%5D%3E-for-FeedId"],[161,"impl-From%3Cu32%3E-for-Value"],[162,"impl-From%3Cu16%3E-for-Value"],[163,"impl-From%3Cu128%3E-for-Value"],[164,"impl-From%3Cu64%3E-for-Value"],[165,"impl-From%3Cu8%3E-for-Value"],[166,"impl-From%3CVec%3Cu8%3E%3E-for-Value"],[439,"impl-Display-for-Error"],[440,"impl-Debug-for-Error"]],"c":"OjAAAAAAAAA=","e":"OzAAAAEAAJgBLQACAAAABAAAAAcAAgALAAEAEAAjADUAHwBWAAcAXwA2AJkAAwCfAAAAoQAGAKkABgC3AA8AyAAJANMALAABAQEABAEDAAoBBAAWAQYAHgEAACABAgAkAQEAKAEAACsBAAAtAQAALwEBADIBAwA5AQAAOwEJAEcBAABJAQMATgEAAFYBAwBcARYAdQEFAH0BAAB/AQkAkAEAAJ0BHAC8AQAAvwERANIBBwDeAREA8QEDAPcBBwA="}],\ +["redstone",{"t":"FKRGRFRPPKFPFFFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNCCNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNMNNNNNNNNCNNNNCNNMNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNICPPGNNNNNNNNNNNNHHNHHHNECECCCFNNNNNNNNNNNNNNNNNNNNNNNNHPPIFNNNNNNNNNNNNNNONNNONKMMMMFINNNNNNNNNNNNNNCCHHHHHHHKKKMMMKFNCNNNCNNNMNNNNNNKKMMPPPPPPPFPPPGPPPPPPPPPNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNFFINNNNNNNNNNNNNNNNNNNNNNNNNCNNGIINNNNNNNNNNNNNN","n":["Bytes","Crypto","Crypto","CryptoError","Environment","FeedId","KeccakOutput","RecoverPreHash","RecoveryByte","RedStoneConfig","RedStoneConfigImpl","Signature","SignerAddress","TimestampMillis","Value","add","add_all_dependencies","add_all_dependencies","add_all_dependencies","as_","as_","as_","as_","as_","as_","as_","as_ascii_str","as_be_bytes","as_hex_str","as_hex_str","as_millis","as_ref","as_ref","as_ref","base32_len","base32_len","base32_len","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","casper","check_base32","check_base32","check_base32","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_to_uninit","clone_to_uninit","clone_to_uninit","clone_to_uninit","clone_to_uninit","clone_to_uninit","clone_to_uninit","clone_to_uninit","clone_to_uninit","clone_to_uninit","cmp","cmp","cmp","code","compare","compare","compare","config","config","contextual_try_into","contextual_try_into","contextual_try_into","contextual_try_into","contextual_try_into","contextual_try_into","contextual_try_into","contract","core","decode_body_with_value_kind","decode_body_with_value_kind","decode_body_with_value_kind","default","default_ext","encode_body","encode_body","encode_body","encode_hex","encode_hex","encode_hex","encode_hex_upper","encode_hex_upper","encode_hex_upper","encode_value_kind","encode_value_kind","encode_value_kind","eq","eq","eq","eq","eq","eq","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_millis","from_u256","get_length","get_length","get_length","hash","helpers","into","into","into","into","into","into","into","is_same_or_after","is_same_or_before","keccak256","labelled_resolve","labelled_resolve","labelled_resolve","labelled_resolve","labelled_resolve","labelled_resolve","labelled_resolve","le_bytes","network","new","partial_cmp","partial_cmp","partial_cmp","radix","recover_address","recover_address","recover_public_key","resolve","resolve","resolve","resolve","resolve","resolve","resolve","solana","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_u256","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_data","type_data","type_data","type_id","type_id","type_id","type_id","type_id","type_id","type_id","value_kind","value_kind","value_kind","vzip","vzip","vzip","vzip","vzip","vzip","vzip","write_base32","write_base32","write_base32","CasperRedStoneConfig","verification","Trusted","Untrusted","UpdateTimestampVerifier","as_","borrow","borrow_mut","contextual_try_into","from","into","labelled_resolve","resolve","try_from","try_into","type_id","verifier","verify_package_timestamp","verify_signers_config","verify_timestamp","verify_trusted_update","verify_untrusted_update","verify_write_timestamp","vzip","ProcessorResult","config","process_payload","processor","processor_result","validator","Config","as_","block_timestamp","borrow","borrow_mut","contextual_try_into","feed_ids","feed_index","fmt","from","into","labelled_resolve","max_timestamp_ahead_ms","max_timestamp_delay_ms","resolve","signer_count_threshold","signer_index","signers","try_from","try_into","try_new","type_id","validate_signer_count_threshold","validate_timestamp","vzip","process_payload","Err","Ok","ProcessorResult","ValidatedPayload","as_","borrow","borrow_mut","contextual_try_into","eq","equivalent","equivalent","equivalent","equivalent","fmt","from","into","labelled_resolve","resolve","timestamp","try_from","try_into","type_id","values","vzip","Validator","feed_index","signer_index","validate_signer_count_threshold","validate_timestamp","DefaultCrypto","StdRedStoneConfig","as_","borrow","borrow_mut","contextual_try_into","from","into","keccak256","labelled_resolve","recover_public_key","resolve","try_from","try_into","type_id","vzip","hex","iter_into","hex_from","hex_to_bytes","make_bytes","make_feed_id","make_signer_address","sample_payload_bytes","sample_payload_hex","IterInto","IterIntoOpt","OptIterIntoOpt","iter_into","iter_into_opt","opt_iter_into_opt","Environment","StdEnv","as_","as_str","borrow","borrow_mut","contextual_try_into","error","from","into","labelled_resolve","print","print","resolve","try_from","try_into","type_id","vzip","AsAsciiStr","AsHexStr","as_ascii_str","as_hex_str","ArrayIsEmpty","ConfigEmptyFeedIds","ConfigExceededSignerCount","ConfigInsufficientSignerCount","ConfigReocuringFeedId","ConfigReocuringSigner","ContractError","ContractErrorContent","CryptographicError","CurrentTimestampMustBeGreaterThanLatestUpdateTimestamp","DataTimestampMustBeGreaterThanBefore","Error","InsufficientSignerCount","NonEmptyPayloadRemainder","NumberOverflow","ReocuringFeedId","SizeNotSupported","TimestampDifferentThanOthers","TimestampTooFuture","TimestampTooOld","WrongRedStoneMarker","as_","as_","borrow","borrow","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","clone_to_uninit","clone_to_uninit","code","code","contextual_try_into","contextual_try_into","eq","eq","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","fmt","fmt","fmt","from","from","from","into","into","labelled_resolve","labelled_resolve","msg","resolve","resolve","to_owned","to_owned","to_string","try_from","try_from","try_into","try_into","type_id","type_id","vzip","vzip","RadixCrypto","RadixEnv","RadixRedStoneConfig","as_","as_","borrow","borrow","borrow_mut","borrow_mut","contextual_try_into","contextual_try_into","from","from","into","into","keccak256","labelled_resolve","labelled_resolve","print","recover_public_key","resolve","resolve","try_from","try_from","try_into","try_into","type_id","type_id","value_ext","vzip","vzip","SolanaCrypto","SolanaEnv","SolanaRedStoneConfig","as_","borrow","borrow_mut","contextual_try_into","from","into","keccak256","labelled_resolve","recover_public_key","resolve","try_from","try_into","type_id","vzip"],"q":[[0,"redstone"],[254,"redstone::casper"],[255,"redstone::contract"],[256,"redstone::contract::verification"],[278,"redstone::core"],[284,"redstone::core::config"],[309,"redstone::core::processor"],[310,"redstone::core::processor_result"],[334,"redstone::core::validator"],[339,"redstone::default_ext"],[355,"redstone::helpers"],[357,"redstone::helpers::hex"],[364,"redstone::helpers::iter_into"],[370,"redstone::network"],[388,"redstone::network::as_str"],[392,"redstone::network::error"],[463,"redstone::radix"],[494,"redstone::solana"],[511,"redstone::types::timestamp_millis"],[512,"core::convert"],[513,"radix_common::data::scrypto::custom_schema"],[514,"sbor::schema::type_aggregator"],[515,"bnum::cast"],[516,"redstone::types::feed_id"],[517,"alloc::string"],[518,"redstone::types::value"],[519,"redstone::types::signer_address"],[520,"redstone::types::bytes"],[521,"bech32"],[522,"alloc::vec"],[523,"core::result"],[524,"redstone::crypto"],[525,"core::cmp"],[526,"radix_common::data::scrypto::custom_value_kind"],[527,"sbor::value_kind"],[528,"sbor::decoder"],[529,"sbor::encoder"],[530,"core::iter::traits::collect"],[531,"core::fmt"],[532,"casper_types::bytesrepr::bytes"],[533,"primitive_types"],[534,"core::hash"],[535,"radix_rust::resolve"],[536,"core::option"],[537,"sbor::schema::type_link"],[538,"sbor::schema::type_data"],[539,"core::any"],[540,"core::ops::function"]],"i":[0,0,26,0,26,0,28,21,21,0,0,21,0,0,0,1,9,14,11,30,21,16,9,14,1,11,9,11,9,14,1,16,9,14,16,9,14,30,21,16,9,14,1,11,30,21,16,9,14,1,11,0,16,9,14,21,16,9,14,1,11,21,16,9,14,1,11,21,16,9,9,14,14,1,1,11,11,9,14,1,21,9,14,1,26,30,30,21,16,9,14,1,11,0,0,9,14,11,16,0,9,14,11,16,9,14,16,9,14,9,14,11,21,16,9,14,1,11,21,21,21,21,16,16,16,16,9,9,9,9,14,14,14,14,1,1,1,1,11,11,11,11,21,16,9,14,1,11,30,30,21,16,16,16,9,9,9,14,14,1,1,11,11,11,11,11,11,11,1,11,9,14,11,9,0,30,21,16,9,14,1,11,1,1,28,30,21,16,9,14,1,11,11,0,14,9,14,1,0,28,28,28,30,21,16,9,14,1,11,0,21,16,9,14,1,11,11,30,21,16,9,14,1,11,30,21,16,9,14,1,11,9,14,11,30,21,16,9,14,1,11,9,14,11,30,21,16,9,14,1,11,16,9,14,0,0,55,55,0,55,55,55,55,55,55,55,55,55,55,55,55,0,0,55,0,0,0,55,0,0,0,0,0,0,0,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,0,58,58,0,0,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,0,60,60,60,60,0,0,71,71,71,71,71,71,71,71,71,71,71,71,71,71,0,0,0,0,0,0,0,0,0,0,0,0,64,65,66,0,0,72,0,72,72,72,0,72,72,72,29,72,72,72,72,72,72,0,0,68,69,57,57,57,57,57,57,57,0,57,57,57,0,57,57,57,57,57,57,57,57,57,70,57,70,57,70,57,70,57,70,57,70,57,57,70,70,57,70,57,70,70,70,70,57,57,57,57,70,57,57,70,57,57,70,57,70,57,70,70,57,70,57,57,70,57,70,57,70,57,70,57,0,0,0,73,74,73,74,73,74,73,74,73,74,73,74,73,73,74,74,73,73,74,73,74,73,74,73,74,0,73,74,0,0,0,75,75,75,75,75,75,75,75,75,75,75,75,75,75],"f":"```````````````{{{d{b}}c}b{{f{b}}}}{{{d{h{l{j}}}}}n}00{cg{}{}{{A`{e}}}}000000{{{d{Ab}}}Ad}{{{d{Af}}}{{d{{Aj{Ah}}}}}}1{{{d{Al}}}Ad}{{{d{b}}}An}{{{d{B`}}}{{d{{Aj{Ah}}}}}}{{{d{Ab}}}{{d{{Aj{Ah}}}}}}{{{d{Al}}}{{d{{Aj{Ah}}}}}}{{{d{c}}}Bb{}}00{{{d{c}}}{{d{e}}}{}{}}000000{{{d{hc}}}{{d{he}}}{}{}}000000`{c{{Bh{{Bf{Bd}}}}}{}}00{{{d{Bj}}}Bj}{{{d{B`}}}B`}{{{d{Ab}}}Ab}{{{d{Al}}}Al}{{{d{b}}}b}{{{d{Af}}}Af}{{{d{c}}{d{he}}}n{}{}}00000{{{d{c}}}n{}}000000000{{{d{Ab}}{d{Ab}}}Bl}{{{d{Al}}{d{Al}}}Bl}{{{d{b}}{d{b}}}Bl}{{{d{Bj}}}Bn}{{{d{c}}{d{e}}}Bl{}{}}00{{{d{{Cd{}{{C`{c}}{Cb{e}}}}}}}{{d{Cf}}}ChCj}{{{d{{Cl{ce}}}}}{{d{Cf}}}ChCj}{{cd}{{Bh{e}}}{}{}}000000``{{{d{hc}}{D`{Cn}}}{{Bh{AbDb}}}{{Dd{Cn}}}}{{{d{hc}}{D`{Cn}}}{{Bh{AlDb}}}{{Dd{Cn}}}}{{{d{hc}}{D`{Cn}}}{{Bh{AfDb}}}{{Dd{Cn}}}}{{}B`}`{{{d{Ab}}{d{hc}}}{{Bh{nDf}}}{{Dh{Cn}}}}{{{d{Al}}{d{hc}}}{{Bh{nDf}}}{{Dh{Cn}}}}{{{d{Af}}{d{hc}}}{{Bh{nDf}}}{{Dh{Cn}}}}{{{d{c}}}e{}{{Dl{Dj}}}}00000321{{{d{Bj}}{d{Bj}}}Dn}{{{d{B`}}{d{B`}}}Dn}{{{d{Ab}}{d{Ab}}}Dn}{{{d{Al}}{d{Al}}}Dn}{{{d{b}}{d{b}}}Dn}{{{d{Af}}{d{Af}}}Dn}{{{d{c}}{d{e}}}Dn{}{}}00000000000000000000000{{{d{Bj}}{d{hE`}}}Eb}{{{d{B`}}{d{hE`}}}Eb}{{{d{Ab}}{d{hE`}}}Eb}{{{d{Al}}{d{hE`}}}Eb}{{{d{b}}{d{hE`}}}Eb}{{{d{Af}}{d{hE`}}}Eb}{cc{}}{Cf{{Cl{ce}}}{}{}}11{{{Bf{Ah}}}B`}{EdB`}{{{Bf{Ah}}}Ab}{{{Ef{Ah}}}Ab}55{{{Bf{Ah}}}Al}{Anb}7{AnAf}{AhAf}{EhAf}:{{{Bf{Ah}}}Af}{EjAf}{BnAf}6{ElAf}{{{d{Ab}}}Bb}{{{d{Al}}}Bb}{{{d{Af}}}Bb}{{{d{Ab}}{d{hc}}}nEn}`{ce{}{}}000000{{{d{b}}b}Dn}0{ce{{F`{{Aj{Ah}}}}}{}}{{c{d{e}}}g{}Fb{}}000000{{{d{Af}}}{{Ef{Ah}}}}`{{{Ef{Ah}}}Al}{{{d{Ab}}{d{Ab}}}{{Fd{Bl}}}}{{{d{Al}}{d{Al}}}{{Fd{Bl}}}}{{{d{b}}{d{b}}}{{Fd{Bl}}}}`{{ce}{{Bh{AlBj}}}{{F`{{Aj{Ah}}}}}{{F`{{Aj{Ah}}}}}}0{{Ahce}{{Bh{B`Bj}}}{{F`{{Aj{Ah}}}}}{}}:::::::`{{{d{c}}}e{}{}}00000{AfEl}{c{{Bh{e}}}{}{}}0000000000000{{}{{Fh{jFf}}}}00{{{d{c}}}Fj{}}000000{{}{{D`{Cn}}}}00{ce{}{}}000000{{{d{c}}{d{he}}}{{Bh{n}}}{}Fl}00`````{cg{}{}{{A`{e}}}}{{{d{c}}}{{d{e}}}{}{}}{{{d{hc}}}{{d{he}}}{}{}}{{cd}{{Bh{e}}}{}{}}{cc{}}6{{c{d{e}}}g{}Fb{}}7;;9{{{d{c}}{d{{Aj{c}}}}}FnG`}{{bb}{{Bh{nGb}}}}{{{d{{Aj{Al}}}}Ah}{{Bh{nGb}}}}{{{d{Fn}}b{Fd{b}}bbb}{{Bh{nGb}}}}{{b{Fd{b}}bb}{{Bh{nGb}}}}{{b{Fd{b}}bbb}{{Bh{nGb}}}}{{b{Fd{b}}b}{{Bh{nGb}}}}>```````<{{{d{Cf}}}{{d{b}}}}<;:{{{d{Cf}}}{{d{{Bf{Ab}}}}}}{{{d{Cf}}Ab}{{Fd{Bb}}}}{{{d{Cf}}{d{hE`}}}Eb}<{ce{}{}}<440{{{d{Cf}}}{{d{Ah}}}}{{{d{Cf}}{d{Al}}}{{Fd{Bb}}}}{{{d{Cf}}}{{d{{Bf{Al}}}}}}{c{{Bh{e}}}{}{}}0{{Ah{Bf{Al}}{Bf{Ab}}b{Fd{b}}{Fd{b}}}{{Bh{CfGb}}}}{{{d{c}}}Fj{}}{{{d{Cf}}Bb{d{{Aj{{Fd{Af}}}}}}}{{Bh{{Bf{Af}}Gb}}}}{{{d{Cf}}Bbb}{{Bh{bGb}}}}8{{{d{c}}e}GdCd{{f{B`}}}}````{cg{}{}{{A`{e}}}}{{{d{c}}}{{d{e}}}{}{}}{{{d{hc}}}{{d{he}}}{}{}}{{cd}{{Bh{e}}}{}{}}{{{d{Gf}}{d{Gf}}}Dn}{{{d{c}}{d{e}}}Dn{}{}}000{{{d{Gf}}{d{hE`}}}Eb}{cc{}}{ce{}{}}{{c{d{e}}}g{}Fb{}}1`??=`1`{{{d{Gh}}Ab}{{Fd{Bb}}}}{{{d{Gh}}{d{Al}}}{{Fd{Bb}}}}{{{d{Gh}}Bb{d{{Aj{{Fd{Af}}}}}}}{{Bh{{Bf{Af}}Gb}}}}{{{d{Gh}}Bbb}{{Bh{bGb}}}}``=<;:65{ce{{F`{{Aj{Ah}}}}}{}}5{{Ahce}{{Bh{B`Bj}}}{{F`{{Aj{Ah}}}}}{}}7{c{{Bh{e}}}{}{}}0{{{d{c}}}Fj{}}9``{cAd{{F`{{Aj{Ah}}}}}}{Ad{{Bf{Ah}}}}{{{Bf{{d{Gj}}}}{Gn{{d{Gj}}}{{Gl{Ad}}}}}{{Bf{B`}}}}{{{d{Gj}}}Ab}{{{d{Gj}}}Al}{{}{{Bf{Ah}}}}{{}Ad}```{{{d{H`}}}c{}}{{{d{Hb}}}c{}}{{{d{Hd}}}c{}}``{cg{}{}{{A`{e}}}}`{{{d{c}}}{{d{e}}}{}{}}{{{d{hc}}}{{d{he}}}{}{}}{{cd}{{Bh{e}}}{}{}}`{cc{}}{ce{}{}}{{c{d{e}}}g{}Fb{}}{cn{{Hf{}{{Gl{Ad}}}}}}02{c{{Bh{e}}}{}{}}0{{{d{c}}}Fj{}}4``{{{d{Hh}}}Ad}{{{d{Hj}}}Ad}`````````````````````;;::99{{{d{Hl}}}Hl}{{{d{Gb}}}Gb}{{{d{c}}{d{he}}}n{}{}}0{{{d{c}}}n{}}0{{{d{Gb}}}Bn}`=={{{d{Hl}}{d{Hl}}}Dn}{{{d{Gb}}{d{Gb}}}Dn}{{{d{c}}{d{e}}}Dn{}{}}0000000{{{d{Hl}}{d{hE`}}}Eb}{{{d{Gb}}{d{hE`}}}Eb}0{cc{}}{BjGb}1{ce{}{}}0{{c{d{e}}}g{}Fb{}}0`11{{{d{c}}}e{}{}}0{{{d{c}}}Ad{}}{c{{Bh{e}}}{}{}}000{{{d{c}}}Fj{}}055```{cg{}{}{{A`{e}}}}0{{{d{c}}}{{d{e}}}{}{}}0{{{d{hc}}}{{d{he}}}{}{}}0{{cd}{{Bh{e}}}{}{}}0;;99{ce{{F`{{Aj{Ah}}}}}{}}99{cn{{Hf{}{{Gl{Ad}}}}}}{{Ahce}{{Bh{B`Bj}}}{{F`{{Aj{Ah}}}}}{}}<<888877`<<```6543><2;0<887<","D":"Ln","p":[[5,"TimestampMillis",0,511],[1,"reference"],[10,"Into",512],[0,"mut"],[6,"ScryptoCustomTypeKind",513],[5,"TypeAggregator",514],[1,"unit"],[10,"CastFrom",515],[5,"FeedId",0,516],[5,"String",517],[5,"Value",0,518],[1,"u8"],[1,"slice"],[5,"SignerAddress",0,519],[1,"u64"],[5,"Bytes",0,520],[1,"usize"],[5,"u5",521],[5,"Vec",522],[6,"Result",523],[6,"CryptoError",0,524],[6,"Ordering",525],[1,"u16"],[17,"Crypto"],[17,"Environment"],[10,"RedStoneConfig",0],[5,"Config",284],[10,"Crypto",0,524],[10,"Environment",370],[5,"RedStoneConfigImpl",0],[6,"ScryptoCustomValueKind",526],[6,"ValueKind",527],[6,"DecodeError",528],[10,"Decoder",528],[6,"EncodeError",529],[10,"Encoder",529],[1,"char"],[10,"FromIterator",530],[1,"bool"],[5,"Formatter",531],[8,"Result",531],[5,"Bytes",532],[1,"array"],[1,"u32"],[1,"u128"],[5,"U256",533],[10,"Hasher",534],[10,"AsRef",512],[10,"LabelResolver",535],[6,"Option",536],[6,"RustTypeId",537],[5,"TypeData",538],[5,"TypeId",539],[10,"WriteBase32",521],[6,"UpdateTimestampVerifier",256],[10,"PartialEq",525],[6,"Error",392],[8,"ProcessorResult",310],[5,"ValidatedPayload",310],[10,"Validator",334],[1,"str"],[17,"Output"],[1,"fn"],[10,"IterInto",364],[10,"IterIntoOpt",364],[10,"OptIterIntoOpt",364],[10,"FnOnce",540],[10,"AsAsciiStr",388],[10,"AsHexStr",388],[5,"ContractErrorContent",392],[5,"DefaultCrypto",339],[5,"StdEnv",370],[5,"RadixCrypto",463],[5,"RadixEnv",463],[6,"SolanaCrypto",494]],"r":[[0,520],[1,524],[3,524],[5,516],[12,519],[13,511],[14,518],[278,310],[280,309]],"b":[[152,"impl-From%3CVec%3Cu8%3E%3E-for-Bytes"],[153,"impl-From%3CBytes%3E-for-Bytes"],[154,"impl-From%3CVec%3Cu8%3E%3E-for-FeedId"],[155,"impl-From%3C%5Bu8;+VALUE_SIZE%5D%3E-for-FeedId"],[161,"impl-From%3Cu64%3E-for-Value"],[162,"impl-From%3Cu8%3E-for-Value"],[163,"impl-From%3Cu32%3E-for-Value"],[165,"impl-From%3CVec%3Cu8%3E%3E-for-Value"],[166,"impl-From%3Cu128%3E-for-Value"],[167,"impl-From%3Cu16%3E-for-Value"],[440,"impl-Debug-for-Error"],[441,"impl-Display-for-Error"]],"c":"OjAAAAAAAAA=","e":"OzAAAAEAAJgBLgACAAAABAAAAAcAAgALAAEAEAAjADUAHwBWAAcAXwA1AJYAAACZAAMAnwABAKIAAgCmAAkAtwAPAMgACQDTACwAAQEBAAQBAwAKAQQAFgEGAB4BAAAgAQIAJAEBACgBAAArAQAALQEAAC8BAQAyAQMAOQEAADsBCQBHAQEASgECAE4BAABWAQMAXAEWAHUBBQB9AQAAfwEJAJABAACeARwAvAEAAMABEQDTAQcA3wERAPIBAwD4AQcA"}],\ ["redstone_testing",{"t":"CQEECQQQQQQQQCPKGRPNNNNNNNNNNNNNNNMMNNMMMNMNNNNNSSSSFNNNNNNONNNNNNNNHHHCONNONNNNONNN","n":["env","hashmap","paste","redstone","sample","test_price_adapter_feed_specific_impl","test_price_adapter_feed_specific_testcases_impls","test_price_adapter_impl","test_price_adapter_instantiate_impl","test_price_adapter_multi_feed_specific_impl","test_price_adapter_multi_feed_specific_testcases_impls","test_price_adapter_read_impl","test_price_adapter_write_impl","run_env","Get","PriceAdapterRunEnv","RunMode","State","Write","as_","borrow","borrow_mut","clone","clone_into","clone_to_uninit","clone_to_uninit","contextual_try_into","eq","equivalent","equivalent","equivalent","equivalent","fmt","from","increase_time","instantiate","into","labelled_resolve","process_payload","read_prices","read_timestamp","resolve","state","to_owned","try_from","try_into","type_id","vzip","SAMPLE_SYSTEM_TIMESTAMP","SAMPLE_SYSTEM_TIMESTAMP_2","SAMPLE_SYSTEM_TIMESTAMP_OLD","SIGNERS","Sample","as_","borrow","borrow_mut","clone","clone_into","clone_to_uninit","content","contextual_try_into","feed_ids","fmt","from","instantiate_price_adapter","into","labelled_resolve","resolve","sample_eth_btc_avax_5sig","sample_eth_btc_avax_5sig_2","sample_eth_btc_avax_5sig_old","sample_test_helpers","system_timestamp","test_get_prices","test_write_prices","timestamp","to_owned","try_from","try_into","type_id","values","verify_results","verify_written_values","vzip"],"q":[[0,"redstone_testing"],[13,"redstone_testing::env"],[14,"redstone_testing::env::run_env"],[48,"redstone_testing::sample"],[84,"bnum::cast"],[85,"core::result"],[86,"core::fmt"],[87,"alloc::vec"],[88,"core::option"],[89,"radix_rust::resolve"],[90,"redstone::types::value"],[91,"core::any"]],"i":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,11,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,11,11,4,4,11,11,11,4,11,4,4,4,4,4,0,0,0,0,0,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,0,0,0,0,21,21,21,21,21,21,21,21,21,21,21,21],"f":"```````````````````{cg{}{}{{b{e}}}}{{{d{c}}}{{d{e}}}{}{}}{{{d{fc}}}{{d{fe}}}{}{}}{{{d{h}}}h}{{{d{c}}{d{fe}}}j{}{}}{{{d{c}}}j{}}0{{cd}{{l{e}}}{}{}}{{{d{h}}{d{h}}}n}{{{d{c}}{d{e}}}n{}{}}000{{{d{h}}{d{fA`}}}Ab}{cc{}}{{{d{f{Af{}{{Ad{c}}}}}}}j{}}{{Ah{Aj{{Aj{Ah}}}}{An{Al}}}{{Af{}{{Ad{c}}}}}{}}{ce{}{}}{{c{d{e}}}g{}B`{}}{{{d{f{Af{}{{Ad{c}}}}}}h{Aj{Ah}}{Aj{{Aj{Ah}}}}Al}{{Bd{Al{Aj{Bb}}}}}{}}{{{d{f{Af{}{{Ad{c}}}}}}{Aj{{Aj{Ah}}}}}{{Aj{Bb}}}{}}{{{d{f{Af{}{{Ad{c}}}}}}{An{{d{Bf}}}}}Al{}}4{{{d{{Af{}{{Ad{c}}}}}}}c{}}{{{d{c}}}e{}{}}{c{{l{e}}}{}{}}0{{{d{c}}}Bh{}}8`````{cg{}{}{{b{e}}}}{{{d{c}}}{{d{e}}}{}{}}{{{d{fc}}}{{d{fe}}}{}{}}{{{d{Bj}}}Bj}{{{d{c}}{d{fe}}}j{}{}}{{{d{c}}}j{}}`{{cd}{{l{e}}}{}{}}{{{d{Bj}}}{{Aj{{d{Bf}}}}}}{{{d{Bj}}{d{fA`}}}Ab}{cc{}}{{{d{Bj}}}cAf}{ce{}{}}{{c{d{e}}}g{}B`{}}1{{}Bj}00``{{{d{Bj}}{d{fc}}{An{{Aj{{d{Bf}}}}}}}jAf}0`{{{d{c}}}e{}{}}{c{{l{e}}}{}{}}0{{{d{c}}}Bh{}}`{{{d{Bj}}{Aj{{d{Bf}}}}{Aj{{An{Bb}}}}Al}j}47","D":"h","p":[[10,"CastFrom",84],[1,"reference"],[0,"mut"],[6,"RunMode",14],[1,"unit"],[6,"Result",85],[1,"bool"],[5,"Formatter",86],[8,"Result",86],[17,"State"],[10,"PriceAdapterRunEnv",14],[1,"u8"],[5,"Vec",87],[1,"u64"],[6,"Option",88],[10,"LabelResolver",89],[5,"Value",90],[1,"tuple"],[1,"str"],[5,"TypeId",91],[5,"Sample",48]],"r":[],"b":[],"c":"OjAAAAAAAAA=","e":"OzAAAAEAAFAABQAAACEAIwABACYAGQBBAAAAQwARAA=="}]\ ]')); if (typeof exports !== 'undefined') exports.searchIndex = searchIndex; diff --git a/static/rust/redstone/rust_sdk_2/search.desc/redstone/redstone-desc-0-.js b/static/rust/redstone/rust_sdk_2/search.desc/redstone/redstone-desc-0-.js index 1083fc5a..f2f609bc 100644 --- a/static/rust/redstone/rust_sdk_2/search.desc/redstone/redstone-desc-0-.js +++ b/static/rust/redstone/rust_sdk_2/search.desc/redstone/redstone-desc-0-.js @@ -1 +1 @@ -searchState.loadedDescShard("redstone", 0, "RedStone\nType wrapping bytes represantion.\nCrypto operations needed for address recovery.\nEnvironment in which we execute. Provides logging etc\nType describing feed ids. We expect FeedId to be byte …\nConfiguration for the redstone protocol. Pluggable with …\nType describing address of signer. Typically pubkey of …\nType describing timpestamp, we use to directly show we …\nType describing values we are getting from and to network. …\nCasper extension\nReturns config for payload decoding and validation.\nContract specific logic.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nRadix extension\nSolana extension\nModule containing primitives used for verification of the …\nTimestamp verifier, with variants for trusted/nontrusted …\nReturns the argument unchanged.\nCalls U::from(self).\nChecks if the updater is in the trusted set. If yes, …\nVerifies if:\nVerifies if:\nFor trusted variant see verify_trusted_update. For …\nVerifies if:\nVerifies if:\nVerifies if:\nConfiguration for a RedStone payload processor.\nThe current block time in timestamp format, used for …\nIdentifiers for the data feeds from which values are …\nReturns the argument unchanged.\nCalls U::from(self).\nThe maximum time package was created ahead of the current …\nThe maximum delay of the package in regards to the current …\nThe minimum number of signers required validating the data.\nList of identifiers for signers authorized to sign the …\nVerifies all members of the config.\nThe main processor of the RedStone payload.\nContains the error value\nContains the success value\nRepresents the result of processing the RedStone payload.\nReturns the argument unchanged.\nCalls U::from(self).\nThe minimum timestamp encountered during processing.\nA collection of values processed during the operation.\nA trait defining validation operations for data feeds and …\nRetrieves the index of a given data feed.\nRetrieves the index of a given signer.\nValidates the signer count threshold for a given index …\nValidates the timestamp for a given index.\nDefault crypto operations. Uses k256 and sha3 crates.\nStandard nonspecialized implementation of the …\nReturns the argument unchanged.\nCalls U::from(self).\nEnvironment in which the code executes.\nDefault and standard implementation of the Environmet …\nReturns the argument unchanged.\nCalls U::from(self).\nEnvironment specific print function.\nUsed when an expected non-empty array or vector is found …\nIndicates that list doesn’t contain FeedIds.\nConfigExceededSignerCount occurs when number of signer …\nConfigInsufficientSignerCount occurs when number of signer …\nIndicates that a FeedId is reocuring on config feed_ids …\nIndicates that a SignerAddress is reocuring on config …\nRepresents errors that arise from the contract itself.\nRepresents errors related to cryptographic operations.\nIndicates that the current update timestamp is not greater …\nIndicates that the provided data timestamp is not greater …\nErrors that can be encountered in the …\nIndicates that the number of signers does not meet the …\nUsed when there is leftover data in a payload that should …\nIndicates an overflow error with U256 numbers.\nIndicates that a FeedId is reocuring in data points.\nSignifies that an unsupported size was encountered.\nIndicates that a timestamp is further in the future than …\nUsed when a timestamp is older than allowed by the …\nIndicates that the marker bytes for RedStone are incorrect.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nImplementation of RedstoneConfig specialized for …\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nImplementation of RedstoneConfig specialized for …\nReturns the argument unchanged.\nCalls U::from(self).") \ No newline at end of file +searchState.loadedDescShard("redstone", 0, "RedStone\nType wrapping bytes represantion.\nCrypto operations needed for address recovery.\nEnvironment in which we execute. Provides logging etc\nType describing feed ids. We expect FeedId to be byte …\nConfiguration for the redstone protocol. Pluggable with …\nType describing address of signer. Typically pubkey of …\nType describing timpestamp, we use to directly show we …\nType describing values we are getting from and to network. …\nCasper extension\nReturns config for payload decoding and validation.\nContract specific logic.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nRadix extension\nSolana extension\nModule containing primitives used for verification of the …\nTimestamp verifier, with variants for trusted/nontrusted …\nReturns the argument unchanged.\nCalls U::from(self).\nChecks if the updater is in the trusted set. If yes, …\nVerifies if:\nVerifies if:\nFor trusted variant see verify_trusted_update. For …\nVerifies if:\nVerifies if:\nVerifies if:\nConfiguration for a RedStone payload processor.\nThe current block time in timestamp format, used for …\nIdentifiers for the data feeds from which values are …\nReturns the argument unchanged.\nCalls U::from(self).\nThe maximum time package was created ahead of the current …\nThe maximum delay of the package in regards to the current …\nThe minimum number of signers required validating the data.\nList of identifiers for signers authorized to sign the …\nVerifies all members of the config.\nThe main processor of the RedStone payload.\nContains the error value\nContains the success value\nRepresents the result of processing the RedStone payload.\nReturns the argument unchanged.\nCalls U::from(self).\nThe timestamp encountered during processing.\nA collection of values processed during the operation.\nA trait defining validation operations for data feeds and …\nRetrieves the index of a given data feed.\nRetrieves the index of a given signer.\nValidates the signer count threshold for a given index …\nValidates the timestamp for a given index.\nDefault crypto operations. Uses k256 and sha3 crates.\nStandard nonspecialized implementation of the …\nReturns the argument unchanged.\nCalls U::from(self).\nEnvironment in which the code executes.\nDefault and standard implementation of the Environmet …\nReturns the argument unchanged.\nCalls U::from(self).\nEnvironment specific print function.\nUsed when an expected non-empty array or vector is found …\nIndicates that list doesn’t contain FeedIds.\nConfigExceededSignerCount occurs when number of signer …\nConfigInsufficientSignerCount occurs when number of signer …\nIndicates that a FeedId is reocuring on config feed_ids …\nIndicates that a SignerAddress is reocuring on config …\nRepresents errors that arise from the contract itself.\nRepresents errors related to cryptographic operations.\nIndicates that the current update timestamp is not greater …\nIndicates that the provided data timestamp is not greater …\nErrors that can be encountered in the …\nIndicates that the number of signers does not meet the …\nUsed when there is leftover data in a payload that should …\nIndicates an overflow error with U256 numbers.\nIndicates that a FeedId is reocuring in data points.\nSignifies that an unsupported size was encountered.\nIndicates that payload timestamps are not equal.\nIndicates that a timestamp is further in the future than …\nUsed when a timestamp is older than allowed by the …\nIndicates that the marker bytes for RedStone are incorrect.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nImplementation of RedstoneConfig specialized for …\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nImplementation of RedstoneConfig specialized for …\nReturns the argument unchanged.\nCalls U::from(self).") \ No newline at end of file diff --git a/static/rust/redstone/rust_sdk_2/src/redstone/core/processor.rs.html b/static/rust/redstone/rust_sdk_2/src/redstone/core/processor.rs.html index 20e09565..70fba76f 100644 --- a/static/rust/redstone/rust_sdk_2/src/redstone/core/processor.rs.html +++ b/static/rust/redstone/rust_sdk_2/src/redstone/core/processor.rs.html @@ -217,9 +217,6 @@ 217 218 219 -220 -221 -222

use crate::{
     core::{
         aggregator::aggregate_values,
@@ -274,16 +271,13 @@
 }
 
 fn make_processor_result<Env: Environment>(config: &Config, payload: Payload) -> ProcessorResult {
-    let min_timestamp = payload.get_min_validated_timestamp(config)?;
+    let timestamp = payload.get_validated_timestamp(config)?;
 
     let values = aggregate_values(payload.data_packages, config)?;
 
-    Env::print(|| format!("{:?} {:?}", min_timestamp, values));
+    Env::print(|| format!("{:?} {:?}", timestamp, values));
 
-    Ok(ValidatedPayload {
-        values,
-        min_timestamp,
-    })
+    Ok(ValidatedPayload { values, timestamp })
 }
 
 #[cfg(feature = "helpers")]
@@ -313,19 +307,19 @@
                 ETH,
                 11,
                 TEST_SIGNER_ADDRESS_1,
-                (TEST_BLOCK_TIMESTAMP + 5).into(),
+                (TEST_BLOCK_TIMESTAMP + 400).into(),
             ),
             DataPackage::test_single_data_point(
                 ETH,
                 13,
                 TEST_SIGNER_ADDRESS_2,
-                (TEST_BLOCK_TIMESTAMP + 3).into(),
+                (TEST_BLOCK_TIMESTAMP + 400).into(),
             ),
             DataPackage::test_single_data_point(
                 BTC,
                 32,
                 TEST_SIGNER_ADDRESS_2,
-                (TEST_BLOCK_TIMESTAMP - 2).into(),
+                (TEST_BLOCK_TIMESTAMP + 400).into(),
             ),
             DataPackage::test_single_data_point(
                 BTC,
@@ -343,7 +337,7 @@
         assert_eq!(
             result,
             Ok(ValidatedPayload {
-                min_timestamp: (TEST_BLOCK_TIMESTAMP - 2).into(),
+                timestamp: (TEST_BLOCK_TIMESTAMP + 400).into(),
                 values: vec![12u8, 31].iter_into()
             })
         );
@@ -355,12 +349,12 @@
             DataPackage::test_multi_data_point(
                 vec![(ETH, 10), (BTC, 31)],
                 TEST_SIGNER_ADDRESS_2,
-                (TEST_BLOCK_TIMESTAMP + 3).into(),
+                (TEST_BLOCK_TIMESTAMP + 5).into(),
             ),
             DataPackage::test_multi_data_point(
                 vec![(ETH, 13), (BTC, 32)],
                 TEST_SIGNER_ADDRESS_1,
-                (TEST_BLOCK_TIMESTAMP + 400).into(),
+                (TEST_BLOCK_TIMESTAMP + 5).into(),
             ),
         ];
 
@@ -372,7 +366,7 @@
         assert_eq!(
             result,
             Ok(ValidatedPayload {
-                min_timestamp: (TEST_BLOCK_TIMESTAMP + 3).into(),
+                timestamp: (TEST_BLOCK_TIMESTAMP + 5).into(),
                 values: vec![11u8, 31].iter_into()
             })
         );
@@ -384,22 +378,22 @@
             DataPackage::test_multi_data_point(
                 vec![(BTC, 30), (ETH, 11)],
                 TEST_SIGNER_ADDRESS_1,
-                (TEST_BLOCK_TIMESTAMP + 5).into(),
+                (TEST_BLOCK_TIMESTAMP).into(),
             ),
             DataPackage::test_multi_data_point(
                 vec![(ETH, 10), (BTC, 31)],
                 TEST_SIGNER_ADDRESS_2,
-                (TEST_BLOCK_TIMESTAMP + 3).into(),
+                (TEST_BLOCK_TIMESTAMP).into(),
             ),
             DataPackage::test_multi_data_point(
                 vec![(BTC, 34), (ETH, 12)],
                 TEST_SIGNER_ADDRESS_2, // REPETITION OF A SIGNER
-                (TEST_BLOCK_TIMESTAMP - 2).into(),
+                (TEST_BLOCK_TIMESTAMP).into(),
             ),
             DataPackage::test_multi_data_point(
                 vec![(ETH, 13), (BTC, 32)],
                 TEST_SIGNER_ADDRESS_1,
-                (TEST_BLOCK_TIMESTAMP + 400).into(),
+                (TEST_BLOCK_TIMESTAMP).into(),
             ),
         ];
 
@@ -421,12 +415,12 @@
             DataPackage::test_multi_data_point(
                 vec![(ETH, 10), (BTC, 31), (BTC, 33)], // REPETITION IN DATAPOINTS HERE.
                 TEST_SIGNER_ADDRESS_2,
-                (TEST_BLOCK_TIMESTAMP + 3).into(),
+                (TEST_BLOCK_TIMESTAMP).into(),
             ),
             DataPackage::test_multi_data_point(
                 vec![(ETH, 13), (BTC, 32)],
                 TEST_SIGNER_ADDRESS_1,
-                (TEST_BLOCK_TIMESTAMP + 400).into(),
+                (TEST_BLOCK_TIMESTAMP).into(),
             ),
         ];
 
diff --git a/static/rust/redstone/rust_sdk_2/src/redstone/core/processor_result.rs.html b/static/rust/redstone/rust_sdk_2/src/redstone/core/processor_result.rs.html
index f0741a94..4ff66f2b 100644
--- a/static/rust/redstone/rust_sdk_2/src/redstone/core/processor_result.rs.html
+++ b/static/rust/redstone/rust_sdk_2/src/redstone/core/processor_result.rs.html
@@ -40,11 +40,11 @@
 /// particularly focusing on time-sensitive data and its associated values, according to the `Config`.
 #[derive(Debug, Eq, PartialEq)]
 pub struct ValidatedPayload {
-    /// The minimum timestamp encountered during processing.
+    /// The timestamp encountered during processing.
     ///
-    /// This field captures the earliest time point (in milliseconds since the Unix epoch)
+    /// This field captures the time point (in milliseconds since the Unix epoch)
     /// among the processed data packages, indicating the starting boundary of the dataset's time range.
-    pub min_timestamp: TimestampMillis,
+    pub timestamp: TimestampMillis,
 
     /// A collection of values processed during the operation.
     ///
@@ -55,7 +55,7 @@
 
 impl From<ValidatedPayload> for (TimestampMillis, Vec<Value>) {
     fn from(validated_payload: ValidatedPayload) -> Self {
-        (validated_payload.min_timestamp, validated_payload.values)
+        (validated_payload.timestamp, validated_payload.values)
     }
 }
 

\ No newline at end of file diff --git a/static/rust/redstone/rust_sdk_2/src/redstone/network/error.rs.html b/static/rust/redstone/rust_sdk_2/src/redstone/network/error.rs.html index cc553dd6..658936fe 100644 --- a/static/rust/redstone/rust_sdk_2/src/redstone/network/error.rs.html +++ b/static/rust/redstone/rust_sdk_2/src/redstone/network/error.rs.html @@ -235,6 +235,17 @@ 235 236 237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248
use alloc::{string::String, vec::Vec};
 use core::fmt::{Debug, Display, Formatter};
 
@@ -345,6 +356,11 @@
     /// Includes FeedId that is reocuring.
     ConfigReocuringFeedId(FeedId),
 
+    /// Indicates that payload timestamps are not equal.
+    ///
+    /// Contains the first timestamp and the one that is not equal to the first one.
+    TimestampDifferentThanOthers(TimestampMillis, TimestampMillis),
+
     /// Indicates that the provided data timestamp is not greater than a previously written package timestamp.
     ///
     /// For the price adapter to accept a new price update, the associated timestamp must be
@@ -385,6 +401,7 @@
             Error::ConfigReocuringSigner(_) => 516,
             Error::ConfigEmptyFeedIds => 517,
             Error::ConfigReocuringFeedId(_) => 518,
+            Error::TimestampDifferentThanOthers(_, _) => 519,
             Error::InsufficientSignerCount(data_package_index, value, _) => {
                 (2000 + data_package_index * 10 + value) as u16
             }
@@ -457,6 +474,11 @@
                     feed_id.as_hex_str()
                 )
             }
+            Error::TimestampDifferentThanOthers(first, outstandig) => write!(
+                f,
+                "Timestamp {:?} is not equal to the first on {:?} in the payload.",
+                outstandig, first
+            ),
             Error::DataTimestampMustBeGreaterThanBefore(current, before) => {
                 write!(
                     f,
diff --git a/static/rust/redstone/rust_sdk_2/src/redstone/protocol/payload.rs.html b/static/rust/redstone/rust_sdk_2/src/redstone/protocol/payload.rs.html
index 14617ebe..6e0e97b9 100644
--- a/static/rust/redstone/rust_sdk_2/src/redstone/protocol/payload.rs.html
+++ b/static/rust/redstone/rust_sdk_2/src/redstone/protocol/payload.rs.html
@@ -26,12 +26,111 @@
 26
 27
 28
-
use alloc::vec::Vec;
-
-use crate::{
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+
use crate::{
     core::validator::Validator, network::error::Error, protocol::data_package::DataPackage,
     TimestampMillis,
 };
+use alloc::vec::Vec;
 
 #[derive(Clone, Debug)]
 pub struct Payload {
@@ -39,19 +138,120 @@
 }
 
 impl Payload {
-    pub fn get_min_validated_timestamp(
+    pub fn get_validated_timestamp(
         &self,
         validator: &impl Validator,
     ) -> Result<TimestampMillis, Error> {
-        self.data_packages
+        let Some(first_package) = self.data_packages.get(0) else {
+            return Err(Error::ArrayIsEmpty);
+        };
+
+        let first_timestamp = validator.validate_timestamp(0, first_package.timestamp)?;
+
+        if let Some(outstanding_ts) = self
+            .data_packages
             .iter()
             .map(|package| package.timestamp)
-            .enumerate()
-            .map(|(index, timestamp)| validator.validate_timestamp(index, timestamp))
-            .collect::<Result<Vec<_>, _>>()?
-            .into_iter()
-            .min()
-            .ok_or(Error::ArrayIsEmpty)
+            .skip(1)
+            .find(|ts| *ts != first_timestamp)
+        {
+            return Err(Error::TimestampDifferentThanOthers(
+                first_timestamp,
+                outstanding_ts,
+            ));
+        }
+
+        Ok(first_timestamp)
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::Payload;
+    use crate::{core::config::Config, network::error::Error, protocol::data_package::DataPackage};
+
+    const TEST_BLOCK_TIMESTAMP: u64 = 2000000000000;
+    const TEST_SIGNER_ADDRESS_1: &str = "1ea62d73edF8ac05dfcea1a34b9796e937a29eFF";
+    const ETH: &str = "ETH";
+    const BTC: &str = "BTC";
+
+    #[test]
+    fn test_validate_all_timestamps_in_payload_are_the_same() -> Result<(), Error> {
+        let config = Config::test_with_signer_count_threshold_or_default(None);
+        let data_packages = vec![
+            DataPackage::test_multi_data_point(
+                vec![(BTC, 30), (ETH, 11)],
+                TEST_SIGNER_ADDRESS_1,
+                (TEST_BLOCK_TIMESTAMP).into(),
+            ),
+            DataPackage::test_multi_data_point(
+                vec![(ETH, 10), (BTC, 31)],
+                TEST_SIGNER_ADDRESS_1,
+                (TEST_BLOCK_TIMESTAMP).into(),
+            ),
+            DataPackage::test_multi_data_point(
+                vec![(BTC, 34), (ETH, 12)],
+                TEST_SIGNER_ADDRESS_1,
+                (TEST_BLOCK_TIMESTAMP).into(),
+            ),
+            DataPackage::test_multi_data_point(
+                vec![(ETH, 13), (BTC, 32)],
+                TEST_SIGNER_ADDRESS_1,
+                (TEST_BLOCK_TIMESTAMP).into(),
+            ),
+        ];
+        let payload = Payload { data_packages };
+        let ts = payload.get_validated_timestamp(&config)?;
+        assert_eq!(ts, TEST_BLOCK_TIMESTAMP.into());
+
+        Ok(())
+    }
+
+    #[test]
+    fn test_validate_all_timestamps_in_payload_one_is_wrong() {
+        let config = Config::test_with_signer_count_threshold_or_default(None);
+        let data_packages = vec![
+            DataPackage::test_multi_data_point(
+                vec![(BTC, 30), (ETH, 11)],
+                TEST_SIGNER_ADDRESS_1,
+                (TEST_BLOCK_TIMESTAMP).into(),
+            ),
+            DataPackage::test_multi_data_point(
+                vec![(ETH, 10), (BTC, 31)],
+                TEST_SIGNER_ADDRESS_1,
+                (TEST_BLOCK_TIMESTAMP).into(),
+            ),
+            DataPackage::test_multi_data_point(
+                vec![(BTC, 34), (ETH, 12)],
+                TEST_SIGNER_ADDRESS_1,
+                (TEST_BLOCK_TIMESTAMP + 5).into(),
+            ),
+            DataPackage::test_multi_data_point(
+                vec![(ETH, 13), (BTC, 32)],
+                TEST_SIGNER_ADDRESS_1,
+                (TEST_BLOCK_TIMESTAMP).into(),
+            ),
+        ];
+        let payload = Payload { data_packages };
+        let result = payload.get_validated_timestamp(&config);
+
+        assert_eq!(
+            result,
+            Err(Error::TimestampDifferentThanOthers(
+                TEST_BLOCK_TIMESTAMP.into(),
+                (TEST_BLOCK_TIMESTAMP + 5).into()
+            ))
+        );
+    }
+
+    #[test]
+    fn test_validate_all_timestamps_in_payload_is_empty() {
+        let config = Config::test_with_signer_count_threshold_or_default(None);
+        let data_packages = vec![];
+        let payload = Payload { data_packages };
+        let result = payload.get_validated_timestamp(&config);
+
+        assert_eq!(result, Err(Error::ArrayIsEmpty));
     }
 }
 
\ No newline at end of file