Struct concordium_std::ReceiveName
source · [−]#[repr(transparent)]pub struct ReceiveName<'a>(_);
Expand description
A receive name. Expected format: “<contract_name>.<func_name>”.
Implementations
sourceimpl<'a> ReceiveName<'a>
impl<'a> ReceiveName<'a>
sourcepub fn new(name: &'a str) -> Result<ReceiveName<'a>, NewReceiveNameError>
pub fn new(name: &'a str) -> Result<ReceiveName<'a>, NewReceiveNameError>
Create a new ReceiveName and check the format. Expected format: “<contract_name>.<func_name>”.
sourcepub fn new_unchecked(name: &'a str) -> ReceiveName<'a>
pub fn new_unchecked(name: &'a str) -> ReceiveName<'a>
Create a new ReceiveName without checking the format. Expected format: “<contract_name>.<func_name>”.
sourcepub fn get_chain_name(self) -> &'a str
pub fn get_chain_name(self) -> &'a str
Get receive name used on chain: “<contract_name>.<func_name>”.
sourcepub fn to_owned(self) -> OwnedReceiveName
pub fn to_owned(self) -> OwnedReceiveName
Convert a ReceiveName
to its owned counterpart. This is an expensive
operation that requires memory allocation.
sourcepub fn contract_name(self) -> &'a str
pub fn contract_name(self) -> &'a str
Extract the contract name by splitting at the first dot.
sourcepub fn entrypoint_name(self) -> EntrypointName<'a>
pub fn entrypoint_name(self) -> EntrypointName<'a>
Extract the entrypoint name by splitting at the first dot.
sourcepub fn is_valid_receive_name(name: &str) -> Result<(), NewReceiveNameError>
pub fn is_valid_receive_name(name: &str) -> Result<(), NewReceiveNameError>
Check whether the given string is a valid contract receive function name. This is the case if and only if
- the string is no more than constants::MAX_FUNC_NAME_SIZE bytes
- the string contains a
.
- all characters are ascii alphanumeric or punctuation characters.
Trait Implementations
sourceimpl<'a> Clone for ReceiveName<'a>
impl<'a> Clone for ReceiveName<'a>
sourcefn clone(&self) -> ReceiveName<'a>
fn clone(&self) -> ReceiveName<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'a> Debug for ReceiveName<'a>
impl<'a> Debug for ReceiveName<'a>
sourceimpl<'a> Hash for ReceiveName<'a>
impl<'a> Hash for ReceiveName<'a>
sourceimpl<'a> PartialEq<ReceiveName<'a>> for ReceiveName<'a>
impl<'a> PartialEq<ReceiveName<'a>> for ReceiveName<'a>
sourcefn eq(&self, other: &ReceiveName<'a>) -> bool
fn eq(&self, other: &ReceiveName<'a>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl<'a> Serial for ReceiveName<'a>
impl<'a> Serial for ReceiveName<'a>
impl<'a> Copy for ReceiveName<'a>
impl<'a> Eq for ReceiveName<'a>
impl<'a> StructuralEq for ReceiveName<'a>
impl<'a> StructuralPartialEq for ReceiveName<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for ReceiveName<'a>
impl<'a> Send for ReceiveName<'a>
impl<'a> Sync for ReceiveName<'a>
impl<'a> Unpin for ReceiveName<'a>
impl<'a> UnwindSafe for ReceiveName<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more