diff --git a/pr-4404/gear_core/env/trait.Externalities.html b/pr-4404/gear_core/env/trait.Externalities.html index 9623da6da41..968ea93b211 100644 --- a/pr-4404/gear_core/env/trait.Externalities.html +++ b/pr-4404/gear_core/env/trait.Externalities.html @@ -66,7 +66,7 @@ ) -> Result<(), Self::FallibleError>; fn source(&self) -> Result<ProgramId, Self::UnrecoverableError>; fn reply_code(&self) -> Result<ReplyCode, Self::FallibleError>; - fn signal_code(&self) -> Result<SignalCode, Self::FallibleError>; + fn signal_code(&self) -> Result<SignalCode, Self::FallibleError>; fn message_id(&self) -> Result<MessageId, Self::UnrecoverableError>; fn program_id(&self) -> Result<ProgramId, Self::UnrecoverableError>; fn debug(&self, data: &str) -> Result<(), Self::UnrecoverableError>; @@ -211,7 +211,7 @@ ) -> Result<(), Self::FallibleError>

Push the incoming message buffer into reply message.

Source

fn source(&self) -> Result<ProgramId, Self::UnrecoverableError>

Get the source of the message currently being handled.

Source

fn reply_code(&self) -> Result<ReplyCode, Self::FallibleError>

Get the reply code if the message being processed.

-
Source

fn signal_code(&self) -> Result<SignalCode, Self::FallibleError>

Get the signal code if the message being processed.

+
Source

fn signal_code(&self) -> Result<SignalCode, Self::FallibleError>

Get the signal code if the message being processed.

Source

fn message_id(&self) -> Result<MessageId, Self::UnrecoverableError>

Get the id of the message currently being handled.

Source

fn program_id(&self) -> Result<ProgramId, Self::UnrecoverableError>

Get the id of program itself

Source

fn debug(&self, data: &str) -> Result<(), Self::UnrecoverableError>

Send debug message.

diff --git a/pr-4404/gear_core/message/enum.ErrorReplyReason.html b/pr-4404/gear_core/message/enum.ErrorReplyReason.html index 00d462ae8b4..d83ccc0b67c 100644 --- a/pr-4404/gear_core/message/enum.ErrorReplyReason.html +++ b/pr-4404/gear_core/message/enum.ErrorReplyReason.html @@ -1,6 +1,6 @@ -ErrorReplyReason in gear_core::message - Rust
gear_core::message

Enum ErrorReplyReason

#[repr(u8)]
pub enum ErrorReplyReason { - Execution(SimpleExecutionError), - FailedToCreateProgram(SimpleProgramCreationError), +ErrorReplyReason in gear_core::message - Rust
gear_core::message

Enum ErrorReplyReason

Source
#[repr(u8)]
pub enum ErrorReplyReason { + Execution(SimpleExecutionError), + FailedToCreateProgram(SimpleProgramCreationError), InactiveActor = 2, RemovedFromWaitlist = 3, ReinstrumentationFailure = 4, @@ -8,14 +8,14 @@ }
Expand description

Reason of error reply creation.

NOTE: Adding new variants to this enum you must also update ErrorReplyReason::to_bytes and ErrorReplyReason::from_bytes methods.

-

Variants§

§

Execution(SimpleExecutionError)

Error reply was created due to underlying execution error.

-
§

FailedToCreateProgram(SimpleProgramCreationError)

Error reply was created due to errors in program creation.

+

Variants§

§

Execution(SimpleExecutionError)

Error reply was created due to underlying execution error.

+
§

FailedToCreateProgram(SimpleProgramCreationError)

Error reply was created due to errors in program creation.

§

InactiveActor = 2

Destination actor is inactive, so it can’t process the message.

§

RemovedFromWaitlist = 3

Message has died in Waitlist as out of rent one.

§

ReinstrumentationFailure = 4

Program re-instrumentation failed.

§

Unsupported = 255

Unsupported reason of error reply. Variant exists for backward compatibility.

-

Trait Implementations§

§

impl Clone for ErrorReplyReason

§

fn clone(&self) -> ErrorReplyReason

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
§

impl Debug for ErrorReplyReason

§

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

Formats the value using the given formatter. Read more
§

impl Decode for ErrorReplyReason

§

fn decode<__CodecInputEdqy>( +

Trait Implementations§

Source§

impl Clone for ErrorReplyReason

Source§

fn clone(&self) -> ErrorReplyReason

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 ErrorReplyReason

Source§

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

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

impl Decode for ErrorReplyReason

Source§

fn decode<__CodecInputEdqy>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<ErrorReplyReason, Error>
where __CodecInputEdqy: Input,

Attempt to deserialise the value from input.
§

fn decode_into<I>( @@ -23,32 +23,32 @@ dst: &mut MaybeUninit<Self>, ) -> Result<DecodeFinished, Error>
where I: Input,

Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
§

fn skip<I>(input: &mut I) -> Result<(), Error>
where - I: Input,

Attempt to skip the encoded value from input. Read more
§

fn encoded_fixed_size() -> Option<usize>

Returns the fixed encoded size of the type. Read more
§

impl Default for ErrorReplyReason

§

fn default() -> ErrorReplyReason

Returns the “default value” for a type. Read more
§

impl<'de> Deserialize<'de> for ErrorReplyReason

§

fn deserialize<__D>( + I: Input,

Attempt to skip the encoded value from input. Read more
§

fn encoded_fixed_size() -> Option<usize>

Returns the fixed encoded size of the type. Read more
Source§

impl Default for ErrorReplyReason

Source§

fn default() -> ErrorReplyReason

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ErrorReplyReason

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<ErrorReplyReason, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Display for ErrorReplyReason

§

fn fmt( + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for ErrorReplyReason

Source§

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

Formats the value using the given formatter. Read more
§

impl Encode for ErrorReplyReason

§

fn size_hint(&self) -> usize

If possible give a hint of expected size of the encoding. Read more
§

fn encode_to<__CodecOutputEdqy>( +) -> Result<(), Error>

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

impl Encode for ErrorReplyReason

Source§

fn size_hint(&self) -> usize

If possible give a hint of expected size of the encoding. Read more
Source§

fn encode_to<__CodecOutputEdqy>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
where __CodecOutputEdqy: Output + ?Sized,

Convert self to a slice and append it to the destination.
§

fn encode(&self) -> Vec<u8>

Convert self to an owned vector.
§

fn using_encoded<R, F>(&self, f: F) -> R
where - F: FnOnce(&[u8]) -> R,

Convert self to a slice and then invoke the given closure with it.
§

fn encoded_size(&self) -> usize

Calculates the encoded size. Read more
§

impl From<ErrorReplyReason> for ReplyCode

§

fn from(original: ErrorReplyReason) -> ReplyCode

Converts to this type from the input type.
§

impl From<SimpleExecutionError> for ErrorReplyReason

§

fn from(original: SimpleExecutionError) -> ErrorReplyReason

Converts to this type from the input type.
§

impl From<SimpleProgramCreationError> for ErrorReplyReason

§

fn from(original: SimpleProgramCreationError) -> ErrorReplyReason

Converts to this type from the input type.
§

impl Hash for ErrorReplyReason

§

fn hash<__H>(&self, state: &mut __H)
where + F: FnOnce(&[u8]) -> R,

Convert self to a slice and then invoke the given closure with it.
§

fn encoded_size(&self) -> usize

Calculates the encoded size. Read more
Source§

impl From<ErrorReplyReason> for ReplyCode

Source§

fn from(original: ErrorReplyReason) -> ReplyCode

Converts to this type from the input type.
Source§

impl From<SimpleExecutionError> for ErrorReplyReason

Source§

fn from(original: SimpleExecutionError) -> ErrorReplyReason

Converts to this type from the input type.
Source§

impl From<SimpleProgramCreationError> for ErrorReplyReason

Source§

fn from(original: SimpleProgramCreationError) -> ErrorReplyReason

Converts to this type from the input type.
Source§

impl Hash for ErrorReplyReason

Source§

fn hash<__H>(&self, state: &mut __H)
where __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 H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl Ord for ErrorReplyReason

§

fn cmp(&self, other: &ErrorReplyReason) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for ErrorReplyReason

Source§

fn cmp(&self, other: &ErrorReplyReason) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where 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 - Self: Sized,

Restrict a value to a certain interval. Read more
§

impl PartialEq for ErrorReplyReason

§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

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

impl PartialOrd for ErrorReplyReason

§

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

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

Tests less than or equal to (for self and other) and is used by the + Self: Sized,
Restrict a value to a certain interval. Read more
Source§

impl PartialEq for ErrorReplyReason

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl PartialOrd for ErrorReplyReason

Source§

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

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

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

Tests greater than or equal to (for self and other) and is used by -the >= operator. Read more
§

impl Sequence for ErrorReplyReason

§

const CARDINALITY: usize = 13usize

Number of values of type Self. Read more
§

fn next(&self) -> Option<ErrorReplyReason>

Returns value following *self or None if this was the end. Read more
§

fn previous(&self) -> Option<ErrorReplyReason>

Returns value preceding *self or None if this was the beginning. Read more
§

fn first() -> Option<ErrorReplyReason>

Returns the first value of type Self. Read more
§

fn last() -> Option<ErrorReplyReason>

Returns the last value of type Self. Read more
§

impl Serialize for ErrorReplyReason

§

fn serialize<__S>( +the >= operator. Read more

Source§

impl Sequence for ErrorReplyReason

Source§

const CARDINALITY: usize = 13usize

Number of values of type Self. Read more
Source§

fn next(&self) -> Option<ErrorReplyReason>

Returns value following *self or None if this was the end. Read more
Source§

fn previous(&self) -> Option<ErrorReplyReason>

Returns value preceding *self or None if this was the beginning. Read more
Source§

fn first() -> Option<ErrorReplyReason>

Returns the first value of type Self. Read more
Source§

fn last() -> Option<ErrorReplyReason>

Returns the last value of type Self. Read more
Source§

impl Serialize for ErrorReplyReason

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl TypeInfo for ErrorReplyReason

§

type Identity = ErrorReplyReason

The type identifying for which type info is provided. Read more
§

fn type_info() -> Type

Returns the static type identifier for Self.
§

impl Copy for ErrorReplyReason

§

impl EncodeLike for ErrorReplyReason

§

impl Eq for ErrorReplyReason

§

impl StructuralPartialEq for ErrorReplyReason

Auto Trait Implementations§

§

impl Freeze for ErrorReplyReason

§

impl RefUnwindSafe for ErrorReplyReason

§

impl Send for ErrorReplyReason

§

impl Sync for ErrorReplyReason

§

impl Unpin for ErrorReplyReason

§

impl UnwindSafe for ErrorReplyReason

Blanket Implementations§

Source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TypeInfo for ErrorReplyReason

Source§

type Identity = ErrorReplyReason

The type identifying for which type info is provided. Read more
Source§

fn type_info() -> Type

Returns the static type identifier for Self.
Source§

impl Copy for ErrorReplyReason

Source§

impl EncodeLike for ErrorReplyReason

Source§

impl Eq for ErrorReplyReason

Source§

impl StructuralPartialEq for ErrorReplyReason

Auto Trait Implementations§

§

impl Freeze for ErrorReplyReason

§

impl RefUnwindSafe for ErrorReplyReason

§

impl Send for ErrorReplyReason

§

impl Sync for ErrorReplyReason

§

impl Unpin for ErrorReplyReason

§

impl UnwindSafe for ErrorReplyReason

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> CloneToUninit for T
where diff --git a/pr-4404/gear_core/message/enum.ReplyCode.html b/pr-4404/gear_core/message/enum.ReplyCode.html index 0f74182a517..ba1be0348de 100644 --- a/pr-4404/gear_core/message/enum.ReplyCode.html +++ b/pr-4404/gear_core/message/enum.ReplyCode.html @@ -1,4 +1,4 @@ -ReplyCode in gear_core::message - Rust
gear_core::message

Enum ReplyCode

#[repr(u8)]
pub enum ReplyCode { +ReplyCode in gear_core::message - Rust
gear_core::message

Enum ReplyCode

Source
#[repr(u8)]
pub enum ReplyCode { Success(SuccessReplyReason), Error(ErrorReplyReason), Unsupported = 255, @@ -7,13 +7,13 @@
§

Error(ErrorReplyReason)

Error reply.

§

Unsupported = 255

Unsupported code. Variant exists for backward compatibility.

-

Implementations§

§

impl ReplyCode

pub fn to_bytes(self) -> [u8; 4]

Converts ReplyCode to 4 bytes array.

-

pub fn from_bytes(bytes: [u8; 4]) -> ReplyCode

Parses 4 bytes array to ReplyCode.

-

pub fn error(reason: impl Into<ErrorReplyReason>) -> ReplyCode

Constructs ReplyCode::Error(_) variant from underlying reason.

-

pub fn is_success(&self) -> bool

Returns bool, defining if ReplyCode represents success reply.

-

pub fn is_error(&self) -> bool

Returns bool, defining if ReplyCode represents error reply.

-

pub fn is_unsupported(&self) -> bool

Returns bool, defining if ReplyCode represents unsupported reason.

-

Trait Implementations§

§

impl Clone for ReplyCode

§

fn clone(&self) -> ReplyCode

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
§

impl Debug for ReplyCode

§

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

Formats the value using the given formatter. Read more
§

impl Decode for ReplyCode

§

fn decode<__CodecInputEdqy>( +

Implementations§

Source§

impl ReplyCode

Source

pub fn to_bytes(self) -> [u8; 4]

Converts ReplyCode to 4 bytes array.

+
Source

pub fn from_bytes(bytes: [u8; 4]) -> ReplyCode

Parses 4 bytes array to ReplyCode.

+
Source

pub fn error(reason: impl Into<ErrorReplyReason>) -> ReplyCode

Constructs ReplyCode::Error(_) variant from underlying reason.

+
Source

pub fn is_success(&self) -> bool

Returns bool, defining if ReplyCode represents success reply.

+
Source

pub fn is_error(&self) -> bool

Returns bool, defining if ReplyCode represents error reply.

+
Source

pub fn is_unsupported(&self) -> bool

Returns bool, defining if ReplyCode represents unsupported reason.

+

Trait Implementations§

Source§

impl Clone for ReplyCode

Source§

fn clone(&self) -> ReplyCode

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 ReplyCode

Source§

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

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

impl Decode for ReplyCode

Source§

fn decode<__CodecInputEdqy>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<ReplyCode, Error>
where __CodecInputEdqy: Input,

Attempt to deserialise the value from input.
§

fn decode_into<I>( @@ -21,32 +21,32 @@ dst: &mut MaybeUninit<Self>, ) -> Result<DecodeFinished, Error>
where I: Input,

Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
§

fn skip<I>(input: &mut I) -> Result<(), Error>
where - I: Input,

Attempt to skip the encoded value from input. Read more
§

fn encoded_fixed_size() -> Option<usize>

Returns the fixed encoded size of the type. Read more
§

impl Default for ReplyCode

§

fn default() -> ReplyCode

Returns the “default value” for a type. Read more
§

impl<'de> Deserialize<'de> for ReplyCode

§

fn deserialize<__D>( + I: Input,

Attempt to skip the encoded value from input. Read more
§

fn encoded_fixed_size() -> Option<usize>

Returns the fixed encoded size of the type. Read more
Source§

impl Default for ReplyCode

Source§

fn default() -> ReplyCode

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ReplyCode

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<ReplyCode, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Display for ReplyCode

§

fn fmt( + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for ReplyCode

Source§

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

Formats the value using the given formatter. Read more
§

impl Encode for ReplyCode

§

fn size_hint(&self) -> usize

If possible give a hint of expected size of the encoding. Read more
§

fn encode_to<__CodecOutputEdqy>( +) -> Result<(), Error>

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

impl Encode for ReplyCode

Source§

fn size_hint(&self) -> usize

If possible give a hint of expected size of the encoding. Read more
Source§

fn encode_to<__CodecOutputEdqy>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
where __CodecOutputEdqy: Output + ?Sized,

Convert self to a slice and append it to the destination.
§

fn encode(&self) -> Vec<u8>

Convert self to an owned vector.
§

fn using_encoded<R, F>(&self, f: F) -> R
where - F: FnOnce(&[u8]) -> R,

Convert self to a slice and then invoke the given closure with it.
§

fn encoded_size(&self) -> usize

Calculates the encoded size. Read more
§

impl From<()> for ReplyCode

§

fn from(original: ()) -> ReplyCode

Converts to this type from the input type.
§

impl From<ErrorReplyReason> for ReplyCode

§

fn from(original: ErrorReplyReason) -> ReplyCode

Converts to this type from the input type.
§

impl From<SuccessReplyReason> for ReplyCode

§

fn from(original: SuccessReplyReason) -> ReplyCode

Converts to this type from the input type.
§

impl Hash for ReplyCode

§

fn hash<__H>(&self, state: &mut __H)
where + F: FnOnce(&[u8]) -> R,

Convert self to a slice and then invoke the given closure with it.
§

fn encoded_size(&self) -> usize

Calculates the encoded size. Read more
Source§

impl From<()> for ReplyCode

Source§

fn from(original: ()) -> ReplyCode

Converts to this type from the input type.
Source§

impl From<ErrorReplyReason> for ReplyCode

Source§

fn from(original: ErrorReplyReason) -> ReplyCode

Converts to this type from the input type.
Source§

impl From<SuccessReplyReason> for ReplyCode

Source§

fn from(original: SuccessReplyReason) -> ReplyCode

Converts to this type from the input type.
Source§

impl Hash for ReplyCode

Source§

fn hash<__H>(&self, state: &mut __H)
where __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 H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl Ord for ReplyCode

§

fn cmp(&self, other: &ReplyCode) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for ReplyCode

Source§

fn cmp(&self, other: &ReplyCode) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where 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 - Self: Sized,

Restrict a value to a certain interval. Read more
§

impl PartialEq for ReplyCode

§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

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

impl PartialOrd for ReplyCode

§

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

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

Tests less than or equal to (for self and other) and is used by the + Self: Sized,
Restrict a value to a certain interval. Read more
Source§

impl PartialEq for ReplyCode

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl PartialOrd for ReplyCode

Source§

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

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

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

Tests greater than or equal to (for self and other) and is used by -the >= operator. Read more
§

impl Sequence for ReplyCode

§

const CARDINALITY: usize = 17usize

Number of values of type Self. Read more
§

fn next(&self) -> Option<ReplyCode>

Returns value following *self or None if this was the end. Read more
§

fn previous(&self) -> Option<ReplyCode>

Returns value preceding *self or None if this was the beginning. Read more
§

fn first() -> Option<ReplyCode>

Returns the first value of type Self. Read more
§

fn last() -> Option<ReplyCode>

Returns the last value of type Self. Read more
§

impl Serialize for ReplyCode

§

fn serialize<__S>( +the >= operator. Read more

Source§

impl Sequence for ReplyCode

Source§

const CARDINALITY: usize = 17usize

Number of values of type Self. Read more
Source§

fn next(&self) -> Option<ReplyCode>

Returns value following *self or None if this was the end. Read more
Source§

fn previous(&self) -> Option<ReplyCode>

Returns value preceding *self or None if this was the beginning. Read more
Source§

fn first() -> Option<ReplyCode>

Returns the first value of type Self. Read more
Source§

fn last() -> Option<ReplyCode>

Returns the last value of type Self. Read more
Source§

impl Serialize for ReplyCode

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl TypeInfo for ReplyCode

§

type Identity = ReplyCode

The type identifying for which type info is provided. Read more
§

fn type_info() -> Type

Returns the static type identifier for Self.
§

impl Copy for ReplyCode

§

impl EncodeLike for ReplyCode

§

impl Eq for ReplyCode

§

impl StructuralPartialEq for ReplyCode

Auto Trait Implementations§

§

impl Freeze for ReplyCode

§

impl RefUnwindSafe for ReplyCode

§

impl Send for ReplyCode

§

impl Sync for ReplyCode

§

impl Unpin for ReplyCode

§

impl UnwindSafe for ReplyCode

Blanket Implementations§

Source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TypeInfo for ReplyCode

Source§

type Identity = ReplyCode

The type identifying for which type info is provided. Read more
Source§

fn type_info() -> Type

Returns the static type identifier for Self.
Source§

impl Copy for ReplyCode

Source§

impl EncodeLike for ReplyCode

Source§

impl Eq for ReplyCode

Source§

impl StructuralPartialEq for ReplyCode

Auto Trait Implementations§

§

impl Freeze for ReplyCode

§

impl RefUnwindSafe for ReplyCode

§

impl Send for ReplyCode

§

impl Sync for ReplyCode

§

impl Unpin for ReplyCode

§

impl UnwindSafe for ReplyCode

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> CloneToUninit for T
where diff --git a/pr-4404/gear_core/message/enum.SuccessReplyReason.html b/pr-4404/gear_core/message/enum.SuccessReplyReason.html index b86ffe59014..177bbd4e566 100644 --- a/pr-4404/gear_core/message/enum.SuccessReplyReason.html +++ b/pr-4404/gear_core/message/enum.SuccessReplyReason.html @@ -1,4 +1,4 @@ -SuccessReplyReason in gear_core::message - Rust
gear_core::message

Enum SuccessReplyReason

#[repr(u8)]
pub enum SuccessReplyReason { +SuccessReplyReason in gear_core::message - Rust
gear_core::message

Enum SuccessReplyReason

Source
#[repr(u8)]
pub enum SuccessReplyReason { Auto = 0, Manual = 1, Unsupported = 255, @@ -7,7 +7,7 @@
§

Manual = 1

Success reply was created by actor manually.

§

Unsupported = 255

Unsupported reason of success reply. Variant exists for backward compatibility.

-

Trait Implementations§

§

impl Clone for SuccessReplyReason

§

fn clone(&self) -> SuccessReplyReason

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
§

impl Debug for SuccessReplyReason

§

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

Formats the value using the given formatter. Read more
§

impl Decode for SuccessReplyReason

§

fn decode<__CodecInputEdqy>( +

Trait Implementations§

Source§

impl Clone for SuccessReplyReason

Source§

fn clone(&self) -> SuccessReplyReason

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 SuccessReplyReason

Source§

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

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

impl Decode for SuccessReplyReason

Source§

fn decode<__CodecInputEdqy>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<SuccessReplyReason, Error>
where __CodecInputEdqy: Input,

Attempt to deserialise the value from input.
§

fn decode_into<I>( @@ -15,32 +15,32 @@ dst: &mut MaybeUninit<Self>, ) -> Result<DecodeFinished, Error>
where I: Input,

Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
§

fn skip<I>(input: &mut I) -> Result<(), Error>
where - I: Input,

Attempt to skip the encoded value from input. Read more
§

fn encoded_fixed_size() -> Option<usize>

Returns the fixed encoded size of the type. Read more
§

impl Default for SuccessReplyReason

§

fn default() -> SuccessReplyReason

Returns the “default value” for a type. Read more
§

impl<'de> Deserialize<'de> for SuccessReplyReason

§

fn deserialize<__D>( + I: Input,

Attempt to skip the encoded value from input. Read more
§

fn encoded_fixed_size() -> Option<usize>

Returns the fixed encoded size of the type. Read more
Source§

impl Default for SuccessReplyReason

Source§

fn default() -> SuccessReplyReason

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for SuccessReplyReason

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<SuccessReplyReason, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Display for SuccessReplyReason

§

fn fmt( + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for SuccessReplyReason

Source§

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

Formats the value using the given formatter. Read more
§

impl Encode for SuccessReplyReason

§

fn size_hint(&self) -> usize

If possible give a hint of expected size of the encoding. Read more
§

fn encode_to<__CodecOutputEdqy>( +) -> Result<(), Error>

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

impl Encode for SuccessReplyReason

Source§

fn size_hint(&self) -> usize

If possible give a hint of expected size of the encoding. Read more
Source§

fn encode_to<__CodecOutputEdqy>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
where __CodecOutputEdqy: Output + ?Sized,

Convert self to a slice and append it to the destination.
§

fn encode(&self) -> Vec<u8>

Convert self to an owned vector.
§

fn using_encoded<R, F>(&self, f: F) -> R
where - F: FnOnce(&[u8]) -> R,

Convert self to a slice and then invoke the given closure with it.
§

fn encoded_size(&self) -> usize

Calculates the encoded size. Read more
§

impl From<SuccessReplyReason> for ReplyCode

§

fn from(original: SuccessReplyReason) -> ReplyCode

Converts to this type from the input type.
§

impl Hash for SuccessReplyReason

§

fn hash<__H>(&self, state: &mut __H)
where + F: FnOnce(&[u8]) -> R,

Convert self to a slice and then invoke the given closure with it.
§

fn encoded_size(&self) -> usize

Calculates the encoded size. Read more
Source§

impl From<SuccessReplyReason> for ReplyCode

Source§

fn from(original: SuccessReplyReason) -> ReplyCode

Converts to this type from the input type.
Source§

impl Hash for SuccessReplyReason

Source§

fn hash<__H>(&self, state: &mut __H)
where __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 H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl Ord for SuccessReplyReason

§

fn cmp(&self, other: &SuccessReplyReason) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for SuccessReplyReason

Source§

fn cmp(&self, other: &SuccessReplyReason) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where 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 - Self: Sized,

Restrict a value to a certain interval. Read more
§

impl PartialEq for SuccessReplyReason

§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

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

impl PartialOrd for SuccessReplyReason

§

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

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

Tests less than or equal to (for self and other) and is used by the + Self: Sized,
Restrict a value to a certain interval. Read more
Source§

impl PartialEq for SuccessReplyReason

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl PartialOrd for SuccessReplyReason

Source§

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

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

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

Tests greater than or equal to (for self and other) and is used by -the >= operator. Read more
§

impl Sequence for SuccessReplyReason

§

const CARDINALITY: usize = 3usize

Number of values of type Self. Read more
§

fn next(&self) -> Option<SuccessReplyReason>

Returns value following *self or None if this was the end. Read more
§

fn previous(&self) -> Option<SuccessReplyReason>

Returns value preceding *self or None if this was the beginning. Read more
§

fn first() -> Option<SuccessReplyReason>

Returns the first value of type Self. Read more
§

fn last() -> Option<SuccessReplyReason>

Returns the last value of type Self. Read more
§

impl Serialize for SuccessReplyReason

§

fn serialize<__S>( +the >= operator. Read more

Source§

impl Sequence for SuccessReplyReason

Source§

const CARDINALITY: usize = 3usize

Number of values of type Self. Read more
Source§

fn next(&self) -> Option<SuccessReplyReason>

Returns value following *self or None if this was the end. Read more
Source§

fn previous(&self) -> Option<SuccessReplyReason>

Returns value preceding *self or None if this was the beginning. Read more
Source§

fn first() -> Option<SuccessReplyReason>

Returns the first value of type Self. Read more
Source§

fn last() -> Option<SuccessReplyReason>

Returns the last value of type Self. Read more
Source§

impl Serialize for SuccessReplyReason

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl TypeInfo for SuccessReplyReason

§

type Identity = SuccessReplyReason

The type identifying for which type info is provided. Read more
§

fn type_info() -> Type

Returns the static type identifier for Self.
§

impl Copy for SuccessReplyReason

§

impl EncodeLike for SuccessReplyReason

§

impl Eq for SuccessReplyReason

§

impl StructuralPartialEq for SuccessReplyReason

Auto Trait Implementations§

§

impl Freeze for SuccessReplyReason

§

impl RefUnwindSafe for SuccessReplyReason

§

impl Send for SuccessReplyReason

§

impl Sync for SuccessReplyReason

§

impl Unpin for SuccessReplyReason

§

impl UnwindSafe for SuccessReplyReason

Blanket Implementations§

Source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TypeInfo for SuccessReplyReason

Source§

type Identity = SuccessReplyReason

The type identifying for which type info is provided. Read more
Source§

fn type_info() -> Type

Returns the static type identifier for Self.
Source§

impl Copy for SuccessReplyReason

Source§

impl EncodeLike for SuccessReplyReason

Source§

impl Eq for SuccessReplyReason

Source§

impl StructuralPartialEq for SuccessReplyReason

Auto Trait Implementations§

§

impl Freeze for SuccessReplyReason

§

impl RefUnwindSafe for SuccessReplyReason

§

impl Send for SuccessReplyReason

§

impl Sync for SuccessReplyReason

§

impl Unpin for SuccessReplyReason

§

impl UnwindSafe for SuccessReplyReason

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> CloneToUninit for T
where diff --git a/pr-4404/gear_core/message/struct.MessageContext.html b/pr-4404/gear_core/message/struct.MessageContext.html index 0c5d3525dd8..40c735e07b9 100644 --- a/pr-4404/gear_core/message/struct.MessageContext.html +++ b/pr-4404/gear_core/message/struct.MessageContext.html @@ -11,7 +11,7 @@ &mut self, packet: InitPacket, delay: u32, -) -> Result<(MessageId, ProgramId), Error>

Send a new program initialization message.

+) -> Result<(MessageId, ProgramId), Error>

Send a new program initialization message.

Generates a new message from provided data packet. Returns message id and generated program id.

Source

pub fn send_commit( @@ -20,22 +20,22 @@ packet: HandlePacket, delay: u32, reservation: Option<ReservationId>, -) -> Result<MessageId, Error>

Send a new program initialization message.

+) -> Result<MessageId, Error>

Send a new program initialization message.

Generates message from provided data packet and stored by handle payload. Returns message id.

-
Source

pub fn send_init(&mut self) -> Result<u32, Error>

Provide space for storing payload for future message creation.

+
Source

pub fn send_init(&mut self) -> Result<u32, Error>

Provide space for storing payload for future message creation.

Returns it’s handle.

-
Source

pub fn send_push(&mut self, handle: u32, buffer: &[u8]) -> Result<(), Error>

Pushes payload into stored payload by handle.

+
Source

pub fn send_push(&mut self, handle: u32, buffer: &[u8]) -> Result<(), Error>

Pushes payload into stored payload by handle.

Source

pub fn send_push_input( &mut self, handle: u32, range: CheckedRange, -) -> Result<(), Error>

Pushes the incoming buffer/payload into stored payload by handle.

+) -> Result<(), Error>

Pushes the incoming buffer/payload into stored payload by handle.

Source

pub fn check_input_range( &self, offset: u32, len: u32, -) -> Result<CheckedRange, Error>

Check if provided offset/len are correct for the current payload +) -> Result<CheckedRange, Error>

Check if provided offset/len are correct for the current payload limits. Result CheckedRange instance is accepted by send_push_input/reply_push_input and has the method len allowing to charge gas before the calls.

@@ -43,18 +43,18 @@ &mut self, packet: ReplyPacket, reservation: Option<ReservationId>, -) -> Result<MessageId, ExtError>

Send reply message.

+) -> Result<MessageId, ExtError>

Send reply message.

Generates reply from provided data packet and stored reply payload. Returns message id.

-
Source

pub fn reply_push(&mut self, buffer: &[u8]) -> Result<(), ExtError>

Pushes payload into stored reply payload.

+
Source

pub fn reply_push(&mut self, buffer: &[u8]) -> Result<(), ExtError>

Pushes payload into stored reply payload.

Source

pub fn reply_destination(&self) -> ProgramId

Return reply destination.

-
Source

pub fn reply_push_input(&mut self, range: CheckedRange) -> Result<(), ExtError>

Pushes the incoming message buffer into stored reply payload.

-
Source

pub fn wake(&mut self, waker_id: MessageId, delay: u32) -> Result<(), Error>

Wake message by it’s message id.

+
Source

pub fn reply_push_input(&mut self, range: CheckedRange) -> Result<(), ExtError>

Pushes the incoming message buffer into stored reply payload.

+
Source

pub fn wake(&mut self, waker_id: MessageId, delay: u32) -> Result<(), Error>

Wake message by it’s message id.

Source

pub fn reply_deposit( &mut self, message_id: MessageId, amount: u64, -) -> Result<(), MessageError>

Create deposit to handle future reply on message id was sent.

+) -> Result<(), MessageError>

Create deposit to handle future reply on message id was sent.

Source

pub fn current(&self) -> &IncomingMessage

Current processing incoming message.

Source

pub fn payload_mut(&mut self) -> &mut Payload

Mutable reference to currently processed incoming message.

Source

pub fn program_id(&self) -> ProgramId

Current program’s id.

diff --git a/pr-4404/gear_core/message/struct.SignalDetails.html b/pr-4404/gear_core/message/struct.SignalDetails.html index 5e8e2ee1101..ea79a1b8777 100644 --- a/pr-4404/gear_core/message/struct.SignalDetails.html +++ b/pr-4404/gear_core/message/struct.SignalDetails.html @@ -1,8 +1,8 @@ SignalDetails in gear_core::message - Rust
gear_core::message

Struct SignalDetails

Source
pub struct SignalDetails { /* private fields */ }
Expand description

Signal details data.

-

Implementations§

Source§

impl SignalDetails

Source

pub fn new(to: MessageId, code: SignalCode) -> Self

Constructor for details.

+

Implementations§

Source§

impl SignalDetails

Source

pub fn new(to: MessageId, code: SignalCode) -> Self

Constructor for details.

Source

pub fn to_message_id(&self) -> MessageId

Returns message id signal sent from.

-
Source

pub fn to_signal_code(&self) -> SignalCode

Returns signal code of signal details.

-
Source

pub fn into_parts(self) -> (MessageId, SignalCode)

Destructs details into parts.

+
Source

pub fn to_signal_code(&self) -> SignalCode

Returns signal code of signal details.

+
Source

pub fn into_parts(self) -> (MessageId, SignalCode)

Destructs details into parts.

Trait Implementations§

Source§

impl Clone for SignalDetails

Source§

fn clone(&self) -> SignalDetails

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 SignalDetails

Source§

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

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

impl Decode for SignalDetails

Source§

fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<Self, Error>

Attempt to deserialise the value from input.
§

fn decode_into<I>( diff --git a/pr-4404/gear_core/message/struct.SignalMessage.html b/pr-4404/gear_core/message/struct.SignalMessage.html index c79adaa8f21..5ced6a2e40f 100644 --- a/pr-4404/gear_core/message/struct.SignalMessage.html +++ b/pr-4404/gear_core/message/struct.SignalMessage.html @@ -1,5 +1,5 @@ SignalMessage in gear_core::message - Rust
gear_core::message

Struct SignalMessage

Source
pub struct SignalMessage { /* private fields */ }
Expand description

Message for signal entry point.

-

Implementations§

Source§

impl SignalMessage

Source

pub fn new(origin_msg_id: MessageId, code: SignalCode) -> Self

Creates a new SignalMessage.

+

Implementations§

Source§

impl SignalMessage

Source

pub fn new(origin_msg_id: MessageId, code: SignalCode) -> Self

Creates a new SignalMessage.

Source

pub fn into_message( self, origin_msg_id: MessageId, @@ -11,7 +11,7 @@ destination: ProgramId, ) -> Dispatch

Convert SignalMessage into Dispatch.

Source

pub fn id(&self) -> MessageId

Message id.

-
Source

pub fn code(&self) -> SignalCode

Status code of the reply message.

+
Source

pub fn code(&self) -> SignalCode

Status code of the reply message.

Trait Implementations§

Source§

impl Clone for SignalMessage

Source§

fn clone(&self) -> SignalMessage

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 SignalMessage

Source§

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

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

impl Decode for SignalMessage

Source§

fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<Self, Error>

Attempt to deserialise the value from input.
§

fn decode_into<I>( diff --git a/pr-4404/gear_core/reservation/struct.GasReserver.html b/pr-4404/gear_core/reservation/struct.GasReserver.html index f4b575a3077..d08255f3ccc 100644 --- a/pr-4404/gear_core/reservation/struct.GasReserver.html +++ b/pr-4404/gear_core/reservation/struct.GasReserver.html @@ -13,27 +13,27 @@ &mut self, amount: u64, duration: u32, -) -> Result<ReservationId, ReservationError>

Reserves gas.

+) -> Result<ReservationId, ReservationError>

Reserves gas.

Creates a new reservation and returns its id.

Returns an error if maximum limit of reservations is reached.

Source

pub fn unreserve( &mut self, id: ReservationId, -) -> Result<(u64, Option<UnreservedReimbursement>), ReservationError>

Unreserves gas reserved within id reservation.

+) -> Result<(u64, Option<UnreservedReimbursement>), ReservationError>

Unreserves gas reserved within id reservation.

Return error if:

  1. Reservation doesn’t exist.
  2. Reservation was “unreserved”, so in GasReservationState::Removed state.
  3. Reservation was marked used.
-
Source

pub fn mark_used(&mut self, id: ReservationId) -> Result<(), ReservationError>

Marks reservation as used.

+
Source

pub fn mark_used(&mut self, id: ReservationId) -> Result<(), ReservationError>

Marks reservation as used.

This allows to avoid double usage of the reservation for sending a new message from execution of message_id of current gas reserver.

Source

pub fn check_not_used( &mut self, id: ReservationId, -) -> Result<&mut bool, ReservationError>

Check if reservation is not used.

+) -> Result<&mut bool, ReservationError>

Check if reservation is not used.

If reservation does not exist returns InvalidReservationId error.

Source

pub fn nonce(&self) -> ReservationNonce

Returns gas reservations current nonce.

Source

pub fn states(&self) -> &GasReservationStates

Gets gas reservations states.

diff --git a/pr-4404/gtest/index.html b/pr-4404/gtest/index.html index 994bbb8d5b0..0e85ce4cb97 100644 --- a/pr-4404/gtest/index.html +++ b/pr-4404/gtest/index.html @@ -27,7 +27,7 @@

§I name = "my-gear-app" version = "0.1.0" authors = ["Your Name"] -edition = "2021" +edition = "2024" [dependencies] gstd = { git = "https://github.com/gear-tech/gear.git", tag = "v1.0.1" } diff --git a/pr-4404/pallet_gear/manager/index.html b/pr-4404/pallet_gear/manager/index.html index c637c93b07b..4270827d1a7 100644 --- a/pr-4404/pallet_gear/manager/index.html +++ b/pr-4404/pallet_gear/manager/index.html @@ -9,8 +9,8 @@ in case of execution resulting in a trap. So, it gives us a guarantee that regardless of the result of message execution, there is always some value to perform asset management, i.e move tokens further to the recipient or give back to sender. The guarantee is implemented by using corresponding pallet_balances functions (reserve, repatriate_reserved, unreserve along with transfer) in pallet_gear extrinsics, -JournalHandler::send_dispatch and -JournalHandler::send_value procedures.

+JournalHandler::send_dispatch and +JournalHandler::send_value procedures.

  • Balance sufficiency before adding message with value to the queue. @@ -21,7 +21,7 @@ by program’s balance checks. The check gives guarantee that value reservation call in

  • -

    JournalHandler::send_dispatch for program’s messages won’t fail, because there is always a +

    JournalHandler::send_dispatch for program’s messages won’t fail, because there is always a sufficient balance for the call.

    1. Messages’s value management considers existential deposit rule. diff --git a/pr-4404/pallet_gear/manager/struct.ExtManager.html b/pr-4404/pallet_gear/manager/struct.ExtManager.html index 7bd1f19bfe8..bab705dfb6b 100644 --- a/pr-4404/pallet_gear/manager/struct.ExtManager.html +++ b/pr-4404/pallet_gear/manager/struct.ExtManager.html @@ -15,65 +15,65 @@ )

    Source

    pub fn remove_gas_reservation_impl( program_id: ProgramId, reservation_id: ReservationId, -) -> GasReservationSlot

    Trait Implementations§

    Source§

    impl<T: Config> From<ExtManager<T>> for QueuePostProcessingData

    Source§

    fn from(ext_manager: ExtManager<T>) -> Self

    Converts to this type from the input type.
    Source§

    impl<T> JournalHandler for ExtManager<T>
    where +) -> GasReservationSlot

    Trait Implementations§

    Source§

    impl<T: Config> From<ExtManager<T>> for QueuePostProcessingData

    Source§

    fn from(ext_manager: ExtManager<T>) -> Self

    Converts to this type from the input type.
    Source§

    impl<T> JournalHandler for ExtManager<T>
    where T: Config, - T::AccountId: Origin,

    Source§

    fn message_dispatched( + T::AccountId: Origin,

    Source§

    fn message_dispatched( &mut self, message_id: MessageId, source: ProgramId, - outcome: CoreDispatchOutcome, -)

    Process message dispatch.
    Source§

    fn gas_burned(&mut self, message_id: MessageId, amount: u64)

    Process gas burned.
    Source§

    fn exit_dispatch(&mut self, id_exited: ProgramId, value_destination: ProgramId)

    Process exit dispatch.
    Source§

    fn message_consumed(&mut self, message_id: MessageId)

    Process message consumed.
    Source§

    fn send_dispatch( + outcome: CoreDispatchOutcome, +)

    Process message dispatch.
    Source§

    fn gas_burned(&mut self, message_id: MessageId, amount: u64)

    Process gas burned.
    Source§

    fn exit_dispatch(&mut self, id_exited: ProgramId, value_destination: ProgramId)

    Process exit dispatch.
    Source§

    fn message_consumed(&mut self, message_id: MessageId)

    Process message consumed.
    Source§

    fn send_dispatch( &mut self, message_id: MessageId, dispatch: Dispatch, delay: u32, reservation: Option<ReservationId>, -)

    Process send dispatch.
    Source§

    fn wait_dispatch( +)

    Process send dispatch.
    Source§

    fn wait_dispatch( &mut self, dispatch: StoredDispatch, duration: Option<u32>, waited_type: MessageWaitedType, -)

    Process send message.
    Source§

    fn wake_message( +)

    Process send message.
    Source§

    fn wake_message( &mut self, message_id: MessageId, program_id: ProgramId, awakening_id: MessageId, delay: u32, -)

    Process send message.
    Source§

    fn update_pages_data( +)

    Process send message.
    Source§

    fn update_pages_data( &mut self, program_id: ProgramId, pages_data: BTreeMap<GearPage, PageBuf>, -)

    Process page update.
    Source§

    fn update_allocations( +)

    Process page update.
    Source§

    fn update_allocations( &mut self, program_id: ProgramId, allocations: IntervalsTree<WasmPage>, -)

    Process [JournalNote::UpdateAllocations].
    Source§

    fn send_value(&mut self, from: ProgramId, to: Option<ProgramId>, value: u128)

    Send value.
    Source§

    fn store_new_programs( +)

    Source§

    fn send_value(&mut self, from: ProgramId, to: Option<ProgramId>, value: u128)

    Send value.
    Source§

    fn store_new_programs( &mut self, program_id: ProgramId, code_id: CodeId, candidates: Vec<(MessageId, ProgramId)>, -)

    Store new programs in storage. Read more
    Source§

    fn stop_processing(&mut self, dispatch: StoredDispatch, gas_burned: u64)

    Stop processing queue. Read more
    Source§

    fn reserve_gas( +)

    Store new programs in storage. Read more
    Source§

    fn stop_processing(&mut self, dispatch: StoredDispatch, gas_burned: u64)

    Stop processing queue. Read more
    Source§

    fn reserve_gas( &mut self, message_id: MessageId, reservation_id: ReservationId, program_id: ProgramId, amount: u64, duration: u32, -)

    Reserve gas.
    Source§

    fn unreserve_gas( +)

    Reserve gas.
    Source§

    fn unreserve_gas( &mut self, reservation_id: ReservationId, program_id: ProgramId, expiration: u32, -)

    Unreserve gas.
    Source§

    fn update_gas_reservation( +)

    Unreserve gas.
    Source§

    fn update_gas_reservation( &mut self, program_id: ProgramId, reserver: GasReserver, -)

    Update gas reservations.
    Source§

    fn system_reserve_gas(&mut self, message_id: MessageId, amount: u64)

    Do system reservation.
    Source§

    fn system_unreserve_gas(&mut self, message_id: MessageId)

    Do system unreservation.
    Source§

    fn send_signal( +)

    Update gas reservations.
    Source§

    fn system_reserve_gas(&mut self, message_id: MessageId, amount: u64)

    Do system reservation.
    Source§

    fn system_unreserve_gas(&mut self, message_id: MessageId)

    Do system unreservation.
    Source§

    fn send_signal( &mut self, message_id: MessageId, destination: ProgramId, code: SignalCode, -)

    Send system signal.
    Source§

    fn reply_deposit( +)

    Send system signal.
    Source§

    fn reply_deposit( &mut self, message_id: MessageId, future_reply_id: MessageId, diff --git a/pr-4404/pallet_gear/trait.BuiltinDispatcher.html b/pr-4404/pallet_gear/trait.BuiltinDispatcher.html index 0143802af0e..529411fc63e 100644 --- a/pr-4404/pallet_gear/trait.BuiltinDispatcher.html +++ b/pr-4404/pallet_gear/trait.BuiltinDispatcher.html @@ -8,7 +8,7 @@ f: &HandleFn<Self::Error>, dispatch: StoredDispatch, gas_limit: u64, - ) -> Vec<JournalNote>; + ) -> Vec<JournalNote>; }
    Expand description

    A trait representing a registry that provides methods to lookup and run a builtin actor.

    Required Associated Types§

    Required Methods§

    Source

    fn lookup<'a>(&'a self, id: &ProgramId) -> Option<&'a HandleFn<Self::Error>>

    Looks up a builtin actor by its actor id.

    Source

    fn run( @@ -16,9 +16,9 @@ f: &HandleFn<Self::Error>, dispatch: StoredDispatch, gas_limit: u64, -) -> Vec<JournalNote>

    Implementations on Foreign Types§

    Source§

    impl BuiltinDispatcher for ()

    Source§

    type Error = ()

    Source§

    fn lookup<'a>(&'a self, _id: &ProgramId) -> Option<&'a HandleFn<Self::Error>>

    Source§

    fn run( +) -> Vec<JournalNote>

    Implementations on Foreign Types§

    Source§

    impl BuiltinDispatcher for ()

    Source§

    type Error = ()

    Source§

    fn lookup<'a>(&'a self, _id: &ProgramId) -> Option<&'a HandleFn<Self::Error>>

    Source§

    fn run( &self, _f: &HandleFn<Self::Error>, _dispatch: StoredDispatch, _gas_limit: u64, -) -> Vec<JournalNote>

    Implementors§

    \ No newline at end of file +) -> Vec<JournalNote>

    Implementors§

    \ No newline at end of file diff --git a/pr-4404/pallet_gear/type.Ext.html b/pr-4404/pallet_gear/type.Ext.html index 2b7f956f9f9..8caf0fa2f8e 100644 --- a/pr-4404/pallet_gear/type.Ext.html +++ b/pr-4404/pallet_gear/type.Ext.html @@ -1,7 +1,7 @@ -Ext in pallet_gear - Rust
    pallet_gear

    Type Alias Ext

    Source
    pub type Ext = Ext<LazyPagesRuntimeInterface>;

    Aliased Type§

    struct Ext {
    -    pub context: ProcessorContext,
    +Ext in pallet_gear - Rust
    pallet_gear

    Type Alias Ext

    Source
    pub type Ext = Ext<LazyPagesRuntimeInterface>;

    Aliased Type§

    struct Ext {
    +    pub context: ProcessorContext,
         pub current_counter: CounterType,
         /* private fields */
    -}

    Fields§

    §context: ProcessorContext

    Processor context.

    +}

    Fields§

    §context: ProcessorContext

    Processor context.

    §current_counter: CounterType

    Actual gas counter type within wasm module’s global.

    \ No newline at end of file diff --git a/pr-4404/pallet_gear_rpc_runtime_api/enum.HandleKind.html b/pr-4404/pallet_gear_rpc_runtime_api/enum.HandleKind.html index ac5f40ea58e..8ddfd0a3752 100644 --- a/pr-4404/pallet_gear_rpc_runtime_api/enum.HandleKind.html +++ b/pr-4404/pallet_gear_rpc_runtime_api/enum.HandleKind.html @@ -1,10 +1,10 @@ -HandleKind in pallet_gear_rpc_runtime_api - Rust
    pallet_gear_rpc_runtime_api

    Enum HandleKind

    Source
    pub enum HandleKind {
    +HandleKind in pallet_gear_rpc_runtime_api - Rust
    pallet_gear_rpc_runtime_api

    Enum HandleKind

    pub enum HandleKind {
         Init(Vec<u8>),
         InitByHash(CodeId),
         Handle(ActorId),
         Reply(MessageId, ReplyCode),
         Signal(MessageId, SignalCode),
    -}

    Variants§

    §

    Init(Vec<u8>)

    §

    InitByHash(CodeId)

    §

    Handle(ActorId)

    §

    Reply(MessageId, ReplyCode)

    §

    Signal(MessageId, SignalCode)

    Trait Implementations§

    Source§

    impl Clone for HandleKind

    Source§

    fn clone(&self) -> HandleKind

    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 HandleKind

    Source§

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

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

    impl Decode for HandleKind

    Source§

    fn decode<__CodecInputEdqy>( +}

    Variants§

    §

    Init(Vec<u8>)

    §

    InitByHash(CodeId)

    §

    Handle(ActorId)

    §

    Reply(MessageId, ReplyCode)

    §

    Signal(MessageId, SignalCode)

    Trait Implementations§

    §

    impl Clone for HandleKind

    §

    fn clone(&self) -> HandleKind

    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
    §

    impl Debug for HandleKind

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Decode for HandleKind

    §

    fn decode<__CodecInputEdqy>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<HandleKind, Error>
    where __CodecInputEdqy: Input,

    Attempt to deserialise the value from input.
    §

    fn decode_into<I>( @@ -12,12 +12,12 @@ dst: &mut MaybeUninit<Self>, ) -> Result<DecodeFinished, Error>
    where I: Input,

    Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
    §

    fn skip<I>(input: &mut I) -> Result<(), Error>
    where - I: Input,

    Attempt to skip the encoded value from input. Read more
    §

    fn encoded_fixed_size() -> Option<usize>

    Returns the fixed encoded size of the type. Read more
    Source§

    impl Encode for HandleKind

    Source§

    fn size_hint(&self) -> usize

    If possible give a hint of expected size of the encoding. Read more
    Source§

    fn encode_to<__CodecOutputEdqy>( + I: Input,

    Attempt to skip the encoded value from input. Read more
    §

    fn encoded_fixed_size() -> Option<usize>

    Returns the fixed encoded size of the type. Read more
    §

    impl Encode for HandleKind

    §

    fn size_hint(&self) -> usize

    If possible give a hint of expected size of the encoding. Read more
    §

    fn encode_to<__CodecOutputEdqy>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
    where __CodecOutputEdqy: Output + ?Sized,

    Convert self to a slice and append it to the destination.
    §

    fn encode(&self) -> Vec<u8>

    Convert self to an owned vector.
    §

    fn using_encoded<R, F>(&self, f: F) -> R
    where - F: FnOnce(&[u8]) -> R,

    Convert self to a slice and then invoke the given closure with it.
    §

    fn encoded_size(&self) -> usize

    Calculates the encoded size. Read more
    Source§

    impl TypeInfo for HandleKind

    Source§

    type Identity = HandleKind

    The type identifying for which type info is provided. Read more
    Source§

    fn type_info() -> Type

    Returns the static type identifier for Self.
    Source§

    impl EncodeLike for HandleKind

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where + F: FnOnce(&[u8]) -> R,

    Convert self to a slice and then invoke the given closure with it.
    §

    fn encoded_size(&self) -> usize

    Calculates the encoded size. Read more
    §

    impl TypeInfo for HandleKind

    §

    type Identity = HandleKind

    The type identifying for which type info is provided. Read more
    §

    fn type_info() -> Type

    Returns the static type identifier for Self.
    §

    impl EncodeLike for HandleKind

    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<T> ArchivePointee for T

    §

    type ArchivedMetadata = ()

    The archived version of the pointer metadata for this type.
    §

    fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

    Converts some archived metadata to the pointer metadata for itself.
    Source§

    impl<T> Borrow<T> for T
    where diff --git a/pr-4404/src/gear_core/env.rs.html b/pr-4404/src/gear_core/env.rs.html index 28c60627d53..9eb4edd3576 100644 --- a/pr-4404/src/gear_core/env.rs.html +++ b/pr-4404/src/gear_core/env.rs.html @@ -421,7 +421,7 @@ }; use alloc::collections::BTreeSet; use core::{fmt::Display, mem}; -use gear_core_errors::{ReplyCode, SignalCode}; +use gear_core_errors::{ReplyCode, SignalCode}; use gear_wasm_instrument::syscalls::SyscallName; /// Lock for the payload of the incoming/currently executing message. @@ -694,7 +694,7 @@ fn reply_code(&self) -> Result<ReplyCode, Self::FallibleError>; /// Get the signal code if the message being processed. - fn signal_code(&self) -> Result<SignalCode, Self::FallibleError>; + fn signal_code(&self) -> Result<SignalCode, Self::FallibleError>; /// Get the id of the message currently being handled. fn message_id(&self) -> Result<MessageId, Self::UnrecoverableError>; diff --git a/pr-4404/src/gear_core/message/common.rs.html b/pr-4404/src/gear_core/message/common.rs.html index 9514eaf5824..604d1757f43 100644 --- a/pr-4404/src/gear_core/message/common.rs.html +++ b/pr-4404/src/gear_core/message/common.rs.html @@ -385,7 +385,7 @@ }, }; use core::ops::Deref; -use gear_core_errors::{ReplyCode, SignalCode}; +use gear_core_errors::{ReplyCode, SignalCode}; use scale_info::{ TypeInfo, scale::{Decode, Encode}, @@ -552,7 +552,7 @@ /// Returns bool defining if message is error reply. pub fn is_error_reply(&self) -> bool { self.to_reply_details() - .map(|d| d.code.is_error()) + .map(|d| d.code.is_error()) .unwrap_or(false) } @@ -629,12 +629,12 @@ /// Message id, which issues signal. to: MessageId, /// Signal code. - code: SignalCode, + code: SignalCode, } impl SignalDetails { /// Constructor for details. - pub fn new(to: MessageId, code: SignalCode) -> Self { + pub fn new(to: MessageId, code: SignalCode) -> Self { Self { to, code } } @@ -644,12 +644,12 @@ } /// Returns signal code of signal details. - pub fn to_signal_code(&self) -> SignalCode { + pub fn to_signal_code(&self) -> SignalCode { self.code } /// Destructs details into parts. - pub fn into_parts(self) -> (MessageId, SignalCode) { + pub fn into_parts(self) -> (MessageId, SignalCode) { (self.to, self.code) } } diff --git a/pr-4404/src/gear_core/message/context.rs.html b/pr-4404/src/gear_core/message/context.rs.html index 5b11b5efd12..b69bd9df950 100644 --- a/pr-4404/src/gear_core/message/context.rs.html +++ b/pr-4404/src/gear_core/message/context.rs.html @@ -1180,7 +1180,7 @@ collections::{BTreeMap, BTreeSet}, vec::Vec, }; -use gear_core_errors::{ExecutionError, ExtError, MessageError as Error, MessageError}; +use gear_core_errors::{ExecutionError, ExtError, MessageError as Error, MessageError}; use scale_info::{ TypeInfo, scale::{Decode, Encode}, @@ -1396,9 +1396,9 @@ &self.settings } - fn check_reply_availability(&self) -> Result<(), ExecutionError> { + fn check_reply_availability(&self) -> Result<(), ExecutionError> { if !matches!(self.kind, DispatchKind::Init | DispatchKind::Handle) { - return Err(ExecutionError::IncorrectEntryForReply); + return Err(ExecutionError::IncorrectEntryForReply); } Ok(()) @@ -1424,17 +1424,17 @@ &mut self, packet: InitPacket, delay: u32, - ) -> Result<(MessageId, ProgramId), Error> { + ) -> Result<(MessageId, ProgramId), Error> { let program_id = packet.destination(); if self.store.initialized.contains(&program_id) { - return Err(Error::DuplicateInit); + return Err(Error::DuplicateInit); } let last = self.store.local_nonce; if last >= self.settings.outgoing_limit { - return Err(Error::OutgoingMessagesAmountLimitExceeded); + return Err(Error::OutgoingMessagesAmountLimitExceeded); } let message_id = MessageId::generate_outgoing(self.current.id(), last); @@ -1457,13 +1457,13 @@ mut packet: HandlePacket, delay: u32, reservation: Option<ReservationId>, - ) -> Result<MessageId, Error> { + ) -> Result<MessageId, Error> { let outgoing = self .outgoing_payloads .handles .get_mut(&handle) - .ok_or(Error::OutOfBounds)?; - let data = outgoing.take().ok_or(Error::LateAccess)?; + .ok_or(Error::OutOfBounds)?; + let data = outgoing.take().ok_or(Error::LateAccess)?; let do_send_commit = || { let Some(new_outgoing_bytes) = Self::increase_counter( @@ -1471,12 +1471,12 @@ packet.payload_len(), self.settings.outgoing_bytes_limit, ) else { - return Err((Error::OutgoingMessagesBytesLimitExceeded, data)); + return Err((Error::OutgoingMessagesBytesLimitExceeded, data)); }; packet .try_prepend(data) - .map_err(|data| (Error::MaxMessageSizeExceed, data))?; + .map_err(|data| (Error::MaxMessageSizeExceed, data))?; let message_id = MessageId::generate_outgoing(self.current.id(), handle); let message = HandleMessage::from_packet(message_id, packet); @@ -1504,7 +1504,7 @@ /// Provide space for storing payload for future message creation. /// /// Returns it's handle. - pub fn send_init(&mut self) -> Result<u32, Error> { + pub fn send_init(&mut self) -> Result<u32, Error> { let last = self.store.local_nonce; if last < self.settings.outgoing_limit { self.store.local_nonce += 1; @@ -1514,16 +1514,16 @@ Ok(last) } else { - Err(Error::OutgoingMessagesAmountLimitExceeded) + Err(Error::OutgoingMessagesAmountLimitExceeded) } } /// Pushes payload into stored payload by handle. - pub fn send_push(&mut self, handle: u32, buffer: &[u8]) -> Result<(), Error> { + pub fn send_push(&mut self, handle: u32, buffer: &[u8]) -> Result<(), Error> { let data = match self.outgoing_payloads.handles.get_mut(&handle) { Some(Some(data)) => data, - Some(None) => return Err(Error::LateAccess), - None => return Err(Error::OutOfBounds), + Some(None) => return Err(Error::LateAccess), + None => return Err(Error::OutOfBounds), }; let new_outgoing_bytes = Self::increase_counter( @@ -1531,10 +1531,10 @@ buffer.len(), self.settings.outgoing_bytes_limit, ) - .ok_or(Error::OutgoingMessagesBytesLimitExceeded)?; + .ok_or(Error::OutgoingMessagesBytesLimitExceeded)?; data.try_extend_from_slice(buffer) - .map_err(|_| Error::MaxMessageSizeExceed)?; + .map_err(|_| Error::MaxMessageSizeExceed)?; self.outgoing_payloads.bytes_counter = new_outgoing_bytes; @@ -1542,11 +1542,11 @@ } /// Pushes the incoming buffer/payload into stored payload by handle. - pub fn send_push_input(&mut self, handle: u32, range: CheckedRange) -> Result<(), Error> { + pub fn send_push_input(&mut self, handle: u32, range: CheckedRange) -> Result<(), Error> { let data = match self.outgoing_payloads.handles.get_mut(&handle) { Some(Some(data)) => data, - Some(None) => return Err(Error::LateAccess), - None => return Err(Error::OutOfBounds), + Some(None) => return Err(Error::LateAccess), + None => return Err(Error::OutOfBounds), }; let bytes_amount = range.len(); @@ -1560,10 +1560,10 @@ bytes_amount, self.settings.outgoing_bytes_limit, ) - .ok_or(Error::OutgoingMessagesBytesLimitExceeded)?; + .ok_or(Error::OutgoingMessagesBytesLimitExceeded)?; data.try_extend_from_slice(&self.current.payload_bytes()[offset..excluded_end]) - .map_err(|_| Error::MaxMessageSizeExceed)?; + .map_err(|_| Error::MaxMessageSizeExceed)?; self.outgoing_payloads.bytes_counter = new_outgoing_bytes; @@ -1574,20 +1574,20 @@ /// limits. Result `CheckedRange` instance is accepted by /// `send_push_input`/`reply_push_input` and has the method `len` /// allowing to charge gas before the calls. - pub fn check_input_range(&self, offset: u32, len: u32) -> Result<CheckedRange, Error> { + pub fn check_input_range(&self, offset: u32, len: u32) -> Result<CheckedRange, Error> { let input = self.current.payload_bytes(); let offset = offset as usize; let len = len as usize; // Check `offset` is not out of bounds. if offset >= input.len() { - return Err(Error::OutOfBoundsInputSliceOffset); + return Err(Error::OutOfBoundsInputSliceOffset); } // Check `len` for the current `offset` doesn't refer to the slice out of input bounds. let available_len = input.len() - offset; if len > available_len { - return Err(Error::OutOfBoundsInputSliceLength); + return Err(Error::OutOfBoundsInputSliceLength); } Ok(CheckedRange { @@ -1605,18 +1605,18 @@ &mut self, mut packet: ReplyPacket, reservation: Option<ReservationId>, - ) -> Result<MessageId, ExtError> { + ) -> Result<MessageId, ExtError> { self.check_reply_availability()?; if self.reply_sent() { - return Err(Error::DuplicateReply.into()); + return Err(Error::DuplicateReply.into()); } let data = self.outgoing_payloads.reply.take().unwrap_or_default(); if let Err(data) = packet.try_prepend(data) { self.outgoing_payloads.reply = Some(data); - return Err(Error::MaxMessageSizeExceed.into()); + return Err(Error::MaxMessageSizeExceed.into()); } let message_id = MessageId::generate_reply(self.current.id()); @@ -1628,11 +1628,11 @@ } /// Pushes payload into stored reply payload. - pub fn reply_push(&mut self, buffer: &[u8]) -> Result<(), ExtError> { + pub fn reply_push(&mut self, buffer: &[u8]) -> Result<(), ExtError> { self.check_reply_availability()?; if self.reply_sent() { - return Err(Error::LateAccess.into()); + return Err(Error::LateAccess.into()); } // NOTE: it's normal to not undone `get_or_insert_with` in case of error @@ -1640,7 +1640,7 @@ .reply .get_or_insert_with(Default::default) .try_extend_from_slice(buffer) - .map_err(|_| Error::MaxMessageSizeExceed.into()) + .map_err(|_| Error::MaxMessageSizeExceed.into()) } /// Return reply destination. @@ -1649,11 +1649,11 @@ } /// Pushes the incoming message buffer into stored reply payload. - pub fn reply_push_input(&mut self, range: CheckedRange) -> Result<(), ExtError> { + pub fn reply_push_input(&mut self, range: CheckedRange) -> Result<(), ExtError> { self.check_reply_availability()?; if self.reply_sent() { - return Err(Error::LateAccess.into()); + return Err(Error::LateAccess.into()); } let CheckedRange { @@ -1666,16 +1666,16 @@ .reply .get_or_insert_with(Default::default) .try_extend_from_slice(&self.current.payload_bytes()[offset..excluded_end]) - .map_err(|_| Error::MaxMessageSizeExceed.into()) + .map_err(|_| Error::MaxMessageSizeExceed.into()) } /// Wake message by it's message id. - pub fn wake(&mut self, waker_id: MessageId, delay: u32) -> Result<(), Error> { + pub fn wake(&mut self, waker_id: MessageId, delay: u32) -> Result<(), Error> { if !self.outcome.awakening.iter().any(|v| v.0 == waker_id) { self.outcome.awakening.push((waker_id, delay)); Ok(()) } else { - Err(Error::DuplicateWaking) + Err(Error::DuplicateWaking) } } @@ -1684,14 +1684,14 @@ &mut self, message_id: MessageId, amount: u64, - ) -> Result<(), MessageError> { + ) -> Result<(), MessageError> { if self .outcome .reply_deposits .iter() .any(|(mid, _)| mid == &message_id) { - return Err(MessageError::DuplicateReplyDeposit); + return Err(MessageError::DuplicateReplyDeposit); } if !self @@ -1705,7 +1705,7 @@ .iter() .any(|(message, ..)| message.id() == message_id) { - return Err(MessageError::IncorrectMessageForReplyDeposit); + return Err(MessageError::IncorrectMessageForReplyDeposit); } self.outcome.reply_deposits.push((message_id, amount)); diff --git a/pr-4404/src/gear_core/message/reply.rs.html b/pr-4404/src/gear_core/message/reply.rs.html index cd2732f3dbd..dd282d6c394 100644 --- a/pr-4404/src/gear_core/message/reply.rs.html +++ b/pr-4404/src/gear_core/message/reply.rs.html @@ -467,7 +467,7 @@ pub fn system(payload: Payload, err: impl Into<ErrorReplyReason>) -> Self { Self { payload, - code: ReplyCode::error(err), + code: ReplyCode::error(err), ..Default::default() } } diff --git a/pr-4404/src/gear_core/message/signal.rs.html b/pr-4404/src/gear_core/message/signal.rs.html index dcae190f5e2..5fc1d81649e 100644 --- a/pr-4404/src/gear_core/message/signal.rs.html +++ b/pr-4404/src/gear_core/message/signal.rs.html @@ -96,7 +96,7 @@ ids::{MessageId, ProgramId, prelude::*}, message::{Dispatch, DispatchKind, Message, SignalDetails}, }; -use gear_core_errors::SignalCode; +use gear_core_errors::SignalCode; use scale_info::{ TypeInfo, scale::{Decode, Encode}, @@ -108,12 +108,12 @@ /// Message id. id: MessageId, /// Reply status code. - code: SignalCode, + code: SignalCode, } impl SignalMessage { /// Creates a new [`SignalMessage`]. - pub fn new(origin_msg_id: MessageId, code: SignalCode) -> Self { + pub fn new(origin_msg_id: MessageId, code: SignalCode) -> Self { let id = MessageId::generate_signal(origin_msg_id); Self { id, code } @@ -146,7 +146,7 @@ } /// Status code of the reply message. - pub fn code(&self) -> SignalCode { + pub fn code(&self) -> SignalCode { self.code } } diff --git a/pr-4404/src/gear_core/reservation.rs.html b/pr-4404/src/gear_core/reservation.rs.html index e79ea5ad124..7f67c2a94e8 100644 --- a/pr-4404/src/gear_core/reservation.rs.html +++ b/pr-4404/src/gear_core/reservation.rs.html @@ -565,7 +565,7 @@ message::IncomingDispatch, }; use alloc::{collections::BTreeMap, format}; -use gear_core_errors::ReservationError; +use gear_core_errors::ReservationError; use scale_info::{ TypeInfo, scale::{Decode, Encode}, @@ -678,7 +678,7 @@ /// in the `states` is less than `max_reservations`. Removed reservations, /// which are stored with the [`GasReservationState::Removed`] state in the /// `states`, aren't excluded from the check. - fn check_execution_limit(&self) -> Result<(), ReservationError> { + fn check_execution_limit(&self) -> Result<(), ReservationError> { // operation might very expensive in the future // so we will store 2 numerics to optimize it maybe let current_reservations = self @@ -692,7 +692,7 @@ }) .sum::<u64>(); if current_reservations > self.max_reservations { - Err(ReservationError::ReservationsLimitReached) + Err(ReservationError::ReservationsLimitReached) } else { Ok(()) } @@ -716,7 +716,7 @@ &mut self, amount: u64, duration: u32, - ) -> Result<ReservationId, ReservationError> { + ) -> Result<ReservationId, ReservationError> { self.check_execution_limit()?; let id = ReservationId::generate(self.message_id, self.nonce.fetch_inc()); @@ -751,12 +751,12 @@ pub fn unreserve( &mut self, id: ReservationId, - ) -> Result<(u64, Option<UnreservedReimbursement>), ReservationError> { + ) -> Result<(u64, Option<UnreservedReimbursement>), ReservationError> { // Docs error case #1. let state = self .states .get(&id) - .ok_or(ReservationError::InvalidReservationId)?; + .ok_or(ReservationError::InvalidReservationId)?; if matches!( state, @@ -766,7 +766,7 @@ GasReservationState::Exists { used: true, .. } | GasReservationState::Created { used: true, .. } ) { - return Err(ReservationError::InvalidReservationId); + return Err(ReservationError::InvalidReservationId); } let state = self.states.remove(&id).unwrap(); @@ -795,7 +795,7 @@ /// This allows to avoid double usage of the reservation /// for sending a new message from execution of `message_id` /// of current gas reserver. - pub fn mark_used(&mut self, id: ReservationId) -> Result<(), ReservationError> { + pub fn mark_used(&mut self, id: ReservationId) -> Result<(), ReservationError> { let used = self.check_not_used(id)?; *used = true; Ok(()) @@ -804,18 +804,18 @@ /// Check if reservation is not used. /// /// If reservation does not exist returns `InvalidReservationId` error. - pub fn check_not_used(&mut self, id: ReservationId) -> Result<&mut bool, ReservationError> { + pub fn check_not_used(&mut self, id: ReservationId) -> Result<&mut bool, ReservationError> { if let Some( GasReservationState::Created { used, .. } | GasReservationState::Exists { used, .. }, ) = self.states.get_mut(&id) { if *used { - Err(ReservationError::InvalidReservationId) + Err(ReservationError::InvalidReservationId) } else { Ok(used) } } else { - Err(ReservationError::InvalidReservationId) + Err(ReservationError::InvalidReservationId) } } diff --git a/pr-4404/src/gear_wasm_builder/crate_info.rs.html b/pr-4404/src/gear_wasm_builder/crate_info.rs.html index 45b8c97a4fe..c2ff8fa6e36 100644 --- a/pr-4404/src/gear_wasm_builder/crate_info.rs.html +++ b/pr-4404/src/gear_wasm_builder/crate_info.rs.html @@ -142,7 +142,7 @@ use crate::{builder_error::BuilderError, multiple_crate_versions}; use anyhow::{Context, Result, ensure}; -use cargo_metadata::{Metadata, MetadataCommand, Package}; +use cargo_metadata::{CrateType, Metadata, MetadataCommand, Package}; use std::{collections::BTreeMap, path::Path}; /// Helper to get a crate info extracted from the `Cargo.toml`. @@ -224,7 +224,7 @@ // is the "compiler recommended" style of library. // // see also https://doc.rust-lang.org/reference/linkage.html - let validated_lib = |ty: &String| ty == "lib" || ty == "rlib"; + let validated_lib = |ty: &CrateType| matches!(ty, CrateType::Lib | CrateType::RLib); let pkg_snake_case_name = pkg.name.replace('-', "_"); // Check for rustc version. See https://github.com/rust-lang/cargo/pull/12783 diff --git a/pr-4404/src/gear_wasm_builder/wasm_project.rs.html b/pr-4404/src/gear_wasm_builder/wasm_project.rs.html index fb609cf7589..c71e94298bb 100644 --- a/pr-4404/src/gear_wasm_builder/wasm_project.rs.html +++ b/pr-4404/src/gear_wasm_builder/wasm_project.rs.html @@ -778,7 +778,7 @@ let mut package = Table::new(); package.insert("name".into(), format!("{}-wasm", &crate_info.name).into()); package.insert("version".into(), crate_info.version.into()); - package.insert("edition".into(), "2021".into()); + package.insert("edition".into(), "2024".into()); let mut lib = Table::new(); lib.insert("name".into(), crate_info.snake_case_name.into()); @@ -866,7 +866,7 @@ r#"{source_code} #[allow(improper_ctypes)] mod fake_gsys {{ - extern "C" {{ + unsafe extern "C" {{ pub fn gr_reply( payload: *const u8, len: u32, diff --git a/pr-4404/src/gtest/lib.rs.html b/pr-4404/src/gtest/lib.rs.html index 9d419faeca8..2c0be191ac6 100644 --- a/pr-4404/src/gtest/lib.rs.html +++ b/pr-4404/src/gtest/lib.rs.html @@ -643,7 +643,7 @@ //! name = "my-gear-app" //! version = "0.1.0" //! authors = ["Your Name"] -//! edition = "2021" +//! edition = "2024" //! //! [dependencies] //! gstd = { git = "https://github.com/gear-tech/gear.git", tag = "v1.0.1" } diff --git a/pr-4404/src/pallet_gear/builtin.rs.html b/pr-4404/src/pallet_gear/builtin.rs.html index 84a8e44e3db..5d70f42962f 100644 --- a/pr-4404/src/pallet_gear/builtin.rs.html +++ b/pr-4404/src/pallet_gear/builtin.rs.html @@ -92,7 +92,7 @@ // along with this program. If not, see <https://www.gnu.org/licenses/>. use super::*; -use core_processor::common::JournalNote; +use core_processor::common::JournalNote; use gear_core::{ ids::ProgramId, message::{Payload, StoredDispatch}, @@ -112,7 +112,7 @@ f: &HandleFn<Self::Error>, dispatch: StoredDispatch, gas_limit: u64, - ) -> Vec<JournalNote>; + ) -> Vec<JournalNote>; } impl BuiltinDispatcher for () { @@ -127,7 +127,7 @@ _f: &HandleFn<Self::Error>, _dispatch: StoredDispatch, _gas_limit: u64, - ) -> Vec<JournalNote> { + ) -> Vec<JournalNote> { Default::default() } } diff --git a/pr-4404/src/pallet_gear/lib.rs.html b/pr-4404/src/pallet_gear/lib.rs.html index a73295349af..fb1246c5ce1 100644 --- a/pr-4404/src/pallet_gear/lib.rs.html +++ b/pr-4404/src/pallet_gear/lib.rs.html @@ -2143,8 +2143,8 @@ }; use core::{marker::PhantomData, num::NonZero}; use core_processor::{ - common::{DispatchOutcome as CoreDispatchOutcome, ExecutableActorData, JournalNote}, - configs::{BlockConfig, BlockInfo}, + common::{DispatchOutcome as CoreDispatchOutcome, ExecutableActorData, JournalNote}, + configs::{BlockConfig, BlockInfo}, }; use frame_support::{ dispatch::{DispatchResultWithPostInfo, PostDispatchInfo}, @@ -2183,7 +2183,7 @@ prelude::*, }; -pub type Ext = core_processor::Ext<LazyPagesRuntimeInterface>; +pub type Ext = core_processor::Ext<LazyPagesRuntimeInterface>; pub(crate) type AccountIdOf<T> = <T as frame_system::Config>::AccountId; pub(crate) type CurrencyOf<T> = <T as pallet_gear_bank::Config>::Currency; @@ -3136,15 +3136,15 @@ } } - pub(crate) fn block_config() -> BlockConfig { - let block_info = BlockInfo { + pub(crate) fn block_config() -> BlockConfig { + let block_info = BlockInfo { height: Self::block_number().unique_saturated_into(), timestamp: <pallet_timestamp::Pallet<T>>::get().unique_saturated_into(), }; let schedule = T::Schedule::get(); - BlockConfig { + BlockConfig { block_info, performance_multiplier: T::PerformanceMultiplier::get().into(), forbidden_funcs: Default::default(), diff --git a/pr-4404/src/pallet_gear/manager/journal.rs.html b/pr-4404/src/pallet_gear/manager/journal.rs.html index ca4a0a905d5..adeedf87096 100644 --- a/pr-4404/src/pallet_gear/manager/journal.rs.html +++ b/pr-4404/src/pallet_gear/manager/journal.rs.html @@ -722,7 +722,7 @@ scheduler::{SchedulingCostsPerBlock, StorageType, TaskPool}, storage::*, }; -use core_processor::common::{DispatchOutcome as CoreDispatchOutcome, JournalHandler}; +use core_processor::common::{DispatchOutcome as CoreDispatchOutcome, JournalHandler}; use frame_support::{ sp_runtime::Saturating, traits::{Currency, ExistenceRequirement, LockableCurrency, WithdrawReasons}, @@ -741,7 +741,7 @@ use sp_runtime::traits::{UniqueSaturatedInto, Zero}; use sp_std::{collections::btree_map::BTreeMap, prelude::*}; -impl<T> JournalHandler for ExtManager<T> +impl<T> JournalHandler for ExtManager<T> where T: Config, T::AccountId: Origin, @@ -750,12 +750,12 @@ &mut self, message_id: MessageId, source: ProgramId, - outcome: CoreDispatchOutcome, + outcome: CoreDispatchOutcome, ) { - use CoreDispatchOutcome::*; + use CoreDispatchOutcome::*; let status = match outcome { - Exit { program_id } => { + Exit { program_id } => { log::trace!("Dispatch outcome exit: {:?}", message_id); Pallet::<T>::deposit_event(Event::ProgramChanged { @@ -765,12 +765,12 @@ DispatchStatus::Success } - Success => { + Success => { log::trace!("Dispatch outcome success: {:?}", message_id); DispatchStatus::Success } - MessageTrap { program_id, trap } => { + MessageTrap { program_id, trap } => { log::trace!("Dispatch outcome trap: {:?}", message_id); log::debug!( "🪤 Program {} terminated with a trap: {}", @@ -780,7 +780,7 @@ DispatchStatus::Failed } - InitSuccess { program_id, .. } => { + InitSuccess { program_id, .. } => { log::trace!( "Dispatch ({:?}) init success for program {:?}", message_id, @@ -820,7 +820,7 @@ DispatchStatus::Success } - InitFailure { + InitFailure { program_id, origin, reason, @@ -833,7 +833,7 @@ DispatchStatus::Failed } - NoExecution => { + NoExecution => { log::trace!("Dispatch ({:?}) for program wasn't executed", message_id); DispatchStatus::NotExecuted diff --git a/pr-4404/src/pallet_gear/queue.rs.html b/pr-4404/src/pallet_gear/queue.rs.html index 597a583507b..3a1a0717cd6 100644 --- a/pr-4404/src/pallet_gear/queue.rs.html +++ b/pr-4404/src/pallet_gear/queue.rs.html @@ -333,11 +333,11 @@ // along with this program. If not, see <https://www.gnu.org/licenses/>. use super::*; -use core_processor::ContextChargedForInstrumentation; +use core_processor::ContextChargedForInstrumentation; use gear_core::program::ProgramState; pub(crate) struct QueueStep<'a, T: Config> { - pub block_config: &'a BlockConfig, + pub block_config: &'a BlockConfig, pub gas_limit: GasBalanceOf<T>, pub dispatch: StoredDispatch, pub balance: u128, @@ -347,7 +347,7 @@ where T::AccountId: Origin, { - pub(crate) fn run_queue_step(queue_step: QueueStep<'_, T>) -> Vec<JournalNote> { + pub(crate) fn run_queue_step(queue_step: QueueStep<'_, T>) -> Vec<JournalNote> { let QueueStep { block_config, gas_limit, @@ -362,7 +362,7 @@ // To start executing a message resources of a destination program should be // fetched from the storage. // The first step is to get program data so charge gas for the operation. - let context = match core_processor::precharge_for_program( + let context = match core_processor::precharge_for_program( block_config, GasAllowanceOf::<T>::get(), dispatch.into_incoming(gas_limit), @@ -375,7 +375,7 @@ let Some(Program::Active(program)) = ProgramStorageOf::<T>::get_program(destination_id) else { log::trace!("Message {dispatch_id} is sent to non-active program {destination_id}"); - return core_processor::process_non_executable(context); + return core_processor::process_non_executable(context); }; if program.state == ProgramState::Initialized && dispatch_kind == DispatchKind::Init { @@ -408,10 +408,10 @@ unreachable!("{err_msg}"); } - return core_processor::process_non_executable(context); + return core_processor::process_non_executable(context); } - let context = match core_processor::precharge_for_allocations( + let context = match core_processor::precharge_for_allocations( block_config, context, program.allocations_tree_len, @@ -429,7 +429,7 @@ }) }).unwrap_or_default(); - let actor_data = ExecutableActorData { + let actor_data = ExecutableActorData { allocations, code_id: program.code_hash.cast(), code_exports: program.code_exports, @@ -441,13 +441,13 @@ // The second step is to load instrumented binary code of the program but // first its correct length should be obtained. let context = - match core_processor::precharge_for_code_length(block_config, context, actor_data) { + match core_processor::precharge_for_code_length(block_config, context, actor_data) { Ok(context) => context, Err(journal) => return journal, }; // Load correct code length value. - let code_id = context.actor_data().code_id; + let code_id = context.actor_data().code_id; let code_len_bytes = T::CodeStorage::get_code_len(code_id).unwrap_or_else(|| { // `Program` exists, so do code and code len. let err_msg = format!( @@ -461,7 +461,7 @@ // Adjust gas counters for fetching instrumented binary code. let context = - match core_processor::precharge_for_code(block_config, context, code_len_bytes) { + match core_processor::precharge_for_code(block_config, context, code_len_bytes) { Ok(context) => context, Err(journal) => return journal, }; @@ -486,7 +486,7 @@ } else { log::debug!("Re-instrumenting code for program '{destination_id:?}'"); - let context = match core_processor::precharge_for_instrumentation( + let context = match core_processor::precharge_for_instrumentation( block_config, context, code.original_code_len(), @@ -499,7 +499,7 @@ Ok(code) => code, Err(e) => { log::debug!("Re-instrumentation error for code {code_id:?}: {e:?}"); - return core_processor::process_reinstrumentation_error(context); + return core_processor::process_reinstrumentation_error(context); } }; @@ -507,7 +507,7 @@ }; // The last one thing is to load program memory. Adjust gas counters for memory pages. - let context = match core_processor::precharge_for_module_instantiation( + let context = match core_processor::precharge_for_module_instantiation( block_config, context, code.instantiated_section_sizes(), @@ -518,7 +518,7 @@ let (random, bn) = T::Randomness::random(dispatch_id.as_ref()); - core_processor::process::<Ext>( + core_processor::process::<Ext>( block_config, (context, code, balance).into(), (random.encode(), bn.unique_saturated_into()), diff --git a/pr-4404/src/pallet_gear/runtime_api.rs.html b/pr-4404/src/pallet_gear/runtime_api.rs.html index e6fb3714430..05d083cf867 100644 --- a/pr-4404/src/pallet_gear/runtime_api.rs.html +++ b/pr-4404/src/pallet_gear/runtime_api.rs.html @@ -1129,7 +1129,7 @@ allowance_multiplier, )?); - let block_info = BlockInfo { + let block_info = BlockInfo { height: Self::block_number().unique_saturated_into(), timestamp: <pallet_timestamp::Pallet<T>>::get().unique_saturated_into(), }; @@ -1140,7 +1140,7 @@ Self::update_gas_allowance(gas_allowance); - core_processor::informational::execute_for_reply::<Ext, String>( + core_processor::informational::execute_for_reply::<Ext, String>( function.into(), instrumented_code, None, @@ -1166,7 +1166,7 @@ memory_infix, } = Self::code_with_memory(program_id)?; - let block_info = BlockInfo { + let block_info = BlockInfo { height: Self::block_number().unique_saturated_into(), timestamp: <pallet_timestamp::Pallet<T>>::get().unique_saturated_into(), }; @@ -1177,7 +1177,7 @@ Self::update_gas_allowance(gas_allowance); - core_processor::informational::execute_for_reply::<Ext, String>( + core_processor::informational::execute_for_reply::<Ext, String>( String::from("state"), instrumented_code, Some(allocations), @@ -1202,7 +1202,7 @@ memory_infix, } = Self::code_with_memory(program_id)?; - let block_info = BlockInfo { + let block_info = BlockInfo { height: Self::block_number().unique_saturated_into(), timestamp: <pallet_timestamp::Pallet<T>>::get().unique_saturated_into(), }; @@ -1213,7 +1213,7 @@ Self::update_gas_allowance(gas_allowance); - core_processor::informational::execute_for_reply::<Ext, String>( + core_processor::informational::execute_for_reply::<Ext, String>( String::from("metahash"), instrumented_code, Some(allocations), @@ -1297,7 +1297,7 @@ fn dequeue_head_and_run( ext_manager: &mut ExtManager<T>, forbidden_funcs: Option<BTreeSet<SyscallName>>, - ) -> Result<Option<(Dispatch, Vec<JournalNote>, bool)>, String> { + ) -> Result<Option<(Dispatch, Vec<JournalNote>, bool)>, String> { // Extracting queued dispatch. let head = QueueOf::<T>::dequeue().map_err(|_| Self::internal_err_string("Queue corrupted"))?; diff --git a/pr-4404/trait.impl/gear_core_processor/common/trait.JournalHandler.js b/pr-4404/trait.impl/gear_core_processor/common/trait.JournalHandler.js index 60134e3f59e..bef007b2571 100644 --- a/pr-4404/trait.impl/gear_core_processor/common/trait.JournalHandler.js +++ b/pr-4404/trait.impl/gear_core_processor/common/trait.JournalHandler.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["pallet_gear",[["impl<T> JournalHandler for ExtManager<T>
    where\n T: Config,\n T::AccountId: Origin,
    "]]]]); + var implementors = Object.fromEntries([["pallet_gear",[["impl<T> JournalHandler for ExtManager<T>
    where\n T: Config,\n T::AccountId: Origin,
    "]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[388]} \ No newline at end of file +//{"start":57,"fragment_lengths":[533]} \ No newline at end of file diff --git a/pr-4404/type.impl/gear_core_processor/ext/struct.Ext.js b/pr-4404/type.impl/gear_core_processor/ext/struct.Ext.js index a3f5eae8d01..5a0d6c39908 100644 --- a/pr-4404/type.impl/gear_core_processor/ext/struct.Ext.js +++ b/pr-4404/type.impl/gear_core_processor/ext/struct.Ext.js @@ -1,9 +1,9 @@ (function() { - var type_impls = Object.fromEntries([["pallet_gear",[["
    §

    impl<LP> BackendExternalities for Ext<LP>
    where\n LP: LazyPagesInterface,

    §

    fn gas_amount(&self) -> GasAmount

    §

    fn pre_process_memory_accesses(\n &mut self,\n reads: &[MemoryInterval],\n writes: &[MemoryInterval],\n gas_counter: &mut u64,\n) -> Result<(), ProcessAccessError>

    Pre-process memory access if needed.
    ","BackendExternalities","pallet_gear::Ext"],["
    §

    impl<LP> CountersOwner for Ext<LP>
    where\n LP: LazyPagesInterface,

    §

    fn charge_gas_for_token(&mut self, token: CostToken) -> Result<(), ChargeError>

    Charge for runtime api call.
    §

    fn charge_gas_if_enough(&mut self, amount: u64) -> Result<(), ChargeError>

    Charge gas if enough, else just returns error.
    §

    fn gas_left(&self) -> GasLeft

    Returns gas limit and gas allowance left.
    §

    fn current_counter_type(&self) -> CounterType

    Currently set gas counter type.
    §

    fn decrease_current_counter_to(&mut self, amount: u64)

    Decreases gas left by fetched single numeric of actual counter.
    §

    fn define_current_counter(&mut self) -> u64

    Returns minimal amount of gas counters and set the type of current counter.
    §

    fn current_counter_value(&self) -> u64

    Returns value of gas counter currently set.
    ","CountersOwner","pallet_gear::Ext"],["
    §

    impl<LP> Externalities for Ext<LP>
    where\n LP: LazyPagesInterface,

    §

    type UnrecoverableError = UnrecoverableExtError

    An error issued in infallible syscall.
    §

    type FallibleError = FallibleExtError

    An error issued in fallible syscall.
    §

    type AllocError = AllocExtError

    An error issued during allocation.
    §

    fn alloc<Context>(\n &mut self,\n ctx: &mut Context,\n mem: &mut impl Memory<Context>,\n pages_num: u32,\n) -> Result<Page<gear_core::::pages::WasmPage::{constant#0}>, <Ext<LP> as Externalities>::AllocError>

    Allocate number of pages. Read more
    §

    fn free(\n &mut self,\n page: Page<gear_core::::pages::WasmPage::{constant#0}>,\n) -> Result<(), <Ext<LP> as Externalities>::AllocError>

    Free specific page.
    §

    fn free_range(\n &mut self,\n start: Page<gear_core::::pages::WasmPage::{constant#0}>,\n end: Page<gear_core::::pages::WasmPage::{constant#0}>,\n) -> Result<(), <Ext<LP> as Externalities>::AllocError>

    Free specific memory range.
    §

    fn env_vars(\n &self,\n version: u32,\n) -> Result<EnvVars, <Ext<LP> as Externalities>::UnrecoverableError>

    Get environment variables currently set in the system and in the form\ncorresponded to the requested version.
    §

    fn block_height(\n &self,\n) -> Result<u32, <Ext<LP> as Externalities>::UnrecoverableError>

    Get the current block height.
    §

    fn block_timestamp(\n &self,\n) -> Result<u64, <Ext<LP> as Externalities>::UnrecoverableError>

    Get the current block timestamp.
    §

    fn send_init(\n &mut self,\n) -> Result<u32, <Ext<LP> as Externalities>::FallibleError>

    Initialize a new incomplete message for another program and return its handle.
    §

    fn send_push(\n &mut self,\n handle: u32,\n buffer: &[u8],\n) -> Result<(), <Ext<LP> as Externalities>::FallibleError>

    Push an extra buffer into message payload by handle.
    §

    fn send_push_input(\n &mut self,\n handle: u32,\n offset: u32,\n len: u32,\n) -> Result<(), <Ext<LP> as Externalities>::FallibleError>

    Push the incoming message buffer into message payload by handle.
    §

    fn send_commit(\n &mut self,\n handle: u32,\n msg: HandlePacket,\n delay: u32,\n) -> Result<MessageId, <Ext<LP> as Externalities>::FallibleError>

    Complete message and send it to another program.
    §

    fn reservation_send_commit(\n &mut self,\n id: ReservationId,\n handle: u32,\n msg: HandlePacket,\n delay: u32,\n) -> Result<MessageId, <Ext<LP> as Externalities>::FallibleError>

    Complete message and send it to another program using gas from reservation.
    §

    fn reply_push(\n &mut self,\n buffer: &[u8],\n) -> Result<(), <Ext<LP> as Externalities>::FallibleError>

    Push an extra buffer into reply message.
    §

    fn reply_commit(\n &mut self,\n msg: ReplyPacket,\n) -> Result<MessageId, <Ext<LP> as Externalities>::FallibleError>

    Complete reply message and send it to source program.
    §

    fn reservation_reply_commit(\n &mut self,\n id: ReservationId,\n msg: ReplyPacket,\n) -> Result<MessageId, <Ext<LP> as Externalities>::FallibleError>

    Complete reply message and send it to source program from reservation.
    §

    fn reply_to(\n &self,\n) -> Result<MessageId, <Ext<LP> as Externalities>::FallibleError>

    Get the message id of the initial message.
    §

    fn signal_from(\n &self,\n) -> Result<MessageId, <Ext<LP> as Externalities>::FallibleError>

    Get the message id which signal issues from.
    §

    fn reply_push_input(\n &mut self,\n offset: u32,\n len: u32,\n) -> Result<(), <Ext<LP> as Externalities>::FallibleError>

    Push the incoming message buffer into reply message.
    §

    fn source(\n &self,\n) -> Result<ActorId, <Ext<LP> as Externalities>::UnrecoverableError>

    Get the source of the message currently being handled.
    §

    fn reply_code(\n &self,\n) -> Result<ReplyCode, <Ext<LP> as Externalities>::FallibleError>

    Get the reply code if the message being processed.
    §

    fn signal_code(\n &self,\n) -> Result<SignalCode, <Ext<LP> as Externalities>::FallibleError>

    Get the signal code if the message being processed.
    §

    fn message_id(\n &self,\n) -> Result<MessageId, <Ext<LP> as Externalities>::UnrecoverableError>

    Get the id of the message currently being handled.
    §

    fn program_id(\n &self,\n) -> Result<ActorId, <Ext<LP> as Externalities>::UnrecoverableError>

    Get the id of program itself
    §

    fn debug(\n &self,\n data: &str,\n) -> Result<(), <Ext<LP> as Externalities>::UnrecoverableError>

    Send debug message. Read more
    §

    fn lock_payload(\n &mut self,\n at: u32,\n len: u32,\n) -> Result<PayloadSliceLock, <Ext<LP> as Externalities>::FallibleError>

    Takes ownership over payload of the executing message and\nreturns it in the wrapper [PayloadSliceLock], which acts\nlike lock. Read more
    §

    fn unlock_payload(\n &mut self,\n payload_holder: &mut PayloadSliceLock,\n) -> UnlockPayloadBound

    Reclaims ownership from the payload lock over previously taken payload from the\ncurrently executing message.. Read more
    §

    fn size(&self) -> Result<usize, <Ext<LP> as Externalities>::UnrecoverableError>

    Size of currently handled message payload.
    §

    fn reserve_gas(\n &mut self,\n amount: u64,\n duration: u32,\n) -> Result<ReservationId, <Ext<LP> as Externalities>::FallibleError>

    Reserve some gas for a few blocks.
    §

    fn unreserve_gas(\n &mut self,\n id: ReservationId,\n) -> Result<u64, <Ext<LP> as Externalities>::FallibleError>

    Unreserve gas using reservation ID.
    §

    fn system_reserve_gas(\n &mut self,\n amount: u64,\n) -> Result<(), <Ext<LP> as Externalities>::FallibleError>

    Do system reservation.
    §

    fn gas_available(\n &self,\n) -> Result<u64, <Ext<LP> as Externalities>::UnrecoverableError>

    Tell how much gas is left in running context.
    §

    fn value(&self) -> Result<u128, <Ext<LP> as Externalities>::UnrecoverableError>

    Value associated with message.
    §

    fn value_available(\n &self,\n) -> Result<u128, <Ext<LP> as Externalities>::UnrecoverableError>

    Tell how much value is left in running context.
    §

    fn wait(&mut self) -> Result<(), <Ext<LP> as Externalities>::UnrecoverableError>

    Interrupt the program and reschedule execution for maximum.
    §

    fn wait_for(\n &mut self,\n duration: u32,\n) -> Result<(), <Ext<LP> as Externalities>::UnrecoverableError>

    Interrupt the program and reschedule execution in duration.
    §

    fn wait_up_to(\n &mut self,\n duration: u32,\n) -> Result<bool, <Ext<LP> as Externalities>::UnrecoverableError>

    Interrupt the program and reschedule execution for maximum,\nbut not more than duration.
    §

    fn wake(\n &mut self,\n waker_id: MessageId,\n delay: u32,\n) -> Result<(), <Ext<LP> as Externalities>::FallibleError>

    Wake the waiting message and move it to the processing queue.
    §

    fn create_program(\n &mut self,\n packet: InitPacket,\n delay: u32,\n) -> Result<(MessageId, ActorId), <Ext<LP> as Externalities>::FallibleError>

    Send init message to create a new program.
    §

    fn reply_deposit(\n &mut self,\n message_id: MessageId,\n amount: u64,\n) -> Result<(), <Ext<LP> as Externalities>::FallibleError>

    Create deposit to handle reply on given message.
    §

    fn random(\n &self,\n) -> Result<(&[u8], u32), <Ext<LP> as Externalities>::UnrecoverableError>

    Returns a random seed for the current block with message id as a subject, along with the time in the past since when it was determinable by chain observers.
    §

    fn forbidden_funcs(&self) -> &BTreeSet<SyscallName>

    Return the set of functions that are forbidden to be called.
    §

    fn send(\n &mut self,\n msg: HandlePacket,\n delay: u32,\n) -> Result<MessageId, Self::FallibleError>

    Send message to another program.
    §

    fn reservation_send(\n &mut self,\n id: ReservationId,\n msg: HandlePacket,\n delay: u32,\n) -> Result<MessageId, Self::FallibleError>

    Send message to another program using gas from reservation.
    §

    fn reply(&mut self, msg: ReplyPacket) -> Result<MessageId, Self::FallibleError>

    Produce reply to the current message.
    §

    fn reservation_reply(\n &mut self,\n id: ReservationId,\n msg: ReplyPacket,\n) -> Result<MessageId, Self::FallibleError>

    Produce reply to the current message from reservation.
    ","Externalities","pallet_gear::Ext"],["
    §

    impl<LP> ProcessorExternalities for Ext<LP>
    where\n LP: LazyPagesInterface,

    Empty implementation for non-substrate (and non-lazy-pages) using

    \n
    §

    fn new(context: ProcessorContext) -> Ext<LP>

    Create new
    §

    fn into_ext_info<Context>(\n self,\n ctx: &mut Context,\n memory: &impl Memory<Context>,\n) -> Result<ExtInfo, MemoryError>

    Convert externalities into info.
    §

    fn lazy_pages_init_for_program<Context>(\n ctx: &mut Context,\n mem: &mut impl Memory<Context>,\n prog_id: ActorId,\n memory_infix: MemoryInfix,\n stack_end: Option<Page<gear_core::::pages::WasmPage::{constant#0}>>,\n globals_config: GlobalsAccessConfig,\n lazy_pages_costs: LazyPagesCosts,\n)

    Protect and save storage keys for pages which has no data
    §

    fn lazy_pages_post_execution_actions<Context>(\n ctx: &mut Context,\n mem: &mut impl Memory<Context>,\n)

    Lazy pages program post execution actions
    §

    fn lazy_pages_status() -> Status

    Returns lazy pages status
    ","ProcessorExternalities","pallet_gear::Ext"]]]]); + var type_impls = Object.fromEntries([["pallet_gear",[["
    Source§

    impl<LP> BackendExternalities for Ext<LP>
    where\n LP: LazyPagesInterface,

    Source§

    fn gas_amount(&self) -> GasAmount

    Source§

    fn pre_process_memory_accesses(\n &mut self,\n reads: &[MemoryInterval],\n writes: &[MemoryInterval],\n gas_counter: &mut u64,\n) -> Result<(), ProcessAccessError>

    Pre-process memory access if needed.
    ","BackendExternalities","pallet_gear::Ext"],["
    Source§

    impl<LP> CountersOwner for Ext<LP>
    where\n LP: LazyPagesInterface,

    Source§

    fn charge_gas_for_token(&mut self, token: CostToken) -> Result<(), ChargeError>

    Charge for runtime api call.
    Source§

    fn charge_gas_if_enough(&mut self, amount: u64) -> Result<(), ChargeError>

    Charge gas if enough, else just returns error.
    Source§

    fn gas_left(&self) -> GasLeft

    Returns gas limit and gas allowance left.
    Source§

    fn current_counter_type(&self) -> CounterType

    Currently set gas counter type.
    Source§

    fn decrease_current_counter_to(&mut self, amount: u64)

    Decreases gas left by fetched single numeric of actual counter.
    Source§

    fn define_current_counter(&mut self) -> u64

    Returns minimal amount of gas counters and set the type of current counter.
    §

    fn current_counter_value(&self) -> u64

    Returns value of gas counter currently set.
    ","CountersOwner","pallet_gear::Ext"],["
    Source§

    impl<LP> Externalities for Ext<LP>
    where\n LP: LazyPagesInterface,

    Source§

    type UnrecoverableError = UnrecoverableExtError

    An error issued in infallible syscall.
    Source§

    type FallibleError = FallibleExtError

    An error issued in fallible syscall.
    Source§

    type AllocError = AllocExtError

    An error issued during allocation.
    Source§

    fn alloc<Context>(\n &mut self,\n ctx: &mut Context,\n mem: &mut impl Memory<Context>,\n pages_num: u32,\n) -> Result<Page<gear_core::::pages::WasmPage::{constant#0}>, <Ext<LP> as Externalities>::AllocError>

    Allocate number of pages. Read more
    Source§

    fn free(\n &mut self,\n page: Page<gear_core::::pages::WasmPage::{constant#0}>,\n) -> Result<(), <Ext<LP> as Externalities>::AllocError>

    Free specific page.
    Source§

    fn free_range(\n &mut self,\n start: Page<gear_core::::pages::WasmPage::{constant#0}>,\n end: Page<gear_core::::pages::WasmPage::{constant#0}>,\n) -> Result<(), <Ext<LP> as Externalities>::AllocError>

    Free specific memory range.
    Source§

    fn env_vars(\n &self,\n version: u32,\n) -> Result<EnvVars, <Ext<LP> as Externalities>::UnrecoverableError>

    Get environment variables currently set in the system and in the form\ncorresponded to the requested version.
    Source§

    fn block_height(\n &self,\n) -> Result<u32, <Ext<LP> as Externalities>::UnrecoverableError>

    Get the current block height.
    Source§

    fn block_timestamp(\n &self,\n) -> Result<u64, <Ext<LP> as Externalities>::UnrecoverableError>

    Get the current block timestamp.
    Source§

    fn send_init(\n &mut self,\n) -> Result<u32, <Ext<LP> as Externalities>::FallibleError>

    Initialize a new incomplete message for another program and return its handle.
    Source§

    fn send_push(\n &mut self,\n handle: u32,\n buffer: &[u8],\n) -> Result<(), <Ext<LP> as Externalities>::FallibleError>

    Push an extra buffer into message payload by handle.
    Source§

    fn send_push_input(\n &mut self,\n handle: u32,\n offset: u32,\n len: u32,\n) -> Result<(), <Ext<LP> as Externalities>::FallibleError>

    Push the incoming message buffer into message payload by handle.
    Source§

    fn send_commit(\n &mut self,\n handle: u32,\n msg: HandlePacket,\n delay: u32,\n) -> Result<MessageId, <Ext<LP> as Externalities>::FallibleError>

    Complete message and send it to another program.
    Source§

    fn reservation_send_commit(\n &mut self,\n id: ReservationId,\n handle: u32,\n msg: HandlePacket,\n delay: u32,\n) -> Result<MessageId, <Ext<LP> as Externalities>::FallibleError>

    Complete message and send it to another program using gas from reservation.
    Source§

    fn reply_push(\n &mut self,\n buffer: &[u8],\n) -> Result<(), <Ext<LP> as Externalities>::FallibleError>

    Push an extra buffer into reply message.
    Source§

    fn reply_commit(\n &mut self,\n msg: ReplyPacket,\n) -> Result<MessageId, <Ext<LP> as Externalities>::FallibleError>

    Complete reply message and send it to source program.
    Source§

    fn reservation_reply_commit(\n &mut self,\n id: ReservationId,\n msg: ReplyPacket,\n) -> Result<MessageId, <Ext<LP> as Externalities>::FallibleError>

    Complete reply message and send it to source program from reservation.
    Source§

    fn reply_to(\n &self,\n) -> Result<MessageId, <Ext<LP> as Externalities>::FallibleError>

    Get the message id of the initial message.
    Source§

    fn signal_from(\n &self,\n) -> Result<MessageId, <Ext<LP> as Externalities>::FallibleError>

    Get the message id which signal issues from.
    Source§

    fn reply_push_input(\n &mut self,\n offset: u32,\n len: u32,\n) -> Result<(), <Ext<LP> as Externalities>::FallibleError>

    Push the incoming message buffer into reply message.
    Source§

    fn source(\n &self,\n) -> Result<ActorId, <Ext<LP> as Externalities>::UnrecoverableError>

    Get the source of the message currently being handled.
    Source§

    fn reply_code(\n &self,\n) -> Result<ReplyCode, <Ext<LP> as Externalities>::FallibleError>

    Get the reply code if the message being processed.
    Source§

    fn signal_code(\n &self,\n) -> Result<SignalCode, <Ext<LP> as Externalities>::FallibleError>

    Get the signal code if the message being processed.
    Source§

    fn message_id(\n &self,\n) -> Result<MessageId, <Ext<LP> as Externalities>::UnrecoverableError>

    Get the id of the message currently being handled.
    Source§

    fn program_id(\n &self,\n) -> Result<ActorId, <Ext<LP> as Externalities>::UnrecoverableError>

    Get the id of program itself
    Source§

    fn debug(\n &self,\n data: &str,\n) -> Result<(), <Ext<LP> as Externalities>::UnrecoverableError>

    Send debug message. Read more
    Source§

    fn lock_payload(\n &mut self,\n at: u32,\n len: u32,\n) -> Result<PayloadSliceLock, <Ext<LP> as Externalities>::FallibleError>

    Takes ownership over payload of the executing message and\nreturns it in the wrapper [PayloadSliceLock], which acts\nlike lock. Read more
    Source§

    fn unlock_payload(\n &mut self,\n payload_holder: &mut PayloadSliceLock,\n) -> UnlockPayloadBound

    Reclaims ownership from the payload lock over previously taken payload from the\ncurrently executing message.. Read more
    Source§

    fn size(&self) -> Result<usize, <Ext<LP> as Externalities>::UnrecoverableError>

    Size of currently handled message payload.
    Source§

    fn reserve_gas(\n &mut self,\n amount: u64,\n duration: u32,\n) -> Result<ReservationId, <Ext<LP> as Externalities>::FallibleError>

    Reserve some gas for a few blocks.
    Source§

    fn unreserve_gas(\n &mut self,\n id: ReservationId,\n) -> Result<u64, <Ext<LP> as Externalities>::FallibleError>

    Unreserve gas using reservation ID.
    Source§

    fn system_reserve_gas(\n &mut self,\n amount: u64,\n) -> Result<(), <Ext<LP> as Externalities>::FallibleError>

    Do system reservation.
    Source§

    fn gas_available(\n &self,\n) -> Result<u64, <Ext<LP> as Externalities>::UnrecoverableError>

    Tell how much gas is left in running context.
    Source§

    fn value(&self) -> Result<u128, <Ext<LP> as Externalities>::UnrecoverableError>

    Value associated with message.
    Source§

    fn value_available(\n &self,\n) -> Result<u128, <Ext<LP> as Externalities>::UnrecoverableError>

    Tell how much value is left in running context.
    Source§

    fn wait(&mut self) -> Result<(), <Ext<LP> as Externalities>::UnrecoverableError>

    Interrupt the program and reschedule execution for maximum.
    Source§

    fn wait_for(\n &mut self,\n duration: u32,\n) -> Result<(), <Ext<LP> as Externalities>::UnrecoverableError>

    Interrupt the program and reschedule execution in duration.
    Source§

    fn wait_up_to(\n &mut self,\n duration: u32,\n) -> Result<bool, <Ext<LP> as Externalities>::UnrecoverableError>

    Interrupt the program and reschedule execution for maximum,\nbut not more than duration.
    Source§

    fn wake(\n &mut self,\n waker_id: MessageId,\n delay: u32,\n) -> Result<(), <Ext<LP> as Externalities>::FallibleError>

    Wake the waiting message and move it to the processing queue.
    Source§

    fn create_program(\n &mut self,\n packet: InitPacket,\n delay: u32,\n) -> Result<(MessageId, ActorId), <Ext<LP> as Externalities>::FallibleError>

    Send init message to create a new program.
    Source§

    fn reply_deposit(\n &mut self,\n message_id: MessageId,\n amount: u64,\n) -> Result<(), <Ext<LP> as Externalities>::FallibleError>

    Create deposit to handle reply on given message.
    Source§

    fn random(\n &self,\n) -> Result<(&[u8], u32), <Ext<LP> as Externalities>::UnrecoverableError>

    Returns a random seed for the current block with message id as a subject, along with the time in the past since when it was determinable by chain observers.
    Source§

    fn forbidden_funcs(&self) -> &BTreeSet<SyscallName>

    Return the set of functions that are forbidden to be called.
    §

    fn send(\n &mut self,\n msg: HandlePacket,\n delay: u32,\n) -> Result<MessageId, Self::FallibleError>

    Send message to another program.
    §

    fn reservation_send(\n &mut self,\n id: ReservationId,\n msg: HandlePacket,\n delay: u32,\n) -> Result<MessageId, Self::FallibleError>

    Send message to another program using gas from reservation.
    §

    fn reply(&mut self, msg: ReplyPacket) -> Result<MessageId, Self::FallibleError>

    Produce reply to the current message.
    §

    fn reservation_reply(\n &mut self,\n id: ReservationId,\n msg: ReplyPacket,\n) -> Result<MessageId, Self::FallibleError>

    Produce reply to the current message from reservation.
    ","Externalities","pallet_gear::Ext"],["
    Source§

    impl<LP> ProcessorExternalities for Ext<LP>
    where\n LP: LazyPagesInterface,

    Empty implementation for non-substrate (and non-lazy-pages) using

    \n
    Source§

    fn new(context: ProcessorContext) -> Ext<LP>

    Create new
    Source§

    fn into_ext_info<Context>(\n self,\n ctx: &mut Context,\n memory: &impl Memory<Context>,\n) -> Result<ExtInfo, MemoryError>

    Convert externalities into info.
    Source§

    fn lazy_pages_init_for_program<Context>(\n ctx: &mut Context,\n mem: &mut impl Memory<Context>,\n prog_id: ActorId,\n memory_infix: MemoryInfix,\n stack_end: Option<Page<gear_core::::pages::WasmPage::{constant#0}>>,\n globals_config: GlobalsAccessConfig,\n lazy_pages_costs: LazyPagesCosts,\n)

    Protect and save storage keys for pages which has no data
    Source§

    fn lazy_pages_post_execution_actions<Context>(\n ctx: &mut Context,\n mem: &mut impl Memory<Context>,\n)

    Lazy pages program post execution actions
    Source§

    fn lazy_pages_status() -> Status

    Returns lazy pages status
    ","ProcessorExternalities","pallet_gear::Ext"]]]]); if (window.register_type_impls) { window.register_type_impls(type_impls); } else { window.pending_type_impls = type_impls; } })() -//{"start":55,"fragment_lengths":[42193]} \ No newline at end of file +//{"start":55,"fragment_lengths":[53798]} \ No newline at end of file