diff --git a/cairo_native/enum.Value.html b/cairo_native/enum.Value.html index 9929365a9..cc0cc3563 100644 --- a/cairo_native/enum.Value.html +++ b/cairo_native/enum.Value.html @@ -44,10 +44,10 @@

A Boxed value or a non-null Nullable value is returned with it’s inner value.

Variants§

§

Felt252(Felt)

§

Bytes31([u8; 31])

§

Array(Vec<Self>)

all elements need to be same type

§

Struct

Fields

§fields: Vec<Self>
§debug_name: Option<String>
§

Enum

Fields

§tag: usize
§value: Box<Self>
§debug_name: Option<String>
§

Felt252Dict

Fields

§value: HashMap<Felt, Self>
§debug_name: Option<String>
§

Uint8(u8)

§

Uint16(u16)

§

Uint32(u32)

§

Uint64(u64)

§

Uint128(u128)

§

Sint8(i8)

§

Sint16(i16)

§

Sint32(i32)

§

Sint64(i64)

§

Sint128(i128)

§

EcPoint(Felt, Felt)

§

EcState(Felt, Felt, Felt, Felt)

§

Secp256K1Point(Secp256k1Point)

§

Secp256R1Point(Secp256r1Point)

§

BoundedInt

Fields

§value: Felt
§range: Range
§

IntRange

Fields

§

Null

Used as return value for Nullables that are null.

-

Trait Implementations§

source§

impl Clone for Value

source§

fn clone(&self) -> Value

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 Value

source§

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

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

impl<'de> Deserialize<'de> for Value

source§

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

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

impl<T: Into<Value> + Clone> From<&[T]> for Value

source§

fn from(value: &[T]) -> Self

Converts to this type from the input type.
source§

impl<T: Into<Value>, const N: usize> From<[T; N]> for Value

source§

fn from(value: [T; N]) -> Self

Converts to this type from the input type.
source§

impl From<Felt> for Value

source§

fn from(value: Felt) -> Self

Converts to this type from the input type.
source§

impl<T: Into<Value>> From<Vec<T>> for Value

source§

fn from(value: Vec<T>) -> Self

Converts to this type from the input type.
source§

impl From<i128> for Value

source§

fn from(value: i128) -> Self

Converts to this type from the input type.
source§

impl From<i16> for Value

source§

fn from(value: i16) -> Self

Converts to this type from the input type.
source§

impl From<i32> for Value

source§

fn from(value: i32) -> Self

Converts to this type from the input type.
source§

impl From<i64> for Value

source§

fn from(value: i64) -> Self

Converts to this type from the input type.
source§

impl From<i8> for Value

source§

fn from(value: i8) -> Self

Converts to this type from the input type.
source§

impl From<u128> for Value

source§

fn from(value: u128) -> Self

Converts to this type from the input type.
source§

impl From<u16> for Value

source§

fn from(value: u16) -> Self

Converts to this type from the input type.
source§

impl From<u32> for Value

source§

fn from(value: u32) -> Self

Converts to this type from the input type.
source§

impl From<u64> for Value

source§

fn from(value: u64) -> Self

Converts to this type from the input type.
source§

impl From<u8> for Value

source§

fn from(value: u8) -> Self

Converts to this type from the input type.
source§

impl PartialEq for Value

source§

fn eq(&self, other: &Self) -> 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 Serialize for Value

source§

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

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

impl Eq for Value

Auto Trait Implementations§

§

impl Freeze for Value

§

impl RefUnwindSafe for Value

§

impl Send for Value

§

impl Sync for Value

§

impl Unpin for Value

§

impl UnwindSafe for Value

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

source§

impl Clone for Value

source§

fn clone(&self) -> Value

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 Value

source§

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

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

impl<'de> Deserialize<'de> for Value

source§

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

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

impl<T: Into<Value> + Clone> From<&[T]> for Value

source§

fn from(value: &[T]) -> Self

Converts to this type from the input type.
source§

impl<T: Into<Value>, const N: usize> From<[T; N]> for Value

source§

fn from(value: [T; N]) -> Self

Converts to this type from the input type.
source§

impl From<Felt> for Value

source§

fn from(value: Felt) -> Self

Converts to this type from the input type.
source§

impl<T: Into<Value>> From<Vec<T>> for Value

source§

fn from(value: Vec<T>) -> Self

Converts to this type from the input type.
source§

impl From<i128> for Value

source§

fn from(value: i128) -> Self

Converts to this type from the input type.
source§

impl From<i16> for Value

source§

fn from(value: i16) -> Self

Converts to this type from the input type.
source§

impl From<i32> for Value

source§

fn from(value: i32) -> Self

Converts to this type from the input type.
source§

impl From<i64> for Value

source§

fn from(value: i64) -> Self

Converts to this type from the input type.
source§

impl From<i8> for Value

source§

fn from(value: i8) -> Self

Converts to this type from the input type.
source§

impl From<u128> for Value

source§

fn from(value: u128) -> Self

Converts to this type from the input type.
source§

impl From<u16> for Value

source§

fn from(value: u16) -> Self

Converts to this type from the input type.
source§

impl From<u32> for Value

source§

fn from(value: u32) -> Self

Converts to this type from the input type.
source§

impl From<u64> for Value

source§

fn from(value: u64) -> Self

Converts to this type from the input type.
source§

impl From<u8> for Value

source§

fn from(value: u8) -> Self

Converts to this type from the input type.
source§

impl PartialEq for Value

source§

fn eq(&self, other: &Self) -> 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 Serialize for Value

source§

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

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

impl Eq for Value

Auto Trait Implementations§

§

impl Freeze for Value

§

impl RefUnwindSafe for Value

§

impl Send for Value

§

impl Sync for Value

§

impl Unpin for Value

§

impl UnwindSafe for Value

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 @@ -585,5 +585,5 @@
§Example
V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where - T: for<'de> Deserialize<'de>,

\ No newline at end of file +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/cairo_native/error/enum.Error.html b/cairo_native/error/enum.Error.html index 707b435cc..2c214281a 100644 --- a/cairo_native/error/enum.Error.html +++ b/cairo_native/error/enum.Error.html @@ -23,8 +23,8 @@ SelectorNotFound, IoError(Error), LibraryLoadError(Error), - SerdeJsonError(Error), -}

Variants§

§

LayoutError(LayoutError)

§

MlirError(Error)

§

MissingParameter(String)

§

UnexpectedValue(String)

§

MissingSyscallHandler

§

LayoutErrorPolyfill(LayoutError)

§

ProgramRegistryErrorBoxed(Box<ProgramRegistryError>)

§

TryFromIntError(TryFromIntError)

§

ParseAttributeError

§

MissingMetadata

§

SierraAssert(SierraAssertError)

§

NativeAssert(NativeAssertError)

§

Compiler(CompilerError)

§

EditStateError(EditStateError)

§

GasMetadataError(GasMetadataError)

§

LLVMCompileError(String)

§

LinkError(String)

§

ConstDataMismatch

§

IntegerLikeTypeExpected

§

IntegerConversion

§

MissingBuiltinCostsSymbol

§

SelectorNotFound

§

IoError(Error)

§

LibraryLoadError(Error)

§

SerdeJsonError(Error)

Implementations§

source§

impl Error

source

pub fn make_missing_parameter(ty: &ConcreteTypeId) -> Self

Trait Implementations§

source§

impl Debug for Error

source§

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

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

impl Display for Error

source§

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

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

impl Error for Error

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
source§

impl From<Box<ProgramRegistryError>> for Error

source§

fn from(source: Box<ProgramRegistryError>) -> Self

Converts to this type from the input type.
source§

impl From<CompilerError> for Error

source§

fn from(source: CompilerError) -> Self

Converts to this type from the input type.
source§

impl From<EditStateError> for Error

source§

fn from(source: EditStateError) -> Self

Converts to this type from the input type.
source§

impl From<Error> for Error

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<Error> for Error

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<Error> for Error

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<Error> for Error

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<GasMetadataError> for Error

source§

fn from(source: GasMetadataError) -> Self

Converts to this type from the input type.
source§

impl From<LayoutError> for Error

source§

fn from(source: LayoutError) -> Self

Converts to this type from the input type.
source§

impl From<LayoutError> for Error

source§

fn from(source: LayoutError) -> Self

Converts to this type from the input type.
source§

impl From<NativeAssertError> for Error

source§

fn from(source: NativeAssertError) -> Self

Converts to this type from the input type.
source§

impl From<SierraAssertError> for Error

source§

fn from(source: SierraAssertError) -> Self

Converts to this type from the input type.
source§

impl From<TryFromIntError> for Error

source§

fn from(source: TryFromIntError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl !Freeze for Error

§

impl !RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl !UnwindSafe for Error

Blanket Implementations§

source§

impl<T> Any for T
where + SerdeJsonError(Error), +

}

Variants§

§

LayoutError(LayoutError)

§

MlirError(Error)

§

MissingParameter(String)

§

UnexpectedValue(String)

§

MissingSyscallHandler

§

LayoutErrorPolyfill(LayoutError)

§

ProgramRegistryErrorBoxed(Box<ProgramRegistryError>)

§

TryFromIntError(TryFromIntError)

§

ParseAttributeError

§

MissingMetadata

§

SierraAssert(SierraAssertError)

§

NativeAssert(NativeAssertError)

§

Compiler(CompilerError)

§

EditStateError(EditStateError)

§

GasMetadataError(GasMetadataError)

§

LLVMCompileError(String)

§

LinkError(String)

§

ConstDataMismatch

§

IntegerLikeTypeExpected

§

IntegerConversion

§

MissingBuiltinCostsSymbol

§

SelectorNotFound

§

IoError(Error)

§

LibraryLoadError(Error)

§

SerdeJsonError(Error)

Implementations§

source§

impl Error

source

pub fn make_missing_parameter(ty: &ConcreteTypeId) -> Self

Trait Implementations§

source§

impl Debug for Error

source§

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

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

impl Display for Error

source§

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

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

impl Error for Error

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
source§

impl From<Box<ProgramRegistryError>> for Error

source§

fn from(source: Box<ProgramRegistryError>) -> Self

Converts to this type from the input type.
source§

impl From<CompilerError> for Error

source§

fn from(source: CompilerError) -> Self

Converts to this type from the input type.
source§

impl From<EditStateError> for Error

source§

fn from(source: EditStateError) -> Self

Converts to this type from the input type.
source§

impl From<Error> for Error

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<Error> for Error

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<Error> for Error

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<Error> for Error

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<GasMetadataError> for Error

source§

fn from(source: GasMetadataError) -> Self

Converts to this type from the input type.
source§

impl From<LayoutError> for Error

source§

fn from(source: LayoutError) -> Self

Converts to this type from the input type.
source§

impl From<LayoutError> for Error

source§

fn from(source: LayoutError) -> Self

Converts to this type from the input type.
source§

impl From<NativeAssertError> for Error

source§

fn from(source: NativeAssertError) -> Self

Converts to this type from the input type.
source§

impl From<SierraAssertError> for Error

source§

fn from(source: SierraAssertError) -> Self

Converts to this type from the input type.
source§

impl From<TryFromIntError> for Error

source§

fn from(source: TryFromIntError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl !Freeze for Error

§

impl !RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl !UnwindSafe for Error

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where diff --git a/cairo_native/execution_result/struct.BuiltinStats.html b/cairo_native/execution_result/struct.BuiltinStats.html index c23dbdc0e..8d30ec164 100644 --- a/cairo_native/execution_result/struct.BuiltinStats.html +++ b/cairo_native/execution_result/struct.BuiltinStats.html @@ -8,8 +8,8 @@ pub range_check_96: usize, pub circuit_add: usize, pub circuit_mul: usize, -}

Fields§

§bitwise: usize§ec_op: usize§range_check: usize§pedersen: usize§poseidon: usize§segment_arena: usize§range_check_96: usize§circuit_add: usize§circuit_mul: usize

Trait Implementations§

source§

impl Clone for BuiltinStats

source§

fn clone(&self) -> BuiltinStats

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 BuiltinStats

source§

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

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

impl Default for BuiltinStats

source§

fn default() -> BuiltinStats

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

impl<'de> Deserialize<'de> for BuiltinStats

source§

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

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

impl Hash for BuiltinStats

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where +}

Fields§

§bitwise: usize§ec_op: usize§range_check: usize§pedersen: usize§poseidon: usize§segment_arena: usize§range_check_96: usize§circuit_add: usize§circuit_mul: usize

Trait Implementations§

source§

impl Clone for BuiltinStats

source§

fn clone(&self) -> BuiltinStats

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 BuiltinStats

source§

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

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

impl Default for BuiltinStats

source§

fn default() -> BuiltinStats

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

impl<'de> Deserialize<'de> for BuiltinStats

source§

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

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

impl Hash for BuiltinStats

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

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
source§

impl Ord for BuiltinStats

source§

fn cmp(&self, other: &BuiltinStats) -> 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 @@ -18,8 +18,8 @@ and should not be overridden without very good reason.

source§

impl PartialOrd for BuiltinStats

source§

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

impl Serialize for BuiltinStats

source§

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

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

impl Copy for BuiltinStats

source§

impl Eq for BuiltinStats

source§

impl StructuralPartialEq for BuiltinStats

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +the >= operator. Read more

source§

impl Serialize for BuiltinStats

source§

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

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

impl Copy for BuiltinStats

source§

impl Eq for BuiltinStats

source§

impl StructuralPartialEq for BuiltinStats

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> 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 @@ -559,5 +559,5 @@
§Example
V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where - T: for<'de> Deserialize<'de>,

\ No newline at end of file +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/cairo_native/execution_result/struct.ContractExecutionResult.html b/cairo_native/execution_result/struct.ContractExecutionResult.html index d39b59e32..c3f77b500 100644 --- a/cairo_native/execution_result/struct.ContractExecutionResult.html +++ b/cairo_native/execution_result/struct.ContractExecutionResult.html @@ -5,8 +5,8 @@ pub error_msg: Option<String>, }
Expand description

Starknet contract execution result.

Fields§

§remaining_gas: u64§failure_flag: bool§return_values: Vec<Felt>§error_msg: Option<String>

Implementations§

source§

impl ContractExecutionResult

Trait Implementations§

source§

impl Clone for ContractExecutionResult

source§

fn clone(&self) -> ContractExecutionResult

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 ContractExecutionResult

source§

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

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

impl Default for ContractExecutionResult

source§

fn default() -> ContractExecutionResult

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

impl<'de> Deserialize<'de> for ContractExecutionResult

source§

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

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

impl Hash for ContractExecutionResult

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where +

Trait Implementations§

source§

impl Clone for ContractExecutionResult

source§

fn clone(&self) -> ContractExecutionResult

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 ContractExecutionResult

source§

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

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

impl Default for ContractExecutionResult

source§

fn default() -> ContractExecutionResult

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

impl<'de> Deserialize<'de> for ContractExecutionResult

source§

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

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

impl Hash for ContractExecutionResult

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

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
source§

impl Ord for ContractExecutionResult

source§

fn cmp(&self, other: &ContractExecutionResult) -> 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 @@ -15,8 +15,8 @@ and should not be overridden without very good reason.

source§

impl PartialOrd for ContractExecutionResult

source§

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

impl Serialize for ContractExecutionResult

source§

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

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

impl Eq for ContractExecutionResult

source§

impl StructuralPartialEq for ContractExecutionResult

Auto Trait Implementations§

§

impl Freeze for ContractExecutionResult

§

impl RefUnwindSafe for ContractExecutionResult

§

impl Send for ContractExecutionResult

§

impl Sync for ContractExecutionResult

§

impl Unpin for ContractExecutionResult

§

impl UnwindSafe for ContractExecutionResult

Blanket Implementations§

source§

impl<T> Any for T
where +the >= operator. Read more

source§

impl Serialize for ContractExecutionResult

source§

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

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

impl Eq for ContractExecutionResult

source§

impl StructuralPartialEq for ContractExecutionResult

Auto Trait Implementations§

§

impl Freeze for ContractExecutionResult

§

impl RefUnwindSafe for ContractExecutionResult

§

impl Send for ContractExecutionResult

§

impl Sync for ContractExecutionResult

§

impl Unpin for ContractExecutionResult

§

impl UnwindSafe for ContractExecutionResult

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 @@ -556,5 +556,5 @@
§Example
V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where - T: for<'de> Deserialize<'de>,

\ No newline at end of file +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/cairo_native/execution_result/struct.ExecutionResult.html b/cairo_native/execution_result/struct.ExecutionResult.html index db216519f..d091062aa 100644 --- a/cairo_native/execution_result/struct.ExecutionResult.html +++ b/cairo_native/execution_result/struct.ExecutionResult.html @@ -3,10 +3,10 @@ pub return_value: Value, pub builtin_stats: BuiltinStats, }
Expand description

The result of the JIT execution.

-

Fields§

§remaining_gas: Option<u64>§return_value: Value§builtin_stats: BuiltinStats

Trait Implementations§

source§

impl Clone for ExecutionResult

source§

fn clone(&self) -> ExecutionResult

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 ExecutionResult

source§

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

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

impl<'de> Deserialize<'de> for ExecutionResult

source§

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

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

impl PartialEq for ExecutionResult

source§

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

source§

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

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

impl Eq for ExecutionResult

source§

impl StructuralPartialEq for ExecutionResult

Auto Trait Implementations§

§

impl Freeze for ExecutionResult

§

impl RefUnwindSafe for ExecutionResult

§

impl Send for ExecutionResult

§

impl Sync for ExecutionResult

§

impl Unpin for ExecutionResult

§

impl UnwindSafe for ExecutionResult

Blanket Implementations§

source§

impl<T> Any for T
where +

Fields§

§remaining_gas: Option<u64>§return_value: Value§builtin_stats: BuiltinStats

Trait Implementations§

source§

impl Clone for ExecutionResult

source§

fn clone(&self) -> ExecutionResult

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 ExecutionResult

source§

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

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

impl<'de> Deserialize<'de> for ExecutionResult

source§

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

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

impl PartialEq for ExecutionResult

source§

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

source§

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

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

impl Eq for ExecutionResult

source§

impl StructuralPartialEq for ExecutionResult

Auto Trait Implementations§

§

impl Freeze for ExecutionResult

§

impl RefUnwindSafe for ExecutionResult

§

impl Send for ExecutionResult

§

impl Sync for ExecutionResult

§

impl Unpin for ExecutionResult

§

impl UnwindSafe for ExecutionResult

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 @@ -544,5 +544,5 @@
§Example
V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where - T: for<'de> Deserialize<'de>,

\ No newline at end of file +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/cairo_native/starknet/struct.BlockInfo.html b/cairo_native/starknet/struct.BlockInfo.html index a2ec646ee..7e2a5e9eb 100644 --- a/cairo_native/starknet/struct.BlockInfo.html +++ b/cairo_native/starknet/struct.BlockInfo.html @@ -2,8 +2,8 @@ pub block_number: u64, pub block_timestamp: u64, pub sequencer_address: Felt, -}

Fields§

§block_number: u64§block_timestamp: u64§sequencer_address: Felt

Trait Implementations§

source§

impl Clone for BlockInfo

source§

fn clone(&self) -> BlockInfo

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 BlockInfo

source§

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

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

impl<'de> Deserialize<'de> for BlockInfo

source§

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

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

impl Hash for BlockInfo

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where +}

Fields§

§block_number: u64§block_timestamp: u64§sequencer_address: Felt

Trait Implementations§

source§

impl Clone for BlockInfo

source§

fn clone(&self) -> BlockInfo

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 BlockInfo

source§

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

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

impl<'de> Deserialize<'de> for BlockInfo

source§

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

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

impl Hash for BlockInfo

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

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
source§

impl Ord for BlockInfo

source§

fn cmp(&self, other: &BlockInfo) -> 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 @@ -12,8 +12,8 @@ and should not be overridden without very good reason.

source§

impl PartialOrd for BlockInfo

source§

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

impl Serialize for BlockInfo

source§

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

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

impl Copy for BlockInfo

source§

impl Eq for BlockInfo

source§

impl StructuralPartialEq for BlockInfo

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +the >= operator. Read more

source§

impl Serialize for BlockInfo

source§

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

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

impl Copy for BlockInfo

source§

impl Eq for BlockInfo

source§

impl StructuralPartialEq for BlockInfo

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> 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 @@ -553,5 +553,5 @@
§Example
V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where - T: for<'de> Deserialize<'de>,

\ No newline at end of file +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/cairo_native/starknet/struct.ExecutionInfo.html b/cairo_native/starknet/struct.ExecutionInfo.html index 7a8757b86..b67a368c1 100644 --- a/cairo_native/starknet/struct.ExecutionInfo.html +++ b/cairo_native/starknet/struct.ExecutionInfo.html @@ -4,8 +4,8 @@ pub caller_address: Felt, pub contract_address: Felt, pub entry_point_selector: Felt, -}

Fields§

§block_info: BlockInfo§tx_info: TxInfo§caller_address: Felt§contract_address: Felt§entry_point_selector: Felt

Trait Implementations§

source§

impl Clone for ExecutionInfo

source§

fn clone(&self) -> ExecutionInfo

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 ExecutionInfo

source§

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

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

impl<'de> Deserialize<'de> for ExecutionInfo

source§

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

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

impl Hash for ExecutionInfo

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where +}

Fields§

§block_info: BlockInfo§tx_info: TxInfo§caller_address: Felt§contract_address: Felt§entry_point_selector: Felt

Trait Implementations§

source§

impl Clone for ExecutionInfo

source§

fn clone(&self) -> ExecutionInfo

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 ExecutionInfo

source§

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

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

impl<'de> Deserialize<'de> for ExecutionInfo

source§

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

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

impl Hash for ExecutionInfo

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

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
source§

impl Ord for ExecutionInfo

source§

fn cmp(&self, other: &ExecutionInfo) -> 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 @@ -14,8 +14,8 @@ and should not be overridden without very good reason.

source§

impl PartialOrd for ExecutionInfo

source§

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

impl Serialize for ExecutionInfo

source§

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

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

impl Eq for ExecutionInfo

source§

impl StructuralPartialEq for ExecutionInfo

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +the >= operator. Read more

source§

impl Serialize for ExecutionInfo

source§

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

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

impl Eq for ExecutionInfo

source§

impl StructuralPartialEq for ExecutionInfo

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> 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 @@ -555,5 +555,5 @@
§Example
V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where - T: for<'de> Deserialize<'de>,

\ No newline at end of file +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/cairo_native/starknet/struct.ExecutionInfoV2.html b/cairo_native/starknet/struct.ExecutionInfoV2.html index ad05a2b53..22220a4c2 100644 --- a/cairo_native/starknet/struct.ExecutionInfoV2.html +++ b/cairo_native/starknet/struct.ExecutionInfoV2.html @@ -4,8 +4,8 @@ pub caller_address: Felt, pub contract_address: Felt, pub entry_point_selector: Felt, -}

Fields§

§block_info: BlockInfo§tx_info: TxV2Info§caller_address: Felt§contract_address: Felt§entry_point_selector: Felt

Trait Implementations§

source§

impl Clone for ExecutionInfoV2

source§

fn clone(&self) -> ExecutionInfoV2

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 ExecutionInfoV2

source§

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

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

impl<'de> Deserialize<'de> for ExecutionInfoV2

source§

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

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

impl Hash for ExecutionInfoV2

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where +}

Fields§

§block_info: BlockInfo§tx_info: TxV2Info§caller_address: Felt§contract_address: Felt§entry_point_selector: Felt

Trait Implementations§

source§

impl Clone for ExecutionInfoV2

source§

fn clone(&self) -> ExecutionInfoV2

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 ExecutionInfoV2

source§

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

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

impl<'de> Deserialize<'de> for ExecutionInfoV2

source§

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

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

impl Hash for ExecutionInfoV2

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

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
source§

impl Ord for ExecutionInfoV2

source§

fn cmp(&self, other: &ExecutionInfoV2) -> 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 @@ -14,8 +14,8 @@ and should not be overridden without very good reason.

source§

impl PartialOrd for ExecutionInfoV2

source§

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

impl Serialize for ExecutionInfoV2

source§

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

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

impl Eq for ExecutionInfoV2

source§

impl StructuralPartialEq for ExecutionInfoV2

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +the >= operator. Read more

source§

impl Serialize for ExecutionInfoV2

source§

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

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

impl Eq for ExecutionInfoV2

source§

impl StructuralPartialEq for ExecutionInfoV2

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> 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 @@ -555,5 +555,5 @@
§Example
V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where - T: for<'de> Deserialize<'de>,

\ No newline at end of file +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/cairo_native/starknet/struct.ResourceBounds.html b/cairo_native/starknet/struct.ResourceBounds.html index 6402a81b7..83cde8167 100644 --- a/cairo_native/starknet/struct.ResourceBounds.html +++ b/cairo_native/starknet/struct.ResourceBounds.html @@ -2,8 +2,8 @@ pub resource: Felt, pub max_amount: u64, pub max_price_per_unit: u128, -}

Fields§

§resource: Felt§max_amount: u64§max_price_per_unit: u128

Trait Implementations§

source§

impl Clone for ResourceBounds

source§

fn clone(&self) -> ResourceBounds

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 ResourceBounds

source§

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

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

impl<'de> Deserialize<'de> for ResourceBounds

source§

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

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

impl Hash for ResourceBounds

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where +}

Fields§

§resource: Felt§max_amount: u64§max_price_per_unit: u128

Trait Implementations§

source§

impl Clone for ResourceBounds

source§

fn clone(&self) -> ResourceBounds

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 ResourceBounds

source§

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

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

impl<'de> Deserialize<'de> for ResourceBounds

source§

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

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

impl Hash for ResourceBounds

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

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
source§

impl Ord for ResourceBounds

source§

fn cmp(&self, other: &ResourceBounds) -> 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 @@ -12,8 +12,8 @@ and should not be overridden without very good reason.

source§

impl PartialOrd for ResourceBounds

source§

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

impl Serialize for ResourceBounds

source§

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

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

impl Copy for ResourceBounds

source§

impl Eq for ResourceBounds

source§

impl StructuralPartialEq for ResourceBounds

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +the >= operator. Read more

source§

impl Serialize for ResourceBounds

source§

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

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

impl Copy for ResourceBounds

source§

impl Eq for ResourceBounds

source§

impl StructuralPartialEq for ResourceBounds

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> 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 @@ -553,5 +553,5 @@
§Example
V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where - T: for<'de> Deserialize<'de>,

\ No newline at end of file +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/cairo_native/starknet/struct.Secp256k1Point.html b/cairo_native/starknet/struct.Secp256k1Point.html index 2ae7c7e2f..e918d5724 100644 --- a/cairo_native/starknet/struct.Secp256k1Point.html +++ b/cairo_native/starknet/struct.Secp256k1Point.html @@ -8,12 +8,12 @@ y_lo: u128, y_hi: u128, is_infinity: bool, -) -> Self

Trait Implementations§

source§

impl Clone for Secp256k1Point

source§

fn clone(&self) -> Secp256k1Point

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 Secp256k1Point

source§

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

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

impl Default for Secp256k1Point

source§

fn default() -> Secp256k1Point

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

impl<'de> Deserialize<'de> for Secp256k1Point

source§

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

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

impl Hash for Secp256k1Point

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where +) -> Self

Trait Implementations§

source§

impl Clone for Secp256k1Point

source§

fn clone(&self) -> Secp256k1Point

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 Secp256k1Point

source§

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

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

impl Default for Secp256k1Point

source§

fn default() -> Secp256k1Point

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

impl<'de> Deserialize<'de> for Secp256k1Point

source§

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

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

impl Hash for Secp256k1Point

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

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
source§

impl PartialEq for Secp256k1Point

source§

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

source§

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

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

impl Copy for Secp256k1Point

source§

impl Eq for Secp256k1Point

source§

impl StructuralPartialEq for Secp256k1Point

Auto Trait Implementations§

§

impl Freeze for Secp256k1Point

§

impl RefUnwindSafe for Secp256k1Point

§

impl Send for Secp256k1Point

§

impl Sync for Secp256k1Point

§

impl Unpin for Secp256k1Point

§

impl UnwindSafe for Secp256k1Point

Blanket Implementations§

source§

impl<T> Any for T
where +and should not be overridden without very good reason.

source§

impl Serialize for Secp256k1Point

source§

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

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

impl Copy for Secp256k1Point

source§

impl Eq for Secp256k1Point

source§

impl StructuralPartialEq for Secp256k1Point

Auto Trait Implementations§

§

impl Freeze for Secp256k1Point

§

impl RefUnwindSafe for Secp256k1Point

§

impl Send for Secp256k1Point

§

impl Sync for Secp256k1Point

§

impl Unpin for Secp256k1Point

§

impl UnwindSafe for Secp256k1Point

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 @@ -551,5 +551,5 @@
§Example
V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where - T: for<'de> Deserialize<'de>,

\ No newline at end of file +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/cairo_native/starknet/struct.Secp256r1Point.html b/cairo_native/starknet/struct.Secp256r1Point.html index 584bacb9d..cef02e425 100644 --- a/cairo_native/starknet/struct.Secp256r1Point.html +++ b/cairo_native/starknet/struct.Secp256r1Point.html @@ -8,12 +8,12 @@ y_lo: u128, y_hi: u128, is_infinity: bool, -) -> Self

Trait Implementations§

source§

impl Clone for Secp256r1Point

source§

fn clone(&self) -> Secp256r1Point

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 Secp256r1Point

source§

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

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

impl Default for Secp256r1Point

source§

fn default() -> Secp256r1Point

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

impl<'de> Deserialize<'de> for Secp256r1Point

source§

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

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

impl Hash for Secp256r1Point

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where +) -> Self

Trait Implementations§

source§

impl Clone for Secp256r1Point

source§

fn clone(&self) -> Secp256r1Point

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 Secp256r1Point

source§

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

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

impl Default for Secp256r1Point

source§

fn default() -> Secp256r1Point

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

impl<'de> Deserialize<'de> for Secp256r1Point

source§

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

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

impl Hash for Secp256r1Point

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

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
source§

impl PartialEq for Secp256r1Point

source§

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

source§

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

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

impl Copy for Secp256r1Point

source§

impl Eq for Secp256r1Point

source§

impl StructuralPartialEq for Secp256r1Point

Auto Trait Implementations§

§

impl Freeze for Secp256r1Point

§

impl RefUnwindSafe for Secp256r1Point

§

impl Send for Secp256r1Point

§

impl Sync for Secp256r1Point

§

impl Unpin for Secp256r1Point

§

impl UnwindSafe for Secp256r1Point

Blanket Implementations§

source§

impl<T> Any for T
where +and should not be overridden without very good reason.

source§

impl Serialize for Secp256r1Point

source§

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

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

impl Copy for Secp256r1Point

source§

impl Eq for Secp256r1Point

source§

impl StructuralPartialEq for Secp256r1Point

Auto Trait Implementations§

§

impl Freeze for Secp256r1Point

§

impl RefUnwindSafe for Secp256r1Point

§

impl Send for Secp256r1Point

§

impl Sync for Secp256r1Point

§

impl Unpin for Secp256r1Point

§

impl UnwindSafe for Secp256r1Point

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 @@ -551,5 +551,5 @@
§Example
V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where - T: for<'de> Deserialize<'de>,

\ No newline at end of file +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/cairo_native/starknet/struct.TxInfo.html b/cairo_native/starknet/struct.TxInfo.html index e91dcf5fa..d16bbb3ac 100644 --- a/cairo_native/starknet/struct.TxInfo.html +++ b/cairo_native/starknet/struct.TxInfo.html @@ -6,8 +6,8 @@ pub transaction_hash: Felt, pub chain_id: Felt, pub nonce: Felt, -}

Fields§

§version: Felt§account_contract_address: Felt§max_fee: u128§signature: Vec<Felt>§transaction_hash: Felt§chain_id: Felt§nonce: Felt

Trait Implementations§

source§

impl Clone for TxInfo

source§

fn clone(&self) -> TxInfo

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 TxInfo

source§

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

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

impl<'de> Deserialize<'de> for TxInfo

source§

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

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

impl Hash for TxInfo

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where +}

Fields§

§version: Felt§account_contract_address: Felt§max_fee: u128§signature: Vec<Felt>§transaction_hash: Felt§chain_id: Felt§nonce: Felt

Trait Implementations§

source§

impl Clone for TxInfo

source§

fn clone(&self) -> TxInfo

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 TxInfo

source§

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

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

impl<'de> Deserialize<'de> for TxInfo

source§

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

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

impl Hash for TxInfo

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

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
source§

impl Ord for TxInfo

source§

fn cmp(&self, other: &TxInfo) -> 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 @@ -16,8 +16,8 @@ and should not be overridden without very good reason.

source§

impl PartialOrd for TxInfo

source§

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

impl Serialize for TxInfo

source§

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

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

impl Eq for TxInfo

source§

impl StructuralPartialEq for TxInfo

Auto Trait Implementations§

§

impl Freeze for TxInfo

§

impl RefUnwindSafe for TxInfo

§

impl Send for TxInfo

§

impl Sync for TxInfo

§

impl Unpin for TxInfo

§

impl UnwindSafe for TxInfo

Blanket Implementations§

source§

impl<T> Any for T
where +the >= operator. Read more

source§

impl Serialize for TxInfo

source§

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

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

impl Eq for TxInfo

source§

impl StructuralPartialEq for TxInfo

Auto Trait Implementations§

§

impl Freeze for TxInfo

§

impl RefUnwindSafe for TxInfo

§

impl Send for TxInfo

§

impl Sync for TxInfo

§

impl Unpin for TxInfo

§

impl UnwindSafe for TxInfo

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 @@ -557,5 +557,5 @@
§Example
V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where - T: for<'de> Deserialize<'de>,

\ No newline at end of file +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/cairo_native/starknet/struct.TxV2Info.html b/cairo_native/starknet/struct.TxV2Info.html index bbfcad8e0..adb95f13d 100644 --- a/cairo_native/starknet/struct.TxV2Info.html +++ b/cairo_native/starknet/struct.TxV2Info.html @@ -12,8 +12,8 @@ pub nonce_data_availability_mode: u32, pub fee_data_availability_mode: u32, pub account_deployment_data: Vec<Felt>, -}

Fields§

§version: Felt§account_contract_address: Felt§max_fee: u128§signature: Vec<Felt>§transaction_hash: Felt§chain_id: Felt§nonce: Felt§resource_bounds: Vec<ResourceBounds>§tip: u128§paymaster_data: Vec<Felt>§nonce_data_availability_mode: u32§fee_data_availability_mode: u32§account_deployment_data: Vec<Felt>

Trait Implementations§

source§

impl Clone for TxV2Info

source§

fn clone(&self) -> TxV2Info

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 TxV2Info

source§

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

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

impl<'de> Deserialize<'de> for TxV2Info

source§

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

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

impl Hash for TxV2Info

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where +

}

Fields§

§version: Felt§account_contract_address: Felt§max_fee: u128§signature: Vec<Felt>§transaction_hash: Felt§chain_id: Felt§nonce: Felt§resource_bounds: Vec<ResourceBounds>§tip: u128§paymaster_data: Vec<Felt>§nonce_data_availability_mode: u32§fee_data_availability_mode: u32§account_deployment_data: Vec<Felt>

Trait Implementations§

source§

impl Clone for TxV2Info

source§

fn clone(&self) -> TxV2Info

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 TxV2Info

source§

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

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

impl<'de> Deserialize<'de> for TxV2Info

source§

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

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

impl Hash for TxV2Info

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

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
source§

impl Ord for TxV2Info

source§

fn cmp(&self, other: &TxV2Info) -> 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 @@ -22,8 +22,8 @@ and should not be overridden without very good reason.

source§

impl PartialOrd for TxV2Info

source§

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

impl Serialize for TxV2Info

source§

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

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

impl Eq for TxV2Info

source§

impl StructuralPartialEq for TxV2Info

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +the >= operator. Read more

source§

impl Serialize for TxV2Info

source§

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

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

impl Eq for TxV2Info

source§

impl StructuralPartialEq for TxV2Info

Auto Trait Implementations§

§

impl Freeze for TxV2Info

§

impl RefUnwindSafe for TxV2Info

§

impl Send for TxV2Info

§

impl Sync for TxV2Info

§

impl Unpin for TxV2Info

§

impl UnwindSafe for TxV2Info

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 @@ -563,5 +563,5 @@
§Example
V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where - T: for<'de> Deserialize<'de>,

\ No newline at end of file +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/cairo_native/starknet/struct.U256.html b/cairo_native/starknet/struct.U256.html index e56d55551..7b3555876 100644 --- a/cairo_native/starknet/struct.U256.html +++ b/cairo_native/starknet/struct.U256.html @@ -2,8 +2,8 @@ pub lo: u128, pub hi: u128, }
Expand description

Binary representation of a u256 (in MLIR).

-

Fields§

§lo: u128§hi: u128

Trait Implementations§

source§

impl Clone for U256

source§

fn clone(&self) -> U256

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 U256

source§

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

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

impl Default for U256

source§

fn default() -> U256

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

impl<'de> Deserialize<'de> for U256

source§

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

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

impl Hash for U256

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where +

Fields§

§lo: u128§hi: u128

Trait Implementations§

source§

impl Clone for U256

source§

fn clone(&self) -> U256

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 U256

source§

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

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

impl Default for U256

source§

fn default() -> U256

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

impl<'de> Deserialize<'de> for U256

source§

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

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

impl Hash for U256

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

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
source§

impl Ord for U256

source§

fn cmp(&self, other: &U256) -> 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 @@ -12,8 +12,8 @@ and should not be overridden without very good reason.

source§

impl PartialOrd for U256

source§

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

impl Serialize for U256

source§

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

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

impl Copy for U256

source§

impl Eq for U256

source§

impl StructuralPartialEq for U256

Auto Trait Implementations§

§

impl Freeze for U256

§

impl RefUnwindSafe for U256

§

impl Send for U256

§

impl Sync for U256

§

impl Unpin for U256

§

impl UnwindSafe for U256

Blanket Implementations§

source§

impl<T> Any for T
where +the >= operator. Read more

source§

impl Serialize for U256

source§

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

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

impl Copy for U256

source§

impl Eq for U256

source§

impl StructuralPartialEq for U256

Auto Trait Implementations§

§

impl Freeze for U256

§

impl RefUnwindSafe for U256

§

impl Send for U256

§

impl Sync for U256

§

impl Unpin for U256

§

impl UnwindSafe for U256

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 @@ -553,5 +553,5 @@
§Example
V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where - T: for<'de> Deserialize<'de>,

\ No newline at end of file +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/cairo_native/utils/fn.cairo_to_sierra.html b/cairo_native/utils/fn.cairo_to_sierra.html index 0d5e8af5e..42281d0ff 100644 --- a/cairo_native/utils/fn.cairo_to_sierra.html +++ b/cairo_native/utils/fn.cairo_to_sierra.html @@ -1,2 +1,2 @@ -cairo_to_sierra in cairo_native::utils - Rust

Function cairo_native::utils::cairo_to_sierra

source ·
pub fn cairo_to_sierra(program: &Path) -> Result<Arc<Program>>
Expand description

Compile a cairo program found at the given path to sierra.

+cairo_to_sierra in cairo_native::utils - Rust

Function cairo_native::utils::cairo_to_sierra

source ·
pub fn cairo_to_sierra(program: &Path) -> Result<Arc<Program>>
Expand description

Compile a cairo program found at the given path to sierra.

\ No newline at end of file diff --git a/cairo_native/utils/struct.BuiltinCosts.html b/cairo_native/utils/struct.BuiltinCosts.html index 2c5d4d3c7..262de7c03 100644 --- a/cairo_native/utils/struct.BuiltinCosts.html +++ b/cairo_native/utils/struct.BuiltinCosts.html @@ -6,9 +6,9 @@ pub poseidon: u64, pub add_mod: u64, pub mul_mod: u64, -}

Fields§

§const: u64§pedersen: u64§bitwise: u64§ecop: u64§poseidon: u64§add_mod: u64§mul_mod: u64

Trait Implementations§

source§

impl Clone for BuiltinCosts

source§

fn clone(&self) -> BuiltinCosts

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 BuiltinCosts

source§

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

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

impl Default for BuiltinCosts

source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for BuiltinCosts

source§

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

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

impl From<BuiltinCosts> for [u64; 7]

source§

fn from(value: BuiltinCosts) -> Self

Converts to this type from the input type.
source§

impl Serialize for BuiltinCosts

source§

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

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

impl Copy for BuiltinCosts

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +}

Fields§

§const: u64§pedersen: u64§bitwise: u64§ecop: u64§poseidon: u64§add_mod: u64§mul_mod: u64

Trait Implementations§

source§

impl Clone for BuiltinCosts

source§

fn clone(&self) -> BuiltinCosts

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 BuiltinCosts

source§

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

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

impl Default for BuiltinCosts

source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for BuiltinCosts

source§

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

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

impl From<BuiltinCosts> for [u64; 7]

source§

fn from(value: BuiltinCosts) -> Self

Converts to this type from the input type.
source§

impl Serialize for BuiltinCosts

source§

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

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

impl Copy for BuiltinCosts

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> 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 @@ -540,5 +540,5 @@
§Example
V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where - T: for<'de> Deserialize<'de>,

\ No newline at end of file +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/cairo_native_compile/fn.main.html b/cairo_native_compile/fn.main.html index 79ac608ec..7de9d8f70 100644 --- a/cairo_native_compile/fn.main.html +++ b/cairo_native_compile/fn.main.html @@ -1 +1 @@ -main in cairo_native_compile - Rust

Function cairo_native_compile::main

source ·
pub(crate) fn main() -> Result<()>
\ No newline at end of file +main in cairo_native_compile - Rust

Function cairo_native_compile::main

source ·
pub(crate) fn main() -> Result<()>
\ No newline at end of file diff --git a/cairo_native_run/fn.main.html b/cairo_native_run/fn.main.html index 1540f72d7..f4cb294fb 100644 --- a/cairo_native_run/fn.main.html +++ b/cairo_native_run/fn.main.html @@ -1 +1 @@ -main in cairo_native_run - Rust

Function cairo_native_run::main

source ·
pub(crate) fn main() -> Result<()>
\ No newline at end of file +main in cairo_native_run - Rust

Function cairo_native_run::main

source ·
pub(crate) fn main() -> Result<()>
\ No newline at end of file diff --git a/cairo_native_run/utils/fn.find_function.html b/cairo_native_run/utils/fn.find_function.html index 9328a93b4..89a24e3cd 100644 --- a/cairo_native_run/utils/fn.find_function.html +++ b/cairo_native_run/utils/fn.find_function.html @@ -1,5 +1,5 @@ find_function in cairo_native_run::utils - Rust

Function cairo_native_run::utils::find_function

source ·
pub fn find_function<'a>(
     sierra_program: &'a Program,
     name_suffix: &str,
-) -> Result<&'a Function>
Expand description

Find the function ending with name_suffix in the program.

+) -> Result<&'a Function>
Expand description

Find the function ending with name_suffix in the program.

\ No newline at end of file diff --git a/cairo_native_run/utils/fn.result_to_runresult.html b/cairo_native_run/utils/fn.result_to_runresult.html index 9364b04c5..7fd175d2e 100644 --- a/cairo_native_run/utils/fn.result_to_runresult.html +++ b/cairo_native_run/utils/fn.result_to_runresult.html @@ -1,2 +1,2 @@ -result_to_runresult in cairo_native_run::utils - Rust

Function cairo_native_run::utils::result_to_runresult

source ·
pub fn result_to_runresult(result: &ExecutionResult) -> Result<RunResultValue>
Expand description

Convert the execution result to a run result.

+result_to_runresult in cairo_native_run::utils - Rust

Function cairo_native_run::utils::result_to_runresult

source ·
pub fn result_to_runresult(result: &ExecutionResult) -> Result<RunResultValue>
Expand description

Convert the execution result to a run result.

\ No newline at end of file diff --git a/cairo_native_run/utils/test/fn.run_tests.html b/cairo_native_run/utils/test/fn.run_tests.html index bed8ec1a4..0e7ae6c8c 100644 --- a/cairo_native_run/utils/test/fn.run_tests.html +++ b/cairo_native_run/utils/test/fn.run_tests.html @@ -3,5 +3,5 @@ sierra_program: Program, function_set_costs: OrderedHashMap<FunctionId, OrderedHashMap<CostTokenType, i32>>, args: RunArgs, -) -> Result<TestsSummary>
Expand description

Runs the tests and process the results for a summary.

+) -> Result<TestsSummary>
Expand description

Runs the tests and process the results for a summary.

\ No newline at end of file diff --git a/cairo_native_test/fn.main.html b/cairo_native_test/fn.main.html index 215e8b283..c118ed01e 100644 --- a/cairo_native_test/fn.main.html +++ b/cairo_native_test/fn.main.html @@ -1 +1 @@ -main in cairo_native_test - Rust

Function cairo_native_test::main

source ·
pub(crate) fn main() -> Result<()>
\ No newline at end of file +main in cairo_native_test - Rust

Function cairo_native_test::main

source ·
pub(crate) fn main() -> Result<()>
\ No newline at end of file diff --git a/cairo_native_test/utils/fn.find_function.html b/cairo_native_test/utils/fn.find_function.html index 1de0b6e4f..b61ebda8d 100644 --- a/cairo_native_test/utils/fn.find_function.html +++ b/cairo_native_test/utils/fn.find_function.html @@ -1,5 +1,5 @@ find_function in cairo_native_test::utils - Rust

Function cairo_native_test::utils::find_function

source ·
pub fn find_function<'a>(
     sierra_program: &'a Program,
     name_suffix: &str,
-) -> Result<&'a Function>
Expand description

Find the function ending with name_suffix in the program.

+) -> Result<&'a Function>
Expand description

Find the function ending with name_suffix in the program.

\ No newline at end of file diff --git a/cairo_native_test/utils/fn.result_to_runresult.html b/cairo_native_test/utils/fn.result_to_runresult.html index 98efbaea3..e0399bfa5 100644 --- a/cairo_native_test/utils/fn.result_to_runresult.html +++ b/cairo_native_test/utils/fn.result_to_runresult.html @@ -1,2 +1,2 @@ -result_to_runresult in cairo_native_test::utils - Rust

Function cairo_native_test::utils::result_to_runresult

source ·
pub fn result_to_runresult(result: &ExecutionResult) -> Result<RunResultValue>
Expand description

Convert the execution result to a run result.

+result_to_runresult in cairo_native_test::utils - Rust

Function cairo_native_test::utils::result_to_runresult

source ·
pub fn result_to_runresult(result: &ExecutionResult) -> Result<RunResultValue>
Expand description

Convert the execution result to a run result.

\ No newline at end of file diff --git a/cairo_native_test/utils/test/fn.run_tests.html b/cairo_native_test/utils/test/fn.run_tests.html index 3b87254c4..d6b23e09f 100644 --- a/cairo_native_test/utils/test/fn.run_tests.html +++ b/cairo_native_test/utils/test/fn.run_tests.html @@ -3,5 +3,5 @@ sierra_program: Program, function_set_costs: OrderedHashMap<FunctionId, OrderedHashMap<CostTokenType, i32>>, args: RunArgs, -) -> Result<TestsSummary>
Expand description

Runs the tests and process the results for a summary.

+) -> Result<TestsSummary>
Expand description

Runs the tests and process the results for a summary.

\ No newline at end of file diff --git a/help.html b/help.html index 47ebcd4c6..d6fdaa571 100644 --- a/help.html +++ b/help.html @@ -1 +1 @@ -Help

Rustdoc help

Back
\ No newline at end of file +Help

Rustdoc help

Back
\ No newline at end of file diff --git a/scarb_native_dump/fn.main.html b/scarb_native_dump/fn.main.html index 4aab8e9c6..48b25060c 100644 --- a/scarb_native_dump/fn.main.html +++ b/scarb_native_dump/fn.main.html @@ -1,2 +1,2 @@ -main in scarb_native_dump - Rust

Function scarb_native_dump::main

source ·
pub(crate) fn main() -> Result<()>
Expand description

Compiles all packages from a Scarb project on the current directory.

+main in scarb_native_dump - Rust

Function scarb_native_dump::main

source ·
pub(crate) fn main() -> Result<()>
Expand description

Compiles all packages from a Scarb project on the current directory.

\ No newline at end of file diff --git a/scarb_native_dump/utils/fn.find_function.html b/scarb_native_dump/utils/fn.find_function.html index 7f57ad9ad..491be5cca 100644 --- a/scarb_native_dump/utils/fn.find_function.html +++ b/scarb_native_dump/utils/fn.find_function.html @@ -1,5 +1,5 @@ find_function in scarb_native_dump::utils - Rust

Function scarb_native_dump::utils::find_function

source ·
pub fn find_function<'a>(
     sierra_program: &'a Program,
     name_suffix: &str,
-) -> Result<&'a Function>
Expand description

Find the function ending with name_suffix in the program.

+) -> Result<&'a Function>
Expand description

Find the function ending with name_suffix in the program.

\ No newline at end of file diff --git a/scarb_native_dump/utils/fn.result_to_runresult.html b/scarb_native_dump/utils/fn.result_to_runresult.html index 1e1ad7ef4..b4575e038 100644 --- a/scarb_native_dump/utils/fn.result_to_runresult.html +++ b/scarb_native_dump/utils/fn.result_to_runresult.html @@ -1,2 +1,2 @@ -result_to_runresult in scarb_native_dump::utils - Rust

Function scarb_native_dump::utils::result_to_runresult

source ·
pub fn result_to_runresult(result: &ExecutionResult) -> Result<RunResultValue>
Expand description

Convert the execution result to a run result.

+result_to_runresult in scarb_native_dump::utils - Rust

Function scarb_native_dump::utils::result_to_runresult

source ·
pub fn result_to_runresult(result: &ExecutionResult) -> Result<RunResultValue>
Expand description

Convert the execution result to a run result.

\ No newline at end of file diff --git a/scarb_native_dump/utils/test/fn.run_tests.html b/scarb_native_dump/utils/test/fn.run_tests.html index 5ec7d7b00..cf1714e81 100644 --- a/scarb_native_dump/utils/test/fn.run_tests.html +++ b/scarb_native_dump/utils/test/fn.run_tests.html @@ -3,5 +3,5 @@ sierra_program: Program, function_set_costs: OrderedHashMap<FunctionId, OrderedHashMap<CostTokenType, i32>>, args: RunArgs, -) -> Result<TestsSummary>
Expand description

Runs the tests and process the results for a summary.

+) -> Result<TestsSummary>
Expand description

Runs the tests and process the results for a summary.

\ No newline at end of file diff --git a/scarb_native_test/fn.deserialize_test_compilation.html b/scarb_native_test/fn.deserialize_test_compilation.html index 9d1b776ef..c0473b5de 100644 --- a/scarb_native_test/fn.deserialize_test_compilation.html +++ b/scarb_native_test/fn.deserialize_test_compilation.html @@ -1,4 +1,4 @@ deserialize_test_compilation in scarb_native_test - Rust

Function scarb_native_test::deserialize_test_compilation

source ·
pub(crate) fn deserialize_test_compilation(
     target_dir: &Path,
     name: String,
-) -> Result<TestCompilation>
\ No newline at end of file +) -> Result<TestCompilation>
\ No newline at end of file diff --git a/scarb_native_test/fn.main.html b/scarb_native_test/fn.main.html index 17303a7f3..3ae6b06d0 100644 --- a/scarb_native_test/fn.main.html +++ b/scarb_native_test/fn.main.html @@ -1 +1 @@ -main in scarb_native_test - Rust

Function scarb_native_test::main

source ·
pub(crate) fn main() -> Result<()>
\ No newline at end of file +main in scarb_native_test - Rust

Function scarb_native_test::main

source ·
pub(crate) fn main() -> Result<()>
\ No newline at end of file diff --git a/scarb_native_test/utils/fn.find_function.html b/scarb_native_test/utils/fn.find_function.html index 964b1779b..127cfe0de 100644 --- a/scarb_native_test/utils/fn.find_function.html +++ b/scarb_native_test/utils/fn.find_function.html @@ -1,5 +1,5 @@ find_function in scarb_native_test::utils - Rust

Function scarb_native_test::utils::find_function

source ·
pub fn find_function<'a>(
     sierra_program: &'a Program,
     name_suffix: &str,
-) -> Result<&'a Function>
Expand description

Find the function ending with name_suffix in the program.

+) -> Result<&'a Function>
Expand description

Find the function ending with name_suffix in the program.

\ No newline at end of file diff --git a/scarb_native_test/utils/fn.result_to_runresult.html b/scarb_native_test/utils/fn.result_to_runresult.html index d4c690bd7..ee115a957 100644 --- a/scarb_native_test/utils/fn.result_to_runresult.html +++ b/scarb_native_test/utils/fn.result_to_runresult.html @@ -1,2 +1,2 @@ -result_to_runresult in scarb_native_test::utils - Rust

Function scarb_native_test::utils::result_to_runresult

source ·
pub fn result_to_runresult(result: &ExecutionResult) -> Result<RunResultValue>
Expand description

Convert the execution result to a run result.

+result_to_runresult in scarb_native_test::utils - Rust

Function scarb_native_test::utils::result_to_runresult

source ·
pub fn result_to_runresult(result: &ExecutionResult) -> Result<RunResultValue>
Expand description

Convert the execution result to a run result.

\ No newline at end of file diff --git a/scarb_native_test/utils/test/fn.run_tests.html b/scarb_native_test/utils/test/fn.run_tests.html index 3b6db5dd6..b243012ca 100644 --- a/scarb_native_test/utils/test/fn.run_tests.html +++ b/scarb_native_test/utils/test/fn.run_tests.html @@ -3,5 +3,5 @@ sierra_program: Program, function_set_costs: OrderedHashMap<FunctionId, OrderedHashMap<CostTokenType, i32>>, args: RunArgs, -) -> Result<TestsSummary>
Expand description

Runs the tests and process the results for a summary.

+) -> Result<TestsSummary>
Expand description

Runs the tests and process the results for a summary.

\ No newline at end of file diff --git a/settings.html b/settings.html index 8da32efe1..267049dc2 100644 --- a/settings.html +++ b/settings.html @@ -1 +1 @@ -Settings

Rustdoc settings

Back
\ No newline at end of file +Settings

Rustdoc settings

Back
\ No newline at end of file diff --git a/src/cairo_native/values.rs.html b/src/cairo_native/values.rs.html index d540c12f6..186fd9c75 100644 --- a/src/cairo_native/values.rs.html +++ b/src/cairo_native/values.rs.html @@ -1675,13 +1675,42 @@ 1675 1676 1677 +1678 +1679 +1680 +1681 +1682 +1683 +1684 +1685 +1686 +1687 +1688 +1689 +1690 +1691 +1692 +1693 +1694 +1695 +1696 +1697 +1698 +1699 +1700 +1701 +1702 +1703 +1704 +1705 +1706
//! # Params and return values de/serialization
 //!
 //! A Rusty interface to provide parameters to cairo-native entry point calls.
 
 use crate::{
-    error::{CompilerError, Error},
-    native_panic,
+    error::{panic::ToNativeAssertError, CompilerError, Error},
+    native_assert, native_panic,
     starknet::{Secp256k1Point, Secp256r1Point},
     types::TypeBuilder,
     utils::{
@@ -2030,23 +2059,25 @@
                 }
                 Self::Enum { tag, value, .. } => {
                     if let CoreTypeConcrete::Enum(info) = Self::resolve_type(ty, registry)? {
-                        assert!(*tag < info.variants.len(), "Variant index out of range.");
+                        native_assert!(*tag < info.variants.len(), "Variant index out of range.");
 
                         let payload_type_id = &info.variants[*tag];
                         let payload = value.to_ptr(arena, registry, payload_type_id)?;
 
                         let (layout, tag_layout, variant_layouts) =
-                            crate::types::r#enum::get_layout_for_variants(registry, &info.variants)
-                                .unwrap();
+                            crate::types::r#enum::get_layout_for_variants(
+                                registry,
+                                &info.variants,
+                            )?;
                         let ptr = arena.alloc_layout(layout).cast::<()>().as_ptr();
 
                         match tag_layout.size() {
-                            0 => panic!("An enum without variants cannot be instantiated."),
+                            0 => native_panic!("An enum without variants cannot be instantiated."),
                             1 => *ptr.cast::<u8>() = *tag as u8,
                             2 => *ptr.cast::<u16>() = *tag as u16,
                             4 => *ptr.cast::<u32>() = *tag as u32,
                             8 => *ptr.cast::<u64>() = *tag as u64,
-                            _ => unreachable!(),
+                            _ => native_panic!("reached the maximum size for an enum"),
                         }
 
                         std::ptr::copy_nonoverlapping(
@@ -2191,7 +2222,9 @@
                 Self::Secp256K1Point { .. } => todo!(),
                 Self::Secp256R1Point { .. } => todo!(),
                 Self::Null => {
-                    unimplemented!("null is meant as return value for nullable for now")
+                    native_panic!(
+                        "unimplemented: null is meant as return value for nullable for now"
+                    )
                 }
                 Self::IntRange { x, y } => {
                     if let CoreTypeConcrete::IntRange(info) = Self::resolve_type(ty, registry)? {
@@ -2250,13 +2283,13 @@
 
                     let (ptr_layout, offset) = ptr_layout.extend(len_layout)?;
                     let start_offset_value = *NonNull::new(ptr.as_ptr().byte_add(offset))
-                        .unwrap()
-                        .cast::<u32>()
+                        .to_native_assert_error("tried to make a non-null ptr out of a null one")?
+                        .cast::<u32>()
                         .as_ref();
                     let (_, offset) = ptr_layout.extend(len_layout)?;
                     let end_offset_value = *NonNull::new(ptr.as_ptr().byte_add(offset))
-                        .unwrap()
-                        .cast::<u32>()
+                        .to_native_assert_error("tried to make a non-null ptr out of a null one")?
+                        .cast::<u32>()
                         .as_ref();
 
                     // this pointer can be null if the array has a size of 0.
@@ -2264,14 +2297,19 @@
                     let data_ptr =
                         init_data_ptr.byte_add(elem_stride * start_offset_value as usize);
 
-                    assert!(end_offset_value >= start_offset_value);
+                    native_assert!(
+                        end_offset_value >= start_offset_value,
+                        "can't have an array with negative length"
+                    );
                     let num_elems = (end_offset_value - start_offset_value) as usize;
                     let mut array_value = Vec::with_capacity(num_elems);
 
                     for i in 0..num_elems {
                         // safe to create a NonNull because if the array has elements, the init_data_ptr can't be null.
-                        let cur_elem_ptr =
-                            NonNull::new(data_ptr.byte_add(elem_stride * i)).unwrap();
+                        let cur_elem_ptr = NonNull::new(data_ptr.byte_add(elem_stride * i))
+                            .to_native_assert_error(
+                                "tried to make a non-null ptr out of a null one",
+                            )?;
 
                         array_value.push(Self::from_ptr(cur_elem_ptr, &info.ty, registry)?);
                     }
@@ -2356,7 +2394,7 @@
                     let tag_value = match info.variants.len() {
                         0 => {
                             // An enum without variants is basically the `!` (never) type in Rust.
-                            panic!("An enum without variants is not a valid type.")
+                            native_panic!("An enum without variants is not a valid type.")
                         }
                         1 => 0,
                         _ => match tag_layout.size() {
@@ -2364,7 +2402,7 @@
                             2 => *ptr.cast::<u16>().as_ref() as usize,
                             4 => *ptr.cast::<u32>().as_ref() as usize,
                             8 => *ptr.cast::<u64>().as_ref() as usize,
-                            _ => unreachable!(),
+                            _ => native_panic!("reached the maximum size for an enum"),
                         },
                     };
 
@@ -2377,9 +2415,10 @@
                     let payload_ty = registry.get_type(&info.variants[tag_value])?;
                     let payload_layout = payload_ty.layout(registry)?;
 
-                    let payload_ptr =
-                        NonNull::new(ptr.as_ptr().byte_add(tag_layout.extend(payload_layout)?.1))
-                            .unwrap();
+                    let payload_ptr = NonNull::new(
+                        ptr.as_ptr().byte_add(tag_layout.extend(payload_layout)?.1),
+                    )
+                    .to_native_assert_error("tried to make a non-null ptr out of a null one")?;
                     let payload = Self::from_ptr(payload_ptr, &info.variants[tag_value], registry)?;
 
                     Self::Enum {
@@ -2403,7 +2442,9 @@
                         layout = Some(new_layout);
 
                         members.push(Self::from_ptr(
-                            NonNull::new(ptr.as_ptr().byte_add(offset)).unwrap(),
+                            NonNull::new(ptr.as_ptr().byte_add(offset)).to_native_assert_error(
+                                "tried to make a non-null ptr out of a null one",
+                            )?,
                             member_ty,
                             registry,
                         )?);
@@ -2435,7 +2476,11 @@
                         output_map.insert(
                             key,
                             Self::from_ptr(
-                                NonNull::new(val_ptr).unwrap().cast(),
+                                NonNull::new(val_ptr)
+                                    .to_native_assert_error(
+                                        "tried to make a non-null ptr out of a null one",
+                                    )?
+                                    .cast(),
                                 &info.ty,
                                 registry,
                             )?,
@@ -2449,7 +2494,7 @@
                     }
                 }
                 CoreTypeConcrete::Felt252DictEntry(_) => {
-                    unimplemented!("shouldn't be possible to return")
+                    native_panic!("unimplemented: shouldn't be possible to return")
                 }
                 CoreTypeConcrete::Pedersen(_)
                 | CoreTypeConcrete::Poseidon(_)
@@ -2459,7 +2504,7 @@
                 | CoreTypeConcrete::EcOp(_)
                 | CoreTypeConcrete::GasBuiltin(_)
                 | CoreTypeConcrete::SegmentArena(_) => {
-                    unreachable!("handled before: {:?}", type_id)
+                    native_panic!("handled before: {:?}", type_id)
                 }
                 // Does it make sense for programs to return this? Should it be implemented
                 CoreTypeConcrete::StarkNet(selector) => match selector {
@@ -2474,7 +2519,7 @@
                         Self::Felt252(data)
                     }
                     StarkNetTypeConcrete::System(_) => {
-                        unreachable!("should be handled before")
+                        native_panic!("should be handled before")
                     }
                     StarkNetTypeConcrete::Secp256Point(info) => match info {
                         Secp256PointTypeConcrete::K1(_) => {
@@ -3151,7 +3196,6 @@
     }
 
     #[test]
-    #[should_panic(expected = "Variant index out of range.")]
     fn test_to_jit_enum_variant_out_of_range() {
         // Parse the program
         let program = ProgramParser::new()
@@ -3165,16 +3209,21 @@
         let registry = ProgramRegistry::<CoreType, CoreLibfunc>::new(&program).unwrap();
 
         // Call to_jit to get the value of the enum with tag value out of range
-        let _ = Value::Enum {
+        let result = Value::Enum {
             tag: 2,
             value: Box::new(Value::Uint8(10)),
             debug_name: None,
         }
-        .to_ptr(&Bump::new(), &registry, &program.type_declarations[1].id);
+        .to_ptr(&Bump::new(), &registry, &program.type_declarations[1].id)
+        .unwrap_err();
+
+        let error = result.to_string().clone();
+        let error_msg = error.split("\n").collect::<Vec<&str>>()[0];
+
+        assert_eq!(error_msg, "Variant index out of range.");
     }
 
     #[test]
-    #[should_panic(expected = "An enum without variants cannot be instantiated.")]
     fn test_to_jit_enum_no_variant() {
         let program = ProgramParser::new()
             .parse(
@@ -3185,12 +3234,21 @@
 
         let registry = ProgramRegistry::<CoreType, CoreLibfunc>::new(&program).unwrap();
 
-        let _ = Value::Enum {
+        let result = Value::Enum {
             tag: 0,
             value: Box::new(Value::Uint8(10)),
             debug_name: None,
         }
-        .to_ptr(&Bump::new(), &registry, &program.type_declarations[1].id);
+        .to_ptr(&Bump::new(), &registry, &program.type_declarations[1].id)
+        .unwrap_err();
+
+        let error = result.to_string().clone();
+        let error_msg = error.split("\n").collect::<Vec<&str>>()[0];
+
+        assert_eq!(
+            error_msg,
+            "An enum without variants cannot be instantiated."
+        );
     }
 
     #[test]
diff --git a/trait.impl/core/convert/trait.From.js b/trait.impl/core/convert/trait.From.js
index 3eaee2a8e..460a92507 100644
--- a/trait.impl/core/convert/trait.From.js
+++ b/trait.impl/core/convert/trait.From.js
@@ -1,5 +1,5 @@
 (function() {
-    var implementors = Object.fromEntries([["cairo_native",[["impl From<&ArrayAbi<Felt252Abi>> for Vec<Felt>"],["impl From<&Felt252Abi> for Felt"],["impl From<OptLevel> for usize"],["impl From<CompilerError> for Error"],["impl From<SierraAssertError> for Error"],["impl From<GasMetadataError> for Error"],["impl From<i128> for Value"],["impl From<i16> for Value"],["impl From<i32> for Value"],["impl From<i64> for Value"],["impl From<i8> for Value"],["impl From<u128> for Value"],["impl From<u16> for Value"],["impl From<u32> for Value"],["impl From<u64> for Value"],["impl From<u8> for OptLevel"],["impl From<u8> for Value"],["impl From<usize> for OptLevel"],["impl From<NativeAssertError> for Error"],["impl From<Felt252Abi> for Felt"],["impl From<BuiltinCosts> for [u64; 7]"],["impl From<LayoutError> for Error"],["impl From<Box<ProgramRegistryError>> for Error"],["impl From<LayoutError> for Error"],["impl From<TryFromIntError> for Error"],["impl From<Error> for Error"],["impl From<Error> for Error"],["impl From<ApChangeError> for GasMetadataError"],["impl From<CostError> for GasMetadataError"],["impl From<EditStateError> for Error"],["impl From<Error> for Error"],["impl From<Error> for Error"],["impl From<Felt> for Value"],["impl<'a, K> From<AotProgramCache<'a, K>> for ProgramCache<'a, K>
where\n K: PartialEq + Eq + Hash,
"],["impl<'a, K> From<JitProgramCache<'a, K>> for ProgramCache<'a, K>
where\n K: PartialEq + Eq + Hash,
"],["impl<T: Into<Value> + Clone> From<&[T]> for Value"],["impl<T: Into<Value>> From<Vec<T>> for Value"],["impl<T: Into<Value>, const N: usize> From<[T; N]> for Value"]]]]); + var implementors = Object.fromEntries([["cairo_native",[["impl From<&ArrayAbi<Felt252Abi>> for Vec<Felt>"],["impl From<&Felt252Abi> for Felt"],["impl From<OptLevel> for usize"],["impl From<CompilerError> for Error"],["impl From<SierraAssertError> for Error"],["impl From<GasMetadataError> for Error"],["impl From<i128> for Value"],["impl From<i16> for Value"],["impl From<i32> for Value"],["impl From<i64> for Value"],["impl From<i8> for Value"],["impl From<u128> for Value"],["impl From<u16> for Value"],["impl From<u32> for Value"],["impl From<u64> for Value"],["impl From<u8> for OptLevel"],["impl From<u8> for Value"],["impl From<usize> for OptLevel"],["impl From<NativeAssertError> for Error"],["impl From<Felt252Abi> for Felt"],["impl From<BuiltinCosts> for [u64; 7]"],["impl From<LayoutError> for Error"],["impl From<Box<ProgramRegistryError>> for Error"],["impl From<LayoutError> for Error"],["impl From<TryFromIntError> for Error"],["impl From<Error> for Error"],["impl From<Error> for Error"],["impl From<ApChangeError> for GasMetadataError"],["impl From<CostError> for GasMetadataError"],["impl From<EditStateError> for Error"],["impl From<Error> for Error"],["impl From<Error> for Error"],["impl From<Felt> for Value"],["impl<'a, K> From<AotProgramCache<'a, K>> for ProgramCache<'a, K>
where\n K: PartialEq + Eq + Hash,
"],["impl<'a, K> From<JitProgramCache<'a, K>> for ProgramCache<'a, K>
where\n K: PartialEq + Eq + Hash,
"],["impl<T: Into<Value> + Clone> From<&[T]> for Value"],["impl<T: Into<Value>> From<Vec<T>> for Value"],["impl<T: Into<Value>, const N: usize> From<[T; N]> for Value"]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { diff --git a/trait.impl/serde/de/trait.Deserialize.js b/trait.impl/serde/de/trait.Deserialize.js index e87628180..00105a27d 100644 --- a/trait.impl/serde/de/trait.Deserialize.js +++ b/trait.impl/serde/de/trait.Deserialize.js @@ -1,5 +1,5 @@ (function() { - var implementors = Object.fromEntries([["cairo_native",[["impl<'de> Deserialize<'de> for Value"],["impl<'de> Deserialize<'de> for BuiltinStats"],["impl<'de> Deserialize<'de> for ContractExecutionResult"],["impl<'de> Deserialize<'de> for ExecutionResult"],["impl<'de> Deserialize<'de> for BlockInfo"],["impl<'de> Deserialize<'de> for ExecutionInfo"],["impl<'de> Deserialize<'de> for ExecutionInfoV2"],["impl<'de> Deserialize<'de> for ResourceBounds"],["impl<'de> Deserialize<'de> for Secp256k1Point"],["impl<'de> Deserialize<'de> for Secp256r1Point"],["impl<'de> Deserialize<'de> for TxInfo"],["impl<'de> Deserialize<'de> for TxV2Info"],["impl<'de> Deserialize<'de> for U256"],["impl<'de> Deserialize<'de> for BuiltinCosts"]]]]); + var implementors = Object.fromEntries([["cairo_native",[["impl<'de> Deserialize<'de> for Value"],["impl<'de> Deserialize<'de> for BuiltinStats"],["impl<'de> Deserialize<'de> for ContractExecutionResult"],["impl<'de> Deserialize<'de> for ExecutionResult"],["impl<'de> Deserialize<'de> for BlockInfo"],["impl<'de> Deserialize<'de> for ExecutionInfo"],["impl<'de> Deserialize<'de> for ExecutionInfoV2"],["impl<'de> Deserialize<'de> for ResourceBounds"],["impl<'de> Deserialize<'de> for Secp256k1Point"],["impl<'de> Deserialize<'de> for Secp256r1Point"],["impl<'de> Deserialize<'de> for TxInfo"],["impl<'de> Deserialize<'de> for TxV2Info"],["impl<'de> Deserialize<'de> for U256"],["impl<'de> Deserialize<'de> for BuiltinCosts"]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { diff --git a/trait.impl/serde/ser/trait.Serialize.js b/trait.impl/serde/ser/trait.Serialize.js index 03138c948..d12a04d52 100644 --- a/trait.impl/serde/ser/trait.Serialize.js +++ b/trait.impl/serde/ser/trait.Serialize.js @@ -1,5 +1,5 @@ (function() { - var implementors = Object.fromEntries([["cairo_native",[["impl Serialize for Value"],["impl Serialize for BuiltinStats"],["impl Serialize for ContractExecutionResult"],["impl Serialize for ExecutionResult"],["impl Serialize for BlockInfo"],["impl Serialize for ExecutionInfo"],["impl Serialize for ExecutionInfoV2"],["impl Serialize for ResourceBounds"],["impl Serialize for Secp256k1Point"],["impl Serialize for Secp256r1Point"],["impl Serialize for TxInfo"],["impl Serialize for TxV2Info"],["impl Serialize for U256"],["impl Serialize for BuiltinCosts"]]]]); + var implementors = Object.fromEntries([["cairo_native",[["impl Serialize for Value"],["impl Serialize for BuiltinStats"],["impl Serialize for ContractExecutionResult"],["impl Serialize for ExecutionResult"],["impl Serialize for BlockInfo"],["impl Serialize for ExecutionInfo"],["impl Serialize for ExecutionInfoV2"],["impl Serialize for ResourceBounds"],["impl Serialize for Secp256k1Point"],["impl Serialize for Secp256r1Point"],["impl Serialize for TxInfo"],["impl Serialize for TxV2Info"],["impl Serialize for U256"],["impl Serialize for BuiltinCosts"]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { diff --git a/type.impl/core/result/enum.Result.js b/type.impl/core/result/enum.Result.js index 611975766..f58150f67 100644 --- a/type.impl/core/result/enum.Result.js +++ b/type.impl/core/result/enum.Result.js @@ -1,5 +1,5 @@ (function() { - var type_impls = Object.fromEntries([["cairo_native",[["
source§

impl<'de, T, U> BorrowDecode<'de> for Result<T, U>
where\n T: BorrowDecode<'de>,\n U: BorrowDecode<'de>,

source§

fn borrow_decode<D>(decoder: &mut D) -> Result<Result<T, U>, DecodeError>
where\n D: BorrowDecoder<'de>,

Attempt to decode this type with the given BorrowDecode.
","BorrowDecode<'de>","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
1.0.0 · source§

impl<T, E> Clone for Result<T, E>
where\n T: Clone,\n E: Clone,

source§

fn clone(&self) -> Result<T, E>

Returns a copy of the value. Read more
source§

fn clone_from(&mut self, source: &Result<T, E>)

Performs copy-assignment from source. Read more
","Clone","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
source§

impl<T, E> Context<T, E> for Result<T, E>
where\n E: StdError + Send + Sync + 'static,

source§

fn context<C>(self, context: C) -> Result<T, Error>
where\n C: Display + Send + Sync + 'static,

Wrap the error value with additional context.
source§

fn with_context<C, F>(self, context: F) -> Result<T, Error>
where\n C: Display + Send + Sync + 'static,\n F: FnOnce() -> C,

Wrap the error value with additional context that is evaluated lazily\nonly once an error does occur.
","Context","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
1.0.0 · source§

impl<T, E> Debug for Result<T, E>
where\n T: Debug,\n E: Debug,

source§

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

Formats the value using the given formatter. Read more
","Debug","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
source§

impl<T, U> Decode for Result<T, U>
where\n T: Decode,\n U: Decode,

source§

fn decode<D>(decoder: &mut D) -> Result<Result<T, U>, DecodeError>
where\n D: Decoder,

Attempt to decode this type with the given Decode.
","Decode","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
source§

impl<'de, T, E> Deserialize<'de> for Result<T, E>
where\n T: Deserialize<'de>,\n E: Deserialize<'de>,

source§

fn deserialize<D>(\n deserializer: D,\n) -> Result<Result<T, E>, <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
source§

impl<T, U> Encode for Result<T, U>
where\n T: Encode,\n U: Encode,

source§

fn encode<E>(&self, encoder: &mut E) -> Result<(), EncodeError>
where\n E: Encoder,

Encode a given type.
","Encode","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
1.0.0 · source§

impl<A, E, V> FromIterator<Result<A, E>> for Result<V, E>
where\n V: FromIterator<A>,

source§

fn from_iter<I>(iter: I) -> Result<V, E>
where\n I: IntoIterator<Item = Result<A, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err occur, a\ncontainer with the values of each Result is returned.

\n

Here is an example which increments every integer in a vector,\nchecking for overflow:

\n\n
let v = vec![1, 2];\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32|\n    x.checked_add(1).ok_or(\"Overflow!\")\n).collect();\nassert_eq!(res, Ok(vec![2, 3]));
\n

Here is another example that tries to subtract one from another list\nof integers, this time checking for underflow:

\n\n
let v = vec![1, 2, 0];\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32|\n    x.checked_sub(1).ok_or(\"Underflow!\")\n).collect();\nassert_eq!(res, Err(\"Underflow!\"));
\n

Here is a variation on the previous example, showing that no\nfurther elements are taken from iter after the first Err.

\n\n
let v = vec![3, 2, 1, 10];\nlet mut shared = 0;\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32| {\n    shared += x;\n    x.checked_sub(2).ok_or(\"Underflow!\")\n}).collect();\nassert_eq!(res, Err(\"Underflow!\"));\nassert_eq!(shared, 6);
\n

Since the third element caused an underflow, no further elements were taken,\nso the final value of shared is 6 (= 3 + 2 + 1), not 16.

\n
","FromIterator>","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
§

impl<C, T, E> FromParallelIterator<Result<T, E>> for Result<C, E>
where\n C: FromParallelIterator<T>,\n T: Send,\n E: Send,

Collect an arbitrary Result-wrapped collection.

\n

If any item is Err, then all previous Ok items collected are\ndiscarded, and it returns that error. If there are multiple errors, the\none returned is not deterministic.

\n
§

fn from_par_iter<I>(par_iter: I) -> Result<C, E>
where\n I: IntoParallelIterator<Item = Result<T, E>>,

Creates an instance of the collection from the parallel iterator par_iter. Read more
","FromParallelIterator>","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
source§

impl<T, E, F> FromResidual<Result<Infallible, E>> for Result<T, F>
where\n F: From<E>,

source§

fn from_residual(residual: Result<Infallible, E>) -> Result<T, F>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
","FromResidual>","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
source§

impl<T, E, F> FromResidual<Yeet<E>> for Result<T, F>
where\n F: From<E>,

source§

fn from_residual(_: Yeet<E>) -> Result<T, F>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
","FromResidual>","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
1.0.0 · source§

impl<T, E> Hash for Result<T, E>
where\n T: Hash,\n E: Hash,

source§

fn hash<__H>(&self, state: &mut __H)
where\n __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
1.0.0 · source§

impl<T, E> IntoIterator for Result<T, E>

source§

fn into_iter(self) -> IntoIter<T>

Returns a consuming iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(5);\nlet v: Vec<u32> = x.into_iter().collect();\nassert_eq!(v, [5]);\n\nlet x: Result<u32, &str> = Err(\"nothing!\");\nlet v: Vec<u32> = x.into_iter().collect();\nassert_eq!(v, []);
\n
source§

type Item = T

The type of the elements being iterated over.
source§

type IntoIter = IntoIter<T>

Which kind of iterator are we turning this into?
","IntoIterator","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
§

impl<T, E> IntoParallelIterator for Result<T, E>
where\n T: Send,

§

type Item = T

The type of item that the parallel iterator will produce.
§

type Iter = IntoIter<T>

The parallel iterator type that will be created.
§

fn into_par_iter(self) -> <Result<T, E> as IntoParallelIterator>::Iter

Converts self into a parallel iterator. Read more
","IntoParallelIterator","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
§

impl<T, E> JsonSchema for Result<T, E>
where\n T: JsonSchema,\n E: JsonSchema,

§

fn schema_name() -> String

The name of the generated JSON Schema. Read more
§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
§

fn json_schema(gen: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
§

fn is_referenceable() -> bool

Whether JSON Schemas generated for this type should be re-used where possible using the $ref keyword. Read more
","JsonSchema","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
1.0.0 · source§

impl<T, E> Ord for Result<T, E>
where\n T: Ord,\n E: Ord,

source§

fn cmp(&self, other: &Result<T, E>) -> Ordering

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

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

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

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
","Ord","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
1.0.0 · source§

impl<T, E> PartialEq for Result<T, E>
where\n T: PartialEq,\n E: PartialEq,

source§

fn eq(&self, other: &Result<T, E>) -> 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,\nand should not be overridden without very good reason.
","PartialEq","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
1.0.0 · source§

impl<T, E> PartialOrd for Result<T, E>
where\n T: PartialOrd,\n E: PartialOrd,

source§

fn partial_cmp(&self, other: &Result<T, E>) -> 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\n<= 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 >\noperator. 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\nthe >= operator. Read more
","PartialOrd","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
1.16.0 · source§

impl<T, U, E> Product<Result<U, E>> for Result<T, E>
where\n T: Product<U>,

source§

fn product<I>(iter: I) -> Result<T, E>
where\n I: Iterator<Item = Result<U, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err\noccur, the product of all elements is returned.

\n
§Examples
\n

This multiplies each number in a vector of strings,\nif a string could not be parsed the operation returns Err:

\n\n
let nums = vec![\"5\", \"10\", \"1\", \"2\"];\nlet total: Result<usize, _> = nums.iter().map(|w| w.parse::<usize>()).product();\nassert_eq!(total, Ok(100));\nlet nums = vec![\"5\", \"10\", \"one\", \"2\"];\nlet total: Result<usize, _> = nums.iter().map(|w| w.parse::<usize>()).product();\nassert!(total.is_err());
\n
","Product>","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
source§

impl<T, E> Residual<T> for Result<Infallible, E>

source§

type TryType = Result<T, E>

🔬This is a nightly-only experimental API. (try_trait_v2_residual)
The “return” type of this meta-function.
","Residual","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
source§

impl<T, E> Result<&T, E>

1.59.0 · source

pub fn copied(self) -> Result<T, E>
where\n T: Copy,

Maps a Result<&T, E> to a Result<T, E> by copying the contents of the\nOk part.

\n
§Examples
\n
let val = 12;\nlet x: Result<&i32, i32> = Ok(&val);\nassert_eq!(x, Ok(&12));\nlet copied = x.copied();\nassert_eq!(copied, Ok(12));
\n
1.59.0 · source

pub fn cloned(self) -> Result<T, E>
where\n T: Clone,

Maps a Result<&T, E> to a Result<T, E> by cloning the contents of the\nOk part.

\n
§Examples
\n
let val = 12;\nlet x: Result<&i32, i32> = Ok(&val);\nassert_eq!(x, Ok(&12));\nlet cloned = x.cloned();\nassert_eq!(cloned, Ok(12));
\n
",0,"cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
source§

impl<T, E> Result<&mut T, E>

1.59.0 · source

pub fn copied(self) -> Result<T, E>
where\n T: Copy,

Maps a Result<&mut T, E> to a Result<T, E> by copying the contents of the\nOk part.

\n
§Examples
\n
let mut val = 12;\nlet x: Result<&mut i32, i32> = Ok(&mut val);\nassert_eq!(x, Ok(&mut 12));\nlet copied = x.copied();\nassert_eq!(copied, Ok(12));
\n
1.59.0 · source

pub fn cloned(self) -> Result<T, E>
where\n T: Clone,

Maps a Result<&mut T, E> to a Result<T, E> by cloning the contents of the\nOk part.

\n
§Examples
\n
let mut val = 12;\nlet x: Result<&mut i32, i32> = Ok(&mut val);\nassert_eq!(x, Ok(&mut 12));\nlet cloned = x.cloned();\nassert_eq!(cloned, Ok(12));
\n
",0,"cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
source§

impl<T, E> Result<Option<T>, E>

1.33.0 (const: unstable) · source

pub fn transpose(self) -> Option<Result<T, E>>

Transposes a Result of an Option into an Option of a Result.

\n

Ok(None) will be mapped to None.\nOk(Some(_)) and Err(_) will be mapped to Some(Ok(_)) and Some(Err(_)).

\n
§Examples
\n
#[derive(Debug, Eq, PartialEq)]\nstruct SomeErr;\n\nlet x: Result<Option<i32>, SomeErr> = Ok(Some(5));\nlet y: Option<Result<i32, SomeErr>> = Some(Ok(5));\nassert_eq!(x.transpose(), y);
\n
",0,"cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
source§

impl<T, E> Result<Result<T, E>, E>

source

pub fn flatten(self) -> Result<T, E>

🔬This is a nightly-only experimental API. (result_flattening)

Converts from Result<Result<T, E>, E> to Result<T, E>

\n
§Examples
\n
#![feature(result_flattening)]\nlet x: Result<Result<&'static str, u32>, u32> = Ok(Ok(\"hello\"));\nassert_eq!(Ok(\"hello\"), x.flatten());\n\nlet x: Result<Result<&'static str, u32>, u32> = Ok(Err(6));\nassert_eq!(Err(6), x.flatten());\n\nlet x: Result<Result<&'static str, u32>, u32> = Err(6);\nassert_eq!(Err(6), x.flatten());
\n

Flattening only removes one level of nesting at a time:

\n\n
#![feature(result_flattening)]\nlet x: Result<Result<Result<&'static str, u32>, u32>, u32> = Ok(Ok(Ok(\"hello\")));\nassert_eq!(Ok(Ok(\"hello\")), x.flatten());\nassert_eq!(Ok(\"hello\"), x.flatten().flatten());
\n
",0,"cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
source§

impl<T, E> Result<T, E>

1.0.0 (const: 1.48.0) · source

pub const fn is_ok(&self) -> bool

Returns true if the result is Ok.

\n
§Examples
\n
let x: Result<i32, &str> = Ok(-3);\nassert_eq!(x.is_ok(), true);\n\nlet x: Result<i32, &str> = Err(\"Some error message\");\nassert_eq!(x.is_ok(), false);
\n
1.70.0 · source

pub fn is_ok_and(self, f: impl FnOnce(T) -> bool) -> bool

Returns true if the result is Ok and the value inside of it matches a predicate.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.is_ok_and(|x| x > 1), true);\n\nlet x: Result<u32, &str> = Ok(0);\nassert_eq!(x.is_ok_and(|x| x > 1), false);\n\nlet x: Result<u32, &str> = Err(\"hey\");\nassert_eq!(x.is_ok_and(|x| x > 1), false);
\n
1.0.0 (const: 1.48.0) · source

pub const fn is_err(&self) -> bool

Returns true if the result is Err.

\n
§Examples
\n
let x: Result<i32, &str> = Ok(-3);\nassert_eq!(x.is_err(), false);\n\nlet x: Result<i32, &str> = Err(\"Some error message\");\nassert_eq!(x.is_err(), true);
\n
1.70.0 · source

pub fn is_err_and(self, f: impl FnOnce(E) -> bool) -> bool

Returns true if the result is Err and the value inside of it matches a predicate.

\n
§Examples
\n
use std::io::{Error, ErrorKind};\n\nlet x: Result<u32, Error> = Err(Error::new(ErrorKind::NotFound, \"!\"));\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), true);\n\nlet x: Result<u32, Error> = Err(Error::new(ErrorKind::PermissionDenied, \"!\"));\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), false);\n\nlet x: Result<u32, Error> = Ok(123);\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), false);
\n
1.0.0 · source

pub fn ok(self) -> Option<T>

Converts from Result<T, E> to Option<T>.

\n

Converts self into an Option<T>, consuming self,\nand discarding the error, if any.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.ok(), Some(2));\n\nlet x: Result<u32, &str> = Err(\"Nothing here\");\nassert_eq!(x.ok(), None);
\n
1.0.0 · source

pub fn err(self) -> Option<E>

Converts from Result<T, E> to Option<E>.

\n

Converts self into an Option<E>, consuming self,\nand discarding the success value, if any.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.err(), None);\n\nlet x: Result<u32, &str> = Err(\"Nothing here\");\nassert_eq!(x.err(), Some(\"Nothing here\"));
\n
1.0.0 (const: 1.48.0) · source

pub const fn as_ref(&self) -> Result<&T, &E>

Converts from &Result<T, E> to Result<&T, &E>.

\n

Produces a new Result, containing a reference\ninto the original, leaving the original in place.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.as_ref(), Ok(&2));\n\nlet x: Result<u32, &str> = Err(\"Error\");\nassert_eq!(x.as_ref(), Err(&\"Error\"));
\n
1.0.0 (const: unstable) · source

pub fn as_mut(&mut self) -> Result<&mut T, &mut E>

Converts from &mut Result<T, E> to Result<&mut T, &mut E>.

\n
§Examples
\n
fn mutate(r: &mut Result<i32, i32>) {\n    match r.as_mut() {\n        Ok(v) => *v = 42,\n        Err(e) => *e = 0,\n    }\n}\n\nlet mut x: Result<i32, i32> = Ok(2);\nmutate(&mut x);\nassert_eq!(x.unwrap(), 42);\n\nlet mut x: Result<i32, i32> = Err(13);\nmutate(&mut x);\nassert_eq!(x.unwrap_err(), 0);
\n
1.0.0 · source

pub fn map<U, F>(self, op: F) -> Result<U, E>
where\n F: FnOnce(T) -> U,

Maps a Result<T, E> to Result<U, E> by applying a function to a\ncontained Ok value, leaving an Err value untouched.

\n

This function can be used to compose the results of two functions.

\n
§Examples
\n

Print the numbers on each line of a string multiplied by two.

\n\n
let line = \"1\\n2\\n3\\n4\\n\";\n\nfor num in line.lines() {\n    match num.parse::<i32>().map(|i| i * 2) {\n        Ok(n) => println!(\"{n}\"),\n        Err(..) => {}\n    }\n}
\n
1.41.0 · source

pub fn map_or<U, F>(self, default: U, f: F) -> U
where\n F: FnOnce(T) -> U,

Returns the provided default (if Err), or\napplies a function to the contained value (if Ok).

\n

Arguments passed to map_or are eagerly evaluated; if you are passing\nthe result of a function call, it is recommended to use map_or_else,\nwhich is lazily evaluated.

\n
§Examples
\n
let x: Result<_, &str> = Ok(\"foo\");\nassert_eq!(x.map_or(42, |v| v.len()), 3);\n\nlet x: Result<&str, _> = Err(\"bar\");\nassert_eq!(x.map_or(42, |v| v.len()), 42);
\n
1.41.0 · source

pub fn map_or_else<U, D, F>(self, default: D, f: F) -> U
where\n D: FnOnce(E) -> U,\n F: FnOnce(T) -> U,

Maps a Result<T, E> to U by applying fallback function default to\na contained Err value, or function f to a contained Ok value.

\n

This function can be used to unpack a successful result\nwhile handling an error.

\n
§Examples
\n
let k = 21;\n\nlet x : Result<_, &str> = Ok(\"foo\");\nassert_eq!(x.map_or_else(|e| k * 2, |v| v.len()), 3);\n\nlet x : Result<&str, _> = Err(\"bar\");\nassert_eq!(x.map_or_else(|e| k * 2, |v| v.len()), 42);
\n
1.0.0 · source

pub fn map_err<F, O>(self, op: O) -> Result<T, F>
where\n O: FnOnce(E) -> F,

Maps a Result<T, E> to Result<T, F> by applying a function to a\ncontained Err value, leaving an Ok value untouched.

\n

This function can be used to pass through a successful result while handling\nan error.

\n
§Examples
\n
fn stringify(x: u32) -> String { format!(\"error code: {x}\") }\n\nlet x: Result<u32, u32> = Ok(2);\nassert_eq!(x.map_err(stringify), Ok(2));\n\nlet x: Result<u32, u32> = Err(13);\nassert_eq!(x.map_err(stringify), Err(\"error code: 13\".to_string()));
\n
1.76.0 · source

pub fn inspect<F>(self, f: F) -> Result<T, E>
where\n F: FnOnce(&T),

Calls a function with a reference to the contained value if Ok.

\n

Returns the original result.

\n
§Examples
\n
let x: u8 = \"4\"\n    .parse::<u8>()\n    .inspect(|x| println!(\"original: {x}\"))\n    .map(|x| x.pow(3))\n    .expect(\"failed to parse number\");
\n
1.76.0 · source

pub fn inspect_err<F>(self, f: F) -> Result<T, E>
where\n F: FnOnce(&E),

Calls a function with a reference to the contained value if Err.

\n

Returns the original result.

\n
§Examples
\n
use std::{fs, io};\n\nfn read() -> io::Result<String> {\n    fs::read_to_string(\"address.txt\")\n        .inspect_err(|e| eprintln!(\"failed to read file: {e}\"))\n}
\n
1.47.0 · source

pub fn as_deref(&self) -> Result<&<T as Deref>::Target, &E>
where\n T: Deref,

Converts from Result<T, E> (or &Result<T, E>) to Result<&<T as Deref>::Target, &E>.

\n

Coerces the Ok variant of the original Result via Deref\nand returns the new Result.

\n
§Examples
\n
let x: Result<String, u32> = Ok(\"hello\".to_string());\nlet y: Result<&str, &u32> = Ok(\"hello\");\nassert_eq!(x.as_deref(), y);\n\nlet x: Result<String, u32> = Err(42);\nlet y: Result<&str, &u32> = Err(&42);\nassert_eq!(x.as_deref(), y);
\n
1.47.0 · source

pub fn as_deref_mut(&mut self) -> Result<&mut <T as Deref>::Target, &mut E>
where\n T: DerefMut,

Converts from Result<T, E> (or &mut Result<T, E>) to Result<&mut <T as DerefMut>::Target, &mut E>.

\n

Coerces the Ok variant of the original Result via DerefMut\nand returns the new Result.

\n
§Examples
\n
let mut s = \"HELLO\".to_string();\nlet mut x: Result<String, u32> = Ok(\"hello\".to_string());\nlet y: Result<&mut str, &mut u32> = Ok(&mut s);\nassert_eq!(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);\n\nlet mut i = 42;\nlet mut x: Result<String, u32> = Err(42);\nlet y: Result<&mut str, &mut u32> = Err(&mut i);\nassert_eq!(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);
\n
1.0.0 · source

pub fn iter(&self) -> Iter<'_, T>

Returns an iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(7);\nassert_eq!(x.iter().next(), Some(&7));\n\nlet x: Result<u32, &str> = Err(\"nothing!\");\nassert_eq!(x.iter().next(), None);
\n
1.0.0 · source

pub fn iter_mut(&mut self) -> IterMut<'_, T>

Returns a mutable iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
§Examples
\n
let mut x: Result<u32, &str> = Ok(7);\nmatch x.iter_mut().next() {\n    Some(v) => *v = 40,\n    None => {},\n}\nassert_eq!(x, Ok(40));\n\nlet mut x: Result<u32, &str> = Err(\"nothing!\");\nassert_eq!(x.iter_mut().next(), None);
\n
1.4.0 · source

pub fn expect(self, msg: &str) -> T
where\n E: Debug,

Returns the contained Ok value, consuming the self value.

\n

Because this function may panic, its use is generally discouraged.\nInstead, prefer to use pattern matching and handle the Err\ncase explicitly, or call unwrap_or, unwrap_or_else, or\nunwrap_or_default.

\n
§Panics
\n

Panics if the value is an Err, with a panic message including the\npassed message, and the content of the Err.

\n
§Examples
\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nx.expect(\"Testing expect\"); // panics with `Testing expect: emergency failure`
\n
§Recommended Message Style
\n

We recommend that expect messages are used to describe the reason you\nexpect the Result should be Ok.

\n\n
let path = std::env::var(\"IMPORTANT_PATH\")\n    .expect(\"env variable `IMPORTANT_PATH` should be set by `wrapper_script.sh`\");
\n

Hint: If you’re having trouble remembering how to phrase expect\nerror messages remember to focus on the word “should” as in “env\nvariable should be set by blah” or “the given binary should be available\nand executable by the current user”.

\n

For more detail on expect message styles and the reasoning behind our recommendation please\nrefer to the section on “Common Message\nStyles” in the\nstd::error module docs.

\n
1.0.0 · source

pub fn unwrap(self) -> T
where\n E: Debug,

Returns the contained Ok value, consuming the self value.

\n

Because this function may panic, its use is generally discouraged.\nInstead, prefer to use pattern matching and handle the Err\ncase explicitly, or call unwrap_or, unwrap_or_else, or\nunwrap_or_default.

\n
§Panics
\n

Panics if the value is an Err, with a panic message provided by the\nErr’s value.

\n
§Examples
\n

Basic usage:

\n\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.unwrap(), 2);
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nx.unwrap(); // panics with `emergency failure`
\n
1.16.0 · source

pub fn unwrap_or_default(self) -> T
where\n T: Default,

Returns the contained Ok value or a default

\n

Consumes the self argument then, if Ok, returns the contained\nvalue, otherwise if Err, returns the default value for that\ntype.

\n
§Examples
\n

Converts a string to an integer, turning poorly-formed strings\ninto 0 (the default value for integers). parse converts\na string to any other type that implements FromStr, returning an\nErr on error.

\n\n
let good_year_from_input = \"1909\";\nlet bad_year_from_input = \"190blarg\";\nlet good_year = good_year_from_input.parse().unwrap_or_default();\nlet bad_year = bad_year_from_input.parse().unwrap_or_default();\n\nassert_eq!(1909, good_year);\nassert_eq!(0, bad_year);
\n
1.17.0 · source

pub fn expect_err(self, msg: &str) -> E
where\n T: Debug,

Returns the contained Err value, consuming the self value.

\n
§Panics
\n

Panics if the value is an Ok, with a panic message including the\npassed message, and the content of the Ok.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(10);\nx.expect_err(\"Testing expect_err\"); // panics with `Testing expect_err: 10`
\n
1.0.0 · source

pub fn unwrap_err(self) -> E
where\n T: Debug,

Returns the contained Err value, consuming the self value.

\n
§Panics
\n

Panics if the value is an Ok, with a custom panic message provided\nby the Ok’s value.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nx.unwrap_err(); // panics with `2`
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nassert_eq!(x.unwrap_err(), \"emergency failure\");
\n
source

pub fn into_ok(self) -> T
where\n E: Into<!>,

🔬This is a nightly-only experimental API. (unwrap_infallible)

Returns the contained Ok value, but never panics.

\n

Unlike unwrap, this method is known to never panic on the\nresult types it is implemented for. Therefore, it can be used\ninstead of unwrap as a maintainability safeguard that will fail\nto compile if the error type of the Result is later changed\nto an error that can actually occur.

\n
§Examples
\n
\nfn only_good_news() -> Result<String, !> {\n    Ok(\"this is fine\".into())\n}\n\nlet s: String = only_good_news().into_ok();\nprintln!(\"{s}\");
\n
source

pub fn into_err(self) -> E
where\n T: Into<!>,

🔬This is a nightly-only experimental API. (unwrap_infallible)

Returns the contained Err value, but never panics.

\n

Unlike unwrap_err, this method is known to never panic on the\nresult types it is implemented for. Therefore, it can be used\ninstead of unwrap_err as a maintainability safeguard that will fail\nto compile if the ok type of the Result is later changed\nto a type that can actually occur.

\n
§Examples
\n
\nfn only_bad_news() -> Result<!, String> {\n    Err(\"Oops, it failed\".into())\n}\n\nlet error: String = only_bad_news().into_err();\nprintln!(\"{error}\");
\n
1.0.0 · source

pub fn and<U>(self, res: Result<U, E>) -> Result<U, E>

Returns res if the result is Ok, otherwise returns the Err value of self.

\n

Arguments passed to and are eagerly evaluated; if you are passing the\nresult of a function call, it is recommended to use and_then, which is\nlazily evaluated.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nlet y: Result<&str, &str> = Err(\"late error\");\nassert_eq!(x.and(y), Err(\"late error\"));\n\nlet x: Result<u32, &str> = Err(\"early error\");\nlet y: Result<&str, &str> = Ok(\"foo\");\nassert_eq!(x.and(y), Err(\"early error\"));\n\nlet x: Result<u32, &str> = Err(\"not a 2\");\nlet y: Result<&str, &str> = Err(\"late error\");\nassert_eq!(x.and(y), Err(\"not a 2\"));\n\nlet x: Result<u32, &str> = Ok(2);\nlet y: Result<&str, &str> = Ok(\"different result type\");\nassert_eq!(x.and(y), Ok(\"different result type\"));
\n
1.0.0 · source

pub fn and_then<U, F>(self, op: F) -> Result<U, E>
where\n F: FnOnce(T) -> Result<U, E>,

Calls op if the result is Ok, otherwise returns the Err value of self.

\n

This function can be used for control flow based on Result values.

\n
§Examples
\n
fn sq_then_to_string(x: u32) -> Result<String, &'static str> {\n    x.checked_mul(x).map(|sq| sq.to_string()).ok_or(\"overflowed\")\n}\n\nassert_eq!(Ok(2).and_then(sq_then_to_string), Ok(4.to_string()));\nassert_eq!(Ok(1_000_000).and_then(sq_then_to_string), Err(\"overflowed\"));\nassert_eq!(Err(\"not a number\").and_then(sq_then_to_string), Err(\"not a number\"));
\n

Often used to chain fallible operations that may return Err.

\n\n
use std::{io::ErrorKind, path::Path};\n\n// Note: on Windows \"/\" maps to \"C:\\\"\nlet root_modified_time = Path::new(\"/\").metadata().and_then(|md| md.modified());\nassert!(root_modified_time.is_ok());\n\nlet should_fail = Path::new(\"/bad/path\").metadata().and_then(|md| md.modified());\nassert!(should_fail.is_err());\nassert_eq!(should_fail.unwrap_err().kind(), ErrorKind::NotFound);
\n
1.0.0 · source

pub fn or<F>(self, res: Result<T, F>) -> Result<T, F>

Returns res if the result is Err, otherwise returns the Ok value of self.

\n

Arguments passed to or are eagerly evaluated; if you are passing the\nresult of a function call, it is recommended to use or_else, which is\nlazily evaluated.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nlet y: Result<u32, &str> = Err(\"late error\");\nassert_eq!(x.or(y), Ok(2));\n\nlet x: Result<u32, &str> = Err(\"early error\");\nlet y: Result<u32, &str> = Ok(2);\nassert_eq!(x.or(y), Ok(2));\n\nlet x: Result<u32, &str> = Err(\"not a 2\");\nlet y: Result<u32, &str> = Err(\"late error\");\nassert_eq!(x.or(y), Err(\"late error\"));\n\nlet x: Result<u32, &str> = Ok(2);\nlet y: Result<u32, &str> = Ok(100);\nassert_eq!(x.or(y), Ok(2));
\n
1.0.0 · source

pub fn or_else<F, O>(self, op: O) -> Result<T, F>
where\n O: FnOnce(E) -> Result<T, F>,

Calls op if the result is Err, otherwise returns the Ok value of self.

\n

This function can be used for control flow based on result values.

\n
§Examples
\n
fn sq(x: u32) -> Result<u32, u32> { Ok(x * x) }\nfn err(x: u32) -> Result<u32, u32> { Err(x) }\n\nassert_eq!(Ok(2).or_else(sq).or_else(sq), Ok(2));\nassert_eq!(Ok(2).or_else(err).or_else(sq), Ok(2));\nassert_eq!(Err(3).or_else(sq).or_else(err), Ok(9));\nassert_eq!(Err(3).or_else(err).or_else(err), Err(3));
\n
1.0.0 · source

pub fn unwrap_or(self, default: T) -> T

Returns the contained Ok value or a provided default.

\n

Arguments passed to unwrap_or are eagerly evaluated; if you are passing\nthe result of a function call, it is recommended to use unwrap_or_else,\nwhich is lazily evaluated.

\n
§Examples
\n
let default = 2;\nlet x: Result<u32, &str> = Ok(9);\nassert_eq!(x.unwrap_or(default), 9);\n\nlet x: Result<u32, &str> = Err(\"error\");\nassert_eq!(x.unwrap_or(default), default);
\n
1.0.0 · source

pub fn unwrap_or_else<F>(self, op: F) -> T
where\n F: FnOnce(E) -> T,

Returns the contained Ok value or computes it from a closure.

\n
§Examples
\n
fn count(x: &str) -> usize { x.len() }\n\nassert_eq!(Ok(2).unwrap_or_else(count), 2);\nassert_eq!(Err(\"foo\").unwrap_or_else(count), 3);
\n
1.58.0 · source

pub unsafe fn unwrap_unchecked(self) -> T

Returns the contained Ok value, consuming the self value,\nwithout checking that the value is not an Err.

\n
§Safety
\n

Calling this method on an Err is undefined behavior.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(unsafe { x.unwrap_unchecked() }, 2);
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nunsafe { x.unwrap_unchecked(); } // Undefined behavior!
\n
1.58.0 · source

pub unsafe fn unwrap_err_unchecked(self) -> E

Returns the contained Err value, consuming the self value,\nwithout checking that the value is not an Ok.

\n
§Safety
\n

Calling this method on an Ok is undefined behavior.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nunsafe { x.unwrap_err_unchecked() }; // Undefined behavior!
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nassert_eq!(unsafe { x.unwrap_err_unchecked() }, \"emergency failure\");
\n
",0,"cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
source§

impl<T, E> Serialize for Result<T, E>
where\n T: Serialize,\n E: Serialize,

source§

fn serialize<S>(\n &self,\n serializer: S,\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
1.16.0 · source§

impl<T, U, E> Sum<Result<U, E>> for Result<T, E>
where\n T: Sum<U>,

source§

fn sum<I>(iter: I) -> Result<T, E>
where\n I: Iterator<Item = Result<U, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err\noccur, the sum of all elements is returned.

\n
§Examples
\n

This sums up every integer in a vector, rejecting the sum if a negative\nelement is encountered:

\n\n
let f = |&x: &i32| if x < 0 { Err(\"Negative element found\") } else { Ok(x) };\nlet v = vec![1, 2];\nlet res: Result<i32, _> = v.iter().map(f).sum();\nassert_eq!(res, Ok(3));\nlet v = vec![1, -2];\nlet res: Result<i32, _> = v.iter().map(f).sum();\nassert_eq!(res, Err(\"Negative element found\"));
\n
","Sum>","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
§

impl<T, E> TapFallible for Result<T, E>

§

type Ok = T

The interior type used to indicate a successful construction.
§

type Err = E

The interior type used to indicate a failed construction.
§

fn tap_ok(self, func: impl FnOnce(&T)) -> Result<T, E>

Immutably accesses an interior success value. Read more
§

fn tap_ok_mut(self, func: impl FnOnce(&mut T)) -> Result<T, E>

Mutably accesses an interior success value. Read more
§

fn tap_err(self, func: impl FnOnce(&E)) -> Result<T, E>

Immutably accesses an interior failure value. Read more
§

fn tap_err_mut(self, func: impl FnOnce(&mut E)) -> Result<T, E>

Mutably accesses an interior failure value. Read more
§

fn tap_ok_dbg(self, func: impl FnOnce(&Self::Ok)) -> Self

Calls .tap_ok() only in debug builds, and is erased in release builds.
§

fn tap_ok_mut_dbg(self, func: impl FnOnce(&mut Self::Ok)) -> Self

Calls .tap_ok_mut() only in debug builds, and is erased in release\nbuilds.
§

fn tap_err_dbg(self, func: impl FnOnce(&Self::Err)) -> Self

Calls .tap_err() only in debug builds, and is erased in release\nbuilds.
§

fn tap_err_mut_dbg(self, func: impl FnOnce(&mut Self::Err)) -> Self

Calls .tap_err_mut() only in debug builds, and is erased in release\nbuilds.
","TapFallible","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
1.61.0 · source§

impl<T, E> Termination for Result<T, E>
where\n T: Termination,\n E: Debug,

source§

fn report(self) -> ExitCode

Is called to get the representation of the value as status code.\nThis status code is returned to the operating system.
","Termination","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
source§

impl<T, E> ToNativeAssertError<T> for Result<T, E>

","ToNativeAssertError","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
source§

impl<T, E> Try for Result<T, E>

source§

type Output = T

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value produced by ? when not short-circuiting.
source§

type Residual = Result<Infallible, E>

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value passed to FromResidual::from_residual\nas part of ? when short-circuiting. Read more
source§

fn from_output(output: <Result<T, E> as Try>::Output) -> Result<T, E>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from its Output type. Read more
source§

fn branch(\n self,\n) -> ControlFlow<<Result<T, E> as Try>::Residual, <Result<T, E> as Try>::Output>

🔬This is a nightly-only experimental API. (try_trait_v2)
Used in ? to decide whether the operator should produce a value\n(because this returned ControlFlow::Continue)\nor propagate a value back to the caller\n(because this returned ControlFlow::Break). Read more
","Try","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
1.0.0 · source§

impl<T, E> Copy for Result<T, E>
where\n T: Copy,\n E: Copy,

","Copy","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
1.0.0 · source§

impl<T, E> Eq for Result<T, E>
where\n T: Eq,\n E: Eq,

","Eq","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
1.0.0 · source§

impl<T, E> StructuralPartialEq for Result<T, E>

","StructuralPartialEq","cairo_native::error::Result","cairo_native::starknet::SyscallResult"]]]]); + var type_impls = Object.fromEntries([["cairo_native",[["
source§

impl<'de, T, U> BorrowDecode<'de> for Result<T, U>
where\n T: BorrowDecode<'de>,\n U: BorrowDecode<'de>,

source§

fn borrow_decode<D>(decoder: &mut D) -> Result<Result<T, U>, DecodeError>
where\n D: BorrowDecoder<'de>,

Attempt to decode this type with the given BorrowDecode.
","BorrowDecode<'de>","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
1.0.0 · source§

impl<T, E> Clone for Result<T, E>
where\n T: Clone,\n E: Clone,

source§

fn clone(&self) -> Result<T, E>

Returns a copy of the value. Read more
source§

fn clone_from(&mut self, source: &Result<T, E>)

Performs copy-assignment from source. Read more
","Clone","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
source§

impl<T, E> Context<T, E> for Result<T, E>
where\n E: StdError + Send + Sync + 'static,

source§

fn context<C>(self, context: C) -> Result<T, Error>
where\n C: Display + Send + Sync + 'static,

Wrap the error value with additional context.
source§

fn with_context<C, F>(self, context: F) -> Result<T, Error>
where\n C: Display + Send + Sync + 'static,\n F: FnOnce() -> C,

Wrap the error value with additional context that is evaluated lazily\nonly once an error does occur.
","Context","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
1.0.0 · source§

impl<T, E> Debug for Result<T, E>
where\n T: Debug,\n E: Debug,

source§

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

Formats the value using the given formatter. Read more
","Debug","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
source§

impl<T, U> Decode for Result<T, U>
where\n T: Decode,\n U: Decode,

source§

fn decode<D>(decoder: &mut D) -> Result<Result<T, U>, DecodeError>
where\n D: Decoder,

Attempt to decode this type with the given Decode.
","Decode","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
source§

impl<'de, T, E> Deserialize<'de> for Result<T, E>
where\n T: Deserialize<'de>,\n E: Deserialize<'de>,

source§

fn deserialize<D>(\n deserializer: D,\n) -> Result<Result<T, E>, <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
source§

impl<T, U> Encode for Result<T, U>
where\n T: Encode,\n U: Encode,

source§

fn encode<E>(&self, encoder: &mut E) -> Result<(), EncodeError>
where\n E: Encoder,

Encode a given type.
","Encode","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
1.0.0 · source§

impl<A, E, V> FromIterator<Result<A, E>> for Result<V, E>
where\n V: FromIterator<A>,

source§

fn from_iter<I>(iter: I) -> Result<V, E>
where\n I: IntoIterator<Item = Result<A, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err occur, a\ncontainer with the values of each Result is returned.

\n

Here is an example which increments every integer in a vector,\nchecking for overflow:

\n\n
let v = vec![1, 2];\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32|\n    x.checked_add(1).ok_or(\"Overflow!\")\n).collect();\nassert_eq!(res, Ok(vec![2, 3]));
\n

Here is another example that tries to subtract one from another list\nof integers, this time checking for underflow:

\n\n
let v = vec![1, 2, 0];\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32|\n    x.checked_sub(1).ok_or(\"Underflow!\")\n).collect();\nassert_eq!(res, Err(\"Underflow!\"));
\n

Here is a variation on the previous example, showing that no\nfurther elements are taken from iter after the first Err.

\n\n
let v = vec![3, 2, 1, 10];\nlet mut shared = 0;\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32| {\n    shared += x;\n    x.checked_sub(2).ok_or(\"Underflow!\")\n}).collect();\nassert_eq!(res, Err(\"Underflow!\"));\nassert_eq!(shared, 6);
\n

Since the third element caused an underflow, no further elements were taken,\nso the final value of shared is 6 (= 3 + 2 + 1), not 16.

\n
","FromIterator>","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
§

impl<C, T, E> FromParallelIterator<Result<T, E>> for Result<C, E>
where\n C: FromParallelIterator<T>,\n T: Send,\n E: Send,

Collect an arbitrary Result-wrapped collection.

\n

If any item is Err, then all previous Ok items collected are\ndiscarded, and it returns that error. If there are multiple errors, the\none returned is not deterministic.

\n
§

fn from_par_iter<I>(par_iter: I) -> Result<C, E>
where\n I: IntoParallelIterator<Item = Result<T, E>>,

Creates an instance of the collection from the parallel iterator par_iter. Read more
","FromParallelIterator>","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
source§

impl<T, E, F> FromResidual<Result<Infallible, E>> for Result<T, F>
where\n F: From<E>,

source§

fn from_residual(residual: Result<Infallible, E>) -> Result<T, F>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
","FromResidual>","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
source§

impl<T, E, F> FromResidual<Yeet<E>> for Result<T, F>
where\n F: From<E>,

source§

fn from_residual(_: Yeet<E>) -> Result<T, F>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
","FromResidual>","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
1.0.0 · source§

impl<T, E> Hash for Result<T, E>
where\n T: Hash,\n E: Hash,

source§

fn hash<__H>(&self, state: &mut __H)
where\n __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
1.0.0 · source§

impl<T, E> IntoIterator for Result<T, E>

source§

fn into_iter(self) -> IntoIter<T>

Returns a consuming iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(5);\nlet v: Vec<u32> = x.into_iter().collect();\nassert_eq!(v, [5]);\n\nlet x: Result<u32, &str> = Err(\"nothing!\");\nlet v: Vec<u32> = x.into_iter().collect();\nassert_eq!(v, []);
\n
source§

type Item = T

The type of the elements being iterated over.
source§

type IntoIter = IntoIter<T>

Which kind of iterator are we turning this into?
","IntoIterator","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
§

impl<T, E> IntoParallelIterator for Result<T, E>
where\n T: Send,

§

type Item = T

The type of item that the parallel iterator will produce.
§

type Iter = IntoIter<T>

The parallel iterator type that will be created.
§

fn into_par_iter(self) -> <Result<T, E> as IntoParallelIterator>::Iter

Converts self into a parallel iterator. Read more
","IntoParallelIterator","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
§

impl<T, E> JsonSchema for Result<T, E>
where\n T: JsonSchema,\n E: JsonSchema,

§

fn schema_name() -> String

The name of the generated JSON Schema. Read more
§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
§

fn json_schema(gen: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
§

fn is_referenceable() -> bool

Whether JSON Schemas generated for this type should be re-used where possible using the $ref keyword. Read more
","JsonSchema","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
1.0.0 · source§

impl<T, E> Ord for Result<T, E>
where\n T: Ord,\n E: Ord,

source§

fn cmp(&self, other: &Result<T, E>) -> Ordering

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

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

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

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
","Ord","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
1.0.0 · source§

impl<T, E> PartialEq for Result<T, E>
where\n T: PartialEq,\n E: PartialEq,

source§

fn eq(&self, other: &Result<T, E>) -> 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,\nand should not be overridden without very good reason.
","PartialEq","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
1.0.0 · source§

impl<T, E> PartialOrd for Result<T, E>
where\n T: PartialOrd,\n E: PartialOrd,

source§

fn partial_cmp(&self, other: &Result<T, E>) -> 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\n<= 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 >\noperator. 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\nthe >= operator. Read more
","PartialOrd","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
1.16.0 · source§

impl<T, U, E> Product<Result<U, E>> for Result<T, E>
where\n T: Product<U>,

source§

fn product<I>(iter: I) -> Result<T, E>
where\n I: Iterator<Item = Result<U, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err\noccur, the product of all elements is returned.

\n
§Examples
\n

This multiplies each number in a vector of strings,\nif a string could not be parsed the operation returns Err:

\n\n
let nums = vec![\"5\", \"10\", \"1\", \"2\"];\nlet total: Result<usize, _> = nums.iter().map(|w| w.parse::<usize>()).product();\nassert_eq!(total, Ok(100));\nlet nums = vec![\"5\", \"10\", \"one\", \"2\"];\nlet total: Result<usize, _> = nums.iter().map(|w| w.parse::<usize>()).product();\nassert!(total.is_err());
\n
","Product>","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
source§

impl<T, E> Residual<T> for Result<Infallible, E>

source§

type TryType = Result<T, E>

🔬This is a nightly-only experimental API. (try_trait_v2_residual)
The “return” type of this meta-function.
","Residual","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
source§

impl<T, E> Result<&T, E>

1.59.0 · source

pub fn copied(self) -> Result<T, E>
where\n T: Copy,

Maps a Result<&T, E> to a Result<T, E> by copying the contents of the\nOk part.

\n
§Examples
\n
let val = 12;\nlet x: Result<&i32, i32> = Ok(&val);\nassert_eq!(x, Ok(&12));\nlet copied = x.copied();\nassert_eq!(copied, Ok(12));
\n
1.59.0 · source

pub fn cloned(self) -> Result<T, E>
where\n T: Clone,

Maps a Result<&T, E> to a Result<T, E> by cloning the contents of the\nOk part.

\n
§Examples
\n
let val = 12;\nlet x: Result<&i32, i32> = Ok(&val);\nassert_eq!(x, Ok(&12));\nlet cloned = x.cloned();\nassert_eq!(cloned, Ok(12));
\n
",0,"cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
source§

impl<T, E> Result<&mut T, E>

1.59.0 · source

pub fn copied(self) -> Result<T, E>
where\n T: Copy,

Maps a Result<&mut T, E> to a Result<T, E> by copying the contents of the\nOk part.

\n
§Examples
\n
let mut val = 12;\nlet x: Result<&mut i32, i32> = Ok(&mut val);\nassert_eq!(x, Ok(&mut 12));\nlet copied = x.copied();\nassert_eq!(copied, Ok(12));
\n
1.59.0 · source

pub fn cloned(self) -> Result<T, E>
where\n T: Clone,

Maps a Result<&mut T, E> to a Result<T, E> by cloning the contents of the\nOk part.

\n
§Examples
\n
let mut val = 12;\nlet x: Result<&mut i32, i32> = Ok(&mut val);\nassert_eq!(x, Ok(&mut 12));\nlet cloned = x.cloned();\nassert_eq!(cloned, Ok(12));
\n
",0,"cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
source§

impl<T, E> Result<Option<T>, E>

1.33.0 (const: unstable) · source

pub fn transpose(self) -> Option<Result<T, E>>

Transposes a Result of an Option into an Option of a Result.

\n

Ok(None) will be mapped to None.\nOk(Some(_)) and Err(_) will be mapped to Some(Ok(_)) and Some(Err(_)).

\n
§Examples
\n
#[derive(Debug, Eq, PartialEq)]\nstruct SomeErr;\n\nlet x: Result<Option<i32>, SomeErr> = Ok(Some(5));\nlet y: Option<Result<i32, SomeErr>> = Some(Ok(5));\nassert_eq!(x.transpose(), y);
\n
",0,"cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
source§

impl<T, E> Result<Result<T, E>, E>

source

pub fn flatten(self) -> Result<T, E>

🔬This is a nightly-only experimental API. (result_flattening)

Converts from Result<Result<T, E>, E> to Result<T, E>

\n
§Examples
\n
#![feature(result_flattening)]\nlet x: Result<Result<&'static str, u32>, u32> = Ok(Ok(\"hello\"));\nassert_eq!(Ok(\"hello\"), x.flatten());\n\nlet x: Result<Result<&'static str, u32>, u32> = Ok(Err(6));\nassert_eq!(Err(6), x.flatten());\n\nlet x: Result<Result<&'static str, u32>, u32> = Err(6);\nassert_eq!(Err(6), x.flatten());
\n

Flattening only removes one level of nesting at a time:

\n\n
#![feature(result_flattening)]\nlet x: Result<Result<Result<&'static str, u32>, u32>, u32> = Ok(Ok(Ok(\"hello\")));\nassert_eq!(Ok(Ok(\"hello\")), x.flatten());\nassert_eq!(Ok(\"hello\"), x.flatten().flatten());
\n
",0,"cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
source§

impl<T, E> Result<T, E>

1.0.0 (const: 1.48.0) · source

pub const fn is_ok(&self) -> bool

Returns true if the result is Ok.

\n
§Examples
\n
let x: Result<i32, &str> = Ok(-3);\nassert_eq!(x.is_ok(), true);\n\nlet x: Result<i32, &str> = Err(\"Some error message\");\nassert_eq!(x.is_ok(), false);
\n
1.70.0 · source

pub fn is_ok_and(self, f: impl FnOnce(T) -> bool) -> bool

Returns true if the result is Ok and the value inside of it matches a predicate.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.is_ok_and(|x| x > 1), true);\n\nlet x: Result<u32, &str> = Ok(0);\nassert_eq!(x.is_ok_and(|x| x > 1), false);\n\nlet x: Result<u32, &str> = Err(\"hey\");\nassert_eq!(x.is_ok_and(|x| x > 1), false);
\n
1.0.0 (const: 1.48.0) · source

pub const fn is_err(&self) -> bool

Returns true if the result is Err.

\n
§Examples
\n
let x: Result<i32, &str> = Ok(-3);\nassert_eq!(x.is_err(), false);\n\nlet x: Result<i32, &str> = Err(\"Some error message\");\nassert_eq!(x.is_err(), true);
\n
1.70.0 · source

pub fn is_err_and(self, f: impl FnOnce(E) -> bool) -> bool

Returns true if the result is Err and the value inside of it matches a predicate.

\n
§Examples
\n
use std::io::{Error, ErrorKind};\n\nlet x: Result<u32, Error> = Err(Error::new(ErrorKind::NotFound, \"!\"));\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), true);\n\nlet x: Result<u32, Error> = Err(Error::new(ErrorKind::PermissionDenied, \"!\"));\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), false);\n\nlet x: Result<u32, Error> = Ok(123);\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), false);
\n
1.0.0 · source

pub fn ok(self) -> Option<T>

Converts from Result<T, E> to Option<T>.

\n

Converts self into an Option<T>, consuming self,\nand discarding the error, if any.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.ok(), Some(2));\n\nlet x: Result<u32, &str> = Err(\"Nothing here\");\nassert_eq!(x.ok(), None);
\n
1.0.0 · source

pub fn err(self) -> Option<E>

Converts from Result<T, E> to Option<E>.

\n

Converts self into an Option<E>, consuming self,\nand discarding the success value, if any.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.err(), None);\n\nlet x: Result<u32, &str> = Err(\"Nothing here\");\nassert_eq!(x.err(), Some(\"Nothing here\"));
\n
1.0.0 (const: 1.48.0) · source

pub const fn as_ref(&self) -> Result<&T, &E>

Converts from &Result<T, E> to Result<&T, &E>.

\n

Produces a new Result, containing a reference\ninto the original, leaving the original in place.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.as_ref(), Ok(&2));\n\nlet x: Result<u32, &str> = Err(\"Error\");\nassert_eq!(x.as_ref(), Err(&\"Error\"));
\n
1.0.0 (const: unstable) · source

pub fn as_mut(&mut self) -> Result<&mut T, &mut E>

Converts from &mut Result<T, E> to Result<&mut T, &mut E>.

\n
§Examples
\n
fn mutate(r: &mut Result<i32, i32>) {\n    match r.as_mut() {\n        Ok(v) => *v = 42,\n        Err(e) => *e = 0,\n    }\n}\n\nlet mut x: Result<i32, i32> = Ok(2);\nmutate(&mut x);\nassert_eq!(x.unwrap(), 42);\n\nlet mut x: Result<i32, i32> = Err(13);\nmutate(&mut x);\nassert_eq!(x.unwrap_err(), 0);
\n
1.0.0 · source

pub fn map<U, F>(self, op: F) -> Result<U, E>
where\n F: FnOnce(T) -> U,

Maps a Result<T, E> to Result<U, E> by applying a function to a\ncontained Ok value, leaving an Err value untouched.

\n

This function can be used to compose the results of two functions.

\n
§Examples
\n

Print the numbers on each line of a string multiplied by two.

\n\n
let line = \"1\\n2\\n3\\n4\\n\";\n\nfor num in line.lines() {\n    match num.parse::<i32>().map(|i| i * 2) {\n        Ok(n) => println!(\"{n}\"),\n        Err(..) => {}\n    }\n}
\n
1.41.0 · source

pub fn map_or<U, F>(self, default: U, f: F) -> U
where\n F: FnOnce(T) -> U,

Returns the provided default (if Err), or\napplies a function to the contained value (if Ok).

\n

Arguments passed to map_or are eagerly evaluated; if you are passing\nthe result of a function call, it is recommended to use map_or_else,\nwhich is lazily evaluated.

\n
§Examples
\n
let x: Result<_, &str> = Ok(\"foo\");\nassert_eq!(x.map_or(42, |v| v.len()), 3);\n\nlet x: Result<&str, _> = Err(\"bar\");\nassert_eq!(x.map_or(42, |v| v.len()), 42);
\n
1.41.0 · source

pub fn map_or_else<U, D, F>(self, default: D, f: F) -> U
where\n D: FnOnce(E) -> U,\n F: FnOnce(T) -> U,

Maps a Result<T, E> to U by applying fallback function default to\na contained Err value, or function f to a contained Ok value.

\n

This function can be used to unpack a successful result\nwhile handling an error.

\n
§Examples
\n
let k = 21;\n\nlet x : Result<_, &str> = Ok(\"foo\");\nassert_eq!(x.map_or_else(|e| k * 2, |v| v.len()), 3);\n\nlet x : Result<&str, _> = Err(\"bar\");\nassert_eq!(x.map_or_else(|e| k * 2, |v| v.len()), 42);
\n
1.0.0 · source

pub fn map_err<F, O>(self, op: O) -> Result<T, F>
where\n O: FnOnce(E) -> F,

Maps a Result<T, E> to Result<T, F> by applying a function to a\ncontained Err value, leaving an Ok value untouched.

\n

This function can be used to pass through a successful result while handling\nan error.

\n
§Examples
\n
fn stringify(x: u32) -> String { format!(\"error code: {x}\") }\n\nlet x: Result<u32, u32> = Ok(2);\nassert_eq!(x.map_err(stringify), Ok(2));\n\nlet x: Result<u32, u32> = Err(13);\nassert_eq!(x.map_err(stringify), Err(\"error code: 13\".to_string()));
\n
1.76.0 · source

pub fn inspect<F>(self, f: F) -> Result<T, E>
where\n F: FnOnce(&T),

Calls a function with a reference to the contained value if Ok.

\n

Returns the original result.

\n
§Examples
\n
let x: u8 = \"4\"\n    .parse::<u8>()\n    .inspect(|x| println!(\"original: {x}\"))\n    .map(|x| x.pow(3))\n    .expect(\"failed to parse number\");
\n
1.76.0 · source

pub fn inspect_err<F>(self, f: F) -> Result<T, E>
where\n F: FnOnce(&E),

Calls a function with a reference to the contained value if Err.

\n

Returns the original result.

\n
§Examples
\n
use std::{fs, io};\n\nfn read() -> io::Result<String> {\n    fs::read_to_string(\"address.txt\")\n        .inspect_err(|e| eprintln!(\"failed to read file: {e}\"))\n}
\n
1.47.0 · source

pub fn as_deref(&self) -> Result<&<T as Deref>::Target, &E>
where\n T: Deref,

Converts from Result<T, E> (or &Result<T, E>) to Result<&<T as Deref>::Target, &E>.

\n

Coerces the Ok variant of the original Result via Deref\nand returns the new Result.

\n
§Examples
\n
let x: Result<String, u32> = Ok(\"hello\".to_string());\nlet y: Result<&str, &u32> = Ok(\"hello\");\nassert_eq!(x.as_deref(), y);\n\nlet x: Result<String, u32> = Err(42);\nlet y: Result<&str, &u32> = Err(&42);\nassert_eq!(x.as_deref(), y);
\n
1.47.0 · source

pub fn as_deref_mut(&mut self) -> Result<&mut <T as Deref>::Target, &mut E>
where\n T: DerefMut,

Converts from Result<T, E> (or &mut Result<T, E>) to Result<&mut <T as DerefMut>::Target, &mut E>.

\n

Coerces the Ok variant of the original Result via DerefMut\nand returns the new Result.

\n
§Examples
\n
let mut s = \"HELLO\".to_string();\nlet mut x: Result<String, u32> = Ok(\"hello\".to_string());\nlet y: Result<&mut str, &mut u32> = Ok(&mut s);\nassert_eq!(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);\n\nlet mut i = 42;\nlet mut x: Result<String, u32> = Err(42);\nlet y: Result<&mut str, &mut u32> = Err(&mut i);\nassert_eq!(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);
\n
1.0.0 · source

pub fn iter(&self) -> Iter<'_, T>

Returns an iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(7);\nassert_eq!(x.iter().next(), Some(&7));\n\nlet x: Result<u32, &str> = Err(\"nothing!\");\nassert_eq!(x.iter().next(), None);
\n
1.0.0 · source

pub fn iter_mut(&mut self) -> IterMut<'_, T>

Returns a mutable iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
§Examples
\n
let mut x: Result<u32, &str> = Ok(7);\nmatch x.iter_mut().next() {\n    Some(v) => *v = 40,\n    None => {},\n}\nassert_eq!(x, Ok(40));\n\nlet mut x: Result<u32, &str> = Err(\"nothing!\");\nassert_eq!(x.iter_mut().next(), None);
\n
1.4.0 · source

pub fn expect(self, msg: &str) -> T
where\n E: Debug,

Returns the contained Ok value, consuming the self value.

\n

Because this function may panic, its use is generally discouraged.\nInstead, prefer to use pattern matching and handle the Err\ncase explicitly, or call unwrap_or, unwrap_or_else, or\nunwrap_or_default.

\n
§Panics
\n

Panics if the value is an Err, with a panic message including the\npassed message, and the content of the Err.

\n
§Examples
\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nx.expect(\"Testing expect\"); // panics with `Testing expect: emergency failure`
\n
§Recommended Message Style
\n

We recommend that expect messages are used to describe the reason you\nexpect the Result should be Ok.

\n\n
let path = std::env::var(\"IMPORTANT_PATH\")\n    .expect(\"env variable `IMPORTANT_PATH` should be set by `wrapper_script.sh`\");
\n

Hint: If you’re having trouble remembering how to phrase expect\nerror messages remember to focus on the word “should” as in “env\nvariable should be set by blah” or “the given binary should be available\nand executable by the current user”.

\n

For more detail on expect message styles and the reasoning behind our recommendation please\nrefer to the section on “Common Message\nStyles” in the\nstd::error module docs.

\n
1.0.0 · source

pub fn unwrap(self) -> T
where\n E: Debug,

Returns the contained Ok value, consuming the self value.

\n

Because this function may panic, its use is generally discouraged.\nInstead, prefer to use pattern matching and handle the Err\ncase explicitly, or call unwrap_or, unwrap_or_else, or\nunwrap_or_default.

\n
§Panics
\n

Panics if the value is an Err, with a panic message provided by the\nErr’s value.

\n
§Examples
\n

Basic usage:

\n\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.unwrap(), 2);
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nx.unwrap(); // panics with `emergency failure`
\n
1.16.0 · source

pub fn unwrap_or_default(self) -> T
where\n T: Default,

Returns the contained Ok value or a default

\n

Consumes the self argument then, if Ok, returns the contained\nvalue, otherwise if Err, returns the default value for that\ntype.

\n
§Examples
\n

Converts a string to an integer, turning poorly-formed strings\ninto 0 (the default value for integers). parse converts\na string to any other type that implements FromStr, returning an\nErr on error.

\n\n
let good_year_from_input = \"1909\";\nlet bad_year_from_input = \"190blarg\";\nlet good_year = good_year_from_input.parse().unwrap_or_default();\nlet bad_year = bad_year_from_input.parse().unwrap_or_default();\n\nassert_eq!(1909, good_year);\nassert_eq!(0, bad_year);
\n
1.17.0 · source

pub fn expect_err(self, msg: &str) -> E
where\n T: Debug,

Returns the contained Err value, consuming the self value.

\n
§Panics
\n

Panics if the value is an Ok, with a panic message including the\npassed message, and the content of the Ok.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(10);\nx.expect_err(\"Testing expect_err\"); // panics with `Testing expect_err: 10`
\n
1.0.0 · source

pub fn unwrap_err(self) -> E
where\n T: Debug,

Returns the contained Err value, consuming the self value.

\n
§Panics
\n

Panics if the value is an Ok, with a custom panic message provided\nby the Ok’s value.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nx.unwrap_err(); // panics with `2`
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nassert_eq!(x.unwrap_err(), \"emergency failure\");
\n
source

pub fn into_ok(self) -> T
where\n E: Into<!>,

🔬This is a nightly-only experimental API. (unwrap_infallible)

Returns the contained Ok value, but never panics.

\n

Unlike unwrap, this method is known to never panic on the\nresult types it is implemented for. Therefore, it can be used\ninstead of unwrap as a maintainability safeguard that will fail\nto compile if the error type of the Result is later changed\nto an error that can actually occur.

\n
§Examples
\n
\nfn only_good_news() -> Result<String, !> {\n    Ok(\"this is fine\".into())\n}\n\nlet s: String = only_good_news().into_ok();\nprintln!(\"{s}\");
\n
source

pub fn into_err(self) -> E
where\n T: Into<!>,

🔬This is a nightly-only experimental API. (unwrap_infallible)

Returns the contained Err value, but never panics.

\n

Unlike unwrap_err, this method is known to never panic on the\nresult types it is implemented for. Therefore, it can be used\ninstead of unwrap_err as a maintainability safeguard that will fail\nto compile if the ok type of the Result is later changed\nto a type that can actually occur.

\n
§Examples
\n
\nfn only_bad_news() -> Result<!, String> {\n    Err(\"Oops, it failed\".into())\n}\n\nlet error: String = only_bad_news().into_err();\nprintln!(\"{error}\");
\n
1.0.0 · source

pub fn and<U>(self, res: Result<U, E>) -> Result<U, E>

Returns res if the result is Ok, otherwise returns the Err value of self.

\n

Arguments passed to and are eagerly evaluated; if you are passing the\nresult of a function call, it is recommended to use and_then, which is\nlazily evaluated.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nlet y: Result<&str, &str> = Err(\"late error\");\nassert_eq!(x.and(y), Err(\"late error\"));\n\nlet x: Result<u32, &str> = Err(\"early error\");\nlet y: Result<&str, &str> = Ok(\"foo\");\nassert_eq!(x.and(y), Err(\"early error\"));\n\nlet x: Result<u32, &str> = Err(\"not a 2\");\nlet y: Result<&str, &str> = Err(\"late error\");\nassert_eq!(x.and(y), Err(\"not a 2\"));\n\nlet x: Result<u32, &str> = Ok(2);\nlet y: Result<&str, &str> = Ok(\"different result type\");\nassert_eq!(x.and(y), Ok(\"different result type\"));
\n
1.0.0 · source

pub fn and_then<U, F>(self, op: F) -> Result<U, E>
where\n F: FnOnce(T) -> Result<U, E>,

Calls op if the result is Ok, otherwise returns the Err value of self.

\n

This function can be used for control flow based on Result values.

\n
§Examples
\n
fn sq_then_to_string(x: u32) -> Result<String, &'static str> {\n    x.checked_mul(x).map(|sq| sq.to_string()).ok_or(\"overflowed\")\n}\n\nassert_eq!(Ok(2).and_then(sq_then_to_string), Ok(4.to_string()));\nassert_eq!(Ok(1_000_000).and_then(sq_then_to_string), Err(\"overflowed\"));\nassert_eq!(Err(\"not a number\").and_then(sq_then_to_string), Err(\"not a number\"));
\n

Often used to chain fallible operations that may return Err.

\n\n
use std::{io::ErrorKind, path::Path};\n\n// Note: on Windows \"/\" maps to \"C:\\\"\nlet root_modified_time = Path::new(\"/\").metadata().and_then(|md| md.modified());\nassert!(root_modified_time.is_ok());\n\nlet should_fail = Path::new(\"/bad/path\").metadata().and_then(|md| md.modified());\nassert!(should_fail.is_err());\nassert_eq!(should_fail.unwrap_err().kind(), ErrorKind::NotFound);
\n
1.0.0 · source

pub fn or<F>(self, res: Result<T, F>) -> Result<T, F>

Returns res if the result is Err, otherwise returns the Ok value of self.

\n

Arguments passed to or are eagerly evaluated; if you are passing the\nresult of a function call, it is recommended to use or_else, which is\nlazily evaluated.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nlet y: Result<u32, &str> = Err(\"late error\");\nassert_eq!(x.or(y), Ok(2));\n\nlet x: Result<u32, &str> = Err(\"early error\");\nlet y: Result<u32, &str> = Ok(2);\nassert_eq!(x.or(y), Ok(2));\n\nlet x: Result<u32, &str> = Err(\"not a 2\");\nlet y: Result<u32, &str> = Err(\"late error\");\nassert_eq!(x.or(y), Err(\"late error\"));\n\nlet x: Result<u32, &str> = Ok(2);\nlet y: Result<u32, &str> = Ok(100);\nassert_eq!(x.or(y), Ok(2));
\n
1.0.0 · source

pub fn or_else<F, O>(self, op: O) -> Result<T, F>
where\n O: FnOnce(E) -> Result<T, F>,

Calls op if the result is Err, otherwise returns the Ok value of self.

\n

This function can be used for control flow based on result values.

\n
§Examples
\n
fn sq(x: u32) -> Result<u32, u32> { Ok(x * x) }\nfn err(x: u32) -> Result<u32, u32> { Err(x) }\n\nassert_eq!(Ok(2).or_else(sq).or_else(sq), Ok(2));\nassert_eq!(Ok(2).or_else(err).or_else(sq), Ok(2));\nassert_eq!(Err(3).or_else(sq).or_else(err), Ok(9));\nassert_eq!(Err(3).or_else(err).or_else(err), Err(3));
\n
1.0.0 · source

pub fn unwrap_or(self, default: T) -> T

Returns the contained Ok value or a provided default.

\n

Arguments passed to unwrap_or are eagerly evaluated; if you are passing\nthe result of a function call, it is recommended to use unwrap_or_else,\nwhich is lazily evaluated.

\n
§Examples
\n
let default = 2;\nlet x: Result<u32, &str> = Ok(9);\nassert_eq!(x.unwrap_or(default), 9);\n\nlet x: Result<u32, &str> = Err(\"error\");\nassert_eq!(x.unwrap_or(default), default);
\n
1.0.0 · source

pub fn unwrap_or_else<F>(self, op: F) -> T
where\n F: FnOnce(E) -> T,

Returns the contained Ok value or computes it from a closure.

\n
§Examples
\n
fn count(x: &str) -> usize { x.len() }\n\nassert_eq!(Ok(2).unwrap_or_else(count), 2);\nassert_eq!(Err(\"foo\").unwrap_or_else(count), 3);
\n
1.58.0 · source

pub unsafe fn unwrap_unchecked(self) -> T

Returns the contained Ok value, consuming the self value,\nwithout checking that the value is not an Err.

\n
§Safety
\n

Calling this method on an Err is undefined behavior.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(unsafe { x.unwrap_unchecked() }, 2);
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nunsafe { x.unwrap_unchecked(); } // Undefined behavior!
\n
1.58.0 · source

pub unsafe fn unwrap_err_unchecked(self) -> E

Returns the contained Err value, consuming the self value,\nwithout checking that the value is not an Ok.

\n
§Safety
\n

Calling this method on an Ok is undefined behavior.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nunsafe { x.unwrap_err_unchecked() }; // Undefined behavior!
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nassert_eq!(unsafe { x.unwrap_err_unchecked() }, \"emergency failure\");
\n
",0,"cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
source§

impl<T, E> Serialize for Result<T, E>
where\n T: Serialize,\n E: Serialize,

source§

fn serialize<S>(\n &self,\n serializer: S,\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
1.16.0 · source§

impl<T, U, E> Sum<Result<U, E>> for Result<T, E>
where\n T: Sum<U>,

source§

fn sum<I>(iter: I) -> Result<T, E>
where\n I: Iterator<Item = Result<U, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err\noccur, the sum of all elements is returned.

\n
§Examples
\n

This sums up every integer in a vector, rejecting the sum if a negative\nelement is encountered:

\n\n
let f = |&x: &i32| if x < 0 { Err(\"Negative element found\") } else { Ok(x) };\nlet v = vec![1, 2];\nlet res: Result<i32, _> = v.iter().map(f).sum();\nassert_eq!(res, Ok(3));\nlet v = vec![1, -2];\nlet res: Result<i32, _> = v.iter().map(f).sum();\nassert_eq!(res, Err(\"Negative element found\"));
\n
","Sum>","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
§

impl<T, E> TapFallible for Result<T, E>

§

type Ok = T

The interior type used to indicate a successful construction.
§

type Err = E

The interior type used to indicate a failed construction.
§

fn tap_ok(self, func: impl FnOnce(&T)) -> Result<T, E>

Immutably accesses an interior success value. Read more
§

fn tap_ok_mut(self, func: impl FnOnce(&mut T)) -> Result<T, E>

Mutably accesses an interior success value. Read more
§

fn tap_err(self, func: impl FnOnce(&E)) -> Result<T, E>

Immutably accesses an interior failure value. Read more
§

fn tap_err_mut(self, func: impl FnOnce(&mut E)) -> Result<T, E>

Mutably accesses an interior failure value. Read more
§

fn tap_ok_dbg(self, func: impl FnOnce(&Self::Ok)) -> Self

Calls .tap_ok() only in debug builds, and is erased in release builds.
§

fn tap_ok_mut_dbg(self, func: impl FnOnce(&mut Self::Ok)) -> Self

Calls .tap_ok_mut() only in debug builds, and is erased in release\nbuilds.
§

fn tap_err_dbg(self, func: impl FnOnce(&Self::Err)) -> Self

Calls .tap_err() only in debug builds, and is erased in release\nbuilds.
§

fn tap_err_mut_dbg(self, func: impl FnOnce(&mut Self::Err)) -> Self

Calls .tap_err_mut() only in debug builds, and is erased in release\nbuilds.
","TapFallible","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
1.61.0 · source§

impl<T, E> Termination for Result<T, E>
where\n T: Termination,\n E: Debug,

source§

fn report(self) -> ExitCode

Is called to get the representation of the value as status code.\nThis status code is returned to the operating system.
","Termination","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
source§

impl<T, E> ToNativeAssertError<T> for Result<T, E>

","ToNativeAssertError","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
source§

impl<T, E> Try for Result<T, E>

source§

type Output = T

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value produced by ? when not short-circuiting.
source§

type Residual = Result<Infallible, E>

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value passed to FromResidual::from_residual\nas part of ? when short-circuiting. Read more
source§

fn from_output(output: <Result<T, E> as Try>::Output) -> Result<T, E>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from its Output type. Read more
source§

fn branch(\n self,\n) -> ControlFlow<<Result<T, E> as Try>::Residual, <Result<T, E> as Try>::Output>

🔬This is a nightly-only experimental API. (try_trait_v2)
Used in ? to decide whether the operator should produce a value\n(because this returned ControlFlow::Continue)\nor propagate a value back to the caller\n(because this returned ControlFlow::Break). Read more
","Try","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
1.0.0 · source§

impl<T, E> Copy for Result<T, E>
where\n T: Copy,\n E: Copy,

","Copy","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
1.0.0 · source§

impl<T, E> Eq for Result<T, E>
where\n T: Eq,\n E: Eq,

","Eq","cairo_native::error::Result","cairo_native::starknet::SyscallResult"],["
1.0.0 · source§

impl<T, E> StructuralPartialEq for Result<T, E>

","StructuralPartialEq","cairo_native::error::Result","cairo_native::starknet::SyscallResult"]]]]); if (window.register_type_impls) { window.register_type_impls(type_impls); } else {