pub struct TxFunctionName(/* private fields */);
Expand description
Contains a SC function name (endpoint, “init”, etc.)
Can be initialized statically and we can make constants out of it.
Implementations§
Source§impl TxFunctionName
impl TxFunctionName
Sourcepub const EMPTY: TxFunctionName
pub const EMPTY: TxFunctionName
No SC transaction.
Sourcepub const INIT: TxFunctionName
pub const INIT: TxFunctionName
The constructor name of any smart contract.
Sourcepub const UPGRADE: TxFunctionName
pub const UPGRADE: TxFunctionName
Gets called exactly once when upgrading to a new version of a smart contract. Can be viewed as an “upgrade constructor”.
Sourcepub const CALLBACK: TxFunctionName
pub const CALLBACK: TxFunctionName
The the legacy async central callback name of any smart contract.
Sourcepub const WHITEBOX_CALL: TxFunctionName
pub const WHITEBOX_CALL: TxFunctionName
Not a real function name (in fact it is an illegal name), just a flag to mark whitebox calls.
pub const fn from_static(name: &'static str) -> Self
pub fn is_empty(&self) -> bool
pub fn into_string(self) -> String
pub fn into_bytes(self) -> Vec<u8> ⓘ
pub fn to_bytes(&self) -> Vec<u8> ⓘ
pub fn as_str(&self) -> &str
Trait Implementations§
Source§impl Clone for TxFunctionName
impl Clone for TxFunctionName
Source§fn clone(&self) -> TxFunctionName
fn clone(&self) -> TxFunctionName
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 Debug for TxFunctionName
impl Debug for TxFunctionName
Source§impl Default for TxFunctionName
impl Default for TxFunctionName
Source§fn default() -> TxFunctionName
fn default() -> TxFunctionName
Returns the “default value” for a type. Read more
Source§impl Display for TxFunctionName
impl Display for TxFunctionName
Source§impl From<&[u8]> for TxFunctionName
impl From<&[u8]> for TxFunctionName
Source§impl From<&str> for TxFunctionName
impl From<&str> for TxFunctionName
Source§impl From<String> for TxFunctionName
impl From<String> for TxFunctionName
Source§impl PartialEq for TxFunctionName
impl PartialEq for TxFunctionName
impl Eq for TxFunctionName
impl StructuralPartialEq for TxFunctionName
Auto Trait Implementations§
impl Freeze for TxFunctionName
impl RefUnwindSafe for TxFunctionName
impl Send for TxFunctionName
impl Sync for TxFunctionName
impl Unpin for TxFunctionName
impl UnwindSafe for TxFunctionName
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: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more