pub struct ManagedVec<M, T>where
M: ManagedTypeApi,
T: ManagedVecItem,{ /* private fields */ }
Expand description
A list of items that lives inside a managed buffer.
Items can be either stored there in full (e.g. u32
),
or just via handle (e.g. BigUint<M>
).
Implementations§
Source§impl<M> ManagedVec<M, EsdtTokenPayment<M>>where
M: ManagedTypeApi,
impl<M> ManagedVec<M, EsdtTokenPayment<M>>where
M: ManagedTypeApi,
Sourcepub fn as_multi_egld_or_esdt_payment(
&self,
) -> &ManagedVec<M, EgldOrEsdtTokenPayment<M>>
pub fn as_multi_egld_or_esdt_payment( &self, ) -> &ManagedVec<M, EgldOrEsdtTokenPayment<M>>
Zero-cost conversion that loosens the EGLD restriction.
It is always safe to do, since the 2 types are guaranteed to have the same layout.
Sourcepub fn into_multi_egld_or_esdt_payment(
self,
) -> ManagedVec<M, EgldOrEsdtTokenPayment<M>>
pub fn into_multi_egld_or_esdt_payment( self, ) -> ManagedVec<M, EgldOrEsdtTokenPayment<M>>
Zero-cost conversion that loosens the EGLD restriction.
It is always safe to do, since the 2 types are guaranteed to have the same layout.
Source§impl<M, T> ManagedVec<M, T>where
M: ManagedTypeApi,
T: ManagedVecItem,
impl<M, T> ManagedVec<M, T>where
M: ManagedTypeApi,
T: ManagedVecItem,
pub fn new() -> ManagedVec<M, T>
Source§impl<M, T> ManagedVec<M, T>where
M: ManagedTypeApi,
T: ManagedVecItem,
impl<M, T> ManagedVec<M, T>where
M: ManagedTypeApi,
T: ManagedVecItem,
pub fn is_empty(&self) -> bool
pub fn try_get(&self, index: usize) -> Option<<T as ManagedVecItem>::Ref<'_>>
Sourcepub fn to_array_of_refs<const N: usize>(
&self,
) -> Option<[<T as ManagedVecItem>::Ref<'_>; N]>
pub fn to_array_of_refs<const N: usize>( &self, ) -> Option<[<T as ManagedVecItem>::Ref<'_>; N]>
Extracts all elements to an array, if the length matches exactly.
The resulting array contains mere references to the items, as defined in ManagedVecItem
.
Sourcepub fn get(&self, index: usize) -> <T as ManagedVecItem>::Ref<'_>
pub fn get(&self, index: usize) -> <T as ManagedVecItem>::Ref<'_>
Retrieves element at index, if the index is valid. Otherwise, signals an error and terminates execution.
Sourcepub fn is_single_item(&self) -> Option<<T as ManagedVecItem>::Ref<'_>>
pub fn is_single_item(&self) -> Option<<T as ManagedVecItem>::Ref<'_>>
If it contains precisely one item, will return Some
with a reference to that item.
Will return None
for zero or more than one item.
pub fn get_mut(&mut self, index: usize) -> ManagedVecRefMut<'_, M, T>
pub fn set(&mut self, index: usize, item: T) -> Result<(), InvalidSliceError>
Sourcepub fn slice(
&self,
start_index: usize,
end_index: usize,
) -> Option<ManagedVec<M, T>>
pub fn slice( &self, start_index: usize, end_index: usize, ) -> Option<ManagedVec<M, T>>
Returns a new ManagedVec
, containing the [start_index, end_index) range of elements.
Returns None
if any index is out of range
pub fn push(&mut self, item: T)
pub fn remove(&mut self, index: usize)
pub fn take(&mut self, index: usize) -> T
Sourcepub fn from_single_item(item: T) -> ManagedVec<M, T>
pub fn from_single_item(item: T) -> ManagedVec<M, T>
New ManagedVec
instance with 1 element in it.
pub fn overwrite_with_single_item(&mut self, item: T)
Sourcepub fn append_vec(&mut self, item: ManagedVec<M, T>)
pub fn append_vec(&mut self, item: ManagedVec<M, T>)
Appends all the contents of another managed vec at the end of the current one. Consumes the other vec in the process.
pub fn into_vec(self) -> Vec<T>
Sourcepub fn with_self_as_vec<R, F>(&mut self, f: F) -> R
pub fn with_self_as_vec<R, F>(&mut self, f: F) -> R
Temporarily converts self to a Vec<T>
.
All operations performed on the temporary vector get saved back to the underlying buffer.
pub fn iter(&self) -> ManagedVecRefIterator<'_, M, T> ⓘ
Sourcepub fn as_multi(&self) -> &MultiValueManagedVec<M, T>
pub fn as_multi(&self) -> &MultiValueManagedVec<M, T>
Creates a reference to and identical object, but one which behaves like a multi-value-vec.
Source§impl<M, T> ManagedVec<M, T>
impl<M, T> ManagedVec<M, T>
pub fn sort(&mut self)
sort_unstable
instead.pub fn sort_by<F>(&mut self, compare: F)
sort_unstable_by
instead.pub fn sort_by_key<K, F>(&mut self, f: F)
sort_unstable_by_key
instead.pub fn sort_by_cached_key<K, F>(&mut self, f: F)
pub fn sort_unstable(&mut self)
pub fn sort_unstable_by<F>(&mut self, compare: F)
pub fn sort_unstable_by_key<K, F>(&mut self, f: F)
pub fn is_sorted(&self) -> bool
Source§impl<M, T> ManagedVec<M, T>
impl<M, T> ManagedVec<M, T>
Trait Implementations§
Source§impl<M, T> Clone for ManagedVec<M, T>
impl<M, T> Clone for ManagedVec<M, T>
Source§fn clone(&self) -> ManagedVec<M, T>
fn clone(&self) -> ManagedVec<M, T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<M, T> Debug for ManagedVec<M, T>
impl<M, T> Debug for ManagedVec<M, T>
Source§impl<M, T> Default for ManagedVec<M, T>where
M: ManagedTypeApi,
T: ManagedVecItem,
impl<M, T> Default for ManagedVec<M, T>where
M: ManagedTypeApi,
T: ManagedVecItem,
Source§fn default() -> ManagedVec<M, T>
fn default() -> ManagedVec<M, T>
Source§impl<M, V> Extend<V> for ManagedVec<M, V>where
M: ManagedTypeApi,
V: ManagedVecItem,
impl<M, V> Extend<V> for ManagedVec<M, V>where
M: ManagedTypeApi,
V: ManagedVecItem,
Source§fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = V>,
fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = V>,
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Source§impl<M> From<()> for ManagedVec<M, EsdtTokenPayment<M>>where
M: ManagedTypeApi,
impl<M> From<()> for ManagedVec<M, EsdtTokenPayment<M>>where
M: ManagedTypeApi,
Source§fn from(_value: ()) -> ManagedVec<M, EsdtTokenPayment<M>>
fn from(_value: ()) -> ManagedVec<M, EsdtTokenPayment<M>>
Source§impl<M> From<(TokenIdentifier<M>, u64, BigUint<M>)> for ManagedVec<M, EsdtTokenPayment<M>>where
M: ManagedTypeApi,
impl<M> From<(TokenIdentifier<M>, u64, BigUint<M>)> for ManagedVec<M, EsdtTokenPayment<M>>where
M: ManagedTypeApi,
Source§fn from(
value: (TokenIdentifier<M>, u64, BigUint<M>),
) -> ManagedVec<M, EsdtTokenPayment<M>>
fn from( value: (TokenIdentifier<M>, u64, BigUint<M>), ) -> ManagedVec<M, EsdtTokenPayment<M>>
Source§impl<M> From<EsdtTokenPayment<M>> for ManagedVec<M, EsdtTokenPayment<M>>where
M: ManagedTypeApi,
impl<M> From<EsdtTokenPayment<M>> for ManagedVec<M, EsdtTokenPayment<M>>where
M: ManagedTypeApi,
Source§fn from(value: EsdtTokenPayment<M>) -> ManagedVec<M, EsdtTokenPayment<M>>
fn from(value: EsdtTokenPayment<M>) -> ManagedVec<M, EsdtTokenPayment<M>>
Source§impl<M> From<ManagedVec<M, ManagedBuffer<M>>> for ManagedArgBuffer<M>where
M: ManagedTypeApi,
impl<M> From<ManagedVec<M, ManagedBuffer<M>>> for ManagedArgBuffer<M>where
M: ManagedTypeApi,
Source§fn from(data: ManagedVec<M, ManagedBuffer<M>>) -> ManagedArgBuffer<M>
fn from(data: ManagedVec<M, ManagedBuffer<M>>) -> ManagedArgBuffer<M>
Source§impl<M, T> From<ManagedVec<M, T>> for MultiValueEncoded<M, T>
impl<M, T> From<ManagedVec<M, T>> for MultiValueEncoded<M, T>
Source§fn from(v: ManagedVec<M, T>) -> MultiValueEncoded<M, T>
fn from(v: ManagedVec<M, T>) -> MultiValueEncoded<M, T>
Source§impl<M, T> From<ManagedVec<M, T>> for MultiValueManagedVec<M, T>where
M: ManagedTypeApi,
T: ManagedVecItem,
impl<M, T> From<ManagedVec<M, T>> for MultiValueManagedVec<M, T>where
M: ManagedTypeApi,
T: ManagedVecItem,
Source§fn from(managed_vec: ManagedVec<M, T>) -> MultiValueManagedVec<M, T>
fn from(managed_vec: ManagedVec<M, T>) -> MultiValueManagedVec<M, T>
Source§impl<M, T> From<ManagedVec<M, T>> for MultiValueManagedVecCounted<M, T>where
M: ManagedTypeApi,
T: ManagedVecItem,
impl<M, T> From<ManagedVec<M, T>> for MultiValueManagedVecCounted<M, T>where
M: ManagedTypeApi,
T: ManagedVecItem,
Source§fn from(v: ManagedVec<M, T>) -> MultiValueManagedVecCounted<M, T>
fn from(v: ManagedVec<M, T>) -> MultiValueManagedVecCounted<M, T>
Source§impl<M, T, I> From<Vec<I>> for ManagedVec<M, T>
impl<M, T, I> From<Vec<I>> for ManagedVec<M, T>
Source§fn from(v: Vec<I>) -> ManagedVec<M, T>
fn from(v: Vec<I>) -> ManagedVec<M, T>
Source§impl<M, V> FromIterator<V> for ManagedVec<M, V>where
M: ManagedTypeApi,
V: ManagedVecItem,
impl<M, V> FromIterator<V> for ManagedVec<M, V>where
M: ManagedTypeApi,
V: ManagedVecItem,
Source§fn from_iter<T>(iter: T) -> ManagedVec<M, V>where
T: IntoIterator<Item = V>,
fn from_iter<T>(iter: T) -> ManagedVec<M, V>where
T: IntoIterator<Item = V>,
Source§impl<'a, M, T> IntoIterator for &'a ManagedVec<M, T>where
M: ManagedTypeApi,
T: ManagedVecItem,
impl<'a, M, T> IntoIterator for &'a ManagedVec<M, T>where
M: ManagedTypeApi,
T: ManagedVecItem,
Source§type Item = <T as ManagedVecItem>::Ref<'a>
type Item = <T as ManagedVecItem>::Ref<'a>
Source§type IntoIter = ManagedVecRefIterator<'a, M, T>
type IntoIter = ManagedVecRefIterator<'a, M, T>
Source§fn into_iter(self) -> <&'a ManagedVec<M, T> as IntoIterator>::IntoIter
fn into_iter(self) -> <&'a ManagedVec<M, T> as IntoIterator>::IntoIter
Source§impl<M, T> IntoIterator for ManagedVec<M, T>where
M: ManagedTypeApi,
T: ManagedVecItem,
impl<M, T> IntoIterator for ManagedVec<M, T>where
M: ManagedTypeApi,
T: ManagedVecItem,
Source§type IntoIter = ManagedVecOwnedIterator<M, T>
type IntoIter = ManagedVecOwnedIterator<M, T>
Source§fn into_iter(self) -> <ManagedVec<M, T> as IntoIterator>::IntoIter
fn into_iter(self) -> <ManagedVec<M, T> as IntoIterator>::IntoIter
Source§impl<M, T> IntoMultiValue for ManagedVec<M, T>
impl<M, T> IntoMultiValue for ManagedVec<M, T>
type MultiValue = MultiValueEncoded<M, <T as IntoMultiValue>::MultiValue>
fn into_multi_value(self) -> <ManagedVec<M, T> as IntoMultiValue>::MultiValue
Source§impl<M, T> ManagedType<M> for ManagedVec<M, T>where
M: ManagedTypeApi,
T: ManagedVecItem,
impl<M, T> ManagedType<M> for ManagedVec<M, T>where
M: ManagedTypeApi,
T: ManagedVecItem,
type OwnHandle = <M as HandleTypeInfo>::ManagedBufferHandle
fn get_handle(&self) -> <M as HandleTypeInfo>::ManagedBufferHandle
Source§unsafe fn forget_into_handle(
self,
) -> <ManagedVec<M, T> as ManagedType<M>>::OwnHandle
unsafe fn forget_into_handle( self, ) -> <ManagedVec<M, T> as ManagedType<M>>::OwnHandle
Source§fn transmute_from_handle_ref(
handle_ref: &<M as HandleTypeInfo>::ManagedBufferHandle,
) -> &ManagedVec<M, T>
fn transmute_from_handle_ref( handle_ref: &<M as HandleTypeInfo>::ManagedBufferHandle, ) -> &ManagedVec<M, T>
fn transmute_from_handle_ref_mut( handle_ref: &mut <M as HandleTypeInfo>::ManagedBufferHandle, ) -> &mut ManagedVec<M, T>
fn get_raw_handle(&self) -> i32
fn as_ref(&self) -> ManagedRef<'_, M, Self>
Source§impl<M, T> ManagedVecItem for ManagedVec<M, T>where
M: ManagedTypeApi,
T: ManagedVecItem,
impl<M, T> ManagedVecItem for ManagedVec<M, T>where
M: ManagedTypeApi,
T: ManagedVecItem,
Source§const SKIPS_RESERIALIZATION: bool = false
const SKIPS_RESERIALIZATION: bool = false
u32
).Source§type PAYLOAD = ManagedVecItemPayloadBuffer<4>
type PAYLOAD = ManagedVecItemPayloadBuffer<4>
Source§type Ref<'a> = ManagedRef<'a, M, ManagedVec<M, T>>
type Ref<'a> = ManagedRef<'a, M, ManagedVec<M, T>>
Source§fn read_from_payload(
payload: &<ManagedVec<M, T> as ManagedVecItem>::PAYLOAD,
) -> ManagedVec<M, T>
fn read_from_payload( payload: &<ManagedVec<M, T> as ManagedVecItem>::PAYLOAD, ) -> ManagedVec<M, T>
Source§unsafe fn borrow_from_payload<'a>(
payload: &<ManagedVec<M, T> as ManagedVecItem>::PAYLOAD,
) -> <ManagedVec<M, T> as ManagedVecItem>::Ref<'a>
unsafe fn borrow_from_payload<'a>( payload: &<ManagedVec<M, T> as ManagedVecItem>::PAYLOAD, ) -> <ManagedVec<M, T> as ManagedVecItem>::Ref<'a>
Source§fn save_to_payload(
self,
payload: &mut <ManagedVec<M, T> as ManagedVecItem>::PAYLOAD,
)
fn save_to_payload( self, payload: &mut <ManagedVec<M, T> as ManagedVecItem>::PAYLOAD, )
fn payload_size() -> usize
Source§impl<M, T> NestedDecode for ManagedVec<M, T>
impl<M, T> NestedDecode for ManagedVec<M, T>
Source§fn dep_decode_or_handle_err<I, H>(
input: &mut I,
h: H,
) -> Result<ManagedVec<M, T>, <H as DecodeErrorHandler>::HandledErr>where
I: NestedDecodeInput,
H: DecodeErrorHandler,
fn dep_decode_or_handle_err<I, H>(
input: &mut I,
h: H,
) -> Result<ManagedVec<M, T>, <H as DecodeErrorHandler>::HandledErr>where
I: NestedDecodeInput,
H: DecodeErrorHandler,
dep_decode
that can handle errors as soon as they occur.
For instance in can exit immediately and make sure that if it returns, it is a success.
By not deferring error handling, this can lead to somewhat smaller bytecode.Source§fn dep_decode<I>(input: &mut I) -> Result<Self, DecodeError>where
I: NestedDecodeInput,
fn dep_decode<I>(input: &mut I) -> Result<Self, DecodeError>where
I: NestedDecodeInput,
Source§impl<M, T> NestedEncode for ManagedVec<M, T>
impl<M, T> NestedEncode for ManagedVec<M, T>
Source§fn dep_encode_or_handle_err<O, H>(
&self,
dest: &mut O,
h: H,
) -> Result<(), <H as EncodeErrorHandler>::HandledErr>where
O: NestedEncodeOutput,
H: EncodeErrorHandler,
fn dep_encode_or_handle_err<O, H>(
&self,
dest: &mut O,
h: H,
) -> Result<(), <H as EncodeErrorHandler>::HandledErr>where
O: NestedEncodeOutput,
H: EncodeErrorHandler,
dep_encode
that can handle errors as soon as they occur.
For instance in can exit immediately and make sure that if it returns, it is a success.
By not deferring error handling, this can lead to somewhat smaller bytecode.Source§fn dep_encode<O>(&self, dest: &mut O) -> Result<(), EncodeError>where
O: NestedEncodeOutput,
fn dep_encode<O>(&self, dest: &mut O) -> Result<(), EncodeError>where
O: NestedEncodeOutput,
Source§impl<M, T> PartialEq for ManagedVec<M, T>
impl<M, T> PartialEq for ManagedVec<M, T>
Source§impl<M, T> TopDecode for ManagedVec<M, T>
impl<M, T> TopDecode for ManagedVec<M, T>
Source§fn top_decode_or_handle_err<I, H>(
input: I,
h: H,
) -> Result<ManagedVec<M, T>, <H as DecodeErrorHandler>::HandledErr>where
I: TopDecodeInput,
H: DecodeErrorHandler,
fn top_decode_or_handle_err<I, H>(
input: I,
h: H,
) -> Result<ManagedVec<M, T>, <H as DecodeErrorHandler>::HandledErr>where
I: TopDecodeInput,
H: DecodeErrorHandler,
top_decode
that can handle errors as soon as they occur.
For instance it can exit immediately and make sure that if it returns, it is a success.
By not deferring error handling, this can lead to somewhat smaller bytecode.Source§fn top_decode<I>(input: I) -> Result<Self, DecodeError>where
I: TopDecodeInput,
fn top_decode<I>(input: I) -> Result<Self, DecodeError>where
I: TopDecodeInput,
Source§impl<M, T> TopEncode for ManagedVec<M, T>
impl<M, T> TopEncode for ManagedVec<M, T>
Source§fn top_encode_or_handle_err<O, H>(
&self,
output: O,
h: H,
) -> Result<(), <H as EncodeErrorHandler>::HandledErr>where
O: TopEncodeOutput,
H: EncodeErrorHandler,
fn top_encode_or_handle_err<O, H>(
&self,
output: O,
h: H,
) -> Result<(), <H as EncodeErrorHandler>::HandledErr>where
O: TopEncodeOutput,
H: EncodeErrorHandler,
top_encode
that can handle errors as soon as they occur.
For instance in can exit immediately and make sure that if it returns, it is a success.
By not deferring error handling, this can lead to somewhat smaller bytecode.Source§fn top_encode<O>(&self, output: O) -> Result<(), EncodeError>where
O: TopEncodeOutput,
fn top_encode<O>(&self, output: O) -> Result<(), EncodeError>where
O: TopEncodeOutput,
Source§impl<M> TopEncodeMultiOutput for ManagedVec<M, ManagedBuffer<M>>where
M: ManagedTypeApi,
impl<M> TopEncodeMultiOutput for ManagedVec<M, ManagedBuffer<M>>where
M: ManagedTypeApi,
fn push_single_value<T, H>(
&mut self,
arg: &T,
h: H,
) -> Result<(), <H as EncodeErrorHandler>::HandledErr>where
T: TopEncode,
H: EncodeErrorHandler,
Source§fn push_multi_specialized<T, H>(
&mut self,
_arg: &T,
h: H,
) -> Result<(), <H as EncodeErrorHandler>::HandledErr>where
T: TryStaticCast,
H: EncodeErrorHandler,
fn push_multi_specialized<T, H>(
&mut self,
_arg: &T,
h: H,
) -> Result<(), <H as EncodeErrorHandler>::HandledErr>where
T: TryStaticCast,
H: EncodeErrorHandler,
Source§impl<Env> TxPayment<Env> for &ManagedVec<<Env as TxEnv>::Api, EgldOrEsdtTokenPayment<<Env as TxEnv>::Api>>where
Env: TxEnv,
impl<Env> TxPayment<Env> for &ManagedVec<<Env as TxEnv>::Api, EgldOrEsdtTokenPayment<<Env as TxEnv>::Api>>where
Env: TxEnv,
Source§fn is_no_payment(&self, _env: &Env) -> bool
fn is_no_payment(&self, _env: &Env) -> bool
Source§fn perform_transfer_execute(
self,
_env: &Env,
to: &ManagedAddress<<Env as TxEnv>::Api>,
gas_limit: u64,
fc: FunctionCall<<Env as TxEnv>::Api>,
)
fn perform_transfer_execute( self, _env: &Env, to: &ManagedAddress<<Env as TxEnv>::Api>, gas_limit: u64, fc: FunctionCall<<Env as TxEnv>::Api>, )
Source§fn with_normalized<From, To, F, R>(
self,
env: &Env,
from: &From,
to: To,
fc: FunctionCall<<Env as TxEnv>::Api>,
f: F,
) -> Rwhere
From: TxFrom<Env>,
To: TxToSpecified<Env>,
F: FnOnce(&ManagedAddress<<Env as TxEnv>::Api>, &BigUint<<Env as TxEnv>::Api>, FunctionCall<<Env as TxEnv>::Api>) -> R,
fn with_normalized<From, To, F, R>(
self,
env: &Env,
from: &From,
to: To,
fc: FunctionCall<<Env as TxEnv>::Api>,
f: F,
) -> Rwhere
From: TxFrom<Env>,
To: TxToSpecified<Env>,
F: FnOnce(&ManagedAddress<<Env as TxEnv>::Api>, &BigUint<<Env as TxEnv>::Api>, FunctionCall<<Env as TxEnv>::Api>) -> R,
Source§fn into_full_payment_data(
self,
_env: &Env,
) -> FullPaymentData<<Env as TxEnv>::Api>
fn into_full_payment_data( self, _env: &Env, ) -> FullPaymentData<<Env as TxEnv>::Api>
Source§impl<Env> TxPayment<Env> for &ManagedVec<<Env as TxEnv>::Api, EsdtTokenPayment<<Env as TxEnv>::Api>>where
Env: TxEnv,
impl<Env> TxPayment<Env> for &ManagedVec<<Env as TxEnv>::Api, EsdtTokenPayment<<Env as TxEnv>::Api>>where
Env: TxEnv,
Source§fn is_no_payment(&self, _env: &Env) -> bool
fn is_no_payment(&self, _env: &Env) -> bool
Source§fn perform_transfer_execute(
self,
_env: &Env,
to: &ManagedAddress<<Env as TxEnv>::Api>,
gas_limit: u64,
fc: FunctionCall<<Env as TxEnv>::Api>,
)
fn perform_transfer_execute( self, _env: &Env, to: &ManagedAddress<<Env as TxEnv>::Api>, gas_limit: u64, fc: FunctionCall<<Env as TxEnv>::Api>, )
Source§fn with_normalized<From, To, F, R>(
self,
env: &Env,
from: &From,
to: To,
fc: FunctionCall<<Env as TxEnv>::Api>,
f: F,
) -> Rwhere
From: TxFrom<Env>,
To: TxToSpecified<Env>,
F: FnOnce(&ManagedAddress<<Env as TxEnv>::Api>, &BigUint<<Env as TxEnv>::Api>, FunctionCall<<Env as TxEnv>::Api>) -> R,
fn with_normalized<From, To, F, R>(
self,
env: &Env,
from: &From,
to: To,
fc: FunctionCall<<Env as TxEnv>::Api>,
f: F,
) -> Rwhere
From: TxFrom<Env>,
To: TxToSpecified<Env>,
F: FnOnce(&ManagedAddress<<Env as TxEnv>::Api>, &BigUint<<Env as TxEnv>::Api>, FunctionCall<<Env as TxEnv>::Api>) -> R,
Source§fn into_full_payment_data(
self,
_env: &Env,
) -> FullPaymentData<<Env as TxEnv>::Api>
fn into_full_payment_data( self, _env: &Env, ) -> FullPaymentData<<Env as TxEnv>::Api>
Source§impl<Env> TxPayment<Env> for ManagedVec<<Env as TxEnv>::Api, EgldOrEsdtTokenPayment<<Env as TxEnv>::Api>>where
Env: TxEnv,
impl<Env> TxPayment<Env> for ManagedVec<<Env as TxEnv>::Api, EgldOrEsdtTokenPayment<<Env as TxEnv>::Api>>where
Env: TxEnv,
Source§fn is_no_payment(&self, _env: &Env) -> bool
fn is_no_payment(&self, _env: &Env) -> bool
Source§fn perform_transfer_execute(
self,
env: &Env,
to: &ManagedAddress<<Env as TxEnv>::Api>,
gas_limit: u64,
fc: FunctionCall<<Env as TxEnv>::Api>,
)
fn perform_transfer_execute( self, env: &Env, to: &ManagedAddress<<Env as TxEnv>::Api>, gas_limit: u64, fc: FunctionCall<<Env as TxEnv>::Api>, )
Source§fn with_normalized<From, To, F, R>(
self,
env: &Env,
from: &From,
to: To,
fc: FunctionCall<<Env as TxEnv>::Api>,
f: F,
) -> Rwhere
From: TxFrom<Env>,
To: TxToSpecified<Env>,
F: FnOnce(&ManagedAddress<<Env as TxEnv>::Api>, &BigUint<<Env as TxEnv>::Api>, FunctionCall<<Env as TxEnv>::Api>) -> R,
fn with_normalized<From, To, F, R>(
self,
env: &Env,
from: &From,
to: To,
fc: FunctionCall<<Env as TxEnv>::Api>,
f: F,
) -> Rwhere
From: TxFrom<Env>,
To: TxToSpecified<Env>,
F: FnOnce(&ManagedAddress<<Env as TxEnv>::Api>, &BigUint<<Env as TxEnv>::Api>, FunctionCall<<Env as TxEnv>::Api>) -> R,
Source§fn into_full_payment_data(
self,
_env: &Env,
) -> FullPaymentData<<Env as TxEnv>::Api>
fn into_full_payment_data( self, _env: &Env, ) -> FullPaymentData<<Env as TxEnv>::Api>
Source§impl<Env> TxPayment<Env> for ManagedVec<<Env as TxEnv>::Api, EsdtTokenPayment<<Env as TxEnv>::Api>>where
Env: TxEnv,
impl<Env> TxPayment<Env> for ManagedVec<<Env as TxEnv>::Api, EsdtTokenPayment<<Env as TxEnv>::Api>>where
Env: TxEnv,
Source§fn is_no_payment(&self, _env: &Env) -> bool
fn is_no_payment(&self, _env: &Env) -> bool
Source§fn perform_transfer_execute(
self,
env: &Env,
to: &ManagedAddress<<Env as TxEnv>::Api>,
gas_limit: u64,
fc: FunctionCall<<Env as TxEnv>::Api>,
)
fn perform_transfer_execute( self, env: &Env, to: &ManagedAddress<<Env as TxEnv>::Api>, gas_limit: u64, fc: FunctionCall<<Env as TxEnv>::Api>, )
Source§fn with_normalized<From, To, F, R>(
self,
env: &Env,
from: &From,
to: To,
fc: FunctionCall<<Env as TxEnv>::Api>,
f: F,
) -> Rwhere
From: TxFrom<Env>,
To: TxToSpecified<Env>,
F: FnOnce(&ManagedAddress<<Env as TxEnv>::Api>, &BigUint<<Env as TxEnv>::Api>, FunctionCall<<Env as TxEnv>::Api>) -> R,
fn with_normalized<From, To, F, R>(
self,
env: &Env,
from: &From,
to: To,
fc: FunctionCall<<Env as TxEnv>::Api>,
f: F,
) -> Rwhere
From: TxFrom<Env>,
To: TxToSpecified<Env>,
F: FnOnce(&ManagedAddress<<Env as TxEnv>::Api>, &BigUint<<Env as TxEnv>::Api>, FunctionCall<<Env as TxEnv>::Api>) -> R,
Source§fn into_full_payment_data(
self,
_env: &Env,
) -> FullPaymentData<<Env as TxEnv>::Api>
fn into_full_payment_data( self, _env: &Env, ) -> FullPaymentData<<Env as TxEnv>::Api>
Source§impl<M, T> TypeAbi for ManagedVec<M, T>
impl<M, T> TypeAbi for ManagedVec<M, T>
type Unmanaged = Vec<<T as TypeAbi>::Unmanaged>
fn type_name_rust() -> String
Source§fn provide_type_descriptions<TDC>(accumulator: &mut TDC)where
TDC: TypeDescriptionContainer,
fn provide_type_descriptions<TDC>(accumulator: &mut TDC)where
TDC: TypeDescriptionContainer,
fn type_names() -> TypeNames
impl<M, T> Eq for ManagedVec<M, T>
impl<Env> TxPaymentMultiEsdt<Env> for &ManagedVec<<Env as TxEnv>::Api, EsdtTokenPayment<<Env as TxEnv>::Api>>where
Env: TxEnv,
impl<Env> TxPaymentMultiEsdt<Env> for ManagedVec<<Env as TxEnv>::Api, EsdtTokenPayment<<Env as TxEnv>::Api>>where
Env: TxEnv,
impl<M, T, U> TypeAbiFrom<ManagedVec<M, U>> for ManagedVec<M, T>
impl<M, T, U> TypeAbiFrom<ManagedVec<M, U>> for Vec<T>
impl<M, T, U> TypeAbiFrom<Vec<U>> for ManagedVec<M, T>
Auto Trait Implementations§
impl<M, T> Freeze for ManagedVec<M, T>
impl<M, T> RefUnwindSafe for ManagedVec<M, T>
impl<M, T> Send for ManagedVec<M, T>
impl<M, T> Sync for ManagedVec<M, T>
impl<M, T> Unpin for ManagedVec<M, T>
impl<M, T> UnwindSafe for ManagedVec<M, T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> InterpretableFrom<&T> for Twhere
T: Clone,
impl<T> InterpretableFrom<&T> for Twhere
T: Clone,
fn interpret_from(from: &T, _context: &InterpreterContext) -> T
Source§impl<T> InterpretableFrom<T> for T
impl<T> InterpretableFrom<T> for T
fn interpret_from(from: T, _context: &InterpreterContext) -> T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> ReconstructableFrom<&T> for Twhere
T: Clone,
impl<T> ReconstructableFrom<&T> for Twhere
T: Clone,
fn reconstruct_from(from: &T, _builder: &ReconstructorContext) -> T
Source§impl<T> ReconstructableFrom<T> for T
impl<T> ReconstructableFrom<T> for T
fn reconstruct_from(from: T, _builder: &ReconstructorContext) -> T
Source§impl<T> SCCodec for Twhere
T: TopEncode,
impl<T> SCCodec for Twhere
T: TopEncode,
fn fmt<F>(&self, f: &mut F)where
F: FormatByteReceiver,
Source§impl<T> TopDecodeMulti for Twhere
T: TopDecode,
impl<T> TopDecodeMulti for Twhere
T: TopDecode,
Source§const IS_SINGLE_VALUE: bool = true
const IS_SINGLE_VALUE: bool = true
fn multi_decode_or_handle_err<I, H>(
input: &mut I,
h: H,
) -> Result<T, <H as DecodeErrorHandler>::HandledErr>where
I: TopDecodeMultiInput,
H: DecodeErrorHandler,
fn multi_decode<I>(input: &mut I) -> Result<Self, DecodeError>where
I: TopDecodeMultiInput,
Source§impl<T> TopDecodeMultiLength for T
impl<T> TopDecodeMultiLength for T
Source§impl<T> TopEncodeMulti for Twhere
T: TopEncode,
impl<T> TopEncodeMulti for Twhere
T: TopEncode,
Source§fn multi_encode_or_handle_err<O, H>(
&self,
output: &mut O,
h: H,
) -> Result<(), <H as EncodeErrorHandler>::HandledErr>where
O: TopEncodeMultiOutput,
H: EncodeErrorHandler,
fn multi_encode_or_handle_err<O, H>(
&self,
output: &mut O,
h: H,
) -> Result<(), <H as EncodeErrorHandler>::HandledErr>where
O: TopEncodeMultiOutput,
H: EncodeErrorHandler,
top_encode
that can handle errors as soon as they occur.
For instance in can exit immediately and make sure that if it returns, it is a success.
By not deferring error handling, this can lead to somewhat smaller bytecode.