pub struct TestTokenIdentifier<'a> { /* private fields */ }
Expand description
Encodes a dummy address, to be used for tests.
It is designed to be usable from contracts (especiall test contracts), with a minimal footprint. For this reason, its inner structure is subject to change.
Implementations§
source§impl<'a> TestTokenIdentifier<'a>
impl<'a> TestTokenIdentifier<'a>
pub const fn new(name: &'a str) -> TestTokenIdentifier<'a>
pub fn eval_to_expr(&self) -> String
Trait Implementations§
source§impl<'a, Env> AnnotatedValue<Env, TokenIdentifier<<Env as TxEnv>::Api>> for TestTokenIdentifier<'a>where
Env: TxEnv,
impl<'a, Env> AnnotatedValue<Env, TokenIdentifier<<Env as TxEnv>::Api>> for TestTokenIdentifier<'a>where
Env: TxEnv,
fn annotation(&self, _env: &Env) -> ManagedBuffer<<Env as TxEnv>::Api>
source§fn to_value(&self, _env: &Env) -> TokenIdentifier<<Env as TxEnv>::Api>
fn to_value(&self, _env: &Env) -> TokenIdentifier<<Env as TxEnv>::Api>
Produces the value from a reference of the annotated type. Might involve a
.clone()
in some cases.source§fn into_value(self, env: &Env) -> T
fn into_value(self, env: &Env) -> T
Consumes annotated value to produce actual value. Read more
source§impl<'a> Clone for TestTokenIdentifier<'a>
impl<'a> Clone for TestTokenIdentifier<'a>
source§fn clone(&self) -> TestTokenIdentifier<'a>
fn clone(&self) -> TestTokenIdentifier<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'a> Debug for TestTokenIdentifier<'a>
impl<'a> Debug for TestTokenIdentifier<'a>
source§impl<'a, Api> From<TestTokenIdentifier<'a>> for TokenIdentifier<Api>where
Api: ManagedTypeApi,
impl<'a, Api> From<TestTokenIdentifier<'a>> for TokenIdentifier<Api>where
Api: ManagedTypeApi,
source§fn from(value: TestTokenIdentifier<'a>) -> TokenIdentifier<Api>
fn from(value: TestTokenIdentifier<'a>) -> TokenIdentifier<Api>
Converts to this type from the input type.
source§impl<'a> PartialEq for TestTokenIdentifier<'a>
impl<'a> PartialEq for TestTokenIdentifier<'a>
source§fn eq(&self, other: &TestTokenIdentifier<'a>) -> bool
fn eq(&self, other: &TestTokenIdentifier<'a>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a> TopEncode for TestTokenIdentifier<'a>
impl<'a> TopEncode for TestTokenIdentifier<'a>
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,
Version of
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,
Attempt to serialize the value to ouput.
impl<'a> Copy for TestTokenIdentifier<'a>
impl<'a> Eq for TestTokenIdentifier<'a>
impl<'a> StructuralPartialEq for TestTokenIdentifier<'a>
impl<'a, M> TypeAbiFrom<&TestTokenIdentifier<'a>> for EgldOrEsdtTokenIdentifier<M>where
M: ManagedTypeApi,
impl<'a, M> TypeAbiFrom<TestTokenIdentifier<'a>> for EgldOrEsdtTokenIdentifier<M>where
M: ManagedTypeApi,
impl<'a, Api> TypeAbiFrom<TestTokenIdentifier<'a>> for TokenIdentifier<Api>where
Api: ManagedTypeApi,
Auto Trait Implementations§
impl<'a> Freeze for TestTokenIdentifier<'a>
impl<'a> RefUnwindSafe for TestTokenIdentifier<'a>
impl<'a> Send for TestTokenIdentifier<'a>
impl<'a> Sync for TestTokenIdentifier<'a>
impl<'a> Unpin for TestTokenIdentifier<'a>
impl<'a> UnwindSafe for TestTokenIdentifier<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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
Compare self to
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>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read 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> 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,
Version of
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 multi_encode<O>(&self, output: &mut O) -> Result<(), EncodeError>where
O: TopEncodeMultiOutput,
fn multi_encode<O>(&self, output: &mut O) -> Result<(), EncodeError>where
O: TopEncodeMultiOutput,
Attempt to serialize the value to ouput.