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