pub struct EnvironmentSpec<F: Form = MetaForm>{ /* private fields */ }
Expand description
Describes a contract environment.
Implementations§
Source§impl<F> EnvironmentSpec<F>
impl<F> EnvironmentSpec<F>
Sourcepub fn account_id(&self) -> &TypeSpec<F>
pub fn account_id(&self) -> &TypeSpec<F>
Returns the AccountId
type of the environment.
Sourcepub fn block_number(&self) -> &TypeSpec<F>
pub fn block_number(&self) -> &TypeSpec<F>
Returns the BlockNumber
type of the environment.
Sourcepub fn native_to_eth_ratio(&self) -> u32
pub fn native_to_eth_ratio(&self) -> u32
Returns the NATIVE_TO_ETH_RATIO
value of the environment.
Source§impl<F> EnvironmentSpec<F>
impl<F> EnvironmentSpec<F>
pub fn new() -> EnvironmentSpecBuilder<F, Missing<AccountId>, Missing<Balance>, Missing<Hash>, Missing<Timestamp>, Missing<BlockNumber>, Missing<NativeToEthRatio>, Missing<BufferSize>>
Trait Implementations§
Source§impl<F: Debug + Form> Debug for EnvironmentSpec<F>
impl<F: Debug + Form> Debug for EnvironmentSpec<F>
Source§impl<F> Default for EnvironmentSpec<F>
impl<F> Default for EnvironmentSpec<F>
Source§impl<'de, F: Form> Deserialize<'de> for EnvironmentSpec<F>
impl<'de, F: Form> Deserialize<'de> for EnvironmentSpec<F>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl IntoPortable for EnvironmentSpec
impl IntoPortable for EnvironmentSpec
Source§type Output = EnvironmentSpec<PortableForm>
type Output = EnvironmentSpec<PortableForm>
The portable version of
Self
.Source§fn into_portable(self, registry: &mut Registry) -> Self::Output
fn into_portable(self, registry: &mut Registry) -> Self::Output
Convert
self
to the portable form by using the registry for caching.Source§impl<F: Form + JsonSchema> JsonSchema for EnvironmentSpec<F>
impl<F: Form + JsonSchema> JsonSchema for EnvironmentSpec<F>
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moreSource§impl<F: PartialEq + Form> PartialEq for EnvironmentSpec<F>
impl<F: PartialEq + Form> PartialEq for EnvironmentSpec<F>
Source§impl<F: Form> Serialize for EnvironmentSpec<F>
impl<F: Form> Serialize for EnvironmentSpec<F>
impl<F: Eq + Form> Eq for EnvironmentSpec<F>
impl<F: Form> StructuralPartialEq for EnvironmentSpec<F>
Auto Trait Implementations§
impl<F> Freeze for EnvironmentSpec<F>
impl<F> RefUnwindSafe for EnvironmentSpec<F>
impl<F> Send for EnvironmentSpec<F>
impl<F> Sync for EnvironmentSpec<F>
impl<F> Unpin for EnvironmentSpec<F>
impl<F> UnwindSafe for EnvironmentSpec<F>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
Consume self to return an equivalent value of
T
. Read more§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to
unchecked_from
.§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of
T
.